]> git.sur5r.net Git - cc65/commitdiff
When turning the ROM off and on, also change the chargen pointer.
authorChristian Groessler <chris@groessler.org>
Thu, 30 May 2013 23:50:07 +0000 (01:50 +0200)
committerChristian Groessler <chris@groessler.org>
Thu, 30 May 2013 23:50:07 +0000 (01:50 +0200)
libsrc/atari/shadow_ram_handlers.s

index d3532b238bb5f1fec150e6b4f3f47f1a486e9eb5..e2de0c31936f83a2dcef21799fb095e04f972238 100644 (file)
        lda     PORTB
        and     #$fe
        sta     PORTB
+       lda     #>__CHARGEN_START__
+       sta     CHBAS
+       sta     CHBASE
 .endmacro
 .macro enable_rom
        lda     PORTB
        ora     #1
        sta     PORTB
+       lda     #$E0
+       sta     CHBAS
+       sta     CHBASE
 .endmacro
 
 .segment "INIT"
@@ -35,6 +41,7 @@ sram_init:
        ldx     #0
        stx     NMIEN           ; disable NMI
 
+; disable ROMs
        disable_rom
 
 ; setup interrupt vectors
@@ -67,11 +74,6 @@ sram_init:
        lda     #>my_SIOV
        sta     SIOV+2
 
-; set new chargen
-       lda     #>__CHARGEN_START__
-       sta     CHBAS
-       sta     CHBASE
-
 ; enable interrupts
        lda     #$40
        sta     NMIEN
@@ -147,29 +149,4 @@ kret:      pha
        pla
        rts
 
-.if 0
-       .import KEYBDV_wrapper
-        .import cursor,mul40
-
-_cgetc:
-        jsr     setcursor
-.if .not .defined(__ATARIXL__)
-        jsr     @1
-.else
-       jsr     KEYBDV_wrapper
-.endif
-        ldx     #0
-        rts
-
-.if .not .defined(__ATARIXL__)
-@1:     lda     KEYBDV+5
-        pha
-        lda     KEYBDV+4
-        pha
-        lda     #12
-        sta     ICAX1Z          ; fix problems with direct call to KEYBDV
-        rts
-.endif
-.endif
-
 .endif ; .if .defined(__ATARIXL__)