Thursday, October 06, 2016

Fault Finding Reading Cromemco Floppy Disks




Spoiler: A vintage Computer story, but with a moderately happy ending

This is a tale of attempting to read the remaining 3.5" diskettes that I had forgotton to image on my 35 year+ old Cromemco 68000 based computer running Cromix 172.


BackStory
In 2009 I achieved success in electrically converting a 3.5" Samsung SFD-321 floppy drive so that it looked to the Cromemco host like a 1970's generation 8" generic (say Shughart) floppy diskette drive.

Where is that wonderful article I hear you ask?

Well here of course
http://majzel.blogspot.com/2009/04/converting-from-8-to-35-inch-floppy.html


The Full Conversion Story
So as to maintain a meaningful and potentially immutable archive I set forth with this ambitious conversion process in 2009

- Original Diskettes are usually 8" Floppies
- They are in a proprietary Cromemco format that makes it difficult to read anywhere except on the original hardware, e.g. connecting an 8" diskette to a PC with a diskette controller is unlikely to work (In summary because Track 0 is written in Single Density FM format at 128 Bytes per sector, whilst the rest of the diskette is in MFM Format at 512 Bytes per sector.  Most Disk controllers, emulator or copying programs just cannot handle this)


- So once 3.5" diskettes were perfected
- Rejig the Cromemco with an 8" and 3.5" drive pair
- The Cromemco sees this as two, 8" drives
- Copy each diskette
- There are over 500 of them.  So this took a long time
- For each copied diskette make a Dave Dunsfield IMD ImageDisk image
- The Dunfield image is a worldwide standard but usually requires an IBM PC with original disk controller
- I had one and had to modify it to accept a 3.5" diskette drive that it had never expected
- So then an .IMD image can be made, on the IBM PC, of the original Cromemco 8" diskette but that is now in a physical 3.5" format
- Each .IMD image was then transferred to my Master Server and then Web Hosted

This conversion process took about 2 years

HxC Floppy Disk Emulator
I tried various Floppy disk emulators without success but in 2014 found one that worked.  HxC

Here is the explanation article
https://majzel.blogspot.com/2014/04/the-hxc-solid-state-diskette-emulator.html

Now the images can be made more portable.  How?


The HxC Floppy emulator can load an Dunfield .IMD file and write a .hfe HxC format file that you can use with your HxC Solid state floppy drive emulator.  This is a freely available emulator, build primarily by Lotharek

Fortunately the emulator program, seen here running on Windows 2016 server has a bulk convert option. So in an instant you can read all your Dunfield .IMD images and save then in HxC .hfe format.

NB: .IMD Images are made on another computer!  It is a genuine IBM PC because the Dunfield program Image Disk is very hardware specific.


Finishing the Job
I noticed that of the almost 1000 converted to 3.5 physical diskettes, which I had thought I had completed in 2014 was not in fact finished. Some were not converted to .IMD and therefore not to .hfe format either.

So, no problem, just read the diskettes, on the Cromemco first to check, then make .IMD via the IBM PC,  IMD.COM program in the normal manner

And then, it all started to go wrong .....


PSU Issues
The vintage Cromemco computer I'm using is now over 35 years old.  To avoid stress to the power supply feeding power to the Electronics; all Floppy and Hard Disks are powered from a separate 500Watt PC power supply.

But when I plugged in the Marcus converted Samsung SFD-321 floppy drive  to the PSU that was already driving all of a hard Disk, HxC floppy emulator and BeagleBone, the PSU shut down.   Was it being shorted by my floppy conversion?

I ordered a new Power Supply.  About 2 Days later it arrived.

I replaced the Enermax with a BeQuiet 500W power supply.  It now works!   With the Samsung SFD-321 attached,  the diskette spins.  But there is a big BUT:

Diskettes Will Not Read



Depression deepens:   I tried multiple 3.5 inch diskettes, about 10 different ones. None are readable.  I mean surely this is impossible?  Diskettes are stored in airtight boxes, inside a further box, in a dry, temperature stable environment.

If I can't read any diskette, then this is a serious problem  (not all my systems have HxC diskette emulators.  They are expensive (to me) at about 100 GBP each.



Make Another Drive
I needed to convert some more of the Samsung drives that I stockpiled some years back using the instructions I made earlier

Error:  I've no Kynar (electrical) wire!   I mean nothing to patch up circuit boards.

1 week later, after the eBay order, today, something arrived in the post.  That is living in Lausanne, Switzerland for you  (no known electrical suppliers handy).   Okay time to get out multimeter and soldering iron and some very powerful magnifying glasses + head-torch ....  Some hours later, 3 more diskette drives are converted  (to 360RPM and 1.6MB unformatted mode aka emulation of a Double Sided, Double Density, 8" Diskette Drive)

mount -r fdb /db
CFLOP Read error, Unit 1, Side 0, Track 0, Sector 1, Not Found
Device open error

system[24] makfs ufdb
UFLOP Preread error, Unit 1, Side 1, Track 1, Sector 2, CRC Error
Cannot write inode    105
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 9, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 8, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 7, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 6, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 5, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 3, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 2, CRC Error
UFLOP Preread error, Unit 1, Side 0, Track 1, Sector 1, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 15, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 14, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 13, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 12, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 11, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 8, CRC Error
UFLOP Preread error, Unit 1, Side 1, Track 0, Sector 7, CRC Error

3 drives later, no good.  But consistent errors.  This must mean something.  But what?  Surely it means that the diskette drive and converstion itself cannot be faulty.




Card Shuffling and Cable Checking

To check against loose connections, take all cards out of machine.  Clean all contacts, Put everything back.  Things should get better maybe? No, worse ...

Unexpected interrupt vector ffH

Preparing to boot Std 0 - type ESC for DDOS prompt
Standby

Address: Memory test by 16K blocks

000000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
100000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
200000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
300000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Floppy = 1, STDC = 6, ESDC = 11

Enter major root device number: 6
Enter minor root device number: 0

68020 XXU 172   Cromix-Plus Operating System


20160923 CRO172 XXU TUART ZIO

System initialization complete
Unexpected interrupt vector e2H
DDOS version 01.04
****** Diagnostic board not present **********
Co-processor test OK
Preparing to boot Std 31 - type ESC for DDOS prompt
;bst0
Preparing to boot Std 0 - type ESC for DDOS prompt
Standby

Address: Memory test by 16K blocks

000000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
100000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
200000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
300000h: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Unexpected interrupt vector ffH

Unexpected interrupt vector ffH
Unexpected interrupt vector ffH

Things are getting worse!  The Unexpected interrupt vector, which crashes the Operating System soon or later means that one of the cards interrupts are not being suspended.  A special priority cable connects relevant  S100 electronics  cards  (i.e. IO cards typically, not memory or CPU).

Hours of frustration later Agata came to help me diagnose the problem.






Older Version initialise

I tried other versions of the floppy disk initialise program, different Motorola 68000 code versions and then in desperation Z80 code versions  (they run on a Z80 coprocessor seamlessly even with the 68000 based OS.  Clever huh!)

system[20] init.com
Initialize Disks version 02.84

Press:  RETURN to supply default answers
ESCAPE to abort formatting
CONTROL-C to abort program
Warning: INIT can destroy a
Disk to initialize (devname)?  fdb

Testing:
  Index pulses being received correctly
  Rotational speed:  overflow

No good :-(  Floppy can still not be read


Eureka Moment


The last time that this worked I had used this Motorola 68000 CPU card whereas right now the failure occurred using the XXU, Motorola 68020 processor card.


10 minutes later the old processor card was installed and

physical 3.5" diskettes, emulating 8" diskettes, were being read, 100% without error.

Problem Solved



Problem Solving Tips
So how was this problem solved?

- I had the help of my exceptionally clever wife, confident and calm me down partner Agata
- I had to try multiple different options, trying to eliminate sources of error:  Power Supply, Cabling, Loose Cards, Faulty Diskette Drive etcetera
- I stepped away from the problem and gave it a break
- I explained the issue to Agata:  Talking a problem thru and / or explaining it to a colleague often has remarkable success

 = you have to explain it and therefore prove you understand it
 = in return they analyse the problem, providing fresh insight, and why didn't you consider xyz etcetera

- Eventually remembering that it worked last with a different processor was the key.  But very weird because although with the 68020 processor the 3.5" diskette (emulating the 8" drive) would not read any physical diskette,  it could and did read from the the HxC emulator, whereby HxC translated .hfe images to real bytes.

This is what initially threw me off.  I had reasoned that if the HxC was working, then surely the physical drives must work too.

Apparently not, and that is still a mystery to me.  I can see no logical reason why the Emulator would be better than the original.  Does not compute.




Summary
Having a logical person to explain a problem to can often greatly assist in resolving the problem.  As usual Agata rather saves the day.