This is a quick guide to the command interface understood by MMC2IEC: (from mmc2iec.c)
USAGE GUIDE:
------------
The MMC2IEC device implements accessing FAT16/32 filesystems on MMC or SD
flash media. The CBM IEC protocol is implemented and the kernel load and save
routines on the C64 works, loading from either PRG, D64 or T64 files, and
saving only to PRG type files in FAT.
Selecting directories and images is possible through LOAD"xxx" commands
issued on the CBM.
This is a quick overview of the commands, say MMC2IEC is IEC device 8:
LOAD"<<",8 Reset SD card state. Do this if the SD card is exchanged.
Read < as the petscii back-arrow.
If SDCARD_DETECT signals is available, this operation is
rarely needed.
In FAT mode: (the default mode)
LOAD"$",8 Gets directory listing, equivalent to LOAD".",8
LOAD"gamesdir",8 Enter the "gamesdir" directory, and get listing.
LOAD"..",8 Up one directory and get directory listing.
LOAD"tetris.prg",8 Loads the "tetris.prg" program file.
SAVE"example.prg",8 Save into "example.prg" which is a FAT file.
LOAD"disk.d64",8 Loads the disk.d64 image and enters D64 mode.
LOAD"tape.t64",8 Loads the tape.t64 image and enters T64 mode.
In D64 mode:
Load "$", "*", wildcards, filenames works (almost) as espected on a 1541.
LOAD"<",8 (back-arrow). Escape D64 mode, and back to FAT mode.
SAVE"abc",8 Fools the CBM, but has no effect. Saves in D64 are
not implemented
In T64 mode:
Load "$", "*", wildcards, filenames works as if it was a D64.
LOAD"<",8 (back-arrow). Escape T64 mode, and back to FAT mode.
SAVE"abc",8 Fools the CBM, but has no effect.
As of firmware v0.8, MMC2IEC supports more CBM DOS features. Messages through the error channel has been implemented, such as file not found, drive not ready and others. This is the welcome message:
Now Save-With-Replace works with SAVE"@:FILE", which will erase FILE first if it did exist. I have not implemented the Save-With-Replace bug, though ;)
But that's not the most interesting:
The "N:" operation initializes a new special disk "image", which is not readonly! I came up a with new file format for this read/write disk simulation, the .M2I file. The file is just an index with 16 char petscii filenames, the FAT filesystem is still utilized for file management:
When the M2I file is open, scratch and rename works, even with wildcards:
M2I files can also be entered with LOAD"FILE.M2I" and exited with LOAD"←", just like D64 and T64. It should be noted that scratch and rename also works in FAT mode, but not with wildcards.
The M2I disks has no limit on size and can be utilized for emulating multidisk games, such as:
This is the contents of the Last Ninja 2 M2I file:
LAST NINJA 2 D: :---------------- P:last.prg :LAST N.2++/IKARI D: :---------------- P:1a.prg :1A.````````````` P:1b.prg :1B.CENTRAL PARK P:2a.prg :2A.````````````` P:2b.prg :2B.THE STREET P:3a.prg :3A.````````````` P:3b.prg :3B.THE SEWERS P:4a.prg :4A.````````````` P:4b.prg :4B.THE BASEMENT P:5a.prg :5A.````````````` P:5b.prg :5B.THE OFFICE P:6a.prg :6A.````````````` P:6b.prg :6B.THE MANSION P:7a.prg :7A.````````````` P:7b.prg :7B.FINAL BATTLE D: :---------------- P:challeng.prg:CHALLENGE /UNIC D: :----------------
One day I will provide command line tools to make M2I systems from D64 or directories.
Finally, a little tip I discovered. If you want to change directory or mode with MMC2IEC, without loading and messing up what's in memory, use an OPEN operation instead of LOAD. For instance, to go to parent directory:
OPEN 15,8,0,"..":CLOSE 15
Previous: Hardware description - Next: Downloads