Horizontal Interruption Mystery
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
Horizontal Interruption Mystery
After trying to dig a bit deeper into VDP's horizontal interruption I found an interesting thing: when you enable horizontal interruption in the reg #0 one interrupt is fired immediately after that and another interrupt happens as expected with the delay set in the reg #10. Does anyone have any ideas what can it be?
-
- Very interested
- Posts: 616
- Joined: Thu Nov 30, 2006 6:30 am
Re: Horizontal Interruption Mystery
Both horizontal and vertical interrupts have an interrupt pending flag. This flag gets set if the necessary condition (hint counter expiring/end of frame) is hit even if the corresponding interrupt is disabled. If the interrupt is enabled when the pending flag is already set, it will fire almost immediately. Short of switching to Mode 4 and reading the status port, there is no way to manually clear these flags once set.
-
- Very interested
- Posts: 158
- Joined: Sat May 12, 2012 7:37 pm
- Location: Ukraine
Re: Horizontal Interruption Mystery
Thanks for the interesting information!