[Coco] MAME Interrupt Bug
Glen Hewlett
glen.hewlett at sympatico.ca
Sat Mar 18 11:11:41 EDT 2017
> On Mar 18, 2017, at 10:38 AM, tim lindner <tlindner at macmess.org> wrote:
>
> 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?
Hi Tim,
Yes that is what seemed to have been happening. The code above would cause MAME emulation of the CoCo3 to crash but on a real CoCo3 it was OK. When I changed the above bit of code from:
> 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
To:
> 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 $FF92
Then the code works under MAME emulation properly. I also changed to the bit of code at the end of the CC stack blasting similarly.
I think I should write a little example code that proves this again so others can test this bug if this really is a bug in MAME or if it’s just me.
Cheers,
Glen
>
> --
> --
> tim lindner
>
> "Proper User Policy apparently means Simon Says."
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list