From 5b3230c65fc1789b777b79c1562c801dea40c90a Mon Sep 17 00:00:00 2001 From: izydorst Date: Fri, 15 Aug 2003 22:17:13 +0000 Subject: [PATCH] fixed problem with I/O access on C64 git-svn-id: svn://svn.cc65.org/cc65/trunk@2333 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/geos/system/get_ostype.s | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libsrc/geos/system/get_ostype.s b/libsrc/geos/system/get_ostype.s index 30c0cc6b6..6124ca9db 100644 --- a/libsrc/geos/system/get_ostype.s +++ b/libsrc/geos/system/get_ostype.s @@ -38,6 +38,10 @@ only40: ldx #0 ; COLUMNS40 tvmode: ; PAL/NTSC check here, result in A php sei ; disable interrupts + lda CPU_DATA ; this is for C64 + pha + lda #IO_IN ; enable access to I/O + sta CPU_DATA bit rasreg bpl tvmode ; wait for rasterline 127=256!) @@ -51,6 +55,10 @@ ntsc: lda #$80 ; NTSC modeend: stx tmp1 ora tmp1 + sta tmp1 ldx #0 + pla + sta CPU_DATA ; restore memory config plp ; restore interrupt state + lda tmp1 rts