Changing Disk Images
====================
Because some programs require more than one disk side there is support
for changing the currently mounted disk image with a button connected
to the disk change pin.
If your circuit doesn't have a disk change pin/button you might be able to
add it yourself:
- For the original MMC2IEC:
Connect a button from PA4 to ground. PA4 is pin 36 on the DIL version
of the controller or pin 33 on the surface-mount version.
- For Shadowolf's MMC2IEC 1.x PCBs:
Connect a button from PC4 to ground. PC4 is pin 23 on the DIL version
of the controller or pin 23 on the surface-mount version.
- Any other circuit without disk change pin on a convenient connector
somewhere and no button dedicated to that function: Please check
with the supplier of the board and read config.h in the sources
to find out how to connect it.
To use this functionality, create a text file that lists the file
names of all disk images you want to swap between, one per line.
The file names are parsed in the same way as the CD command, so you
can include a path to the image if desired.
Examples:
=== example 1 ===
FOO.D64
BAR.D64
BAZ.D64
=== end of example 1 ===
=== example 2 ===
//NEATGAME/:DISK1A.D64
//NEATGAME/:DISK1B.D64
//NEATGAME/:DISK2A.D64
//NEATGAME/:DISK2B.D64
=== end of example 2 ===
The swap list is enabled by sending "XS:filename" over the command channel
with filename being the name of the image list you created, parsed
in the same way as any other file name.
After sending XS the first image in the list is automatically
mounted. To switch to the next image in the list, push the button. If
the new image was mounted successfully both LEDs will blink twice.
When you've reached the last image in the list pushing the button will
mount the first image again. All of this is completely compatible with
normal image mounting/unmounting, so you can unmount the disk image
any time you want and resume the mount cycle later by pushing the
button.
Due to the way this feature is implemented you are not limited to a
swap list containing just D64 images, M2I and even FAT directories
will work too. FIXME: Does that still work?
If you press the button when no list has been set before or when the
previous list was cleared by sending XS the software will look for a
file called AUTOSWAP.LST in the current (FAT-)directory and use this
as the current swap list until you deactivate it or manually change
the directory (otherwise an AUTOSWAP.LST in the new directory would be
ignored until you send XS, killing the nice "it just works" feeling).
FIXME: Integrate the following into the preceding
The second disk change button is on
- PA5 for LarsP
- PC3 for Shadowolf's MMC2IEC 1.x
- PC2 for Shadowolf's sd2iec 1.x ("Reserve" on the header)
- PG4 for uIEC
Either of those buttons will trigger the use of AUTOSWAP.LST.
If a swap list is already active, the first button will switch
to the next image in the list, the second button will switch
to the previous image in the list and pushing both buttons
together will switch to the first image in the list.
The confirmation blink is red+green followed by
green for "next", by red for "previous" and by
red+green for "first".