MMC2IEC
This page covers the MMC2IEC hardware device. For the firmware used by the MMC2IEC hardware, see sd2iec (firmware). For similar hardware projects, see SD2IEC and µIEC.
The MMC2IEC is a hardware mass storage device using an SD/MMC card and interfacing with the IEC bus. It is based on the ATmega32 microcontroller from the Atmel AVR microcontroller family. The most prominent use of MMC2IEC is emulation/replacement of a Commodore-1541 disk drive for a C64. Hardware and the microcontroller's firmware is available as open source (GPL).
History[edit | edit source]
The original MMC2IEC device was created by Lars Pontoppidan at the beginning of 2007. It started as a port of the PIC-based 1541-III to the Atmel microcontroller family. However, in the end the code of the 1541-III was used as inspiration only.
Enhanced hardware and firmware versions have been developed by the community. Shadowolf released a slighly modified version of the hardware in forum64 - this version is incompatible with the original MMC2IEC firmware. Also, several minor enhancements of the firmware have been done. Unseen works on a rewritten firmware (sd2iec) that is currently the only one under active development.
A redesigned hardware called SD2IEC was released in march 2008. SD2IEC is the successor project of MMC2IEC.
Firmware[edit | edit source]
- sd2iec firmware versions above 0.6.7 only work with SD2IEC devices or MMC2IEC devices updated with an ATmega644.
- 2008-05-22: Unseen releases sd2iec 0.6.6 including support for the Final Cartridge 3 fastloader and sleep mode.
- 2008-02-20: Unseen releases sd2iec 0.6 including support for B-R, B-W, M-R, writing configuration to EEPROM, and several bugfixes.
- 2008-01-12: Unseen releases sd2iec 0.5 including read/write support for D64 format, full Jiffy support (no crystal needed), and a new "disk change" button feature.
- 2007-12-07: Unseen releases sd2iec 0.4 including support for M2I format.
- 2007-11-29: Unseen releases sd2iec 0.3 including Turbo Disk fastloader support (8 MHz crystal needed).
- 2007-10-16: Unseen releases sd2iec 0.1 featuring more exact IEC emulation.
Hardware[edit | edit source]
- 2008-03-15: SD2IEC 1.2 PCB released (ATmega644, better IEC line drivers, disk swap button, I/O pads, mount holes).
- See the SD2IEC page for up-to-date information.
- 2007-12-20: Shadowolf releases MMC2IEC 1.9 PCB layout (includes crystal).
- 2007-08-09: Shadowolf releases MMC2IEC 1.6 PCB layout (150 pieces made, no crystal).
- 2007-06-26: Shadowolf releases MMC2IEC 1.5 PCB layout (~10 pieces made, no crystal).
Features[edit | edit source]
MMC2IEC hardware variants using the ATmega644 may run newer firmware versions. See sd2iec (firmware) for details.
sd2iec firmware 0.6.6[edit | edit source]
Complete rewrite by Unseen. Available for Shadowolf, LarsP, and NKC PCB. Like MMC2IEC 0.8/0.9 firmware but...
- No T64 support. D64/M2I are supported (both reading and writing for D64, even with direct sector access using U1/U2)
- Subdirectory support (CMD command syntax).
- Support for Turbo Disk AKA Fast Load AKA Speeddisk fastloader (only with 8MHz crystal installed).
- Supports the JiffyDos fast serial bus protocol (doesn't require a crystal - internal oscillator is accurate enough)
- Support for the Final Cartridge 3 fastloader (no crystal needed).
- Supports an external "disk change" button
- Supports FAT long file names
- Supports FAT12/FAT16/FAT32 formatted SD cards.
- Improved IEC compatibility
- Supports most typical IEC functions (LOAD, SAVE, OPEN, GET, PUT, CLOSE, ...)
- 1571 ROM has been taken as reference for implementation
- Many non-fastloader games run now (see znarF's M2I list).
MMC2IEC firmware 0.9[edit | edit source]
Modified by Shadowolf. Deprecated.
- Modified for Shadowolf PCB layout.
- .bin format for use with a bootloader.
- bootloader needs to get flashed on the ATmega once and then updates/flashes the actual firmware from SD card.
MMC2IEC firmware 0.8[edit | edit source]
By LarsP. Deprecated.
- Supports C64 kernel LOAD and SAVE functions.
- Supports wildcards.
- Supports SD and MMC cards.
- Thorough FAT16 and FAT32 support.
- Directory listing and changing supported through LOAD commands.
- PRG file load and save.
- D64/T64 image readonly support.
- Support for proprietary M2I format. Uses a filename mapping file to map from files on the SD card to C64 files. Write support.
- Live configurable to be device 8 or 9, and works with other devices on the bus.
- SD card write protect switch works.
Limitations:
- No fast loader support.
- None of the Commodore DOS functions beside LOAD and SAVE works.
- Few D64 games with loaders work.
- No long filenames.
FAQ[edit | edit source]
See sd2iec (firmware).
Hardware[edit | edit source]
Shadowolf's version[edit | edit source]
- C64 and C64DTV compatible
- does not run with LarsP's firmware
- Power consumption: Idle ~15mA, busy 30-80mA
- mmc2iec_schematic_layout_1.9.zip
A redesigned hardware called SD2IEC was released in march 2008. SD2IEC is the successor project of MMC2IEC.
NKC version[edit | edit source]
- Sold by NKC Electronics (discontinued; an updated SD2IEC variant is sold since February 2009)
- Incompatible with LarsP and Shadowolf version (minor pin change)
Community versions[edit | edit source]
A number of device variants have been made by community members. For newer variants, typically the LarsP layout is used, a crystal is added, and the ATmega32 is substituted with an ATmega644. This provides full compatibility with the sd2iec firmware.
Software[edit | edit source]
Bootloader[edit | edit source]
- For Shadowolf layout and ATmega32
- Fuse settings: BOOTSZ = 01 (boot size 1024 words, start $3c00), BOOTRST = 0 (boot reset vector enabled)
- 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.
- Flashing command:
- Without crystal: avrdude -p m32 -U flash:w:mmc2iec_bootloader.hex:i -U hfuse:w:0x9A:m -U lfuse:w:0xA4:m
- With crystal: avrdude -p m32 -U flash:w:mmc2iec_bootloader.hex:i -U hfuse:w:0x9A:m -U lfuse:w:0x9E:m
- bootloader_2008-01-05.zip from http://sd2iec.de/bootloader/
ATmega644 Bootloader[edit | edit source]
- For Shadowolf MMC2IEC layout, but populated with ATmega644 instead of ATmega32. The device supports the latest sd2iec firmware then (see SD2IEC device).
- Fuse settings:
- Without crystal, only microcontroller replaced: avrdude -v -p m644 -U flash:w:mmc2iec_m644_bootloader.hex:i -U hfuse:w:0x92:m -U efuse:w:0xfd:m -U lfuse:w:0xe2:m
- With 8MHz crystal and two capacitors added: avrdude -v -p m644 -U flash:w:mmc2iec_m644_bootloader.hex:i -U hfuse:w:0x92:m -U efuse:w:0xfd:m -U lfuse:w:0xef:m
- bootloader firmware download, copy from this Forum64 posting.
- Updated bootloader archive for all architectures and population variants for MMC2IEC and SD2IEC was posted here .
Firmware[edit | edit source]
See Unseen's sd2iec firmware page. The correct firmware variant for the MMC2IEC is sw1/nkc/larsp-m32 (sw1/nkc/larsp-m644 for MMC2IEC devices updated to ATmega644).
See also[edit | edit source]
Links[edit | edit source]
- Original MMC2IEC project page by Lars Pontoppidan
- MMC2IEC forum at forum64.de
- HOWTO-SD-FAT16 - how to format your SD card using FAT16
- M2I Forum64 thread
- AntaBaka's MMC2IEC/SD2IEC Page