SD2IEC & IEC-2-SD Adapters: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 22: | Line 22: | ||
* '''100 % open-source:''' hardware KiCad / Eagle files & AVR/ARM firmware on GitHub. | * '''100 % open-source:''' hardware KiCad / Eagle files & AVR/ARM firmware on GitHub. | ||
== | == History == | ||
* '''2006-07 – MMC2IEC''' — Lars Pontoppidan prototypes an ATmega32 board that translates IEC ↔ SPI-MMC.<ref name="pontoppidan">Pontoppidan, L. “MMC2IEC project log”, Usenet comp.sys.cbm, 2007-02-19.</ref> | * '''2006-07 – MMC2IEC''' — Lars Pontoppidan prototypes an ATmega32 board that translates IEC ↔ SPI-MMC.<ref name="pontoppidan">Pontoppidan, L. “MMC2IEC project log”, Usenet comp.sys.cbm, 2007-02-19.</ref> | ||
* '''2008 – sd2iec''' — Ingo Korb forks the code, adds FAT32, long filenames, D71/D81 and renames the firmware '''sd2iec'''.<ref name="sd2iec_wiki">''sd2iec'' official wiki, “Development timeline”.</ref> | * '''2008 – sd2iec''' — Ingo Korb forks the code, adds FAT32, long filenames, D71/D81 and renames the firmware '''sd2iec'''.<ref name="sd2iec_wiki">''sd2iec'' official wiki, “Development timeline”.</ref> | ||
| Line 29: | Line 29: | ||
* '''2018 – IEC-2-SD (STM32)''' — Petter Lundsten ports the protocol to the STM32 “Blue Pill”, bringing USB mass-storage gadget mode.<ref name="iec2sd">Lundsten, P. “IEC-2-SD readme”, GitHub, 2019-05-03.</ref> | * '''2018 – IEC-2-SD (STM32)''' — Petter Lundsten ports the protocol to the STM32 “Blue Pill”, bringing USB mass-storage gadget mode.<ref name="iec2sd">Lundsten, P. “IEC-2-SD readme”, GitHub, 2019-05-03.</ref> | ||
== | == Hardware architecture == | ||
{| class="wikitable sortable" style="text-align:center" | {| class="wikitable sortable" style="text-align:center" | ||
! Variant !! MCU !! Clock !! RAM !! Notes | ! Variant !! MCU !! Clock !! RAM !! Notes | ||
| Line 43: | Line 43: | ||
Most boards power entirely from the '''+5 V IEC bus''' (≈ 100 mA). A 3 V LDO or DC/DC step-down supplies the SD slot. Level-shifting is done by resistor networks or BSS138 FETs depending on revision. | Most boards power entirely from the '''+5 V IEC bus''' (≈ 100 mA). A 3 V LDO or DC/DC step-down supplies the SD slot. Level-shifting is done by resistor networks or BSS138 FETs depending on revision. | ||
== | == Firmware features == | ||
* '''DOS Commands:''' `LOAD, SAVE, OPEN, B-A (block execute), VALIDATE`, etc. | * '''DOS Commands:''' `LOAD, SAVE, OPEN, B-A (block execute), VALIDATE`, etc. | ||
* '''Disk image hot-swap''' using buttons (NEXT / PREV) or via `OPEN 15,"CD:somedir"`. | * '''Disk image hot-swap''' using buttons (NEXT / PREV) or via `OPEN 15,"CD:somedir"`. | ||
| Line 57: | Line 57: | ||
* Command channel buffers are 254 bytes – very long `@` commands can overflow. | * Command channel buffers are 254 bytes – very long `@` commands can overflow. | ||
== | == Fast-loader compatibility matrix == | ||
{| class="wikitable" | {| class="wikitable" | ||
! Loader !! Stock C64 !! JiffyDOS !! SD2IEC (AVR) !! IEC-2-SD (STM32) | ! Loader !! Stock C64 !! JiffyDOS !! SD2IEC (AVR) !! IEC-2-SD (STM32) | ||
| Line 72: | Line 72: | ||
|} | |} | ||
== | == Using SD2IEC == | ||
<plainlist> | <plainlist> | ||
* '''Device number''' – shipped as *8*; change with `OPEN15,8,15,"U0>"+CHR$(10+new#):CLOSE15`. | * '''Device number''' – shipped as *8*; change with `OPEN15,8,15,"U0>"+CHR$(10+new#):CLOSE15`. | ||
| Line 81: | Line 81: | ||
</plainlist> | </plainlist> | ||
== | == Pi1541 / 1541 Ultimate == | ||
{| class="wikitable" | {| class="wikitable" | ||
! Feature !! SD2IEC / IEC-2-SD !! Pi1541 !! 1541 Ultimate-II+ | ! Feature !! SD2IEC / IEC-2-SD !! Pi1541 !! 1541 Ultimate-II+ | ||
| Line 98: | Line 98: | ||
|} | |} | ||
== | == Popular ready-made units == | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
! Brand / Model !! Notes !! Approx. price (2024) | ! Brand / Model !! Notes !! Approx. price (2024) | ||
| Line 111: | Line 111: | ||
|} | |} | ||
== | == DIY resources == | ||
* '''PCB & schematic:''' <https://github.com/IngmarK/sd2iec-hardware> | * '''PCB & schematic:''' <https://github.com/IngmarK/sd2iec-hardware> | ||
* '''Firmware source:''' <https://github.com/sd2iec/sd2iec> | * '''Firmware source:''' <https://github.com/sd2iec/sd2iec> | ||
| Line 117: | Line 117: | ||
* '''Forum support:''' Lemon64 “sd2iec user thread”, retro-computing Stack Exchange tag ‘‘sd2iec’’. | * '''Forum support:''' Lemon64 “sd2iec user thread”, retro-computing Stack Exchange tag ‘‘sd2iec’’. | ||
== | == See also == | ||
* [[Pi1541 Full-Drive Emulator]] | * [[Pi1541 Full-Drive Emulator]] | ||
* [[1541 Ultimate-II+ Cartridge]] | * [[1541 Ultimate-II+ Cartridge]] | ||
* [[Commodore IEC Serial Bus]] | * [[Commodore IEC Serial Bus]] | ||
== | == References == | ||
<references /> | <references /> | ||
== | == External links == | ||
* [https://sd2iec.de Official ''sd2iec'' wiki] – documentation, binaries, parts list. | * [https://sd2iec.de Official ''sd2iec'' wiki] – documentation, binaries, parts list. | ||
* [https://www.thefuturewas8bit.com/ The Future Was 8-bit] – commercial SD2IEC hardware. | * [https://www.thefuturewas8bit.com/ The Future Was 8-bit] – commercial SD2IEC hardware. | ||
Revision as of 14:41, 22 January 2026
The SD2IEC family—and its ARM-based off-shoots usually sold as IEC-2-SD—are open-hardware adapters that let Commodore 8-bit machines read and write FAT/FAT32-formatted SD-cards through the standard IEC serial bus. Acting as a *smart* disk-drive clone they implement the most-used 1541/1571/1581 DOS commands (LOAD, SAVE, directory, block API, ↑, ←, etc.) plus a small command channel interpreter that maps files and sub-directories to disk images on the card.
Quick facts
- “Loader-ready in < 1 s” – no mechanical spin-up / head-seek delays.
- Capacity: 32 GB+ per card, thousands of ‘‘D64/D71/D81’’ images or plain PRGs.
- Speed: ≈ 45× stock 1541 with JiffyDOS fast-loader (≈ 12 kB s-1).
- Firmware upgradable from the C64 itself (`LOAD "FW.BIN",8,1` & `RUN`).
- 100 % open-source: hardware KiCad / Eagle files & AVR/ARM firmware on GitHub.
History
- 2006-07 – MMC2IEC — Lars Pontoppidan prototypes an ATmega32 board that translates IEC ↔ SPI-MMC.[1]
- 2008 – sd2iec — Ingo Korb forks the code, adds FAT32, long filenames, D71/D81 and renames the firmware sd2iec.[2]
- 2010-12 – Commercial kits — Jim Brain's uIEC/SD and NKC Electronics sell through-hole DIY modules.
- 2014-15 – TFW8b v4/v5 — TheFutureWas8bit releases compact SMD units with button board & OLED.
- 2018 – IEC-2-SD (STM32) — Petter Lundsten ports the protocol to the STM32 “Blue Pill”, bringing USB mass-storage gadget mode.[3]
Hardware architecture
| Variant | MCU | Clock | RAM | Notes |
|---|---|---|---|---|
| Classic SD2IEC | ATmega1284P | 20 MHz crystal | 16 KB | SPI→SD, UART→debug, optional OLED/I²C |
| uIEC/SD | ATmega644P | 16 MHz | 4 KB | 2× micro-SD sockets, daughter-card form factor |
| IEC-2-SD | STM32F103C8T6 | 72 MHz | 20 KB SRAM | USB-C, full-speed USB gadget (card seen as drive on PC) |
| SaRuMan-SD | ATmega1284P | 24 MHz (X-tal) | 16 KB | Sidekick64 plug-on module, exposed JTAG |
Most boards power entirely from the +5 V IEC bus (≈ 100 mA). A 3 V LDO or DC/DC step-down supplies the SD slot. Level-shifting is done by resistor networks or BSS138 FETs depending on revision.
Firmware features
- DOS Commands: `LOAD, SAVE, OPEN, B-A (block execute), VALIDATE`, etc.
- Disk image hot-swap using buttons (NEXT / PREV) or via `OPEN 15,"CD:somedir"`.
- Long-file-name to C64 PETSCII mapping (configurable).
- GEOS support (`U0>M0`) and native fast-loader patches for JiffyDOS, Final Cartridge III, Epyx FastLoad, SJLoad, etc.
- Config file `sd2iec.cfg` – set default device #, Jiffy mode, drive # mapping, LED polarity.
- IEC passthrough so real 1541s can daisy-chain behind the adapter.
Known limitations
- No true 6502-cycle-exact 1541 CPU emulation ⇒ copy-protected titles that rely on drive-side code or nibble-level flux patterns fail.
- Relative files not supported.
- Burst-mode fast-loaders designed for the 1571/1581 may require a parallel-IEC mod or fail altogether.
- Command channel buffers are 254 bytes – very long `@` commands can overflow.
Fast-loader compatibility matrix
| Loader | Stock C64 | JiffyDOS | SD2IEC (AVR) | IEC-2-SD (STM32) |
|---|---|---|---|---|
| JiffyDOS (KERNAL) | ✗ | ✔ | ✔ 45× | ✔ 45× |
| Epyx FastLoad (cart) | ✔ 5× | ✔ 5× | ✔ 30× | ✔ 35× |
| Final Cartridge III | ✔ 6× | ✗ | ✔ 32× | ✔ 34× |
| Dolphin DOS | ✗ | ✗ | — | — |
| Fast Load V5 PAL | ✔ | ✔ | ⚠ (needs ``OPEN15,"UX"` patch) | ✔ |
Using SD2IEC
<plainlist>
- Device number – shipped as *8*; change with `OPEN15,8,15,"U0>"+CHR$(10+new#):CLOSE15`.
- Browse directories – `LOAD"$",8` or use FB64 file-browser PRG on the card root.
- Mount D64 image – `OPEN1,8,15,"CD:DEMOS/DISK1.D64":CLOSE1`.
- Swap image – front buttons (NEXT/PREV) or `OPEN15,"XS:next":CLOSE15`.
- Firmware update – copy `firmware.bin` to card root → reset while holding “NEXT”.
</plainlist>
Pi1541 / 1541 Ultimate
| Feature | SD2IEC / IEC-2-SD | Pi1541 | 1541 Ultimate-II+ |
|---|---|---|---|
| MCU / SoC | 8-bit AVR / STM32 | Raspberry Pi (ARM) | FPGA (Cyclone III) |
| Cycle-exact 6502 emulation | ✗ | ✔ | ✔ |
| Copy-protected G64 / TAP | ✗ | ✔ | ✔ |
| Price (2024) | US$25-60 | US$60-90 | US$200+ |
| Plug-and-play (no Pi setup) | ✔ | ⚠ SD card image & config needed | ✔ |
| Real-time clock, Ethernet, RAM-expansion | ✗ | ✗ | ✔ |
Popular ready-made units
| Brand / Model | Notes | Approx. price (2024) |
|---|---|---|
| TheFutureWas8bit SD2IEC v5B | OLED, 3 buttons, IEC thru, 3-D printed shell | £34 GB |
| Retro-Port uIEC/SD | Daughter-card w. 6-pin header, fits internal C64 installs | US$44 |
| Pi1541 Zero (not SD2IEC) | Cycle-exact but needs Pi Zero – see separate page | €49 |
| IEC-2-SD “BluePill edition” | STM32, USB-C, optional OLED, DIY kit | €29 kit / €45 built |
DIY resources
- PCB & schematic: <https://github.com/IngmarK/sd2iec-hardware>
- Firmware source: <https://github.com/sd2iec/sd2iec>
- IEC-2-SD repo: <https://github.com/plundstr/IEC-2-SD>
- Forum support: Lemon64 “sd2iec user thread”, retro-computing Stack Exchange tag ‘‘sd2iec’’.
See also
References
External links
- Official sd2iec wiki – documentation, binaries, parts list.
- The Future Was 8-bit – commercial SD2IEC hardware.
- Retroleum blog – tutorial “Compiling sd2iec on macOS”.