Floppy Drive Troubleshooting

388 views
Skip to first unread message

Matt Fisher

unread,
Sep 13, 2020, 1:40:42 PM9/13/20
to RC2014-Z80
Hi,

I've recently got a RC2014 Zed, running RomWBW 3.0.1. I'm trying to add a pair of 3.5 inch floppy drives to it, but having some trouble getting it to work. 

I've built a floppy controller on some perfboard based on Scott Bakers design (the only difference is I'm using a WD37C65B-PL chip): http://www.smbaker.com/wordpress/wp-content/uploads/2016/12/rc2014-floppy-wd-sch.png 

The problem is that it's not detected by the BIOS, and any read commands via FDU return with "exec timeout" with one drive, and "sendcmd timeout" on the other.

I'm currently trying to run one drive at a time, at the end of the cable with the twist. Both drives are confirmed working with a normal PC. Could this be a duff WDC controller?

Start up output:
RomWBW HBIOS v3.0.1, 2020-04-04

RC2014 Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1
512KB ROM, 512KB RAM

SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
DSRTC: MODE=STD IO=0xC0 NOT PRESENT
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
IDE: IO=0x10 MODE=RC
IDE0: NO MEDIA
IDE1: NO MEDIA
PPIDE: IO=0x20 PPI NOT PRESENT

Unit Device Type Capacity/Mode
---------- ---------- ---------------- --------------------
Char 0 SIO0: RS-232 115200,8,N,1
Char 1 SIO1: RS-232 115200,8,N,1
Disk 0 MD1: RAM Disk 384KB,LBA
Disk 1 MD0: ROM Disk 384KB,LBA
Disk 2 IDE0: Hard Disk --
Disk 3 IDE1: Hard Disk --


Survey output:
B>survey
                *** System Survey (December 17) ***

Drive A: 24K bytes in 0 files with 360K bytes remaining
Drive B: 378K bytes in 57 files with 6K bytes remaining

Memory map:
0       8       16      24      32      40      48      56      64
|       |       |       |       |       |       |       |       |
 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTCCCBBBBBBB
T=TPA   C=CPM   B=BIOS or unassigned    R=ROM or bad
BIOS at E603    iobyte 94       drive 01        BDOS at D806

65535 Bytes RAM         0 Bytes ROM             55302 Bytes in TPA
0 Bytes Empty           65535 Total Active Bytes

Active I/O ports:
50 51 52 53 58 59 5A 5B 5C 5D 5E 5F
80 81 82 83 84 85 86 87
20 Ports active


FDU output:
===== RC-WDC ==========<< FDU MAIN MENU >>======================
(S)ETUP: UNIT=00  MEDIA=1.44MB   MODE=POLL        TRACE=01
----------------------------------------------------------------
(R)EAD          (W)RITE         (F)ORMAT        (V)ERIFY
(I)NIT BUFFER   (D)UMP BUFFER   FDC (C)MDS      E(X)IT
=== OPTION ===> FDC MENU

===================<< FDU FDC COMMAND MENU >>======= [MSR=00] ==
(R)EAD           READ (D)EL      (W)RITE         WRITE D(E)L
READ (T)RK       READ (I)D       (F)ORMAT        SCAN E(Q)
SCAN (L)O/EQ     SCAN (H)I/EQ    RE(C)AL         SE(N)SE INT
S(P)ECIFY        DRI(V)E STAT    (S)EEK          VERSI(O)N
P(U)LSE TC       L(A)TCH:1C      (M)OTOR:ON      FDC RESET (Z)
E(X)IT
=== OPTION ===> READ
ENTER TRACK [00-FF] (00):
ENTER HEAD [00-FF] (00):
ENTER SECTOR [00-FF] (01):
READ: 46 00 00 00 01 02 01 1B FF --> <EMPTY> [EXEC TIMEOUT]

Matt

unread,
Sep 13, 2020, 6:18:06 PM9/13/20
to RC2014-Z80
Forgot to mention, there is some sign of life on one of the drives (the one that reports exec timeout). Toggling the motor on/off, and starting the read operation does cause activity LED to turn on. 
Also I'm only running the Z80 v2.1, SIO/2, dual clock, and 512k ROM/RAM modules, plus my custom floppy board. Unplugging the floppy board results in IO ports 50-5F disappearing from survey results. There's no other storage on board, so I'm not sure how IDE is detected on startup. 

Andy Nicol

unread,
Sep 14, 2020, 8:01:32 AM9/14/20
to RC2014-Z80
Hi Matt,

Does the motor start when you send the motor-on command? Does the head move when you send the seek command? If seek and motor on/off work but data transfer doesn't then you might have a faulty cable or wrong crystal on the SMB board. Have you checked all the solder joints? Can you post photographs of the board, front and back?

For detection in the BIOS, I think you will have to rebuild the ROM image. If you are unable to re-flash the memory board, you can always download a .COM build and execute it, but you will have to do this every time you boot. I use a Minipro TL866 for this. Note that none of this affects FDU operation, which should work regardless so you can concentrate on using FDU to debug the floppy interface.

Andy Nicol

unread,
Sep 14, 2020, 8:13:03 AM9/14/20
to RC2014-Z80
ps You do know that there's a printed board available to buy for this? Making your own home-brew board multiplies your chances of errors.

Wayne Warthen

unread,
Sep 14, 2020, 12:45:29 PM9/14/20
to RC2014-Z80
Hi Matt,

It appears that you are using the "low level" FDC menu for testing.  That is fine, but it requires using a series of very specific commands to work correctly.  For example, I do not see the use of the SPECIFY command which must preceed the READ command.

I would suggest testing with the main menu.  You have enabled tracing which is good.  From the main menu, with tracing enabled, can you try doing a READ and post the results?

Thanks,

Wayne

Matt

unread,
Sep 14, 2020, 3:00:19 PM9/14/20
to RC2014-Z80
Ok, so good news. Turns out the board I made was fine, and the problem was the power supply. I was using the USB to barrel jack lead that came with the kit with a phone charger and a USB power monitor in line. Had 5.15v at the charger end, but only 4.7v at the backplane. The motor in the drive was just clicking when requesting a read, with hundreds of repeating lines of "invalid command" and "disk change". I changed over to using an old ATX power supply that has been modified for bench use, and it immediately sprung to life.

I would order one of SMB's boards, but I don't really want to buy two spares, and I'm UK based so it could take several weeks to arrive.

I'll take a look at rebuilding the ROM. I don't have a flash programmer (yet), but I'm assuming the flash utility in RomWBW will allow me to reflash the chip.

Thanks for the help.

The images of the PCB. Took a whole weekend to solder that rats nest - it started with good intentions. (Note the jumper is missing from the address selection, as I've ran out and was using a temporary patch lead which was in the way for the picture) 
Back.jpgFront.jpg

Wayne Warthen

unread,
Sep 14, 2020, 7:20:40 PM9/14/20
to RC2014-Z80
Ah, of course.  I'm sorry, I didn't think of power supply.  That is a common issue with floppies on the RC2014 platform because the floppy motor startup (as you found) draws a lot of current and destabilizes the system without more power than a USB connection can provide.  One reason I did not think of power supply is because your system behaved differently than I have heard of previously when there is insufficient power.  Most systems just immediately reboot when attempting to start the floppy motor with too little power.  Not sure why yours went into a loop like it did.

Anyway, good job finding the issue and even better job with the breadboarding!

Yes, RomWBW has a FLASH.COM application that will allow you to reprogram the ROM.  You will need to state the ROM image on persistent storage though and it sounded like you don't a CF/SD card attached.  When you build a new ROM, you will get a .COM version of the new ROM that lets you "test" the new ROM image by loading it via the .COM file.

-Wayne

Matt

unread,
Sep 15, 2020, 4:07:26 AM9/15/20
to RC2014-Z80
Yeah, that's the sort of failure mode I was expecting if it was low power. USB power monitor was reporting only a tiny increase in current (from around 100mA to around 120mA) when trying to use one of the drives, and the other drive was pulling around 300mA without doing anything (I'm now assuming that was the stepper motor trying to spin to start up position), which is why I assumed the chip was bad. I guess the drives have some sort of low voltage protection on them.

I saw the FLASH application had a "partial" flag, which I assumed was to flash partial files, not what it actually does which is flash the entire ROM onto a much larger chip. I've ordered a reprogrammer now anyway, so hopefully that will be here before the weekend.

Thanks,
Matt

mbrooks

unread,
Mar 20, 2021, 10:04:28 AM3/20/21
to RC2014-Z80
Hi Matt, Have a spare Scott Baker wdc floppy controller board if you are interested. Bare board or partially assembled?
Mike
Reply all
Reply to author
Forward
0 new messages