mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +00:00
Use deferred VBI instead of immediate VBI. A deferred VBI won't be
called if the user program has interrupts disabled which makes it easier to avoid race conditions.
This commit is contained in:
parent
e267addb5b
commit
6a17df69dd
@ -16,11 +16,11 @@
|
|||||||
.segment "INIT"
|
.segment "INIT"
|
||||||
|
|
||||||
initirq:
|
initirq:
|
||||||
lda VVBLKI
|
lda VVBLKD
|
||||||
ldx VVBLKI+1
|
ldx VVBLKD+1
|
||||||
sta IRQInd+1
|
sta IRQInd+1
|
||||||
stx IRQInd+2
|
stx IRQInd+2
|
||||||
lda #6
|
lda #7
|
||||||
ldy #<IRQStub
|
ldy #<IRQStub
|
||||||
ldx #>IRQStub
|
ldx #>IRQStub
|
||||||
jsr SETVBV
|
jsr SETVBV
|
||||||
@ -31,7 +31,7 @@ initirq:
|
|||||||
.code
|
.code
|
||||||
|
|
||||||
doneirq:
|
doneirq:
|
||||||
lda #6
|
lda #7
|
||||||
ldy IRQInd+1
|
ldy IRQInd+1
|
||||||
ldx IRQInd+2
|
ldx IRQInd+2
|
||||||
jsr SETVBV
|
jsr SETVBV
|
||||||
@ -44,7 +44,6 @@ doneirq:
|
|||||||
IRQStub:
|
IRQStub:
|
||||||
cld ; Just to be sure
|
cld ; Just to be sure
|
||||||
.ifdef __ATARIXL__
|
.ifdef __ATARIXL__
|
||||||
pha
|
|
||||||
.ifdef CHARGEN_RELOC
|
.ifdef CHARGEN_RELOC
|
||||||
lda CHBAS
|
lda CHBAS
|
||||||
pha
|
pha
|
||||||
@ -64,7 +63,6 @@ IRQStub:
|
|||||||
sta CHBAS
|
sta CHBAS
|
||||||
sta CHBASE
|
sta CHBASE
|
||||||
.endif
|
.endif
|
||||||
pla
|
|
||||||
.endif
|
.endif
|
||||||
jmp IRQInd ; Jump to the saved IRQ vector
|
jmp IRQInd ; Jump to the saved IRQ vector
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user