Sharp X68000 - Writing 5.25" Floppies in Linux

The Sharp X68000 has two 1.2MB 5.25“ floppy drives (except the Compact models, which have far more common 3.5” drives… though virtually no software was released on that format!), so getting a PC with an equivalent drive is the easiest way of getting software or an OS onto them.

You will of course need a 1.2MB Double-sided, High-density 5.25“ drive supported by your onboard floppy controller. Sadly the floppy controller has gone from all modern PC's, but everything up to and including the Core 2 Duo/Quad should have one onboard. I use an old Pentium IV 3.06GHz HT system (last with fully functional ISA slots) which runs any modern version of Linux without an X11 GUI just fine.

Configuring the drive may be the most difficult part of the process - 5.25” floppy drives are nothing near as standard as the 3.5“ drive, and you will likely have to find the manual for your model to correctly jumper it as your drive A: or B: - remember that if you have a twisted-ribbon floppy cable, anything before the twist is drive B:, anything after (the end connector) is drive A:. Your drive jumpers must match that.

I'm using a Panasonic JU-475-5 AKO, a relatively common (and later) drive, but there are similar models from Mitsumi and TEAC. Expect to pay £60 - £100 for a working drive from Ebay. These things are getting quite scarce now. Do not buy an earlier Double-density drive!

You need a package of tools called `fdutils` installing, this includes things like 'getfdprm', 'setfdprm', etc:

$ apt-get install fdutils
The following packages will be INSTALLED:
0 packages upgraded, 1 newly installed, 0 reinstalled, 0 to remove and 184 not upgraded.
Need to get 324 kB of archives. After unpacking 0 B will be used.
Get: 1 bionic/universe amd64 fdutils amd64 5.5-20060227-7build1 [324 kB]
Fetched 324 kB in 0s (2,025 kB/s)
Preconfiguring packages ...
(Reading database ... 834304 files and directories currently installed.)
Preparing to unpack .../fdutils_5.5-20060227-7build1_amd64.deb ...
Unpacking fdutils (5.5-20060227-7build1) over (5.5-20060227-7build1) ...
Setting up fdutils (5.5-20060227-7build1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Processing triggers for doc-base (0.10.8) ...
Processing 2 changed doc-base files...
Registering documents with scrollkeeper...
$ which setfdprm

To set up the drive for the Sharp X68000 track layout, you need to configure the drive. Here's a quick shell script that automates it:

if [ "$MODE" == "on" ]
    echo "1232/1232 2464 16 2 77 0 0x35 0x08 0xDF 0x74" > /etc/fdprm
    setfdprm /dev/$FD -p 1232/1232
    fdformat /dev/$FD
    setfdprm /dev/$FD -c

Run it as

$ sudo setx68flop on fd1
[sudo] password for user:         
Double-sided, 77 tracks, 16 sec/track. Total capacity 1232 kB.
Formatting ... done 
Verifying ... done

Then write your disk image using dd:

$ sudo dd if=Phalanx_disk1.xdf of=/dev/fd1
[sudo] password for user:
2464+0 records in
2464+0 records out
1261568 bytes (1.3 MB, 1.2 MiB) copied, 81.9835 s, 15.4 kB/s

Then after you are done, clear the floppy settings so that your floppy drive goes back to normal IBM/PC 1.2MB format:

$ sudo setx68flop off fd1
[sudo] password for user:
  • blog/x68_floppies.txt
  • Last modified: 2020/08/12 19:22
  • by john