mirror of
https://github.com/freitz85/AppleIISd.git
synced 2024-11-21 06:31:36 +00:00
Test with 8 drives for ProDOS 2.5
This commit is contained in:
parent
320602e692
commit
65bff70367
@ -1,10 +1,10 @@
|
||||
;*******************************
|
||||
;
|
||||
; Apple][Sd Firmware
|
||||
; Version 1.2
|
||||
; Version 1.3
|
||||
; Defines
|
||||
;
|
||||
; (c) Florian Reitz, 2017 - 2018
|
||||
; (c) Florian Reitz, 2017 - 2019
|
||||
;
|
||||
; X register usually contains SLOT16
|
||||
; Y register is used for counting or SLOT
|
||||
@ -61,7 +61,7 @@ WP = $20
|
||||
CD = $40
|
||||
INITED = $80
|
||||
|
||||
SMDRIVERVER = $120B ; Version 1.2 Beta
|
||||
SMDRIVERVER = $130B ; Version 1.3 Beta
|
||||
|
||||
; Error codes
|
||||
NO_ERR = $00
|
||||
|
@ -1,10 +1,10 @@
|
||||
;*******************************
|
||||
;
|
||||
; Apple][Sd Firmware
|
||||
; Version 1.2.1
|
||||
; Version 1.3
|
||||
; Main source
|
||||
;
|
||||
; (c) Florian Reitz, 2017 - 2018
|
||||
; (c) Florian Reitz, 2017 - 2019
|
||||
;
|
||||
; X register usually contains SLOT16
|
||||
; Y register is used for counting or SLOT
|
||||
@ -368,7 +368,7 @@ INIT: LDA #$03 ; set SPI mode 3
|
||||
RTS
|
||||
|
||||
|
||||
TEXT: .asciiz " Apple][Sd v1.2.1 (c)2018 Florian Reitz "
|
||||
TEXT: .asciiz " Apple][Sd v1.3 (c)2019 Florian Reitz "
|
||||
|
||||
CMD0: .byt $40, $00, $00
|
||||
.byt $00, $00, $95
|
||||
|
@ -1,10 +1,10 @@
|
||||
;*******************************
|
||||
;
|
||||
; Apple][Sd Firmware
|
||||
; Version 1.2
|
||||
; Version 1.3
|
||||
; Helper functions
|
||||
;
|
||||
; (c) Florian Reitz, 2017 - 2018
|
||||
; (c) Florian Reitz, 2017 - 2019
|
||||
;
|
||||
; X register usually contains SLOT16
|
||||
; Y register is used for counting or SLOT
|
||||
@ -102,10 +102,13 @@ GETR3: JSR GETR1 ; get R1 first
|
||||
;*******************************
|
||||
;
|
||||
; Calculate block address
|
||||
; Unit number is in $43 DSSS0000
|
||||
; Unit number is in $43 DSSS0000 / DSSS00DD
|
||||
; Block no is in $46-47
|
||||
; Address is in R30-R33
|
||||
;
|
||||
; Starting ProDOS 2.5a5 the unit number
|
||||
; has been enhanced to DSSS00DD
|
||||
;
|
||||
;*******************************
|
||||
|
||||
GETBLOCK: PHX ; save X
|
||||
@ -116,21 +119,35 @@ GETBLOCK: PHX ; save X
|
||||
STA R33,X ; in R30-R33
|
||||
LDA BLOCKNUM+1
|
||||
STA R32,X
|
||||
STZ R31,X
|
||||
STZ R30,X
|
||||
|
||||
TYA ; get SLOT16
|
||||
.if 1
|
||||
LDA DSNUMBER ; calculate drive number
|
||||
ASL A
|
||||
AND #$07
|
||||
ADC #$01
|
||||
STA R31,X
|
||||
.else
|
||||
LDA DSNUMBER
|
||||
AND #$03 ; mask extended drive bits (bits 0-1)
|
||||
STA R31,X
|
||||
BIT DSNUMBER ; check old drive number (bit 7)
|
||||
BPL @PHANTOM
|
||||
INC A ; increase by one
|
||||
STA R31,X
|
||||
.endif
|
||||
.if 0
|
||||
@PHANTOM: TYA ; get SLOT16
|
||||
EOR DSNUMBER
|
||||
AND #$70 ; check only slot bits
|
||||
BEQ @DRIVE ; it is our slot
|
||||
LDA #2 ; it is a phantom slot
|
||||
STA R31,X
|
||||
|
||||
@DRIVE: BIT DSNUMBER ; drive number
|
||||
BPL @SDHC ; D1
|
||||
LDA R31,X ; D2
|
||||
INC A
|
||||
BEQ @SDHC ; it is our slot
|
||||
LDA R31,X ; it is a phantom slot, multiply by 16
|
||||
ASL A
|
||||
ASL A
|
||||
ASL A
|
||||
ASL A
|
||||
STA R31,X
|
||||
.endif
|
||||
|
||||
@SDHC: LDA #SDHC
|
||||
AND SS,Y ; if card is SDHC,
|
||||
@ -144,7 +161,7 @@ GETBLOCK: PHX ; save X
|
||||
DEY
|
||||
BNE @LOOP
|
||||
|
||||
@END: PLY ; restore Y
|
||||
@END: PLY ; restore Y
|
||||
PLX ; restore X
|
||||
RTS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user