Re: Unexpected IRQ behaviour on a VIC-20

From: smf <smf_at_null.net>
Date: Sat, 29 Jul 2017 14:17:34 +0100
Message-ID: <7ffe0eb9-5500-751c-0903-f1ff66ca663e@null.net>
NMI is $0318, brk is $0316

sei before rti won't work even with an irq, because rti pops the 
interrupt state from the stack and that will have the interrupt enabled. 
You could modify the value on the stack if you want to disable irq's 
after an interrupt has occurred.

when you lower ca1 then the 6522 should lower the 6502's nmi input, 
which will trigger your routine. Until you read from the data register 
then it should be impossible to trigger the nmi again. The cpu's nmi's 
can't be masked, even when you're in the middle of an nmi routine. So 
I'm at a loss what you're seeing and why, which might be down to only 
having a snippet of your code.

You should probably hack your hardware change into an emulator and run 
your code through that, because then you can see exactly what it's 
doing. Have you disabled vblank/timer irq's? You seem to be jumping into 
the same code for both irq & nmi and that could be confusing if they are 
still enabled.

On 29/07/2017 08:37, Baltissen, GJPAA (Ruud) wrote:
> The NMI doesn't push anything at all to stack before doing a "jmp 
> ($0316)".


       Message was sent through the cbm-hackers mailing list
Received on 2017-07-29 14:00:08

Archive generated by hypermail 2.2.0.