mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-01-24 23:32:46 +00:00
Minor refactoring of SHR point plot code
This commit is contained in:
parent
942234ae9a
commit
3acbd09ed4
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
@ -216,7 +216,6 @@ SHRCHAR640 PHY ; Preserve Y
|
|||||||
* $98+x - fill circle
|
* $98+x - fill circle
|
||||||
*
|
*
|
||||||
* TODO: Only does point plotting ATM
|
* TODO: Only does point plotting ATM
|
||||||
* TODO: Only supports 640 mode right now
|
|
||||||
SHRPLOT >>> ENTMAIN
|
SHRPLOT >>> ENTMAIN
|
||||||
JSR SHRCOORD ; Convert coordinates
|
JSR SHRCOORD ; Convert coordinates
|
||||||
LDX A2L ; Screen row (Y-coord)
|
LDX A2L ; Screen row (Y-coord)
|
||||||
@ -244,28 +243,18 @@ SHRPLOT >>> ENTMAIN
|
|||||||
TAX ; Index into :BITS320
|
TAX ; Index into :BITS320
|
||||||
|
|
||||||
LDA :BITS320,X ; Get bit pattern for pixel to set
|
LDA :BITS320,X ; Get bit pattern for pixel to set
|
||||||
EOR #$FF ; Invert bits
|
BRA :DOPLOT
|
||||||
AND [A3L],Y ; Load existing byte, clearing pixel
|
|
||||||
STA A1L
|
|
||||||
LDA :BITS320,X ; Get bit pattern for pixel to set
|
|
||||||
AND SHRGFXMASK ; Mask to set colour
|
|
||||||
ORA A1L ; OR into existing byte
|
|
||||||
|
|
||||||
* TODO: Apply SHRGFXACTION GCOL action
|
|
||||||
|
|
||||||
STA [A3L],Y ; Write to screen
|
|
||||||
>>> XF2AUX,GFXPLOTRET
|
|
||||||
RTS
|
|
||||||
|
|
||||||
:MODE0 TXA
|
:MODE0 TXA
|
||||||
AND #$03 ; Keep LSB two bits only
|
AND #$03 ; Keep LSB two bits only
|
||||||
TAX ; Index into :BITS640
|
TAX ; Index into :BITS640
|
||||||
|
|
||||||
LDA :BITS640,X ; Get bit pattern for pixel to set
|
LDA :BITS640,X ; Get bit pattern for pixel to set
|
||||||
|
:DOPLOT PHA
|
||||||
EOR #$FF ; Invert bits
|
EOR #$FF ; Invert bits
|
||||||
AND [A3L],Y ; Load existing byte, clearing pixel
|
AND [A3L],Y ; Load existing byte, clearing pixel
|
||||||
STA A1L
|
STA A1L
|
||||||
LDA :BITS640,X ; Get bit pattern for pixel to set
|
PLA ; Recover bit pattern
|
||||||
AND SHRGFXMASK ; Mask to set colour
|
AND SHRGFXMASK ; Mask to set colour
|
||||||
ORA A1L ; OR into existing byte
|
ORA A1L ; OR into existing byte
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user