diff --git a/applecorn.po b/applecorn.po index 3f20939..7ff9bda 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/auxmem.shr.s b/auxmem.shr.s index 8b0a0fe..bb24ecf 100644 --- a/auxmem.shr.s +++ b/auxmem.shr.s @@ -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 diff --git a/auxmem.vdu.s b/auxmem.vdu.s index f935bf2..07d3283 100644 --- a/auxmem.vdu.s +++ b/auxmem.vdu.s @@ -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 diff --git a/mainmem.shr.s b/mainmem.shr.s index cdfbb4c..9c89e77 100644 --- a/mainmem.shr.s +++ b/mainmem.shr.s @@ -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