.KillCustomScreen SEI \ Disable interrupts so we can update the interrupt \ vector and VIA LDA irq1Address \ Set the IRQ1V vector to irq1Address, which removes the STA IRQ1V \ custom screen interrupt handler from the chain LDA irq1Address+1 STA IRQ1V+1 LDA #%01000000 \ Set 6522 User VIA interrupt enable register IER STA VIA+&6E \ (SHEILA &4E) bit 6 (i.e. disable the Timer1 interrupt \ from the User VIA, as we no longer need it) CLI \ Re-enable interrupts JSR FlushSoundBuffers \ Flush all four sound channel buffers \ Fall through into SetScreenMode7 to switch to mode 7Name: KillCustomScreen [Show more] Type: Subroutine Category: Screen mode Summary: Disable the custom screen mode and switch to mode 7 Deep dive: Hidden secrets of the custom screen modeContext: See this subroutine in context in the source code References: This subroutine is called as follows: * MainDrivingLoop (Part 5 of 5) calls KillCustomScreen
[X]
Subroutine FlushSoundBuffers (category: Sound)
Flush all four specified sound buffers
[X]
Configuration variable IRQ1V = &0204
The IRQ1V vector that we intercept to implement the screen mode
[X]
Configuration variable VIA = &FE00
Memory-mapped space for accessing internal hardware, such as the video ULA, 6845 CRTC and 6522 VIAs (also known as SHEILA)
[X]
Variable irq1Address (category: Screen mode)
Stores the previous value of IRQ1V before we install our custom IRQ handler