Area536 :: Rebooted

Mar 27, 2024 - 2 minute read - MS-DOS MiSTer Retrogaming DOSContainer

DOSContainer Rust status update Q1

DOSContainer the Bash version functions, but it really is just a proof of concept for what I really want this product to be. As such, I ceased maintaining the Bash version except in case of glaringly hideous bugs. Instead, I’m now working on a version in Rust. The result should be a native binary for a number of platforms that does exactly what I want and comes in a simple, monolithic binary that simply works. This post is the status update on the project for Q1 2024.

Learing Rust

Yes, I’m using this project to teach myself the Rust programming language. I’m intrigued by the way the language solves a major problem category from C-derived languages while maintaining the speed and low-level access of a real systems language. My learning process does mean I have to occasionally rip out substantial parts of the code because I did things wrong at a very fundamental level. That’s the main reason why progress is slower than it could be.

Analyzer and Builder in one

DOSContainer has unit tests that work nicely to prevent regression bugs. I’m also adding features to analyze disk images. Not because I want to build a disk image debugger, but I simply need a tool to examine the output of DOSContainer and compare it to other tools. The current Rust version contains two major commands: build and analyze. I’ll keep the analyzer bit in there because it may well be useful to others.

Features status

DOSContainer now builds valid VHD-format disk images, partitions them properly for FAT12 and writes a halfway valid FAT12 filesystem to them. DOSContainer also is able to read existing VHD images that were created using other tools and to give some details about their contents.

Next steps

The main goal for the near future is to make the FAT12 implementation bug-free and 100% compatible with IBM PC-DOS 2.00. This is by far the most complex bit of code in the whole project. Once this works correctly, adding support for variations of FAT is more or less a downhill battle. As it stands now, I’ll be mostly testing and debugging. This quality cycle will introduce features to the analyzer part of the tool as well, which may already become valuable to others.