whscullin / apple2js

An Apple II emulator originally written in Javascript, now being converted to TypeScript
http://www.scullinsteel.com/apple2/
MIT License
438 stars 57 forks source link

ThunderClock is not interrupting. #169

Open jumbothecomdian opened 1 year ago

jumbothecomdian commented 1 year ago

I've been playing around with the ThunderClock card. The following program is expected to increase the variable cnt. This is per the examples given here.

 100 D$ =  CHR$ (4)
 110  PRINT D$"BLOAD TCPUTIL"
 120 LCNT = 768
 130 HCNT = 769
 140 SLOTNO = 770
 150 GTSLOT = 775
 160 STROBE = 817
 170 ZERO = 833
 180 IGO = 877
 190 IHLT = 897
 200 ENABLE = 895
 210 DISABLE = 905
 220 SOUND = 907
 230 MUTE = 911
 290  CALL GTSLOT
 300  CALL IGO
 310  CALL ZERO
 320  CALL STROBE
 330 CNT =  PEEK (HCNT) * 256 +  PEEK (LCNT)
 340  PRINT CNT
 350  GOTO 320

When ran, the variable cnt is resultant in 0. I then ran some diagnostics disks. When running the ThunderClock test program provided on the ThunderClock disk, it simply reports that, "the ThunderClock in slot #5 has a problem." The Basic commands to get the time works but the commands to set the time do not. When running the supplied demo program on the ThunderClock Disk, the options to set the interrupt rate and time both result in undefined behavior. Setting the clock manually with my own program does not work either. Maybe there is something I am missing?

whscullin commented 1 year ago

The Thunderclock implementation is read only, and only reports the system time. It mainly reports itself as a Thunderclock (and uses the Thunderclock ROM) because that allows it to work as a clock with ProDOS out of the box. I could certainly consider building out the other features - I assume you're mostly interested in interrupts? I'm not sure of the value of being able to set the time, but maybe I'm missing something.

jumbothecomdian commented 1 year ago

I am mainly interested in the interrupts, yes. I mentioned the other features because I was exploring them too.