Login
Back to forumSee the full topicGo to last reply

Posted By

Mad
on 2020-11-30
20:28:54
 Re: Cartridge and raster interrupts

did you set $ff0a right (ora #$02 for rasterinterrupt) and ff0a rasterline highbit ff0b rasterline low 8 bits. then you need an lda $ff09 and sta $ff09 at end of the interrupt.. It's also good to use lda $ff09 sta $ff09 after setting $fffe/$fffe in the main programm before the cli.

A typical interrupt setup would look like:

irqsetup:
sei
lda #myirq & 255
sta $fffe
lda #myirq / 256
sta $ffff
lda #64
sta $ff0b
lda #$02
sta $ff0a
lda $ff09
sta $ff09
cli
rts


and myirq would look like:
myirq:
pha
inc $ff19
lda $ff09
sta $ff09
pla
rti


I didn't try it but this should keep changing the border color in rasterline 64.. If you want a rasterline above 256 (only pal) ff0a would need a lda #$03 instead of lda #$02..

Some people use inc $ff09 or dec $ff09 but this gave problems with nested interrupts for me (whyever that was), so I don't use it anymore.

This has nothing to do with the normal way interrupts occur in basic and so on. It's just you taking the total control of the interrupt execution, so that only your routine is handled and nothing basic or kernel related. So for instance the basic split screen functionality and so on is not usable anymore afterwards most probably command prompt keyboard access (+currently typed in character screen printing) is also disabled then.. Most probably everything is frozen of the kernal/basic stuff..



Back to top


Copyright © Plus/4 World Team, 2001-2024