more compatible SETTIM and RDTIM routines

This commit is contained in:
FeralChild64 committed 2019-09-02 17:07:55 +02:00
1 parent 1c2b498e15
commit 33393ea824
2 files changed
+8 -6

No files matched your search

+4 -3
View File
@@ -12,7 +12,6 @@ rdtim:
;; Disable interrupts for the duration of the routine, to prevent
;; jiffy clock update while reeading it's values
php
sei
;; Store the jiffy clock state
@@ -20,7 +19,9 @@ rdtim:
ldx TIME + 1
lda TIME + 2
;; Restore processor state and return
plp
;; Enable interrupts. More elegant solution would be pha + sei + ... + pla,
;; but (checked by running a test program) original ROM routine always
;; leaves IRQs enabled.
cli
rts
+4 -3
View File
@@ -12,7 +12,6 @@ settim:
;; Disable interrupts for the duration of the routine, to prevent
;; jiffy clock update while changing it's values
php
sei
;; Store the jiffy clock state
@@ -20,7 +19,9 @@ settim:
stx TIME + 1
sta TIME + 2
;; Restore processor state and return
plp
;; Enable interrupts. More elegant solution would be pha + sei + ... + pla,
;; but (checked by running a test program) original ROM routine always
;; leaves IRQs enabled.
cli
rts