elizabethtaylor wrote:
Stepper drives like the WDI-325 still depend on a fixed index pulse and the original sector geometry written at the factory
afaik in soft sectored early stepper drives index was generated by optical/hall sensor or motor driver
here for example chip doing it for Seagate 125
https://github.com/schlae/HardDriveInfo ... 647-502.mdand on a diagram
https://github.com/schlae/HardDriveInfo ... _20629.pdfelizabethtaylor wrote:
The controller's low-level format routine may also be gated on a valid defect table or geometry table burned into ROM.
afaik also too early for defect tables handled by disk
now index track is another matter and I agree disk fails to get ready because it most likely cant find its index track. Seagate uses special track -1 (or -2?) for this purpose, no idea how WD handled it.
mima85 wrote:
In the last days, with the help of Google's AI (sorry folks, I don't know i8031 assembly so I had to rely on big brother's tools, even if I'm not actually fond of AI and the whole vibe coding thing) I, naively I admit, made the robots slopify me some assembly source code to put together a sort of "factory restore" firmware, of which I thoroughly outlined the specifications. I gave to the AI the hex dump of the original IBM's firmware to make it extract from the IBM's code all that's needed to handle all the hardware and the low-level format routine itself, which appears to be actually present into the original code, and to build over it the custom firmware.
Google's toasters arent the best for this. I havent seen anyones RE success stories using google crap. Claude toaster on the other hand sometimes pulls rabbits out of its ass one-shotting exotic firmwares. What Im trying to say is you are going to need a bigger boat.
mima85 wrote:
If you want I can share the code, my specifications and some other stuff that came out during the conversations
I havent seen a firmware for an IDE drive so I dont know how it looks like internally and how much is handled by controller chip (chip directly connected to IDE port) and how much still goes thru micro. If its anything like old SCSI drives then micro is the brains of everything - selects heads, controls head assembly arm movement, sends commands to actual controller Asic, even controls rotation speed. Here micro is at least directly controlling head stepper.
For WD drive start with making robot produce annotated disassembly to the point it can name functions. Im you will need:
Trace which 8031 IO connect to two TEA3717 pins 7 8 9. Thats between 3 and 6 IO taken care of.
Trace which 8031 IO go to big IBM chip - this one incorporates
Capture all 8031 IOs, if you dont have 40 IO LA capable of storing couple seconds at >12mhz you will need to kludge =
https://sigrok.org/wiki/Lcsoft_Mini_Board would be barely fast enough at 12MHz considering cycle times of 8031. Capture all 8031 IOs in groups of P0, P1, P2, P3. In 16 channel mode at least grabbing one of the ports + pin 9 reset (and trigger on that) / 16 wr / 17 rd / 29 psen + P0.0-P0-4 for syncing. Lets say 5 seconds from reset. AI will be able to cobble python script gluing all the captures into one correlated log.
give that to AI + as much pinout as you can gather. Dont mix two boards you have

Pick just one and stick to it, AIs are stupid and easily confuse when given too much choice.
The questions that interest us most are
- How and when does it know its on track 0? waiting for some IO port or maybe reading something from controller? waiting for specific pattern decoded by ENDEC? this one is crucial and should be easy as its somewhere at the beginning of initialization. - - does it sync with Index pulses? Which IO it uses to do it? logic capture should show it as one of the pins will steadily pulse at ~50Hz.
Finally in separate session you can try
https://github.com/yyzkevin/COMrade https://github.com/jdredd87/DOSBridge one of those to let Toaster control PS/2 with drive connected and ask it to determine whats the status of connected XT-IDE drive. Try it with Seagate first since its almost working. Ask it to low level format it too, knowing how AIs operate it will cobble together custom made programs to attempt this. It will find IO ports on its own, determine command structure etc.