Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "ROM"-numbered memory page to the total pool of memory for all devices #112

Open
ped7g opened this issue Jul 3, 2020 · 1 comment
Open

Comments

@ped7g
Copy link
Collaborator

ped7g commented Jul 3, 2020

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)

@ped7g ped7g self-assigned this Aug 8, 2020
@ped7g
Copy link
Collaborator Author

ped7g commented Aug 10, 2020

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.

@ped7g ped7g removed their assignment Aug 10, 2020
ped7g added a commit to ped7g/sjasmplus that referenced this issue Aug 16, 2020
* master: (27 commits)
  CI: update remote-curl script to target the stable 1.17.0 source
  v1.17.0 release prepared third time...
  Z80: adding warning to `out (c),0` usage about being unstable on CMOS
chips
  tests: extending test of new $$$ and $$$$ with the new EQU syntax test
  v1.17.0 release prepared second time...
  ubsan: fix unaligned casts in SAVENEX code
  ubsan: fix some undefined behaviour constructs where possible
  asan: fix memory-use-after-scope in Lua error reporting
  memory-leaks: hunting down `delete[]` in directives.cpp
  memory-leaks: hunting down leak reported in ValidateLabel, but no
success
  memory-leaks: fix missing `delete[]` on file names in case of syntax
errors
  v1.17.0 release prepared
  docs: refresh with v1.17.0 release, multi-line STRUCT init and EQU
page number
  EQU: z00m128#112 related - allow optional explicit pageNumber for EQU
definitions
  docs: refresh with new $$$ and $$$$ operators info.
  DISP: fix z00m128#118 - adding new aliases for physical address and page
inside DISP
  docs: refresh structures docs with new TEXT field description (z00m128#93)
  struct: fix z00m128#93 final cleanup of tests and adding example for docs
  struct: z00m128#93 raise the maximum "TEXT" length to 8192
  struct: z00m128#93 limiting multi-line scope when inside macros
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant