Gotek losing track calibration

Post Reply
arpruss
Posts: 11
Joined: Mon Jan 05, 2026 6:02 am

Gotek losing track calibration

Post by arpruss »

I'm using an HP 1653B with a Gotek with HxC firmware, which normally works reliably, but I am trying to support out-of-spec larger disk sizes to reduce disk swapping, and I am having some reproducible seek problems in certain circumstances. The device has a 765 controller and a Sony MP F52W drive.

I can successfully create a 254-track disk (with 5 sectors per track, 1024 bytes per sector), and with a little patch, I can make the HP read and write reliably in my own code (skipping over the magic track 79 which it needs for special stuff). But when I boot the standard oscilloscope SYSTEM_ software, and I write data (either with patch code--I have a patch that saves screenshots to disk--or the SYSTEM_ software data save function), it fails.

I have tracked down (pun not intended) the problem to the seek track command on the 765 FDC failing. Based on the 7-segment display, the HxC firmware on the Gotek is seeking to the wrong track, and it's off by 21. When the 765 is asked to read track 177, the display shows "198". When it's asked to read track 0, it shows "21". When I see to track 20, I see "41". Again, this only happens in very specific circumstances, after booting the SYSTEM_ software off a virtue 254-track hfe file. But I *like* that setup.

In case it's relevant, I think that the SYSTEM_ software is reading a bunch of stuff from different tracks all over the disk just before the failure. It's reading the comment fields on all the files.

Calling the 765 calibrate function twice in a row resynchronizes the tracks and resumes proper function.

Any suggestions on what I might change in the HxC firmware settings to solve this problem? I've also tried playing around with the gap3 and pregap settings. Currently I'm using gap3=50 and pregap=128. I think gap3=50 is right, because that's what the ROM asks the 765 for when it reads and formats.
Jeff
Site Admin
Posts: 8304
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Gotek losing track calibration

Post by Jeff »

Maybe the machine go to the track 255 ? The track 255 is a special track for the Direct Access. When switching from one mode to the other mode some track step count may be lost. Have you the same issue with 200 tracks images ?

Can you try to ground/force the select signal ? Or use this https://hxc2001.com/custom_fw/ and set "Non gated mode"

There is maybe also a timeout issue in the machine itself : Accessing to a "far" track may generate a timeout error.
arpruss
Posts: 11
Joined: Mon Jan 05, 2026 6:02 am

Re: Gotek losing track calibration

Post by arpruss »

I've got it! According to Gemini (I can't find it in the datasheet somehow), there is a 77 pulse maximum on the 765's recalibrate command. The OS issues the command twice, which isn't good enough when one starts in a track >= 155, and that is exactly what I have observed.

I suppose the solution is to patch SYSTEM_ to seek to track 1 before calibrating or maybe to call calibrate four times. I went with the latter solution, and just added this to my screenshot patch: https://github.com/arpruss/hp165x_softw ... screenshot
Post Reply