mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-09-30 05:55:26 +00:00
Implement VDU29 (gfx origin) handling.
This commit is contained in:
parent
1aeacf29b6
commit
1aa49a8014
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
28
auxmem.vdu.s
28
auxmem.vdu.s
@ -1065,15 +1065,15 @@ VDUCOPYEXIT RTS
|
|||||||
*
|
*
|
||||||
|
|
||||||
* TO DO:
|
* TO DO:
|
||||||
* coord=coord+origin
|
|
||||||
* scale coord
|
|
||||||
* clip to viewport
|
* clip to viewport
|
||||||
|
|
||||||
VDU25 LDA VDUQ+4
|
VDU25 LDA VDUQ+4
|
||||||
AND #$04 ; Bit 2 set -> absolute
|
AND #$04 ; Bit 2 set -> absolute
|
||||||
BNE :S0
|
BNE :S0
|
||||||
JSR RELCOORD
|
JSR RELCOORD ; Relative->Absolute coords
|
||||||
:S0 LDX #7
|
BRA :S1
|
||||||
|
:S0 JSR ADJORIG ; Adjust graphics origin
|
||||||
|
:S1 LDX #7
|
||||||
VDU25BACKUP1 LDA PIXELPLOTX+0,X ; Copy pixel coords
|
VDU25BACKUP1 LDA PIXELPLOTX+0,X ; Copy pixel coords
|
||||||
STA PIXELPLOTX+4,X ; POSN becomes LAST
|
STA PIXELPLOTX+4,X ; POSN becomes LAST
|
||||||
DEX ; and PLOT becomes POSN
|
DEX ; and PLOT becomes POSN
|
||||||
@ -1086,14 +1086,30 @@ VDU25BACKUP2 LDA GFXPOSNX,X ; POSN becomes LAST
|
|||||||
DEX
|
DEX
|
||||||
BPL VDU25BACKUP2
|
BPL VDU25BACKUP2
|
||||||
LDA VDUPIXELS
|
LDA VDUPIXELS
|
||||||
BEQ :S1
|
BEQ :S2
|
||||||
JSR HGRPLOTTER
|
JSR HGRPLOTTER
|
||||||
:S1 LDA $C000 ; This and PRCHRC need to be
|
:S2 LDA $C000 ; This and PRCHRC need to be
|
||||||
EOR #$80 ; made more generalised
|
EOR #$80 ; made more generalised
|
||||||
BMI VDU25EXIT ; No key pressed
|
BMI VDU25EXIT ; No key pressed
|
||||||
JSR KBDCHKESC ; Ask KBD to test if Escape
|
JSR KBDCHKESC ; Ask KBD to test if Escape
|
||||||
VDU25EXIT RTS
|
VDU25EXIT RTS
|
||||||
|
|
||||||
|
* Adjust graphics origin
|
||||||
|
ADJORIG CLC
|
||||||
|
LDA GFXORIGX+0
|
||||||
|
ADC VDUQ+5
|
||||||
|
STA VDUQ+5
|
||||||
|
LDA GFXORIGX+1
|
||||||
|
ADC VDUQ+6
|
||||||
|
STA VDUQ+6
|
||||||
|
CLC
|
||||||
|
LDA GFXORIGY+0
|
||||||
|
ADC VDUQ+7
|
||||||
|
STA VDUQ+7
|
||||||
|
LDA GFXORIGY+1
|
||||||
|
ADC VDUQ+8
|
||||||
|
STA VDUQ+8
|
||||||
|
RTS
|
||||||
|
|
||||||
* Add coordinates to GFXPOSNX, GFXPOSNY
|
* Add coordinates to GFXPOSNX, GFXPOSNY
|
||||||
RELCOORD CLC
|
RELCOORD CLC
|
||||||
|
Loading…
Reference in New Issue
Block a user