Open ReiquelApplegate opened 4 weeks ago
SlowROM and FastROM do not change the cpu clock itself but the ROM access speed; this still has the effect of slowing down execution but doesn’t impact other timing. Specifically the cpu inserts additional wait states when accessing slow ROM to give it chance to stabilise.
CPU::wait can return either 6, 8, or 12. Aren't those the number of master cycles a single CPU cycle takes?
The first branch in wait specifically takes romspeed into account; where romspeed is set to the number of wait states configured for the memory region.
Yes but shouldn't the comment instead read:
//one PPU dot = 4 master cycles . // //PPU dots 323 and 327 are 6 master cycles long.
This quote from the emu author is why I think that:
(for others: a cycle is 6, 8 or 12 master clocks depending on the memory area and FastROM setting)
source: https://forums.nesdev.org/viewtopic.php?p=104265#p104265
In ares/sfc/ppu/counter/inline.hpp:
According to fullsnes the dot clock is the master clock divided by 4, not the cpu clock divided by 4. If it were the cpu clock wouldn't switching between fastrom/slowrom change how many dots appear on a scanline?