gameroy icon indicating copy to clipboard operation
gameroy copied to clipboard

Subcycle accuracy

Open Rodrigodd opened this issue 10 months ago • 1 comments

@Rodrigodd Hi! Do you think it is possible to add support for sub-cycle accuracy to the JIT emulator?

@Rodrigodd I mean, even more emulation accuracy than cycle accuracy. More details: https://emulation.gametechwiki.com/index.php/Emulation_accuracy#Subcycle_accuracy For example, BeesNES emulator implements sub-cycle accuracy.

Originally posted by @medovy in #8

Rodrigodd avatar Feb 04 '25 11:02 Rodrigodd

@medovy Yes, the JIT compiler can be sub-cycle accurate. Both the Interpreter and the JIT compiler keep track of how many cycles each operation takes, if sub-cycle accuracy is limited to having behavior on both the rising and falling edges of the clock, it is just a question of doubling the precision that I measure the number of cycles.

I cannot recall any accuracy tests that requires sub-cycle accuracy. Even if there is, is not easy to reach the conclusion that the behavior we see is sub-cycle in nature.

And by the way, I am working on getting https://github.com/msinger/dmg-sim to run with https://github.com/emu-russia/dmgcpu, which will be a gate-level emulation of the GameBoy. This will hopefully solve that problem.

Rodrigodd avatar Feb 04 '25 11:02 Rodrigodd