Compare commits

...

3 Commits

Author SHA1 Message Date
Florian Reitz b13ed9077f Replace BIT with LDA 2021-08-25 00:39:15 +02:00
Florian Reitz 99eebeb89f Set DSNUMBER on boot 2021-08-24 20:56:49 +02:00
Florian Reitz f866c3f66e Fix in INIT 2021-08-24 19:44:49 +02:00
7 changed files with 16 additions and 14 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,7 +1,7 @@
;*******************************
;
; Apple][Sd Firmware
; Version 1.2.2
; Version 1.2.3
; Defines
;
; (c) Florian Reitz, 2017 - 2021

View File

@ -1,7 +1,7 @@
;*******************************
;
; Apple][Sd Firmware
; Version 1.2.2
; Version 1.2.3
; Main source
;
; (c) Florian Reitz, 2017 - 2021
@ -86,7 +86,7 @@
LDA #197
JSR $FCA8 ; wait for 100 ms
@OAPPLE: BIT OAPPLE ; check for OA key
@OAPPLE: LDA OAPPLE ; check for OA key
BPL @INIT ; and skip boot if pressed
@NEXTSLOT: LDA CURSLOT ; skip boot when no card
@ -110,6 +110,8 @@
STZ BUFFER ; buffer lo
STZ BLOCKNUM+1 ; block hi
STZ BLOCKNUM ; block lo
LDA SLOT16
STA DSNUMBER ; set to current slot
JSR READ
BCS @NEXTSLOT ; load not successful
@ -224,10 +226,10 @@ INIT: STZ CTRL,X ; reset SPI controller
LDA #SS0 ; set CS high
STA SS,X
LDY #10
LDA #DUMMY
@LOOP: STA DATA,X
@WAIT: BIT CTRL,X
@LOOP: LDA #DUMMY
STA DATA,X
@WAIT: LDA CTRL,X ; wait for TC (bit 7) to get high
BPL @WAIT
DEY
BNE @LOOP ; do 10 times

View File

@ -1,7 +1,7 @@
;*******************************
;
; Apple][Sd Firmware
; Version 1.2.2
; Version 1.2.3
; Helper functions
;
; (c) Florian Reitz, 2017 - 2021
@ -36,7 +36,7 @@ SDCMD: PHY
LDY #0
@LOOP: LDA (CMDLO),Y
STA DATA,X
@WAIT: BIT CTRL,X ; TC is in N
@WAIT: LDA CTRL,X ; TC is in N
BPL @WAIT
INY
CPY #6
@ -54,7 +54,7 @@ SDCMD: PHY
GETR1: LDA #DUMMY
STA DATA,X
@WAIT: BIT CTRL,X
@WAIT: LDA CTRL,X
BPL @WAIT
LDA DATA,X ; get response
BMI GETR1 ; wait for MSB=0
@ -79,7 +79,7 @@ GETR3: JSR GETR1 ; get R1 first
JMP @WAIT ; first byte is already there
@LOOP: LDA #DUMMY ; send dummy
STA DATA,X
@WAIT: BIT CTRL,X
@WAIT: LDA CTRL,X
BPL @WAIT
LDA DATA,X
PHA
@ -128,7 +128,7 @@ GETBLOCK: PHX ; save X
LDA #2 ; it is a phantom slot
STA R31,X
@DRIVE: BIT DSNUMBER ; drive number
@DRIVE: LDA DSNUMBER ; drive number
BPL @SDHC ; D1
LDA R31,X ; D2
INC A

View File

@ -1,7 +1,7 @@
;*******************************
;
; Apple][Sd Firmware
; Version 1.2.2
; Version 1.2.3
; ProDOS functions
;
; (c) Florian Reitz, 2017 - 2021

View File

@ -1,7 +1,7 @@
;*******************************
;
; Apple][Sd Firmware
; Version 1.2.2
; Version 1.2.3
; Smartport functions
;
; (c) Florian Reitz, 2017 - 2021
@ -95,7 +95,7 @@ SMARTPORT: LDY #SMZPSIZE-1 ; save zeropage area for Smarport
BCC @RESTZP
TXA
;warum feste anzahl an bytes für return wert?
;warum feste anzahl an bytes f<EFBFBD>r return wert?
LDY #2 ; highbyte of # bytes transferred
LDX #0 ; low byte of # bytes transferred
;warum wird mit #1 verglichen?