I've been passively working on a NES emulator. I find it a very useful way to expand on my knowledge of NES programming. I've read documents here and on the wiki,but I am essentially still in the design phase. (I have the cpu done, and am ready to start the ppu)
I have some questions for the people on here who have built and rebuilt their own emulators on some of the strategies they used, and on what they wish they had done differently.
How do your organize the management of the memory accessable by the CPU? What I had first done was to simply allocate 0x10000 bytes and allow the CPU to directly access it through array accesses. As I move toward the PPU, I see that this is not a good approach since asking for something like the joypad IO mapped memory needs to be handled completey differently.
Is the smarter approach to keep all the CPU memory in a MemoryManager class, and have it intercept all the reads and writes. (I think yes). Then subclass or augment this when mappers are introduced.
Should PPU memory, palette, etc.. be managed by a memorymanager class, or is it fine just to control this via a PPU class?
I hve a ton more questions, but they can wait until I've gotten further in my design and implementation.
Al
I have some questions for the people on here who have built and rebuilt their own emulators on some of the strategies they used, and on what they wish they had done differently.
How do your organize the management of the memory accessable by the CPU? What I had first done was to simply allocate 0x10000 bytes and allow the CPU to directly access it through array accesses. As I move toward the PPU, I see that this is not a good approach since asking for something like the joypad IO mapped memory needs to be handled completey differently.
Is the smarter approach to keep all the CPU memory in a MemoryManager class, and have it intercept all the reads and writes. (I think yes). Then subclass or augment this when mappers are introduced.
Should PPU memory, palette, etc.. be managed by a memorymanager class, or is it fine just to control this via a PPU class?
I hve a ton more questions, but they can wait until I've gotten further in my design and implementation.
Al