SHR XOR cursor bugfix (behaviour with copy key)

This commit is contained in:
Bobbi Webber-Manners 2023-01-09 18:02:43 -05:00
parent 2e0e9def00
commit f1173947bf
3 changed files with 8 additions and 10 deletions

Binary file not shown.

View File

@ -171,27 +171,25 @@ SHRCURSOR PHA ; Preserve character
STA VDUADDR+1 STA VDUADDR+1
LDY #$00 LDY #$00
PLA ; Recover character PLA ; Recover character
CMP #'_' CMP CURSOR
BEQ :CURSORON BEQ :CURSORON
CMP CURSORED CMP CURSORED
BEQ :CURSORON BEQ :CURSORON
CMP CURSORCP
BEQ :CURSORON
BRA :CURSOROFF BRA :CURSOROFF
:CURSORON LDA :CURSTATE :CURSORON LDA [VDUADDR],Y
ROR A BNE :DONE ; Already on
BCS :DONE ; Already on
BRA :L1 BRA :L1
:CURSOROFF LDA :CURSTATE :CURSOROFF LDA [VDUADDR],Y
ROR A BEQ :DONE ; Already off
BCC :DONE ; Already off
:L1 LDAL [VDUADDR],Y ; XOR last row :L1 LDAL [VDUADDR],Y ; XOR last row
EOR #$FF EOR #$FF
STAL [VDUADDR],Y STAL [VDUADDR],Y
INY INY
CPY #$04 CPY #$04
BNE :L1 BNE :L1
INC :CURSTATE
:DONE RTS :DONE RTS
:CURSTATE DB $00 ; Cursor state
* Write character to SHR screen in 320 pixel mode * Write character to SHR screen in 320 pixel mode

View File

@ -409,8 +409,8 @@ PUTCOPYCURS TAX ; Preserve character
TXA TXA
JMP OUTCHARCP JMP OUTCHARCP
:SHR TXA ; Recover character :SHR TXA ; Recover character
JSR SHRCURSOR
JMP OUTCHARCP2 JMP OUTCHARCP2
JMP SHRCURSOR
RTS RTS