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

Advanced Memory Models #478

Open
drcjt opened this issue Apr 19, 2024 · 0 comments
Open

Advanced Memory Models #478

drcjt opened this issue Apr 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@drcjt
Copy link
Owner

drcjt commented Apr 19, 2024

The Z80 has an address bus of 16 bits limiting memory access to 64k. Some retro and modern computers support more than 64k of RAM, typically via bank switching.

There are two ways in which RAM beyond 64k could be used in CSharp-80:

  • Increased space for the compiled C# program itself. This could be achieved by assigning compiled method code to memory banks and bank switching on calls to the methods.
  • Increased space for the heap. This would require a change in the representation of reference types which are currently just 16 bit pointers into the heap. Adopting an approach of splitting the 16 bit pointer into part that determines the bank and the remainder that determines the location within the bank is a possibility. There may be some issues with the size of banks limiting the maximum size of heap objects though.

Some examples of Z80 computers with support for more than 64k of RAM:

  • ZX Spectrum 128
  • TRS-80 Model 4
  • MSX
  • ZX-Sprinter
  • ZX Evolution
@drcjt drcjt added the enhancement New feature or request label Apr 19, 2024
@drcjt drcjt mentioned this issue Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant