cx16 avoid ram bank issue with RDTIM in sys.wait() and c64.RDTIM16()

This commit is contained in:
Irmen de Jong 2023-05-21 15:03:33 +02:00
parent 125ce3240f
commit c69c17de42
2 changed files with 9 additions and 3 deletions

View File

@ -70,7 +70,9 @@ asmsub RDTIM16() -> uword @AY {
; -- like RDTIM() but only returning the lower 16 bits in AY for convenience
%asm {{
phx
sei
jsr c64.RDTIM
cli
pha
txa
tay
@ -936,9 +938,13 @@ _loop lda P8ZP_SCRATCH_W1
plx
rts
+ jsr c64.RDTIM
+ sei
jsr c64.RDTIM
cli
sta P8ZP_SCRATCH_B1
- jsr c64.RDTIM
- sei
jsr c64.RDTIM
cli
cmp P8ZP_SCRATCH_B1
beq -

View File

@ -9,7 +9,7 @@ main {
ubyte pos
for pos in 0 to 7 {
pokew(table + 64 + pos*2, ($000a-pos)*200) ; TODO FIX WRONG CODE
pokew(table + 64 + pos*2, ($000a-pos)*200)
}
for pos in 0 to 7 {