mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2024-06-15 19:29:32 +00:00
Fix to MODE 1 (320 pixel wide) line drawing
This commit is contained in:
parent
3952506523
commit
2c58b2199e
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
|
@ -593,25 +593,25 @@ SHRPOINT2 SEP #$30 ; 8 bit M & X
|
||||||
STA A4L
|
STA A4L
|
||||||
|
|
||||||
LDX A1L ; Store X-coord for later
|
LDX A1L ; Store X-coord for later
|
||||||
LSR A1H ; Divide by 4
|
LSR A1H ; Divide by 2
|
||||||
ROR A1L
|
ROR A1L
|
||||||
LSR A1H
|
|
||||||
ROR A1L
|
|
||||||
LDY A1L ; Index into row of pixels
|
|
||||||
|
|
||||||
LDA SHRPIXELS ; Pixels per byte
|
LDA SHRPIXELS ; Pixels per byte
|
||||||
CMP #$02 ; 2 is 320-mode (MODE 1)
|
CMP #$02 ; 2 is 320-mode (MODE 1)
|
||||||
BNE :MODE0
|
BNE :MODE0
|
||||||
|
|
||||||
|
LDY A1L ; Index into row of pixels
|
||||||
TXA
|
TXA
|
||||||
LSR
|
|
||||||
AND #$01 ; Keep LSB bit only
|
AND #$01 ; Keep LSB bit only
|
||||||
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
|
||||||
BRA SHRPLOTBYTE
|
BRA SHRPLOTBYTE
|
||||||
|
|
||||||
:MODE0 TXA
|
:MODE0 LSR A1H ; Divide X-coord by 2 again
|
||||||
|
ROR A1L
|
||||||
|
LDY A1L ; Index into row of pixels
|
||||||
|
TXA
|
||||||
AND #$03 ; Keep LSB two bits only
|
AND #$03 ; Keep LSB two bits only
|
||||||
TAX ; Index into :BITS640
|
TAX ; Index into :BITS640
|
||||||
|
|
||||||
|
@ -943,11 +943,18 @@ SHRCOORD MAC
|
||||||
REP #$30 ; 16 bit M & X
|
REP #$30 ; 16 bit M & X
|
||||||
MX %00 ; Tell Merlin
|
MX %00 ; Tell Merlin
|
||||||
|
|
||||||
* X-coordinate in SHRVDUQ+5,+6 1280/2=640
|
* X-coordinate in SHRVDUQ+5,+6 1280/2=640 or 1280/4=320
|
||||||
LDA SHRVDUQ+5
|
LDA SHRVDUQ+5
|
||||||
ASL ; Sign bit -> C
|
ASL ; Sign bit -> C
|
||||||
ROR SHRVDUQ+5 ; Signed divide /2
|
ROR SHRVDUQ+5 ; Signed divide /2
|
||||||
|
|
||||||
|
LDX SHRPIXELS ; Pixels per byte
|
||||||
|
CPX #$02 ; 2 is 320-mode (MODE 1)
|
||||||
|
BNE SHRCOORDM0
|
||||||
LDA SHRVDUQ+5
|
LDA SHRVDUQ+5
|
||||||
|
ASL ; Sign bit -> C
|
||||||
|
ROR SHRVDUQ+5 ; Signed divide /2
|
||||||
|
SHRCOORDM0 LDA SHRVDUQ+5
|
||||||
STA A1L ; Result in A1L/H
|
STA A1L ; Result in A1L/H
|
||||||
|
|
||||||
* Y-coordinate in SHRVDUQ+7,+8 1024*25/128=200
|
* Y-coordinate in SHRVDUQ+7,+8 1024*25/128=200
|
||||||
|
|
Loading…
Reference in New Issue
Block a user