dirkwhoffmann / virtualc64

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

C64/autostart/defaults/test.prg #678

Closed dirkwhoffmann closed 3 years ago

dirkwhoffmann commented 3 years ago

Good news first: The test succeeds when run via the regression script:

Bildschirmfoto 2021-05-13 um 13 42 31

When run manually (directly after power up), it fails:

Bildschirmfoto 2021-05-13 um 13 43 02

TODO: Check where the 79 comes from...

dirkwhoffmann commented 3 years ago

TODO: Check where the 79 comes from...

Solved. The upper bit of the "9" is the light pen interrupt bit. Commodore had the tendency to wire multiple lines together, and the light pen line is no exception. It shares a connection with the keyboard matrix which means that a light pen interrupt is signalled when certain keys are pressed. One key is the SPACE key which solves the issue here. In the regression script, the program is loaded via LOAD"TEST",8 (without space) whereas in my manual experiment, the test was loaded via LOAD "TEST",8 (with space).