cleanup/fix pce cpeekc/cpeekcolor/cpeekrevers/cpeeks, replaces #532

This commit is contained in:
mrdudz
2025-05-25 02:52:03 +02:00
parent 5c72deb0b9
commit e9a15af29b
4 changed files with 25 additions and 30 deletions

View File

@@ -14,13 +14,14 @@ _cpeekrevers:
st0 #VDC_MARR ; Memory-Address Read
ldy SCREEN_PTR
ldx SCREEN_PTR+1
sty VDC_DATA_LO
stx VDC_DATA_HI
sty a:VDC_DATA_LO
stx a:VDC_DATA_HI
st0 #VDC_VRR ; VRAM Read Register
lda VDC_DATA_LO ; character (bit 7 is revers bit)
rol a
rol a
and #1
ldx #0
lda a:VDC_DATA_LO ; character (bit 7 is revers bit)
and #$80 ; get reverse bit
asl a ; reverse bit to carry, A=0
tax ; ldx #>$0000
rol a ; reverse bit from carry
rts