SD2IEC
From C64-Wiki
SD2IEC is a hardware mass storage device using an SD/MMC card and interfacing with the IEC bus. It is based on the ATmega644 microcontroller from the Atmel AVR microcontroller family. The most prominent use of SD2IEC is emulation/replacement of a Commodore-1541 disk drive for a C64. Hardware and the microcontroller's firmware is available as open source (GPL).
SD2IEC uses firmware also called sd2iec.
Contents |
[edit] History
The SD2IEC device is an enhanced version of the MMC2IEC device. In contrast to MMC2IEC, it uses the ATmega644 microcontroller (more RAM and flash than ATmega32) and uses a different circuit for driving the IEC bus.
- 2008-03-15: SD2IEC 1.2 PCB layout release (differences to MMC2IEC 1.9: ATmega644, better IEC line drivers, disk swap button, I/O pads, mount holes) - about 120 pieces made
[edit] Features
- Compatible with C64, C64DTV, C128 (no burst mode), C16, etc.
- Power consumption: Idle ~15mA, busy 30-80mA
- sd2iec_1.2.zip - schematics and Eagle PCB files
- R100/R101 are placeholders for a reset button (connecting the AVR reset pin with ground) or a connection with the IEC reset line (AVR reset pin connected via a standard diode with IEC reset - the cathode of the diode has to point towards the IEC reset line). This is optional.
[edit] Firmware features
For detailed information and features of the firmware, please see sd2iec.
[edit] How does the SD2IEC compare with the 1541-III and 1541 Ultimate?
- 1541-III vs. SD2IEC
- SD2IEC does not feature a display. Exchanging disks is possible using the disk switch button though.
- SD2IEC PCB is even smaller than 1541-III-DTV PCB.
- SD2IEC features a bootloader that fetches firmware from the SD card at startup.
- SD2IEC uses ATmega644 microcontroller (open source C compilers are available for this platform).
- 1541 Ultimate vs. SD2IEC
- SD2IEC is much cheaper.
- Since the 1541 Ultimate completely emulates a 1541, it's much more compatible (supports all fastloaders).
- SD2IEC does not provide any extra functionality the 1541 Ultimate provides (cartridge emulation).
- SD2IEC is faster than 1541 Ultimate for all normal IEC operations it emulates since it emulates only protocol level (no slow mechanics).
[edit] Can I use a parallel cable with the SD2IEC?
No. Theoretically the hardware could be extended for that. However, note that the CBM bus seems quite fast already (see above).
[edit] Software
[edit] Bootloader
- Reads firmware .bin file from SD card (FAT16 and FAT12 supported) and updates ATMega flash if needed
- On powerup, red LED is on. If an updated firmware is found on SD card, green light blinks for some seconds during flashing. If no updated firmware is found, green light flashes once. When complete, both LEDs turn off.
- Firmware (.bin) needs to reside in the SD card's root directory. Only file size and signature have to match.
- avrdude flashing command: avrdude -p m644 -U flash:w:sd2iec_bootloader.hex:i -U hfuse:w:0xDA:m -U efuse:w:0xFD:m -U lfuse:w:0xE7:m
- this programs lfuse/clock settings last so programming without attached crystal is possible (once!)
- programming with a 5V programmer is possible (do not attach an SD card or IEC device during programming then)
- Fuse settings explained...
- BOOTSZ = 01 (boot size 2048 words, start $7800), BOOTRST = 0 (boot reset vector enabled)
- Crystal osc., start-up 16CLK + 4.1ms: CKSEL = 0111, SUT = 10
- Download: Unseen's sd2iec firmware page
[edit] Firmware
For detailed information and features of the firmware, please see sd2iec.
Download: Unseen's sd2iec firmware page - the correct firmware binary for the SD2IEC PCB is sw2-m644.
[edit] See also
[edit] Weblinks
- SD2IEC/MMC2IEC forum at forum64.de
- M2I Forum64 thread
- HOWTO-SD-FAT16 - how to format your SD card using FAT16 (using live Linux)
- Panasonic SD Memory Card Formatting Software (Windows)
