Most hard disk media in MAME for the software list is sourced from non-reproducible sources, especially by route of regular installation and use of the system. While a best effort is usually made to present the software in a ready-to-run format, allowing users to bypass lengthy and difficult installation processes, verifying that the hard disk images are complete and untampered is virtually impossible. It also often manifests in internal file system dates being in the extreme future compared to the release date of the software, impacting the emulation of a contemporary experience.
In an effort to stem the tide of these unverifiable images, this project seeks to create verifiably reproducible hard disk images by way of producing input files that MAME can replay, and when done so, an identical hard disk image as what is listed in the software list XML definition files should result. At present, the following images are represented in this repository:
CHD | Software | MAME Version |
---|---|---|
ibm5150_hdd/freedos13_8086.chd | FreeDOS 1.3 8086 Minimized1 | 0.271 |
ibm5170_hdd/freedos13.chd | FreeDOS 1.3 (Floppy Edition)2 | 0.2713 |
ibm5170_hdd/freedos13.chd4 | FreeDOS 1.3 (CD-ROM Edition)5 | 0.2774 |
ibm5170_hdd/freedos14.chd4 | FreeDOS 1.4 | 0.2774 |
Methods of reproducibility
MAME offers a couple major methods to create files that can be played back to recreate a hard disk example: input recordings (inp files), and Lua scripting. All three images listed above use the first technique.
Both methods generally require that the initial hard disk image is blank, and all NVRAM files (eg, BIOS settings) are non-existent. They also require that the same initial conditions exist on repeat runs; this includes floppy and CD-ROM images used, RAM size, and any optional non-default hardware. MAME may adjust defaults over time, and future versions might require parameters the original version did not.
Input recordings
By running MAME with a command line such as -record freedos.inp
, MAME will record the date and time the recording started, as well as all input into the machine and the associated timings. By using this method, the operating system installation can be carried out as normal once, and then replayed at any time to produce the same disk image as the first time. Watching the screen during operating system installation can verify the options used to make the image.
A major drawback to this method is that media changes require user intervention while running. The freedos13_8086.inp
and freedos13.inp
(version 0.271) files use multiple floppy disks, and pauses were done to give opportunity to change the disk when required.
Lua scripting
MAME has extensive Lua scripting capabilities, allowing the emulator to be controlled by scripts. This is conceptually very similar to input recordings, but since the scripts are written out in simple text format, greater verification can be made that installation scripts are not hiding anything. It is also, sometimes, possible to mix Lua scripts between multiple computers: eg, the c64 and c65 drivers can react to the same input in the same ways.
MAME's Lua scripting was not written with automated operating system installation in mind, and the user sairuk has made an initial effort to mend this with an experimental plugin called act486auto, despite the name, it is not limited to the 486-based drivers.
An experiment was carried out in using this plugin to automate the FreeDOS 1.4 installation, but a few significant issues presented themselves and the experiment has been abandoned. The incomplete progress of which is represented on the act486auto-test branch.
Cloning the repository
To make a local copy of this repository, have Fossil installed and run:
$ fossil clone https://chiselapp.com/user/chungy/repository/mame-reprod-chd
- ^ This is an unofficial FreeDOS distribution optimized for the original IBM PC model 5150. More information can be found on YouTube and its archive.org link.
- ^ FreeDOS comes in two major versions of the operating system, the floppy and CD-ROM distributions. Even though there are a lot of floppy disks, it only installs a subset of software compared to the CD-ROM version.
- ^ While the input recording file for this is stored on an old, and tagged, check-in in this repository, as of the current writing of this wiki, it is the current hard disk image represented in MAME, since version 0.271 and at least until version 0.276.
- ^ a b c d This image will land in MAME 0.277, due for release toward the end of April 2025.
- ^ Since the CD-ROM version of FreeDOS installs a larger set of software, it was decided that it is preferable to use this version to represent the installed operating system in MAME.