From badf78999f86bf0ed55095870d741e426f4cc64c Mon Sep 17 00:00:00 2001 From: cpg Date: Mon, 17 Jul 2000 00:30:01 +0000 Subject: [PATCH] added PAL/NTSC check for 1200xl + XL/XE systems git-svn-id: svn://svn.cc65.org/cc65/trunk@162 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/atari/ostype.s | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/libsrc/atari/ostype.s b/libsrc/atari/ostype.s index 7975c8b3c..c3d210e4d 100644 --- a/libsrc/atari/ostype.s +++ b/libsrc/atari/ostype.s @@ -45,6 +45,7 @@ .include "atari.inc" .export _get_ostype + .importzp tmp1 .proc _get_ostype @@ -68,7 +69,28 @@ 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 @@ -99,7 +121,7 @@ _1200_11: _1200_fin: ora #%010 - bne _fin + bne _fin_xl ; 400/800 ROM @@ -116,7 +138,7 @@ _400800: lda #%00110001 bne _400800_done -; 400/900 unknown +; 400/800 unknown _400800_unknown: lda #%00000001