adapt to CHARGEN_RELOC

This commit is contained in:
Christian Groessler
2013-09-20 18:09:53 +02:00
parent 722dbaa1aa
commit 34e75afec3

View File

@@ -6,6 +6,10 @@
.import callirq .import callirq
.include "atari.inc" .include "atari.inc"
.ifdef __ATARIXL__
.import __CHARGEN_START__
.include "romswitch.inc"
.endif
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
@@ -40,17 +44,27 @@ doneirq:
IRQStub: IRQStub:
cld ; Just to be sure cld ; Just to be sure
.ifdef __ATARIXL__ .ifdef __ATARIXL__
pha pha
lda PORTB .ifdef CHARGEN_RELOC
pha lda CHBAS
and #$fe pha
sta PORTB ; disable ROM @@@ TODO: update CHARGEN .endif
lda PORTB
pha
and #$fe
sta PORTB ; disable ROM
set_chbase >__CHARGEN_START__
.endif .endif
jsr callirq ; Call the functions jsr callirq ; Call the functions
.ifdef __ATARIXL__ .ifdef __ATARIXL__
pla pla
sta PORTB sta PORTB ; restore old ROM setting
pla .ifdef CHARGEN_RELOC
pla
sta CHBAS
sta CHBASE
.endif
pla
.endif .endif
jmp IRQInd ; Jump to the saved IRQ vector jmp IRQInd ; Jump to the saved IRQ vector