mirror of
https://github.com/bobbimanners/Applecorn.git
synced 2025-01-09 14:30:50 +00:00
Added comments to Kent's code.
This commit is contained in:
parent
1a2d98bec4
commit
19a8842b5f
BIN
applecorn.po
BIN
applecorn.po
Binary file not shown.
54
auxmem.shr.s
54
auxmem.shr.s
@ -343,36 +343,36 @@ SHRNEXTROW LDA VDUADDR+0 ; Add 160 to VDUADDR
|
|||||||
* TODO: This is only for 640 mode at present
|
* TODO: This is only for 640 mode at present
|
||||||
SHRSCR1LINE PHY
|
SHRSCR1LINE PHY
|
||||||
PHX
|
PHX
|
||||||
STA VDUADDR+1
|
STA VDUADDR+1 ; Screen line -> MSB
|
||||||
STZ VDUADDR
|
STZ VDUADDR+0 ; Zero LSB
|
||||||
PHP
|
PHP ; Disable interrupts
|
||||||
SEI
|
SEI
|
||||||
CLC
|
CLC ; Enter native mode
|
||||||
XCE
|
XCE
|
||||||
PHB
|
PHB ; Preserve data bank
|
||||||
REP #$31 ; M,X 16 bit, carry clear
|
REP #$31 ; M,X 16 bit, carry clear
|
||||||
MX %00 ; Tell Merlin
|
MX %00 ; Tell Merlin
|
||||||
LDA VDUADDR
|
LDA VDUADDR ; Screen line to scroll
|
||||||
|
ASL ; Mult 4
|
||||||
ASL
|
ASL
|
||||||
ASL
|
ADC VDUADDR ; Mult 5
|
||||||
ADC VDUADDR
|
|
||||||
STA VDUADDR ; VDUADDR = line * $500
|
STA VDUADDR ; VDUADDR = line * $500
|
||||||
LDA TXTWINLFT
|
LDA TXTWINLFT ; Left margin
|
||||||
ASL
|
ASL ; 2 bytes / char
|
||||||
AND #$00ff
|
AND #$00ff ; Mask to get 8 bit result
|
||||||
ADC VDUADDR
|
ADC VDUADDR ; Add to beginning of line addr
|
||||||
STA VDUADDR ; VDUADDR = Minimum position
|
STA VDUADDR ; VDUADDR = start position
|
||||||
SEP #$21 ; M 8 bit, X 16 bit, carry set
|
SEP #$21 ; M 8 bit, X 16 bit, carry set
|
||||||
MX %10 ; Tell Merlin
|
MX %10 ; Tell Merlin
|
||||||
LDA TXTWINRGT
|
LDA TXTWINRGT ; Compute width ..
|
||||||
SBC TXTWINLFT
|
SBC TXTWINLFT ; .. right minus left
|
||||||
REP #$31 ; M,X 16 bit, carry clear
|
REP #$31 ; M,X 16 bit, carry clear
|
||||||
MX %00 ; Tell Merlin
|
MX %00 ; Tell Merlin
|
||||||
ASL
|
ASL ; 2 bytes / char
|
||||||
AND #$00ff
|
AND #$00ff ; Mask to get 8 bit result
|
||||||
ADC VDUADDR
|
ADC VDUADDR ; Add to start position
|
||||||
TAX
|
TAX ; Will use as index
|
||||||
PEA #$e1e1
|
PEA #$e1e1 ; Set databank to $E1
|
||||||
PLB
|
PLB
|
||||||
PLB
|
PLB
|
||||||
:LOOP1 LDA $2500,x ; 2 bytes, row 0
|
:LOOP1 LDA $2500,x ; 2 bytes, row 0
|
||||||
@ -391,15 +391,15 @@ SHRSCR1LINE PHY
|
|||||||
STA $23c0,x
|
STA $23c0,x
|
||||||
LDA $2960,x ; row 7
|
LDA $2960,x ; row 7
|
||||||
STa $2460,x
|
STa $2460,x
|
||||||
|
DEX ; Update index
|
||||||
DEX
|
DEX
|
||||||
DEX
|
BMI :DONE ; Jump out if odd->-ve
|
||||||
BMI :DONE
|
CPX VDUADDR ; Compare with start addr
|
||||||
CPX VDUADDR
|
BCS :LOOP1 ; Bytes left? Go again
|
||||||
BCS :LOOP1
|
:DONE PLB ; Recover data bank
|
||||||
:DONE PLB
|
SEC ; Back to emulation mode
|
||||||
SEC
|
|
||||||
XCE
|
XCE
|
||||||
PLP
|
PLP ; Recover flags + regs
|
||||||
PLX
|
PLX
|
||||||
PLY
|
PLY
|
||||||
RTS
|
RTS
|
||||||
|
Loading…
Reference in New Issue
Block a user