Subscribe via RSS
7Jun/230

PC-98 – Working With 3.5″ Disks

So far, I've only really had to deal with physical 5.25" floppy disks, as my PC-9801VX does not have 3.5" drives. My external Gotek was an emulated 3.5" set, but there was never a need to write actual 3.5" floppies. This all changed once I picked up other PC-98 machines.

Above are three BIOS screens from two 98-Notes and a PC-9821, all complaining that they want you to "Set a System Disk". The term 'set' is a little misleading, as they're really asking you to insert one. None of these machines have 5.25" drives, and all the disk images I have in my arsenal are 1.22mb images!

Make a 3.5" Floppy Disk think it's a 5.25"

To get anything to boot, we'll need to write one of these images to a 3.5" drive. I assumed this would all be simple and used the same technique as I did over here. Turns out that, even though the image will write fine to the disk, the machines needing the floppy won't be able to read it.

This is because standard 3.5" floppies are, by default, formatted as 1.44mb. Writing a 1.22mb image to a 1.44-formatted drive will mismatch the data and the receiving PC wont be able to correctly read the tracks. Or this is what I understand. Prior to all this, I'd assumed that the format of the disk was in the first track and that writing an image would also re-write the format... but this isn't true. Instead, we have to re-format the disk prior to writing the image. You can read all about disk formats here.

(Update: Oh lol... if I'd read the link above I would've realised that 1.22mb 3.5" disks are normal... they're known as 2DD, not the 2HD I'm used to!)

Of course, this is the internet, so someone has already done all of this for us. The basic idea is to re-format the disk to the correct format using a tool called ufiformat, convert the image to raw bytes with no header and then dd the image over. There are supposedly only a limited number of USB floppy drives that can do this, but my Teac FD-05PUW worked perfectly.

First up, connect the USB floppy to the machine you'll use. If you're using Virtual Box (like I was, on my NAS!), then you'll need to map the USB device through to the guest OS in settings. Once it's up and your machine is alive, make sure to update your package manager with the latest sources. I did this with:

swh@virtual-deb-nas:~$ sudo apt-get update
Get:1 file:/run/live/medium bullseye InRelease
Ign:1 file:/run/live/medium bullseye InRelease
...
Hit:7 http://deb.debian.org/debian bullseye InRelease
Get:8 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]
Get:9 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,078 B]
Fetched 2,903 B in 1s (3,537 B/s)
Reading package lists... Done
E: Some index files failed to download. They have been ignored, or old ones used instead.

Next, let's install ufiformat:

swh@virtual-deb-nas:~$ sudo apt-get install ufiformat
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  ufiformat
0 upgraded, 1 newly installed, 0 to remove and 265 not upgraded.
Need to get 0 B/14.4 kB of archives.
After this operation, 42.0 kB of additional disk space will be used.
Selecting previously unselected package ufiformat.
(Reading database ... 214799 files and directories currently installed.)
Preparing to unpack .../ufiformat_0.9.9-1+b1_amd64.deb ...
Unpacking ufiformat (0.9.9-1+b1) ...
Setting up ufiformat (0.9.9-1+b1) ...
Processing triggers for man-db (2.9.4-2) ...

Once that's installed, we need to find the floppy drive. The best method is with dmesg.

swh@virtual-deb-nas:~$ sudo dmesg | grep "removable disk"
[    5.065667] sd 3:0:0:0: [sdb] Attached SCSI removable disk

Nice, so the floppy is loaded at /dev/sdb. Now we need to get our images ready. I'm wanting to install DOS 6.22, so grab your images from whereever you need to. Depending on the image format, use any of the d88split tools over here to get the images into the correct format.

swh@virtual-deb-nas:~/dos622$ ls -l
total 9888
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS1.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS2.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS3.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS4.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS5.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS6.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS7.FDI
-rw-r--r-- 1 swh swh 1265664 Jun  6 18:53 DOS8.FDI

My DOS images were in FDI format, so I needed to convert to Mahalito and then to RAW. For each of the images, this required:

swh@virtual-deb-nas:~/dos622$ ../fdi2mhlt.pl DOS1.FDI DOS622-1-MHLT
FDI: 1265664 bytes (4096 header + 1261568 body)
77 cyls, 2 heads, 8 sectors/track, 1024 bytes/sector => body 1261568 bytes
writing to DOS622-1-MHLT.2hd and DOS622-1-MHLT.dat
swh@virtual-deb-nas:~/dos622$ ../flatmhlt.pl DOS622-1-MHLT.2hd DOS622-1

This results in the following files from one disk image:

swh@virtual-deb-nas:~/dos622$ ls -l DOS622*
-rw-r--r-- 1 swh swh   10175 Jun  6 18:58 DOS622-1.2hd
-rw-r--r-- 1 swh swh 1261568 Jun  6 18:58 DOS622-1.dat
-rw-r--r-- 1 swh swh   10175 Jun  6 18:57 DOS622-1-MHLT.2hd
-rw-r--r-- 1 swh swh 1015808 Jun  6 18:57 DOS622-1-MHLT.dat

You can ignore everything but the final DOS622-1.dat. We need to write this to our floppy, but beforehand we need to format our floppy! Slap a disk in and enter the following:

swh@virtual-deb-nas:~/dos622$ sudo ufiformat -f 1232 /dev/sdb
geometry: track=77, head=2, sector=8, block=1024
formatting track=76, head=1...
done

Once it's done, we can write or first image:

swh@virtual-deb-nas:~/dos622$ sudo dd if=DOS622-1.dat of=/dev/sdb bs=64k
19+1 records in
19+1 records out
1261568 bytes (1.3 MB, 1.2 MiB) copied, 27.4431 s, 46.0 kB/s

Done! 1.3mb Written! Did it work?

Rinse and repeat for the rest!

Filed under: Retro Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*

No trackbacks yet.