Rewrite image format #16
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blocked by #15.
This PR completely replaces the original formatting function with a function for creating an empty disk image and also adds tests for it.
Unlike the previous implementation, this one:
InitializeMedia~Run~programInitializeMedia~Run~calc_inode_blocks_checksummethod.Obtaining Test Images
Reference images were obtained using the MAME emulator, via my fork which supports image formatting.
Then, the bitmap and superblock numbers were written into the images.
After that, the dates in the superblock were slightly edited. This is because for some reason, the GRiD Compass emulation in MAME returns an incorrect day-of-week number: Thursday is reported as the 6th day of the week, and Monday as the 3rd. I didn't have time to investigate, so the images were manually edited after formatting, and the checksum was recalculated.
Obtaining Boot Code
The boot code was obtained from copies of official floppy disks.
GRiDCase Support
Theoretically, floppy disk images with the
CCOS_DISK_FORMAT_GRIDCASEformat should work in GRiD-OS 3.2.0 under GRiDCase, even without fully populating the boot sector. However, since a GRiDCase emulator still doesn't exist and my laptop is broken so I can't test images, this option is not available to the user.