mirror of
https://github.com/freitz85/AppleIISd.git
synced 2025-02-19 18:31:29 +00:00
Fix in INIT
This commit is contained in:
parent
06139a74f8
commit
27cad58424
@ -90,13 +90,11 @@
|
|||||||
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
|
||||||
.IFPC02
|
SBC #1
|
||||||
DEC A
|
|
||||||
STA CMDHI ; use CMDHI/LO as pointer
|
STA CMDHI ; use CMDHI/LO as pointer
|
||||||
|
.IFPC02
|
||||||
STZ CMDLO
|
STZ CMDLO
|
||||||
.ELSE
|
.ELSE
|
||||||
SBC #1
|
|
||||||
STA CMDHI
|
|
||||||
LDA #0
|
LDA #0
|
||||||
STA CMDLO
|
STA CMDLO
|
||||||
.ENDIF
|
.ENDIF
|
||||||
@ -286,11 +284,11 @@ INIT:
|
|||||||
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: AND CTRL,X
|
STA DATA,X
|
||||||
BPL @WAIT
|
@WAIT: LDA CTRL,X
|
||||||
|
BPL @WAIT ; wait for TC (bit 7) to get high
|
||||||
DEY
|
DEY
|
||||||
BNE @LOOP ; do 10 times
|
BNE @LOOP ; do 10 times
|
||||||
LDA SS,X
|
LDA SS,X
|
||||||
|
@ -41,14 +41,9 @@ SDCMD: .IFPC02
|
|||||||
LDY #0
|
LDY #0
|
||||||
@LOOP: LDA (CMDLO),Y
|
@LOOP: LDA (CMDLO),Y
|
||||||
STA DATA,X
|
STA DATA,X
|
||||||
@WAIT: .IFPC02
|
@WAIT: LDA CTRL,X ; TC is in N
|
||||||
BIT CTRL,X ; TC is in N
|
|
||||||
BPL @WAIT
|
BPL @WAIT
|
||||||
.ELSE
|
|
||||||
LDA #TC
|
|
||||||
AND CTRL,X
|
|
||||||
BEQ @WAIT
|
|
||||||
.ENDIF
|
|
||||||
INY
|
INY
|
||||||
CPY #6
|
CPY #6
|
||||||
BCC @LOOP
|
BCC @LOOP
|
||||||
@ -70,14 +65,9 @@ SDCMD: .IFPC02
|
|||||||
|
|
||||||
GETR1: LDA #DUMMY
|
GETR1: LDA #DUMMY
|
||||||
STA DATA,X
|
STA DATA,X
|
||||||
@WAIT: .IFPC02
|
@WAIT: LDA CTRL,X ; TC is in N
|
||||||
BIT CTRL,X ; TC is in N
|
|
||||||
BPL @WAIT
|
BPL @WAIT
|
||||||
.ELSE
|
|
||||||
LDA #TC
|
|
||||||
AND CTRL,X
|
|
||||||
BEQ @WAIT
|
|
||||||
.ENDIF
|
|
||||||
LDA DATA,X ; get response
|
LDA DATA,X ; get response
|
||||||
BMI GETR1 ; wait for MSB=0
|
BMI GETR1 ; wait for MSB=0
|
||||||
PHA
|
PHA
|
||||||
@ -106,14 +96,9 @@ 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: .IFPC02
|
@WAIT: LDA CTRL,X ; TC is in N
|
||||||
BIT CTRL,X ; TC is in N
|
|
||||||
BPL @WAIT
|
BPL @WAIT
|
||||||
.ELSE
|
|
||||||
LDA #TC
|
|
||||||
AND CTRL,X
|
|
||||||
BEQ @WAIT
|
|
||||||
.ENDIF
|
|
||||||
LDA DATA,X
|
LDA DATA,X
|
||||||
PHA
|
PHA
|
||||||
DEY
|
DEY
|
||||||
|
21
README.md
21
README.md
@ -1,4 +1,5 @@
|
|||||||
# AppleIISd
|
# AppleIISd
|
||||||
|
|
||||||
SD card based ProFile replacement for enhanced Apple IIe and IIgs computers
|
SD card based ProFile replacement for enhanced Apple IIe and IIgs computers
|
||||||
|
|
||||||
The **AppleIISd** is a SD card based replaced for the ProFile harddrive. In contrast to other SD card based devices, this card does not replace a Disk II drive. Data is saved directly onto the SD card, not via images on a FAT system, like on other cards. The SD card is accessable with [CiderPress](http://a2ciderpress.com/).
|
The **AppleIISd** is a SD card based replaced for the ProFile harddrive. In contrast to other SD card based devices, this card does not replace a Disk II drive. Data is saved directly onto the SD card, not via images on a FAT system, like on other cards. The SD card is accessable with [CiderPress](http://a2ciderpress.com/).
|
||||||
@ -8,6 +9,7 @@ A Xilinx CPLD is used as a SPI controller and translates, together with the ROM
|
|||||||
The assembler sources are written for CC65. The [schematics](Binary/AppleIISd.pdf) are available as PDF.
|
The assembler sources are written for CC65. The [schematics](Binary/AppleIISd.pdf) are available as PDF.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* works with ProDOS and GS/OS
|
* works with ProDOS and GS/OS
|
||||||
* up to 128MB storage space (4x 65535 blocks)
|
* up to 128MB storage space (4x 65535 blocks)
|
||||||
* ProDOS and Smartport driver in ROM
|
* ProDOS and Smartport driver in ROM
|
||||||
@ -18,7 +20,9 @@ The assembler sources are written for CC65. The [schematics](Binary/AppleIISd.pd
|
|||||||
* Skip boot when Open-Apple key is pressed
|
* Skip boot when Open-Apple key is pressed
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
The AppleIISd requires an enhanced IIe or IIgs computer. The ROM code uses some 65c02 opcodes and will therefore not work on a II, II+ or unenhanced IIe. It has been tested in the following combinations:
|
The AppleIISd requires an enhanced IIe or IIgs computer. The ROM code uses some 65c02 opcodes and will therefore not work on a II, II+ or unenhanced IIe. It has been tested in the following combinations:
|
||||||
|
|
||||||
* Apple IIgs Rom 01, GS/OS 6.0.4
|
* Apple IIgs Rom 01, GS/OS 6.0.4
|
||||||
* Apple IIgs Rom 01, Prodos 2.4.1
|
* Apple IIgs Rom 01, Prodos 2.4.1
|
||||||
* Apple IIgs Rom 01, Prodos 1.9
|
* Apple IIgs Rom 01, Prodos 1.9
|
||||||
@ -27,6 +31,7 @@ The AppleIISd requires an enhanced IIe or IIgs computer. The ROM code uses some
|
|||||||
* Apple IIe enhanced, 64k, Prodos 1.9
|
* Apple IIe enhanced, 64k, Prodos 1.9
|
||||||
|
|
||||||
## Binary distribution
|
## Binary distribution
|
||||||
|
|
||||||
The following files in [Binary/](Binary) have been provided to eliminate the need to compile assembler or VHDL sources.
|
The following files in [Binary/](Binary) have been provided to eliminate the need to compile assembler or VHDL sources.
|
||||||
|
|
||||||
| File | Purpose |
|
| File | Purpose |
|
||||||
@ -41,6 +46,7 @@ The following files in [Binary/](Binary) have been provided to eliminate the nee
|
|||||||
| Gerber_Vx.x.zip | Gerber files for different hw revisions |
|
| Gerber_Vx.x.zip | Gerber files for different hw revisions |
|
||||||
|
|
||||||
## Smartport drive remapping
|
## Smartport drive remapping
|
||||||
|
|
||||||
The AppleIISd features Smartport drivers in ROM to provide more than two drives in both GS/OS and ProDOS.
|
The AppleIISd features Smartport drivers in ROM to provide more than two drives in both GS/OS and ProDOS.
|
||||||
|
|
||||||
As ProDOS supports only two drives per slot, additional drives on a Smartport device are mapped to 'phantom slots'. Version prior to version 2 supported only the remapping of drives when the card was in slot 5. Starting with version 2, the remapping seems to work on all slots. The following list shows the assignments as slot/drive, when no other devices are attached:
|
As ProDOS supports only two drives per slot, additional drives on a Smartport device are mapped to 'phantom slots'. Version prior to version 2 supported only the remapping of drives when the card was in slot 5. Starting with version 2, the remapping seems to work on all slots. The following list shows the assignments as slot/drive, when no other devices are attached:
|
||||||
@ -56,15 +62,19 @@ As ProDOS supports only two drives per slot, additional drives on a Smartport de
|
|||||||
When more devices are connected, things get a little confusing ;-)
|
When more devices are connected, things get a little confusing ;-)
|
||||||
|
|
||||||
## Building the sources
|
## Building the sources
|
||||||
|
|
||||||
Be sure to have the newest version of CC65 (V2.16) and some kind of Make instaled, then type one of the following comands:
|
Be sure to have the newest version of CC65 (V2.16) and some kind of Make instaled, then type one of the following comands:
|
||||||
```
|
|
||||||
|
```bash
|
||||||
make # generate binaries
|
make # generate binaries
|
||||||
make OPTIONS=mapfile,listing # generate mapfile and listing, too
|
make OPTIONS=mapfile,listing # generate mapfile and listing, too
|
||||||
make clean # delete binaries
|
make clean # delete binaries
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively use the VisualStudio solution.
|
Alternatively use the VisualStudio solution.
|
||||||
|
|
||||||
## Timing
|
## Timing
|
||||||
|
|
||||||
The clock of the SPI bus *SCK* may be derived from either *Phi0* or the *7M* clock. Additionally, the divisor may be 2 to 8.
|
The clock of the SPI bus *SCK* may be derived from either *Phi0* or the *7M* clock. Additionally, the divisor may be 2 to 8.
|
||||||
|
|
||||||
The following measurements were taken with the divisor set to 2, resulting in *fSCK* of 500kHz and 3.5MHz. Reading of a byte requires that a dummy byte is sent on the bus, before the answer can be read. Therefore the measurement is the time between sending the byte and receiving the answer. The measurement for reading of a whole 512 byte block includes the SD card commands to do so.
|
The following measurements were taken with the divisor set to 2, resulting in *fSCK* of 500kHz and 3.5MHz. Reading of a byte requires that a dummy byte is sent on the bus, before the answer can be read. Therefore the measurement is the time between sending the byte and receiving the answer. The measurement for reading of a whole 512 byte block includes the SD card commands to do so.
|
||||||
@ -78,7 +88,7 @@ This shows that the required to read a single byte can be reduced significantly
|
|||||||
|
|
||||||
The time for reading a 512 byte block could *only* be halved, but there are for sure opportunities for optimization in the code surrounding the reading.
|
The time for reading a 512 byte block could *only* be halved, but there are for sure opportunities for optimization in the code surrounding the reading.
|
||||||
|
|
||||||
```
|
```asm
|
||||||
* single byte @ 500kHz
|
* single byte @ 500kHz
|
||||||
LDA #$FF
|
LDA #$FF
|
||||||
STA $C0C0
|
STA $C0C0
|
||||||
@ -97,8 +107,8 @@ STA $C0C0
|
|||||||
LDA $C0C0
|
LDA $C0C0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Registers
|
## Registers
|
||||||
|
|
||||||
The control registers of the *AppleIISd* are mapped to the usual I/O space at **$C0n0 - $C0n3**, where n is slot+8. All registers and bits are read/write, except where noted.
|
The control registers of the *AppleIISd* are mapped to the usual I/O space at **$C0n0 - $C0n3**, where n is slot+8. All registers and bits are read/write, except where noted.
|
||||||
|
|
||||||
| Address | Function | Default value |
|
| Address | Function | Default value |
|
||||||
@ -131,14 +141,15 @@ The control registers of the *AppleIISd* are mapped to the usual I/O space at **
|
|||||||
**INIT** Initialized - This bit is set to 1 when the SD card has been initialized by the firmware. Do not write manually.
|
**INIT** Initialized - This bit is set to 1 when the SD card has been initialized by the firmware. Do not write manually.
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
* Much more testing
|
* Much more testing
|
||||||
* Enable more than 4 volumes under GS/OS
|
* Enable more than 4 volumes under GS/OS
|
||||||
* Support for 6502 CPUs
|
* Support for 6502 CPUs
|
||||||
* Support for CP/M
|
* Support for CP/M
|
||||||
|
|
||||||
## Known Bugs
|
## Known Bugs
|
||||||
* Programs not startable from partitions 3 and 4 under ProDOS
|
|
||||||
|
|
||||||
|
* Programs not startable from partitions 3 and 4 under ProDOS
|
||||||
|
|
||||||
![Front_Img_Smd](Images/Card%20Front%20SMD.jpg)
|
![Front_Img_Smd](Images/Card%20Front%20SMD.jpg)
|
||||||
![Front_Img](Images/Card%20Front.jpg)
|
![Front_Img](Images/Card%20Front.jpg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user