From 34e75afec3091c211e132d7b49d92d4cdcc84d06 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Fri, 20 Sep 2013 18:09:53 +0200 Subject: [PATCH] adapt to CHARGEN_RELOC --- libsrc/atari/irq.s | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/libsrc/atari/irq.s b/libsrc/atari/irq.s index 3fbdc971b..4a266630c 100644 --- a/libsrc/atari/irq.s +++ b/libsrc/atari/irq.s @@ -6,6 +6,10 @@ .import callirq .include "atari.inc" +.ifdef __ATARIXL__ + .import __CHARGEN_START__ + .include "romswitch.inc" +.endif ; ------------------------------------------------------------------------ @@ -40,17 +44,27 @@ doneirq: IRQStub: cld ; Just to be sure .ifdef __ATARIXL__ - pha - lda PORTB - pha - and #$fe - sta PORTB ; disable ROM @@@ TODO: update CHARGEN + pha +.ifdef CHARGEN_RELOC + lda CHBAS + pha +.endif + lda PORTB + pha + and #$fe + sta PORTB ; disable ROM + set_chbase >__CHARGEN_START__ .endif jsr callirq ; Call the functions .ifdef __ATARIXL__ - pla - sta PORTB - pla + pla + sta PORTB ; restore old ROM setting +.ifdef CHARGEN_RELOC + pla + sta CHBAS + sta CHBASE +.endif + pla .endif jmp IRQInd ; Jump to the saved IRQ vector -- 2.39.5