]> git.sur5r.net Git - cc65/commitdiff
Added patches to make systime work correctly with the different video systems
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 19 Mar 2010 20:46:56 +0000 (20:46 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 19 Mar 2010 20:46:56 +0000 (20:46 +0000)
(Stefan Haubenthal).

git-svn-id: svn://svn.cc65.org/cc65/trunk@4624 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c128/systime.s
libsrc/c64/systime.s

index dced83c06056633ca4c9b7d06a6cf5345e0dd367..468d7da19100530c1dbcbc1aa931d75c72dfc5c9 100644 (file)
 
         .include        "time.inc"
         .include        "c128.inc"
+       .include        "get_tv.inc"
 
         .constructor    initsystime
        .importzp       tmp1, tmp2
+       .import         _get_tv
 
 
 ;----------------------------------------------------------------------------
@@ -66,7 +68,13 @@ BCD2dec:tax
 
         lda     CIA1_TOD10
         sta     CIA1_TOD10
-        rts
+       jsr     _get_tv
+       cmp     #TV::PAL
+       bne     @60Hz
+       lda     CIA1_CRA
+       ora     #$80
+       sta     CIA1_CRA
+@60Hz: rts
 
 .endproc
 
index c0b4238bcf227cd711e671d395fb755847df0278..28b3e8190026f27600533ea637ec1ed0d00f34a7 100644 (file)
 
         .include        "time.inc"
         .include        "c64.inc"
+       .include        "get_tv.inc"
 
         .constructor    initsystime
        .importzp       tmp1, tmp2
+       .import         _get_tv, _get_ostype
 
 
 ;----------------------------------------------------------------------------
@@ -66,7 +68,16 @@ BCD2dec:tax
 
         lda     CIA1_TOD10
         sta     CIA1_TOD10
-        rts
+       jsr     _get_tv
+       cmp     #TV::PAL
+       bne     @60Hz
+       jsr     _get_ostype
+       cmp     #$43
+       beq     @60Hz
+       lda     CIA1_CRA
+       ora     #$80
+       sta     CIA1_CRA
+@60Hz: rts
 
 .endproc