Closed dgesswein closed 6 months ago
With ext2emu writing arbitrary disk contents wouldn't be too hard. The difficult problem is handling the bad spots on the disk. A tool would be needed to find the bad spots on the disk and to then modify the image being written to avoid the bad spots. Only a few formats have know ways of assigning alternates in the sector headers. For other drives its handled at the filesystem or special controller bad block lists which are too involved to deal with. Without a good solution this is not a high priority.
Primitive support for writing is now provided. See mfm/mfm_write.c and documentation files. Currently command line parsing not properly implemented so parameters need to be set in the code. No attempt to handle bad spots on disk. Testing stopped when I got it to write the disk I needed.
Now picks up cylinders and heads from emu file so useable. No way to specify write precomp cylinder without modifying code.
First run can hang. If you ctrl-z it then kill it and rerun it will not hang again. Problem is first DMA never completes. Unclear why.
Precomp can be set from command line and hanging fixed. Should be usable now. No bad sector handling. Making ext2emu handle that may be best option.
Most of the logic needed exists in mfm_read and mfm_emu except for write precompensation.