Jump to content

SD2IEC & IEC-2-SD Adapters: Difference between revisions

From RetroTechCollection
Created page with "{{Infobox hardware | name = SD2IEC & IEC-2-SD Adapters | image = 250px | caption = TFW8b SD2IEC v5B โ€“ turnkey unit with OLED, buttons and IEC-passthrough | developer = Community project<br />originated as '''MMC2IEC''' by Lars Pontoppidan (2007); maintained by Ingo Korb (''sd2iec'' firmware) | type = SD-card IEC serial mass-storage adapter (1541-compatible subset) | first_released = 2008 (''sd2iec''..."
ย 
No edit summary
Line 129: Line 129:
* [https://www.thefuturewas8bit.com/ The Future Was 8-bit] โ€“ commercial SD2IEC hardware.
* [https://www.thefuturewas8bit.com/ The Future Was 8-bit] โ€“ commercial SD2IEC hardware.
* [https://blog.retroleum.co.uk/ Retroleum blog] โ€“ tutorial โ€œCompiling sd2iec on macOSโ€.
* [https://blog.retroleum.co.uk/ Retroleum blog] โ€“ tutorial โ€œCompiling sd2iec on macOSโ€.
[[Category:Commodore_Systems]]

Revision as of 11:34, 25 April 2025

SD2IEC & IEC-2-SD Adapters
Caption TFW8b SD2IEC v5B โ€“ turnkey unit with OLED, buttons and IEC-passthrough
Type SD-card IEC serial mass-storage adapter (1541-compatible subset)
Designer Community project
originated as MMC2IEC by Lars Pontoppidan (2007); maintained by Ingo Korb (sd2iec firmware)
Manufacturer Unknown
First released 2008 (sd2iec v0.1)
Latest revision sd2iec firmware v1.1.1 (March 2024)
Operating voltage +5 V from IEC bus โ€ข on-board 3.3 V LDO for SD-card
Layers / PCB โ€”
Compatibility C64 / C64C / SX-64 / C128 / VIC-20 (CR) / Plus-4 / PET (via IEEEโ€“IEC adapter)
Features โ€”
Model No. uIEC/SD, SD2IEC (v4โ€“v5B), SD2IEC Slim/OLED, IEC-2-SD ARM, SaRuMan-SD, numerous DIY

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 โœ— โœ— โœ”
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

๐Ÿ“š See also

๐Ÿ“ References

  1. โ†‘ Pontoppidan, L. โ€œMMC2IEC project logโ€, Usenet comp.sys.cbm, 2007-02-19.
  2. โ†‘ sd2iec official wiki, โ€œDevelopment timelineโ€.
  3. โ†‘ Lundsten, P. โ€œIEC-2-SD readmeโ€, GitHub, 2019-05-03.