Fixed VDU24 bug

This commit is contained in:
Bobbi Webber-Manners 2023-01-05 22:33:16 -05:00
parent ec913ef6cb
commit 0fbe7c9592
3 changed files with 16 additions and 15 deletions

Binary file not shown.

View File

@ -1073,34 +1073,35 @@ VDU26QUIT RTS
VDU28 LDX VDUMODE
LDA VDUQCOORD+2 ; right
CMP VDUQCOORD+0 ; left
BCC VDUCOPYEXIT ; right<left
BCC VDU28EXIT ; right<left
CMP SCNTXTMAXX,X
BEQ VDU28B
BCS VDUCOPYEXIT ; right>width
BCS VDU28EXIT ; right>width
VDU28B LDA VDUQCOORD+1 ; bottom
CMP VDUQCOORD+3 ; top
BCC VDUCOPYEXIT ; bottom<top
BCC VDU28EXIT ; bottom<top
CMP SCNTXTMAXY,X
BEQ VDU28C
BCS VDUCOPYEXIT ; top>height
BCS VDU28EXIT ; top>height
VDU28C LDY #TXTWINLFT+3-VDUVARS ; Copy to txt window params
BEQ VDU28D
BEQ VDU28EXIT
JSR VDUCOPY4
LDA TXTWINLFT ; Cursor to top-left of window
STA VDUTEXTX
LDA TXTWINTOP
STA VDUTEXTY
VDU28D RTS
VDU28EXIT RTS
* VDU 24,left;bottom;right;top; - define graphics window
VDU24 BIT VDUBANK ; Check if this is a GS
BMI :GS
RTS ; If not, hasta la vista
:GS LDX #$08
:GS LDX #$00
>>> WRTMAIN
:L1 LDA VDUQGFXWIND,X ; Copy to main mem for SHR
STA SHRVDUQ,X
DEX
INX
CPX #$08
BNE :L1
>>> WRTAUX
>>> XF2MAIN,SHRVDU24

View File

@ -307,9 +307,9 @@ SHRPLOTCOL LDA SHRGFXFGMASK ; Preserve FG colour
SHRPOINT REP #$30 ; 16 bit M & X
MX %00 ; Tell Merlin
LDA A2L ; y coordinate
CMP SHRWINTOP
BMI :OUT
CMP SHRWINBTM
BMI :OUT
CMP SHRWINTOP
BPL :OUT
LDA A1L ; x coordinate
CMP SHRWINLFT
@ -840,7 +840,7 @@ SHRVDU24 >>> ENTMAIN
LDA A1L ; right converted
STA SHRWINRGT
LDA A2L ; top converted
STA SHRWINBTM
STA SHRWINTOP
SEC ; 65816 emulation mode
XCE
@ -856,16 +856,16 @@ SHRVDU24 >>> ENTMAIN
SHRVDU26 >>> ENTMAIN
STZ SHRWINLFT+0
STZ SHRWINLFT+1
STZ SHRWINTOP+0
STZ SHRWINTOP+1
STZ SHRWINBTM+0
STZ SHRWINBTM+1
LDA #<639
STA SHRWINRGT+0
LDA #>639
STA SHRWINRGT+1
LDA #<199
STA SHRWINBTM+0
STA SHRWINTOP+0
LDA #>199
STA SHRWINBTM+1
STA SHRWINTOP+1
>>> XF2AUX,VDU26RET