Migrate SHRVDU16/CLG into main memory

This commit is contained in:
Bobbi Webber-Manners 2023-01-05 21:21:12 -05:00
parent 9ee3788c44
commit ec913ef6cb
3 changed files with 24 additions and 20 deletions

Binary file not shown.

View File

@ -143,7 +143,6 @@ SHRBGMASK EQU $B002 ; Colour mask background (word)
****************************************************************************** ******************************************************************************
SHRBGMASKA DW $0000 ; Keep a copy in aux mem too SHRBGMASKA DW $0000 ; Keep a copy in aux mem too
SHRGFXBGMASKA DW $0000
* Write character to SHR screen * Write character to SHR screen
@ -559,23 +558,8 @@ SHRCLREOL JSR SHRCHARADDR
* VDU16 (CLG) clears the whole SHR screen right now * VDU16 (CLG) clears the whole SHR screen right now
SHRCLEAR PHP ; Disable interrupts SHRCLEAR >>> XF2MAIN,SHRVDU16
SEI SHRCLRRET >>> ENTAUX
CLC ; 816 native mode
XCE
REP #$10 ; 16 bit index
MX %10 ; Tell Merlin
LDX #$0000
LDA SHRGFXBGMASKA
:L1 STAL $E12000,X ; SHR screen @ E1:2000
INX
CPX #$7D00
BNE :L1
SEP #$10 ; Back to 8 bit index
MX %11 ; Tell Merlin
SEC ; Back to 6502 emu mode
XCE
PLP ; Normal service resumed
RTS RTS
@ -642,7 +626,6 @@ SHRSETGCOL PHA
AND #$0F AND #$0F
TAY TAY
LDA SHRCMASK320,Y ; Lookup mask in table LDA SHRCMASK320,Y ; Lookup mask in table
STA SHRGFXBGMASKA
>>> WRTMAIN >>> WRTMAIN
STA SHRGFXBGMASK STA SHRGFXBGMASK
>>> WRTAUX >>> WRTAUX
@ -662,7 +645,6 @@ SHRSETGCOL PHA
AND #$03 AND #$03
TAY TAY
LDA SHRCMASK640,Y ; Lookup mask in table LDA SHRCMASK640,Y ; Lookup mask in table
STA SHRGFXBGMASKA
>>> WRTMAIN >>> WRTMAIN
STA SHRGFXBGMASK STA SHRGFXBGMASK
>>> WRTAUX >>> WRTAUX

View File

@ -787,6 +787,28 @@ SHRCOORD2 MX $00 ; Tell Merlin it's 16 bit
MX %11 ; Following code is 8 bit again MX %11 ; Following code is 8 bit again
* Clear the graphics window
SHRVDU16 >>> ENTMAIN
PHP ; Disable interrupts
SEI
CLC ; 816 native mode
XCE
REP #$10 ; 16 bit index
MX %10 ; Tell Merlin
LDX #$0000
LDA SHRGFXBGMASK
:L1 STAL $E12000,X ; SHR screen @ E1:2000
INX
CPX #$7D00
BNE :L1
SEP #$10 ; Back to 8 bit index
MX %11 ; Tell Merlin
SEC ; Back to 6502 emu mode
XCE
PLP ; Normal service resumed
>>> XF2AUX,SHRCLRRET
* Validate graphics window parms & store if okay * Validate graphics window parms & store if okay
* First 8 bytes of SHRVDUQ: left, bottom, right, top * First 8 bytes of SHRVDUQ: left, bottom, right, top
SHRVDU24 >>> ENTMAIN SHRVDU24 >>> ENTMAIN