X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fatari%2Fostype.s;h=7a3342d2ac48f4c5a433b21e82d1cecdea770a2f;hb=85170998ad45cadb2064fa68349bb3a8975efd89;hp=dc17018fae2ecc06ed8864b015370858987b25fa;hpb=a01b9f08eda45246c9612567f7a9e1ea132d246a;p=cc65 diff --git a/libsrc/atari/ostype.s b/libsrc/atari/ostype.s index dc17018fa..7a3342d2a 100644 --- a/libsrc/atari/ostype.s +++ b/libsrc/atari/ostype.s @@ -41,11 +41,41 @@ .export _get_ostype .if .defined(__ATARIXL__) -.warning "fix me!" + + .include "atari.inc" + .import __CHARGEN_START__ + .segment "LOWCODE" +.macro disable_rom + pha + lda PORTB + and #$fe + sta PORTB + lda #>__CHARGEN_START__ + sta CHBAS + sta CHBASE + pla +.endmacro +.macro enable_rom + lda PORTB + ora #1 + sta PORTB + lda #$E0 + sta CHBAS + sta CHBASE +.endmacro + +.else ; above atarixl, below atari + +.macro disable_rom +.endmacro +.macro enable_rom +.endmacro + .endif .proc _get_ostype + enable_rom lda $fcd8 cmp #$a2 beq _400800 @@ -67,6 +97,7 @@ and #%00111000 ora #%11 _fin: ldx #0 + disable_rom rts ; unknown ROM @@ -74,6 +105,7 @@ _fin: ldx #0 _unknown: lda #0 tax + disable_rom rts ; 1200XL ROM