Skip to content

Commit

Permalink
[KERNAL] fix two DOW bugs (#273)
Browse files Browse the repository at this point in the history
* [KERNAL] fix DOW write to RTC

* [KERNAL] fix register preserve for upload_time
  • Loading branch information
mooinglemur committed Feb 25, 2024
1 parent 65717a7 commit c9b08c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kernal/drivers/x16/rtc.s
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ rtc_set_date_time:
lda r3H
and #$07
ora #$08 ; enable battery backup
jsr i2c_write_byte_as_bcd ; 3: day of week
jsr i2c_write_byte ; 3: day of week

dey
lda r1H
Expand Down
4 changes: 2 additions & 2 deletions kernal/ieee_switch.s
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ upload_time:
@1: lda 0,x
pha
inx
cpx #9
cpx #10
bne @1

jsr clock_get_date_time
Expand All @@ -209,7 +209,7 @@ upload_time:
.word $c000 + 3 * 16
.byte BANK_CBDOS

ldx #8
ldx #9
@4: pla
sta 0,x
dex
Expand Down

0 comments on commit c9b08c2

Please sign in to comment.