Gotek HD Image Support on PCjr

PCjr discussions !
Post Reply
jneuhaus
Poster4
Poster4
Posts: 31
Joined: Sun May 30, 2021 9:36 am

Gotek HD Image Support on PCjr

Post by jneuhaus »

Starting a new thread dedicated to this as it started under the 3Flop section.

So, I've been attempting to get my Gotek to allow my PCjr to read high density disks through the PCjr flopper controller card. It is known that the PCjr controller is not happy with HD drives (bitrate too high at 500kbps I'm guessing is the issue).

However, with FlashFloppy (v 3.29 in my testing) and a Gotek, you can play around with settings for particular image types. So, I figured I'd give it a go and see if I could get it to work.

For 360k and 720k floppies, it's fairly easy to get it to work
config.sys (Replace # with drive number (0,1,2), if you do not have a 3Flop and can only support 1 drive anyway I don't think you need this at all, same if you have the Gotek connected to drive A (0)).

Code: Select all

device=driver.sys /d:# /f:0
And off you go, no extra settings.

However, with 1.2 and 1.44 MB disk (i.e. 5 1/4" DSHD and 3 1/2" DSHD respectively), we have some issues. The default for these drives is 360 RPM and 500 kbps bitrate. Since the PCjr can work with 250 kbps I tried a few things.

For config.sys, you'll need to tell it the drive is a 1.2MB drive.

Code: Select all

device=driver.sys /d:# /f:1
IMG.CFG settings on the Gotek USB drive for FlashFloppy to read. Note I've only been testing with a 1.2MB disk image so far.

Code: Select all

[::1228800]
# Mandatory: Number of cylinders (1-255).
cyls = 80
# Mandatory: Number of heads (1-2).
heads = 2
# Number of sectors per track (0-256). Default is 0.
secs = 15
# Bytes per sector (128, 256, 512, 1024, 2048, 4096, 8192).
# Mandatory if @secs is non-zero.
bps = 512
# Rotational RPM. Default is 300.
rpm = 360
# Data rate in kHz (kbit/s) (eg. MFM DD = 250). Default is 0.
#           0 = based on recording mode and size of track.
# eg. 250 is MFM DD, 500 is MFM HD, 125 is FM SD.
rate = 500
Messing with various combos, none of the following worked:

Code: Select all

rpm = 360
rate = 250

rpm = 360
rate = 500

rpm = 300
rate = 500

rpm = 300
rate = 250
Then I started thinking about how FlashFloppy might be treating these values and realized that it may be simulating the index marker faster than the entire track can be processed. So even though the bitrate might be okay, it will register the index marker as being passed before it finishes all the sectors.

So I tried the following

Code: Select all

rpm = 180
rate = 250
And...It SORT of works! I can see the disk contents at least, so the FAT table is readable. However, if I attempt to copy the disk, it gives me an error of:
"Sector not found reading drive A"
(note DOS 5.0)

I'll keep trying some things and may try setting up FlashFloppy to output a log to see if I can determine why it might be having issues. But it does lead me to believe I might not be totally crazy for trying to get this to work. Or it could be that DOS will be really unhappy with 180 RPM and just throws it's arms up thinking that the index marker is not coming in fast enough, I'm not sure exactly how it uses the index marker.
User avatar
chuckphd53
Moderator
Moderator
Posts: 304
Joined: Fri Mar 20, 2020 3:45 pm

Re: Gotek HD Image Support on PCjr

Post by chuckphd53 »

interesting..... keepus informed
“I never commit to memory anything that can easily be looked up in a book.” (AE)
jneuhaus
Poster4
Poster4
Posts: 31
Joined: Sun May 30, 2021 9:36 am

Re: Gotek HD Image Support on PCjr

Post by jneuhaus »

Alright, so it does work!

I reported that I was getting sector not found errors. Logging data via Flash Floppy didn't help me diagnose the issue, but I noticed that the unit was never leaving track offset 0. It would switch heads, but never go to track 1. i.e. display always shows T: 00.0 or 00.1. So I decided to reconfigure and make sure it was still working for 360k disks. Which it was not. I then remembered that my unit supposedly has a speaker and I hadn't been hearing any sound from it in a while. So, to make a long story short, my unit has a touchy power connector (or maybe it's my cable, not sure yet). I jiggled it a little bit and then I was able to read 360k images again.

So then, back to testing the 1.2MB images, and it works! I was fully able to copy the entire disk contents to a hard drive with no issues.

So Flash Floppy IMG.CFG settings for 1.2MB image support is:

Code: Select all

[::1228800]
# Mandatory: Number of cylinders (1-255).
cyls = 80
# Mandatory: Number of heads (1-2).
heads = 2
# Number of sectors per track (0-256). Default is 0.
secs = 15
# Bytes per sector (128, 256, 512, 1024, 2048, 4096, 8192).
# Mandatory if @secs is non-zero.
bps = 512
# Rotational RPM. Default is 300.
rpm = 180
# Data rate in kHz (kbit/s) (eg. MFM DD = 250). Default is 0.
#           0 = based on recording mode and size of track.
# eg. 250 is MFM DD, 500 is MFM HD, 125 is FM SD.
rate = 250
Unfortunately, no..you can't up the RPM, it is not happy with a higher rate. Maybe you can tweak it a little bit, but 180 appears to work and makes sense. Basically, we are emulating a 5 1/4" DSHD drive running at half the RPM and a bitrate that is compatible with the PCjr floppy controller. i.e. a DD bitrate. With a bit rate of 250 kb/s and 15 sectors per track and 512 bytes each, it has to have enough time to fit all that data in before we hit the index mark again at the end of the disk rotation.

I don't know that all software will be happy with it, but so far DOS seems okay with it.

I also suspect this would work on any system with a similar controller that can only handle about 250 kb/s. So, I would expect this to work on the 5150, etc.

The only downside being that of course compared to a real HD drive setup, data will transfer half as fast as it would on real hardware.

And of course to do this correctly, you have to set your system up for the specific image you are targeting. It seems to be able to read the FAT table for other disk image sizes (360k, 720k, 1.44MB), but I would be highly suspect of any data it pulls at it will be interpreting the drive geometry incorrectly. the settings I have above only affect the 1.2MB images, but the device line in the config.sys is setting up DOS for that specific geometry.
Post Reply