sjasmplus
sjasmplus copied to clipboard
Add "ROM"-numbered memory page to the total pool of memory for all devices
Currently any DEVICE
has only "RAM" type of memory pool for PAGE
directive, but sometimes it may be handy to define symbols in "ROM" page for various symbol-export reasons (LABELSLIST
, CSPECTMAP
, SLD file).
I guess something like PAGE -1
(-2, -3, ... for devices where it makes sense to provide larger ROM space, like Next needs at least two 8kiB pages) can be added, PAGE 255
may clash with super-size devices (not sure if sjasmplus already has some with more than 256 pages, I think there is 4MB or 8MB "spectrum" device which has more than 256 pages).
Also consider extended EQU
syntax for explicit mem-page definition for special cases when current mapping is not good enough... like:
MySymbol EQU $C000, 123 ; $$MySymbol == 123
(This is related to partially fixed #111)
First try failed:
doing it like "-4 .. -1" pages just shifting internally everything by +4 doesn't fare well with absolute offsets/addresses allowed by savedev
and savenex
.
I guess the "ROMs" could rather use some hard constant like +0x7000 to pageNumber and +0x43210000 to memory offsets (limiting future device maximum RAM size to ~1GiB max by offset and ~400MiB by page number for 16kiB pages) ("strange numbers" to make them easy to remember) - and have completely separate detection of these and recalculating them into "virtual rom" memory.