Login
Back to forumSee the full topicGo to last reply

Posted By

Verona
on 2024-02-25
07:39:20
 Re: Need help with raster interrupt

I use it this way:
(But I not use ROM at all, so you must modify it to your needs)

irq_start_point:
php
pha
txa
pha
tya
pha

lda $FF09
and #$02
bne raster_irq
jmp notraszter

raster_irq:
sta $FF09
lda $FF1C
and #1
beq not_hi_bit
jmp hi_bit_on

not_hi_bit:
lda $FF0A
and #255
ora #2
sta $FF0A

rrirq_start:

... Here comes what I do when raster IRQ happens.
An example:

lda $FF1D
rrirq_1:
cmp #22//22
bcc first_line_jobs
rrirq_2:
cmp #54
bcc second line jobs

...

jmp title_hi_bit_on

first_line_jobs:

...

second_line_jobs:

....

hi_bit_on:

lda $FF0A
and #255
ora #2
sta $FF0A

notraster:

pla
tay
pla
tax
pla
plp
rti



Back to top


Copyright © Plus/4 World Team, 2001-2024