diff --git a/AppleIISd.bin b/AppleIISd.bin index f47849f..7fd6750 100644 Binary files a/AppleIISd.bin and b/AppleIISd.bin differ diff --git a/AppleIISd.vcxproj b/AppleIISd.vcxproj index 41f7420..7b893e5 100644 --- a/AppleIISd.vcxproj +++ b/AppleIISd.vcxproj @@ -18,6 +18,7 @@ + {9EA7EC3D-1771-420F-932F-231A35ED1200} diff --git a/AppleIISd.vcxproj.filters b/AppleIISd.vcxproj.filters index 9a84f19..5c8a181 100644 --- a/AppleIISd.vcxproj.filters +++ b/AppleIISd.vcxproj.filters @@ -16,6 +16,9 @@ src + + src + diff --git a/src/AppleIISd.inc b/src/AppleIISd.inc index 47a9012..1492ace 100644 --- a/src/AppleIISd.inc +++ b/src/AppleIISd.inc @@ -1,7 +1,8 @@ ;******************************* ; ; Apple][Sd Firmware -; Version 1.0 +; Version 1.1 +; Defines ; ; (c) Florian Reitz, 2017 ; diff --git a/src/AppleIISd.s b/src/AppleIISd.s index 9fc3ce3..9e3c3a2 100644 --- a/src/AppleIISd.s +++ b/src/AppleIISd.s @@ -11,19 +11,42 @@ ; ;******************************* -.import COMMAND -.import SDCMD -.import GETBLOCK -.import CARDDET -.import WRPROT .import GETR1 .import GETR3 +.import SDCMD +.import CARDDET +.import STATUS +.import READ +.import WRITE .include "AppleIISd.inc" -.define DEBUG 0 -; signature bytes +;******************************* +; +; Signature bytes +; +; 65535 blocks +; Removable media +; Non-interruptable +; 2 drives +; Read, write and status allowed +; +;******************************* + + .segment "SLOTID" + .dbyt $FFFF ; 65535 blocks + .byt $97 ; Status bits + .byt DRIVER - STA $BF11,X -@INSOUT: RTS - - ;******************************* ; ; Boot from SD card ; ;******************************* - .else ;@BOOT: CMP #0 ; BNE @NEXTSLOT ; init not successful @BOOT: LDA #$01 @@ -167,7 +131,6 @@ JSR READ ; call driver LDX SLOT16 JMP $801 ; goto bootloader - .endif ;******************************* @@ -187,15 +150,6 @@ DRIVER: CLD PHA LDA CMDHI PHA - - .if DEBUG - LDA #$04 - STA SLOT - LDA #$C4 - STA CURSLOT - LDA #$40 - - .else PHP SEI LDA #$60 ; opcode for RTS @@ -211,7 +165,6 @@ DRIVER: CLD ASL A ASL A ASL A - .endif STA SLOT16 ; $s0 TAX ; X holds now SLOT16 @@ -231,10 +184,6 @@ DRIVER: CLD BEQ @READ CMP #2 BEQ @WRITE - .if DEBUG - CMP #$FF - BEQ @TEST - .endif LDA #1 ; unknown command SEC BRA @RESTZP @@ -245,10 +194,6 @@ DRIVER: CLD BRA @RESTZP @WRITE: JSR WRITE BRA @RESTZP - .if DEBUG -@TEST: JSR TEST ; do device test - BRA @RESTZP - .endif @INIT: JSR INIT BCC @CMD ; init ok @@ -267,23 +212,6 @@ DRIVER: CLD RTS -;******************************* -; -; Signature bytes -; -; 65535 blocks -; Removable media -; Non-interruptable -; 2 drives -; Read, write and status allowed -; -;******************************* - - .segment "SLOTID" - .dbyt $FFFF ; 65535 blocks - .byt $97 ; Status bits - .byt