| |
Trifox Account closed
Registered: Mar 2006 Posts: 108 |
question about triggered raster line in raster interrupt
i am using this code
to initialise my interrupt
this should look fairly common:
(pasted from somewhere ... )
; Initialise Music Interrupt
sei ; turn off interrupts
lda #$7f
ldx #$01
sta $dc0d ; Turn off CIA 1 interrupts
sta $dd0d ; Turn off CIA 2 interrupts
stx $d01a ; Turn on raster interrupts
lda $d011
;ldx #%1000
;ldy #$14
and #%01111111
sta $d011 ; Clear high bit of $d012, set text mode
;stx $d016 ; single-colour
;sty $d018 ; screen at $0400, charset at $2000
lda #<int ; low part of address of interrupt handler code
ldx #>int ; high part of address of interrupt handler code
ldy #0 ; line to trigger interrupt
sta $0314 ; store in interrupt vector
stx $0315
sty $d012
lda $dc0d ; ACK CIA 1 interrupts
lda $dd0d ; ACK CIA 2 interrupts
asl $d019 ; ACK VIC interrupts
cli
to init my interrrupt, i encountered that this interrupt is triggered in row 256 :( what must i do to let it trigger on exactly line 0 ? and only there, not on line 0 AND 256 ... know what i mean ?
i am leaving the interrupt with following fragment:
; Initialise Music Interrupt
sei ; turn off interrupts
lda #$7f
ldx #$01
sta $dc0d ; Turn off CIA 1 interrupts
sta $dd0d ; Turn off CIA 2 interrupts
stx $d01a ; Turn on raster interrupts
lda $d011
;ldx #%1000
;ldy #$14
and #%01111111
sta $d011 ; Clear high bit of $d012, set text mode
;stx $d016 ; single-colour
;sty $d018 ; screen at $0400, charset at $2000
lda #<int ; low part of address of interrupt handler code
ldx #>int ; high part of address of interrupt handler code
ldy #0 ; line to trigger interrupt
sta $0314 ; store in interrupt vector
stx $0315
sty $d012
lda $dc0d ; ACK CIA 1 interrupts
lda $dd0d ; ACK CIA 2 interrupts
asl $d019 ; ACK VIC interrupts
cli
|
|
... 13 posts hidden. Click here to view all posts.... |
| |
Mace
Registered: May 2002 Posts: 1799 |
Why would I want to make my stuff compatible with C65?
I'd have to stick to all compatibility rules then, and I didn't even _know_ there was the possibility to do so :-)
BTW, what _are_ the (other) rules to keep C64 compatibility? |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
WTF? CSDB just deleted my post and gave me a search page instead.
|
| |
WVL
Registered: Mar 2002 Posts: 902 |
Right. Like most demos are not compatible with c64 because of ASL $d019.. :) I'm guessing 99.9% of demos wouldnt run anyway, because of
-vic trickery
-illegal opcodes
-lotsa other stuff
So please keep saving those cycles and do ASL $D019 ;) |
| |
Oswald
Registered: Apr 2002 Posts: 5094 |
looks like I'm alone with my lsr $d019 :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
inc $d019 ftw! |
| |
Scout
Registered: Dec 2002 Posts: 1570 |
Quote: looks like I'm alone with my lsr $d019 :)
Nope :) |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
SRE $D019 |
| |
TWW
Registered: Jul 2009 Posts: 545 |
dec $d019? |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
RTFM...
the correct thing is poke d019,1 |
| |
Mace
Registered: May 2002 Posts: 1799 |
awww... please close this thread, it's many moons old :( |
Previous - 1 | 2 | 3 - Next |