Page 1 of 1

HDD image generator: DOScontainer

Posted: Sat Oct 01, 2022 2:32 pm
by Bas
As promised, I'm open sourcing my efforts to create a disk image generator for AO486. It's been many months since I started this and progress was incredibly slow. Due to a change of jobs I had a little more time over the past week or two and managed to come to some meaningful point. Starting on Monday my time will be severely limited again, which is why I'm now open sourcing something that is utterly half-baked and hardly usable for anyone.

The idea: use a modern K8s approach to MS-DOS hard drive images
There are thousands upon thousands of MS-DOS titles, many of which hinge on combinations of a relatively small number of moving parts like memory managers, DOS extenders, device drivers, intricacies of CONFIG.SYS and AUTOEXEC.BAT etc. These combinations can be codified in the form of YAML-files which then feed a build pipeline that creates a disk image file and decorates that all the way up to an automatically bootable disk image. Such image files can then be uploaded to the MiSTer and used like many other cores' ROM's: pick a file, boot the core, play!

Why this approach when we already have packs?
I dislike the maintenance process on these large disk images with their hundreds of games. It just feels extremely clunky and inflexible, which is why I'm working on a lean and customizable alternative.

The current status?
You can compile the main branch of my 'doscontainer' repo, and the binary will dynamically create a disk image in a place of your choosing and of a particular size. Nothing fancy and hardly finished at all, unfortunately.
I went down a rabbit hole trying to use the rust-fatfs 'crate' to quickly get FAT16 filesystem support for, essentally, free. Unfortunately I haven't been able to replicate the function of FORMAT /S or the SYS command using this.

I'm an absolute Rust newbie! While the primary purpose of this exercise remains to actually build this tool, it was also my very first learning project to figure out how to code in Rust. I'm more than open to suggestions for improvements to my code, and please, be kind.

For the other steps, actually decorating the bootable disk image, I'm expecting to use native tools running on Linux since it can handle reading and writing to a mounted FAT16 filesystem just fine. Tools like Ansible (a big maybe) could, for instance, be used to template all manner of configuration settings into the images.

The idea is not to run any of this build tooling on the MiSTer itself. When I say "Linux" here, I mean it in the generic sense like a CI/CD service somewhere. Personally I'll be using my own Jenkins environment at home on a Raspberry Pi for this. I'll look into setting up something more centralized when things become usable and useful to others.

Now without further delay, the repository:
https://github.com/basvandewiel/doscontainer/

Re: HDD image generator: DOScontainer

Posted: Sat Oct 01, 2022 4:00 pm
by Bas
Build instructions? First install a Rust build environment. Look at https://rustup.rs for an easy way to get there. Once you're set up with a working Rust compiler, you can use the Cargo utility from the cloned Git repo:

cargo build

Then look in the target/debug subdirectory for the 'doscontainer' binary. You can run that from the command line and play with it, for what it's worth.

Re: HDD image generator: DOScontainer

Posted: Thu Oct 06, 2022 7:46 am
by Caldor
Very nice, thanks for sharing :)