SHR: XOR cursor sorta working. Has issues with copy cursor atm.

This commit is contained in:
Bobbi Webber-Manners 2023-01-09 17:44:38 -05:00
parent 4fe3d4debc
commit 2e0e9def00
4 changed files with 42 additions and 4 deletions

Binary file not shown.

View File

@ -157,6 +157,43 @@ SHRPRCHAR CMP CURSORED ; Edit cursor?
:S1 JMP SHRPRCH640
* Plot or unplot a cursor on SHR screen
SHRCURSOR PHA ; Preserve character
LDA #$E1
STA VDUBANK2
JSR SHRCHARADDR ; Screen addr in VDUADDR
LDA VDUADDR+0 ; LSB
CLC
ADC #<$460 ; $460 is seven rows
STA VDUADDR+0
LDA VDUADDR+1 ; MSB
ADC #>$460 ; $460 is seven rows
STA VDUADDR+1
LDY #$00
PLA ; Recover character
CMP #'_'
BEQ :CURSORON
CMP CURSORED
BEQ :CURSORON
BRA :CURSOROFF
:CURSORON LDA :CURSTATE
ROR A
BCS :DONE ; Already on
BRA :L1
:CURSOROFF LDA :CURSTATE
ROR A
BCC :DONE ; Already off
:L1 LDAL [VDUADDR],Y ; XOR last row
EOR #$FF
STAL [VDUADDR],Y
INY
CPY #$04
BNE :L1
INC :CURSTATE
:DONE RTS
:CURSTATE DB $00 ; Cursor state
* Write character to SHR screen in 320 pixel mode
SHRPRCH320 SEC
SBC #32

View File

@ -398,7 +398,7 @@ PUTCURSOR TAX ; Preserve character
TXA
JMP PUTCHRC
:SHR TXA ; Recover character
* TODO: Add code for XOR cursor in SHR mode
JMP SHRCURSOR
RTS
@ -410,7 +410,7 @@ PUTCOPYCURS TAX ; Preserve character
JMP OUTCHARCP
:SHR TXA ; Recover character
JMP OUTCHARCP2
* TODO: Add code for XOR copy cursor in SHR mode
JMP SHRCURSOR
RTS

View File

@ -215,6 +215,7 @@ SHRCHAR640 PHY ; Preserve Y
* VDU5 plot char at graphics cursor position
* TODO: Need to do bitshifting for x-position
SHRVDU5CH320 >>> ENTMAIN
PHP ; Disable interrupts
SEI
@ -324,7 +325,7 @@ SHRVDU5CH320 >>> ENTMAIN
* VDU5 plot char at graphics cursor position
SHRVDU5CH640 >>> ENTMAIN
* TODO
* TODO: Write me!
>>> XF2AUX,SHRPRCH640RET
@ -344,7 +345,7 @@ SHRVDU10 >>> ENTMAIN
>>> XF2AUX,VDU10RET
* Handle linefeed in VDU5 mode
* Handle linefeed in VDU5 mode - does the actual work
* Called in 65816 native mode, 16 bit M & X
SHRVDU5LF MX %00 ; Tell Merlin
LDA SHRWINLFT