Hi folks!
I have my CPU and PPU background rendering implemented and I can run Donkey Kong and see its menu transition to the game map and see donkey kong.
However, the game is extremely slow. I measured the game loop and it executes fast (both the clocking of the system PPU and CPU and the SDL rendering). The main game loop does the following on average in time:
- system clock (cpu/ppu clocks + NMI): 900ns on average
- rendering: 487200ns when a frame is complete draw
- event processing: 9800ns
So that leads me to believe I am stuck in some subroutine more time than I should in terms of clock ticks.
Here is a demo of what I see:
https://drive.google.com/file/d/19DFxr3 ... sp=sharing
Stuck in unecessary subroutine loops
Moderator: Moderators
Re: Stuck in unecessary subroutine loops
I'm not sure exactly what those numbers are supposed to mean, but if you want to emulate at full speed then the CPU needs to take less than 559ns to emulate a single cycle; similarly, the PPU needs to take less than 186ns per cycle on average.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
P.S. If you don't get this note, let me know and I'll write you another.
Re: Stuck in unecessary subroutine loops
Thx Quietust, ended up being a bug with an SDL version where polling for events was way too slow.