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

Address mapping - do it right #23

Closed
7 of 9 tasks
ddrcode opened this issue Sep 30, 2023 · 0 comments · Fixed by #28
Closed
7 of 9 tasks

Address mapping - do it right #23

ddrcode opened this issue Sep 30, 2023 · 0 comments · Fixed by #28
Labels
6502 The issue is related to core 6502 emulator C64 C64-specific issue

Comments

@ddrcode
Copy link
Owner

ddrcode commented Sep 30, 2023

Some form of addreess mapping is currently implemented as a bunch of if conditions.
Let's abstract it properly.

Tasks

  • Any adress-bus attached device can't be accessed directly. The only way to interact with should be via machine's get_byte, set_byte methods (perhaps worth renaming to read_byte / write_byte)
  • read_word / write_word are just a convenience functions on machine level, not on memory-device
  • unit tests!
  • get rid of the current concept of Memory struct that has rom/rom fields. Separate them!
  • the minimalistic implementation (MOS6502_Machine) - that cen be considered as implementation of Default trait, should consist of 64kB of RAM and 6-bytes ROM for reset/irq/nmi vectors. Don't hardcoded vector addresses anymore on machine's start function.
  • for C64 implement at least a primitive version of PLA-82S100 - the memory "bus" logic
  • on C64 level connect CIA, RAM, ROM and VIC_II via memory address bus and don't refer to them directly from C64 logic.
  • Make the proper use of Byte 0, that may prevent writing access at some occasions
  • (optional) would be great to have debugger being aware of the source of data

References:

@ddrcode ddrcode added 6502 The issue is related to core 6502 emulator C64 C64-specific issue labels Sep 30, 2023
@ddrcode ddrcode added this to the MVP (of course) milestone Sep 30, 2023
@ddrcode ddrcode mentioned this issue Sep 30, 2023
5 tasks
@ddrcode ddrcode linked a pull request Oct 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6502 The issue is related to core 6502 emulator C64 C64-specific issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant