Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for Apple II 3.5" as well #85

Open
SvOlli opened this issue Dec 18, 2023 · 5 comments
Open

Build for Apple II 3.5" as well #85

SvOlli opened this issue Dec 18, 2023 · 5 comments

Comments

@SvOlli
Copy link

SvOlli commented Dec 18, 2023

With the Apple II GS and the Apple II C plus, there are two machines capable of running CP/M 65, but can't due to a different disk format (3.5" instead of 5.25").

(And I'd really like to see CP/M 65 running on my real 2gs instead of just in an emulator.)

@davidgiven
Copy link
Owner

That's the 800kB format, right? Making a disk image should be easy as IIRC it's just the same as the later Macintosh 800kB format, but they'll need a whole new set of disk access routines and I'm still burnt out from doing the Apple II routines! If you have any pointers to example code that'll help...

@polluks
Copy link
Contributor

polluks commented Jul 17, 2024

SmartPort access it easy:

; Define SmartPort register addresses
SMARTPORT_COMMAND  = $C0E0
SMARTPORT_STATUS   = $C0E1
SMARTPORT_DATA     = $C0E2

; Command definitions
SMARTPORT_CMD_READ = $02
SMARTPORT_CMD_WRITE = $03

; Buffer for data transfer
BUFFER = $8000

; Initialize the SmartPort
INIT_SMARTPORT:
    LDA #$00
    STA SMARTPORT_COMMAND  ; Reset the SmartPort
    RTS
; Send a command to the SmartPort
SEND_COMMAND:
    LDX #$00
    STX SMARTPORT_STATUS   ; Clear status
    LDA #SMARTPORT_CMD_READ ; Load command (change to WRITE for write operation)
    STA SMARTPORT_COMMAND  ; Send command
    RTS
; Read data from the SmartPort
READ_DATA:
    LDY #$00
READ_LOOP:
    LDA SMARTPORT_STATUS
    BPL READ_LOOP         ; Wait until data is ready
    LDA SMARTPORT_DATA    ; Read data byte
    STA BUFFER, Y         ; Store in buffer
    INY
    CPY #$100             ; Assume 256 bytes to read
    BNE READ_LOOP
    RTS
; Write data to the SmartPort
WRITE_DATA:
    LDY #$00
WRITE_LOOP:
    LDA BUFFER, Y         ; Load data byte from buffer
    STA SMARTPORT_DATA    ; Write to SmartPort
    INY
    CPY #$100             ; Assume 256 bytes to write
    BNE WRITE_LOOP
    RTS

@SEGStriker
Copy link

Any progress? I guess adding more drives support should be easy. For example S6 D2 (5.25"), S5 D1, D2 (3.5"), S7 D1, D2 (HDD or another disk type).

@davidgiven
Copy link
Owner

I haven't actually touched it! Is 800kB disk access always through SmartPort or does it use a software-defined interface like the Apple II interface?

@SEGStriker
Copy link

The original one is just like Apple II interface, but designed for higher capacity, mostly in ProDOS: https://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Interface%20Cards/Disk%20Drive%20Controllers/Apple%20II%203.5%20Disk%20Controller%20Card/Manuals/Apple%203.5%20Disk%20Controller%20Card%20-%20Owner's%20Guide.pdf

And there are modern implementations like:

https://wiki.reactivemicro.com/Apple_II_3.5_Disk_Controller_Card
https://www.bigmessowires.com/yellowstone (not only for FDDs)
https://www.a2heaven.com/webshop/resources/pdf_document/18/8f/a.pdf - one of many A2Heaven controllers that supports high-capacity devices, with smartport compatibility

https://en.wikipedia.org/wiki/SuperDrive - It says in 1988 1.44 MB FDDs were introduced for Apple IIe, then in 1991 the controller...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants