Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
This commit is contained in:
parent
472454c19d
commit
ae5cb754fb
|
@ -17,10 +17,15 @@ XLEN = $BE52 ;length of command string-1.
|
||||||
XCNUM = $BE53 ;CI cmd no. (ext cmd - 0).
|
XCNUM = $BE53 ;CI cmd no. (ext cmd - 0).
|
||||||
PBITS = $BE54 ;Command parameter bits.
|
PBITS = $BE54 ;Command parameter bits.
|
||||||
XRETURN = $FF58 ;Known RTS instruction.
|
XRETURN = $FF58 ;Known RTS instruction.
|
||||||
InputByte = $c08e
|
|
||||||
OutputByte = $c08d
|
; have 6502 absolute indexed access phantom reads
|
||||||
InputFlags = $c08b
|
; happen on page $bf to avoid unwanted i/o access
|
||||||
OutputFlags = $c087
|
IndexOffset = $8f
|
||||||
|
|
||||||
|
InputByte = $c08e - IndexOffset
|
||||||
|
OutputByte = $c08d - IndexOffset
|
||||||
|
InputFlags = $c08b - IndexOffset
|
||||||
|
OutputFlags = $c087 - IndexOffset
|
||||||
|
|
||||||
ReadBlockCommand = $01
|
ReadBlockCommand = $01
|
||||||
WriteBlockCommand = $02
|
WriteBlockCommand = $02
|
||||||
|
@ -76,9 +81,10 @@ DetectSlot:
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
tax
|
|
||||||
clc
|
clc
|
||||||
bcc Start
|
adc #IndexOffset
|
||||||
|
tax
|
||||||
|
bcc Start ;always
|
||||||
nextSlot:
|
nextSlot:
|
||||||
dex
|
dex
|
||||||
bne DetectSlot
|
bne DetectSlot
|
||||||
|
|
|
@ -19,10 +19,14 @@ IOError = $27
|
||||||
NoDevice = $28
|
NoDevice = $28
|
||||||
WriteProtect = $2B
|
WriteProtect = $2B
|
||||||
|
|
||||||
InputByte = $c08e
|
; have 6502 absolute indexed access phantom reads
|
||||||
OutputByte = $c08d
|
; happen on page $bf to avoid unwanted i/o access
|
||||||
InputFlags = $c08b
|
IndexOffset = $8f
|
||||||
OutputFlags = $c087
|
|
||||||
|
InputByte = $c08e - IndexOffset
|
||||||
|
OutputByte = $c08d - IndexOffset
|
||||||
|
InputFlags = $c08b - IndexOffset
|
||||||
|
OutputFlags = $c087 - IndexOffset
|
||||||
|
|
||||||
ResetCommand = $00
|
ResetCommand = $00
|
||||||
ReadBlockCommand = $01
|
ReadBlockCommand = $01
|
||||||
|
@ -85,9 +89,10 @@ DetectSlot:
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
tax
|
|
||||||
clc
|
clc
|
||||||
bcc Init
|
adc #IndexOffset
|
||||||
|
tax
|
||||||
|
bcc Init ;always
|
||||||
nextSlot:
|
nextSlot:
|
||||||
dex
|
dex
|
||||||
bne DetectSlot
|
bne DetectSlot
|
||||||
|
|
Loading…
Reference in New Issue