From fe7578801576cf8ebec0eb8dab2246fc5c466b67 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Thu, 19 Sep 2013 23:34:45 +0200 Subject: [PATCH] add CHARGEN_RELOC knob to conditionally include the code to change CHBASE --- libsrc/atari/romswitch.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libsrc/atari/romswitch.inc b/libsrc/atari/romswitch.inc index 58e09042a..9e229ea63 100644 --- a/libsrc/atari/romswitch.inc +++ b/libsrc/atari/romswitch.inc @@ -7,9 +7,10 @@ .ifdef __ATARIXL__ -USEWSYNC= 1 +USEWSYNC = 1 +CHARGEN_RELOC = 1 -.if USEWSYNC +.if .defined(USEWSYNC) .and .defined(CHARGEN_RELOC) .macro wsync sta WSYNC .endmacro @@ -24,25 +25,31 @@ USEWSYNC= 1 and #$fe wsync sta PORTB +.ifdef CHARGEN_RELOC lda #>__CHARGEN_START__ sta CHBAS sta CHBASE +.endif .endmacro .macro disable_rom_quick lda PORTB and #$fe sta PORTB +.ifdef CHARGEN_RELOC lda #>__CHARGEN_START__ sta CHBAS sta CHBASE +.endif .endmacro .macro disable_rom_val val lda val wsync sta PORTB +.ifdef CHARGEN_RELOC lda #>__CHARGEN_START__ sta CHBAS sta CHBASE +.endif .endmacro .macro enable_rom @@ -50,17 +57,21 @@ USEWSYNC= 1 ora #1 wsync sta PORTB +.ifdef CHARGEN_RELOC lda #$E0 sta CHBAS sta CHBASE +.endif .endmacro .macro enable_rom_quick lda PORTB ora #1 sta PORTB +.ifdef CHARGEN_RELOC lda #$E0 sta CHBAS sta CHBASE +.endif .endmacro .else ; above __ATARIXL__, below not -- 2.39.5