.include "atari.inc"
.export _get_ostype
+ .importzp tmp1
.proc _get_ostype
asl a
asl a
asl a
+ and #%11100000
ora #%11
+_fin_xl:sta tmp1
+ lda PALNTS ; get OS PAL/NTSC flag (0 = NTSC, 1 = PAL)
+ beq _xl_ntsc
+ cmp #1
+ beq _xl_pal
+ lda #0
+ beq _fxlcont
+
+_xl_ntsc:
+ lda #%10
+ bne _fxlcont
+
+_xl_pal:lda #1
+
+_fxlcont:
+ asl a
+ asl a
+ asl a
+ ora tmp1
+
_fin: ldx #0
rts
_1200_fin:
ora #%010
- bne _fin
+ bne _fin_xl
; 400/800 ROM
lda #%00110001
bne _400800_done
-; 400/900 unknown
+; 400/800 unknown
_400800_unknown:
lda #%00000001