From ffbb58bcbc59de8edf4730f3635755e745a0953a Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sun, 19 Jul 2020 16:24:45 +0200 Subject: [PATCH] changed TIME variable format to default one --- src/basic/basic_commands_CC/helper_ask_if_sure.s | 4 ++-- src/basic/engine_variables/assign_variable_TI_string.s | 4 ++-- src/basic/engine_variables/fetch_variable_TI_string.s | 4 ++-- src/basic/math/rnd_seed_init.s | 2 +- src/kernal/time/udtim.s | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/basic/basic_commands_CC/helper_ask_if_sure.s b/src/basic/basic_commands_CC/helper_ask_if_sure.s index 92d36947..2d554b7c 100644 --- a/src/basic/basic_commands_CC/helper_ask_if_sure.s +++ b/src/basic/basic_commands_CC/helper_ask_if_sure.s @@ -60,10 +60,10 @@ helper_ask_if_sure: jsr JCHROUT clc - lda TIME+0 + lda TIME+2 adc #$0C !: - cmp TIME+0 + cmp TIME+2 bne !- // FALLTROUGH diff --git a/src/basic/engine_variables/assign_variable_TI_string.s b/src/basic/engine_variables/assign_variable_TI_string.s index 55c5f644..229b85cc 100644 --- a/src/basic/engine_variables/assign_variable_TI_string.s +++ b/src/basic/engine_variables/assign_variable_TI_string.s @@ -75,8 +75,8 @@ assign_variable_TI_string_loop_next: // Set the resulting value - ldy INDEX+0 + ldy INDEX+2 ldx INDEX+1 - lda INDEX+2 + lda INDEX+0 jmp JSETTIM diff --git a/src/basic/engine_variables/fetch_variable_TI_string.s b/src/basic/engine_variables/fetch_variable_TI_string.s index 753477b9..5e70d6c1 100644 --- a/src/basic/engine_variables/fetch_variable_TI_string.s +++ b/src/basic/engine_variables/fetch_variable_TI_string.s @@ -17,9 +17,9 @@ fetch_variable_TI_string: jsr JRDTIM - sty INDEX+0 + sty INDEX+2 stx INDEX+1 - sta INDEX+2 + sta INDEX+0 // Now calculate the digits, starting from the most important one diff --git a/src/basic/math/rnd_seed_init.s b/src/basic/math/rnd_seed_init.s index 56f0a13c..a2510214 100644 --- a/src/basic/math/rnd_seed_init.s +++ b/src/basic/math/rnd_seed_init.s @@ -21,7 +21,7 @@ rnd_seed_init: eor CIA1_TIMAHI sta RNDX+4 - lda TIME+0 // byte from jiffy counter might be useful too + lda TIME+2 // byte from jiffy counter might be useful too eor SID_RANDOM // not sure if SID set correctly, but it will not hurt #if CONFIG_MB_MEGA_65 eor VIC_XPOS // not sure if VIC-IV visible, but it will not hurt diff --git a/src/kernal/time/udtim.s b/src/kernal/time/udtim.s index 9c75406f..b2e2dcc8 100644 --- a/src/kernal/time/udtim.s +++ b/src/kernal/time/udtim.s @@ -18,14 +18,14 @@ UDTIM: // after this time we have to reset the clock. #if !HAS_OPCODES_65CE02 - inc TIME+0 + inc TIME+2 bne udtim_time_done // done with clock inc TIME+1 #else - inw TIME+0 + inw TIME+2 #endif bne udtim_clock_rollover - inc TIME+2 + inc TIME+0 // FALLTROUGH @@ -39,10 +39,10 @@ udtim_clock_rollover: lda TIME+1 cmp #$1A bne udtim_time_done // done with clock - lda TIME+2 + lda TIME+0 cmp #$4F bne udtim_time_done // done with clock lda #$00 - sta TIME+2 + sta TIME+0 sta TIME+1 beq udtim_time_done // done with clock - will always jump