.ifdef __ATARIXL__
-USEWSYNC= 1
+USEWSYNC = 1
+CHARGEN_RELOC = 1
-.if USEWSYNC
+.if .defined(USEWSYNC) .and .defined(CHARGEN_RELOC)
.macro wsync
sta WSYNC
.endmacro
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
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