Compare commits

...

3 Commits
6502 ... master

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 ; Apple][Sd Firmware
; Version 1.2.2 ; Version 1.2.3
; Defines ; Defines
; ;
; (c) Florian Reitz, 2017 - 2021 ; (c) Florian Reitz, 2017 - 2021

View File

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

View File

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

View File

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

View File

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