Serial IEC Disk Drive Interface

6 posts / 0 new
Last post
Online
Last seen: 37 min 16 sec ago
Joined: May 4 2021 - 06:35
Posts: 155
Serial IEC Disk Drive Interface

Dear Friends,

it is with great pleasure that @nippur72 and I share with you our latest project (actually, more his effort than mine, I just soldered some component...).

 

As some of you had guessed: this is a microSD Storage Card add-on module that allows your Apple-1 to use one or more Commodore Disk Drives!

 

We told ourselves: almost everything is already on the Storage Card: RAM, ROM, VIA... let's add the few components that are missing and build a true serial IEC interface!

No sooner said than done!

The module is easy to build and connects to the Storage Card via the expansion connector already in place (just solder a 1x12pin stripline to it).

It is necessary to upgrade the Storage Card firmware to version 1.3 by rewriting the EEPROM, after having done all the checks described in Chapter 4 of the reference document.

 

Reference page:

https://p-l4b.github.io/iec/ (local archive)

 

Nippur72 ported most of the Disk Drive routines from the C64's Kernal to the Storage Card firmware, quite a miracle considering he managed to fit everything into just over 2kB of space.

Thus, all CBM DOS-specific commands (Initialize, Validate, Scratch, New, Error channel, etc.) plus Apple-1 dedicated commands are available.

Of course, the on-board microSD memory card remains accessible and functional.

 

Since this is an IEC interface it is possible to daisy chain and manage up to 4 Drives (or emulators: Pi1541 for example works great).

Tests were conducted with the 1541 and 1541/II but we are confident that any Drive offering "basic" serial IEC interface operation is compatible.

Any contributions to this Compatibility List will be posted on the project site.

 

The schematic for this Add-On, the related Gerber file, the SD OS source code, and all informations are available under a Creative Common CC BY 4.0 license.

Here's a short video. Enjoy! :-)

https://www.youtube.com/watch?v=qsFPuuKBxFc

 

 

Claudio P-LAB / Nippur72

 

Offline
Last seen: 8 hours 50 min ago
Joined: Jun 29 2018 - 16:55
Posts: 582
Claudio was nice enough to

Claudio was nice enough to let me test the circuit this week. I must say it has a really nice feel to it as a user. After taking this photo I ended up reformatting the disk, copying BASIC and some programs to the disk by way of SD card, and testing whatever I could. Including a Replica 1 Plus, which worked perfectly too.

 

Loading BASIC is fast. Not "Uncle Bernie's turbo-loader .aiff 2 seconds fast," but much faster than cassette. And somehow more satisfying than loading right from SD.

 

So here's my proto version, I used some female headers as standoffs to level the proto board above the SD card to eliminate the possiblity of shorts, and used a pin header with a 1:1 pinout of the IEC DIN. One wire from the 74LS06 IC to the IEC connection is on the underside of the board but most of the rest of the circuit is visible. 
Offline
Last seen: 5 months 1 week ago
Joined: Dec 10 2021 - 12:26
Posts: 33
Cool setup, and with a

Cool setup, and with a Commodore keyboard too!

And it doesn't matter if it's slower, loading from a real disk drive has a special "flavour" :-)

The routines in the EEPROM are the ones directly from the Commodore 64 Kernal adapted to work with a 6522 (VIA) instead of 6526 (CIA). The slowness is due to the fact that data is exchanged by "bit banging" on the I/O ports, despite the VIA/CIA is in theory able to handle the handshake directly without CPU intervention.

The short story is that the IEC protocol was originally parallel on the Commodore PET but later turned to be serial when the VIC-20 came out (in order to keep prices contained). But the 6522 shipped with the VIC-20 had a bug on the shift register so the automatic handshake could not be used and the routines were implemented as bit banging, making it a lot slower. 

Offline
Last seen: 8 hours 50 min ago
Joined: Jun 29 2018 - 16:55
Posts: 582
nippur72 wrote:Cool setup,
nippur72 wrote:

Cool setup, and with a Commodore keyboard too!

And it doesn't matter if it's slower, loading from a real disk drive has a special "flavour" :-)

The routines in the EEPROM are the ones directly from the Commodore 64 Kernal adapted to work with a 6522 (VIA) instead of 6526 (CIA). The slowness is due to the fact that data is exchanged by "bit banging" on t

It's great stuff, thank you.  It's not slow by any means, it is much faster and more usable than normal cassette. Uncle Bernies audio turboloader is just impressively fast for audio as a transmission method. 

Online
Last seen: 37 min 16 sec ago
Joined: May 4 2021 - 06:35
Posts: 155
1571 and 1581 CBM drives are supported

Hi all,

Good news!

 

Thanks to the support of a couple of friends we can now also add the Commodore 1571 and 1581 Disk Drives to those fully supported by the microSD/IEC interface for Apple-1!

https://p-l4b.github.io/iec/

 

Updated list:

https://p-l4b.github.io/iec/list.txt

 

On the 1571, to benefit from the full capability to read/write all 1328 blocks, it is necessary to issue from SD OS the command @CMD U0>M1 to put the drive in 128 mode.

This will give access to all ~330kB of the disk.

If the command is not issued, it will work in 64 mode (664 blocks).

 

The 1581 works "out of the box" and it has been tested with both the original CBM firmware and JiffyDOS 6.0.

It works at full capacity without any command, providing an impressive 3160 blocks (~800kB) of storage.

Who could possibly need more storage space? :-D

 

Time to dust off your drive!

Enjoy! :-)

 

https://www.youtube.com/watch?v=qsFPuuKBxFc

 

Claudio - P-LAB

 

Online
Last seen: 37 min 16 sec ago
Joined: May 4 2021 - 06:35
Posts: 155
Also SD2IEC tested and working

Dear friends,

I am pleased to inform you that popular SD2IEC type Drive Emulators are also compatible with the SD/IEC Disk Drive Interface for Apple-1.

https://p-l4b.github.io/iec/

 

Usually these types of devices are powered from the cassette interface or other ports, if an external power connector is not available... be creative! :-)

 

At the moment the File Browser program (FB64, FB20 etc.) is not available, but you will still be able to move between directories with the appropriate @CMD commands, as well as mount/unmount disk images.

Programs can be saved either in directories or within the disk images.

 

For the complete list of SD2IEC commands, please refer to the online guides.

 

With this, the list of compatible devices -already updated- is almost complete.

Thank you for your support on this project and have fun! :-)

 

Claudio - P-LAB

 

 

Log in or register to post comments