diff --git a/Apple2/RPi.Command.asm b/Apple2/RPi.Command.asm index 56316e7..b5e1db9 100644 --- a/Apple2/RPi.Command.asm +++ b/Apple2/RPi.Command.asm @@ -17,10 +17,15 @@ XLEN = $BE52 ;length of command string-1. XCNUM = $BE53 ;CI cmd no. (ext cmd - 0). PBITS = $BE54 ;Command parameter bits. XRETURN = $FF58 ;Known RTS instruction. -InputByte = $c08e -OutputByte = $c08d -InputFlags = $c08b -OutputFlags = $c087 + +; have 6502 absolute indexed access phantom reads +; happen on page $bf to avoid unwanted i/o access +IndexOffset = $8f + +InputByte = $c08e - IndexOffset +OutputByte = $c08d - IndexOffset +InputFlags = $c08b - IndexOffset +OutputFlags = $c087 - IndexOffset ReadBlockCommand = $01 WriteBlockCommand = $02 @@ -76,9 +81,10 @@ DetectSlot: asl asl asl - tax clc - bcc Start + adc #IndexOffset + tax + bcc Start ;always nextSlot: dex bne DetectSlot diff --git a/Apple2/Shell.asm b/Apple2/Shell.asm index 7a613b3..67cd253 100755 --- a/Apple2/Shell.asm +++ b/Apple2/Shell.asm @@ -19,10 +19,14 @@ IOError = $27 NoDevice = $28 WriteProtect = $2B -InputByte = $c08e -OutputByte = $c08d -InputFlags = $c08b -OutputFlags = $c087 +; have 6502 absolute indexed access phantom reads +; happen on page $bf to avoid unwanted i/o access +IndexOffset = $8f + +InputByte = $c08e - IndexOffset +OutputByte = $c08d - IndexOffset +InputFlags = $c08b - IndexOffset +OutputFlags = $c087 - IndexOffset ResetCommand = $00 ReadBlockCommand = $01 @@ -85,9 +89,10 @@ DetectSlot: asl asl asl - tax clc - bcc Init + adc #IndexOffset + tax + bcc Init ;always nextSlot: dex bne DetectSlot