[Coco] MAME Interrupt Bug

tim lindner tlindner at macmess.org
Sat Mar 18 10:38:19 EDT 2017


On Fri, Mar 17, 2017 at 7:54 PM, Glen Hewlett <glen.hewlett at sympatico.ca> wrote:
> On Mar 17, 2017, at 3:57 PM, William Astle <lost at l-w.ca> wrote:
>> On 2017-03-17 01:35 PM, Glen Hewlett wrote:
>>> The code below doesn’t work on the latest MAME (0.183) but it does work on a real CoCo3.
>>> I have a feeling that MAME doesn’t handle turning off all the interrupts very well.  Maybe it’s
>>> me, I’ll have to investigate this more as I’ve been using MAME to test my code for the last six
>>> months and this is the first time I’ve had an issue with it.

>> It might be that you're getting a spurious interrupt in MAME after disabling the GIME IRQ.
>> Reading FF92 immediately after disabling everything would clear that.

> You Rock!  You were totally correct that MAME was having trouble when I disabled the
> GIME IRQ and then disabled the IRQ.  I tried it as you described and only disabled
> the GIME IRQ and reading $FF92 and it now works fine with MAME.  I’m really glad to
> have the code running on MAME again.  :)


Let me see if I understand this.


LDA     #%01001100              *
        STA     $FF90                   * CoCo 3 Mode, MMU Enabled,
GIME IRQ Disabled, GIME FIRQ Disabled, Vector RAM at FEXX enabled,
Standard SCS Normal, ROM Map 16k Int, 16k
        LDA     #%00000000              * $00 - disable all interrupts
        STA     $FF92                   * Disable all Interrupts


The above code would disable interrupts on a real CoCo and a MAME.

But on MAME when stack blasting caused the CC reg to enable
interrupts, an interrupt would erroneously be taken?

-- 
--
tim lindner

"Proper User Policy apparently means Simon Says."


More information about the Coco mailing list