Supersnaphots for Amstrad CPC

With the command line option -remu, RASM is able to compile both RAM and ROM (lower and up to 256 upper ROM). Used with an emulator which can handle super snapshot, breakpoints will be located precisely anywhere without confusion between RAM and ROM. Labels will benefit the same advantages. No more glitches!

3 new chunks were created : LOWR, RMxx et REMU

chunk LOWR

This chunk contains lower ROM data for a size up to 16384 bytes. Data may be RLE crunched like snapshot v3 memory.

chunk RMxx (with xx as an hexadecimal value from #00 to #FF)

There can be up to 256 RM chunks, xx indicates which ROM slot is concerned. Like LOWR and MEM chunks, data may be RLE crunched.

chunk REMU

REMU chunk contains debug informations to be used by an emulator. This chunk is pure ASCII to handle easily features and upgrades. It's barely a list of tags+parameters. You must consider each field separated by a semicolon. Each unsupported tag may be skipped.

rombrk tag

rombrk is a ROM breakpoint. It has 2 parameters: logical address and ROM number. From 0 to 255 for an upper ROM and 256 for the lower ROM.

breakpoint example, in order to break at machine power ON:

rombrk 0 256; lower ROM, logical address #0000

brk tag

brk is a RAM breakpoint, It has 2 parameters like rombrk tag: Logical address and RAM bank. This breakpoint will be triggered only if the mapping fit the logical address.

romlabel and label tags

romlabel and label tags indicated where a label is located: RAM or ROM and his logical address. This is very similar to breakpoints tags

romcomz and label comz

romcomz and comz tags indicated where a comment is located: RAM or ROM and his logical address. This is very similar to breakpoints tags

alias tag

This tag let you export some values. The emulator may use the values anywhere. This tag has only one parameter.

Evolution of supersnapshots for the ACE-DL emulator

This program declares labels located at the same logical addresses #0000 and #C000 and then connects, executes and disconnects the ROMs then performs an identical jump at the very same address in RAM.
Thanks to the extended information, the emulator can determine which label to display in the trace without getting tangled up.

buildsna

;******* ram code definition ********
bankset 0

org 0
ram0000
jp backfromram0

org #4000
run #4000

start4000       brk
selectupper     ld bc,#DF09 : out (c),c
.connectupper   ld bc,#7F80+%0100 : out (c),c
gotoupper       jp #C000

backfromupper   nop
disconnectupper ld bc,#7F80+%1100 : out (c),c
gotoecran       jp #C000

backfromecran   nop
connectlower    ld bc,#7F80+%1000 : out (c),c
gotolower       jp 0

backfromlower   nop
disablerom      ld bc,#7F80+%1100 : out (c),c
gotoram0        jp 0

backfromram0    nop

selectupper10   ld bc,#DF0A : out (c),c
.connectupper   ld bc,#7F80+%0100 : out (c),c
copyto8000      ld hl,#C000 : ld de,#8000 : ld bc,16 : ldir
goto8000        jp #8000

backfromcopy8000 nop
testend         jr testend ; infinite loop                                                                                                                                  

org #C000                                                                                                                                                                   
ecranC000 jp backfromecran                                                                                                                                                  

;******* rom code definition ********

rombank lower
org 0
lower0000 jp backfromlower

rombank 9
org #C000 ; do not forget to specify the logical address before your ROM code
upperC000 jp backfromupper

rombank 10
org #8000
label local
romcopy8000 jp backfromcopy8000
label global
Sauf mention contraire, le contenu de cette page est protégé par la licence Creative Commons Attribution-ShareAlike 3.0 License