-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
With commit 4372a45 I started to rework the interface between emulator and ppu. At the moment the ppu is defined by a big structure containing all the internals states, references to the emulator and references to the actual video output.
When playing around with different ideas for ppu optimizations things started to get complicated so here is a proposal to solve this issue:
- The only interface the emulator is getting to the ppu is via function pointers for read and write ppu registers and reset the ppu.
- An additional
void *reference is here to point to the internal ppu data structure. The emulator don't need to have any knowledge about it. - The ppu will be initialized outside of the emulator and is a module of it's own. No matter what the output looks like or which internal optimizations are used (fpga implementation, opengl buffering, ...) it's all up to the implementation.
- This separation helps to clean up
nes.cwhich is holding a lot of ppu centric functionality. - Different ppu implementations can share same functionality
The separation is work in progress. Missing is clean up of nes.c and adapting ppu_pixel_based.c (renamed to ppu_caching.c). The same separation makes sense for APU and controller input as well.
What do you think? @GorgonMeducer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels