Hi. I'm trying to figure this out.
So I:
1. Set the bit 5 at $4200 for vertical interrupt
2. Set the line to stop at $4209-a
3. Then in the irq handler subroutine, I read $4211,
"and #$80" until it is zero?
This gets me a blank screen.
Thank you for your help in advance.
Proper way to acknowledge irq
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: Proper way to acknowledge irq
Also, are you using a debugging emulator?fullSNES § PPU interrupts wrote: 4211h - TIMEUP - H/V-Timer IRQ Flag (R) (Read/Ack)The IRQ flag is automatically reset after reading from this register (except when reading at the very time when the IRQ condition is true (which lasts for 4-8 master cycles), then the CPU receives bit7=1, but register bit7 isn't cleared). The flag is also automatically cleared when disabling IRQs (by setting 4200h.Bit5-4 to zero).Code: Select all
7 H/V-Count Timer IRQ Flag (0=None, 1=Interrupt Request) 6-0 Not used
Unlike NMI handlers, IRQ handlers MUST acknowledge IRQs, otherwise the IRQ gets executed again (ie. immediately after the RTI opcode).