dirkwhoffmann / virtualc64

VirtualC64 is a cycle-accurate C64 emulator for macOS
https://dirkwhoffmann.github.io/virtualc64
Other
356 stars 33 forks source link

CIA/cia-timer.prg fails for new CIAs #436

Closed dirkwhoffmann closed 6 years ago

dirkwhoffmann commented 6 years ago
bildschirmfoto 2018-10-04 um 07 49 07
dirkwhoffmann commented 6 years ago
bildschirmfoto 2018-10-05 um 17 37 37

That was an easy one. The old CIAs (NMOS technology) are affected by a race condition which is known as "Timer B bug". It prevents the IRQ bit in the ICR register being set for timer B, if the ICR register is read at the same time. The new CIA chips (HMOS II technology) don't seem to be affected by this "bug", because disabling the bug emulation code is enough to make the VICE test pass.

Alessandro1970 commented 6 years ago

What am I wrong? It does not work for me

schermata 2018-10-07 alle 10 52 18
dirkwhoffmann commented 6 years ago

This test is broken now. 🙁

dirkwhoffmann commented 6 years ago

3.0 beta 3 should fix it:

http://www.dirkwhoffmann.de/virtualC64/VirtualC64_3.0_beta3.zip

BTW, thanks again to David Horrocks (Hoxs64). I shamelessly adapted his solution for this problem.