[Coco] Interrupt Confusion
Roger Taylor
rtaylor at bayou.com
Mon Jan 12 00:40:06 EST 2004
Here's what's going on - I revised the interrupt code in Mocha to work
>>>according to the rules as I understand them (I had known it wasn't
>>>right but most stuff still worked). As a result, the Cyrus Chess
>>>program stopped processing keystrokes. I found if I set bit 7 of
>>>0xff03 after an interrupt but ONLY when the CC IRQ mask was on, the
>>>program would work fine. Before that, I was setting bit 7 as soon as
>>>mocha fired the IRQ (regardless of the state of CC register). I
>>>thought that fixed everything until...
>>>
>>>"Temple Of ROM" now breaks. If I turn on bit 7 of 0xff03 everytime I
>>>fire an IRQ regardless of the CC register's IRQ mask, TOR will work
>>>but Cyrus breaks! In TOR, it appears the CC IRQ mask is always on
>>>meaning the 6809 isn't processing IRQs but the program is somehow
>>>dependent on bit 7 of 0xff03 being handled as if IRQs were firing.
>>>What's going on?
To the best of my knowledge, bit 7 of 65283 should be going high 60 times a
second no matter if you have the CPU IRQ masked or not.
The game that seems to be dependant on bit 7 of 65283 is probably manually
checking this bit to see when the 60hz refresh signal is occuring. A
typical VSYNC call might be:
vsync tst 65283
bpl vsync
rts
Why one game works while the other breaks, and vice-versa, is beyond
me. It sounds like something else is not being handled correctly.
----------
Roger Taylor
More information about the Coco
mailing list