PDA

View Full Version : AT&T UNIX PC (3B1) Hard Disk Emulator



Twylo
April 18th, 2014, 03:09 PM
Hi folks,

A couple of weeks back I bought a nice AT&T UNIX PC from a local collector here in the Bay Area. I probably over-paid for it, but I've wanted one for a while, so I think it was worth it. It's a 67MB model, and like most 30 year old hard drives its MFM drive has issues. After making a full backup, I decided to reinitialize and reformat the drive and do a fresh install. Sadly, the drive has so many bad blocks it overflowed the bad block table (which apparently is only 7 bits).

That got me thinking about how to do a hard drive replacement. MFM emulators have been discussed here many times before, but never really seem to move past the planning or prototyping stage. I don't blame anyone for that, it seems like a very hard problem. MFM is nasty to decode. So I started to wonder if there was another way to go about it, and I think I have a good idea. I'd like some input from folks here, if it's interesting to you.

My thinking is that rather than try to do an MFM encoder & decoder, I could instead build a microcontroller circuit that sits in the socket currently occupied by the WD1010. If the storage subsystem is intercepted there, rather than at the MFM layer, I think the logic could be much, much simpler. The host interface of the WD1010/WD2010 is pretty straight forward DMA/PIO with a parallel 8-bit data bus and 3-bit address bus. All I need to do is read commands off the data bus and operating on them. The state machine looks relatively easy.

There is one biggish drawback: The Disk and Head Select logic is external to the WD1010, so if I only piggyback on the WD1010 socket, I can ONLY simulate a one-disk/one-head system. That limits the maximum size of the simulated disk, but still allows for up to 256MB (1 head, 2048 cylinders, 256 sectors per track, 512 bytes per sector). That's pretty respectable for its time period, I think.

So, there it is. I'd love feedback on this idea. What do you all think? A reasonable approach?

-Twylo

lowen
April 19th, 2014, 07:57 AM
The FreHD project does WD1010 emulation for the TRS-80; the design might be adaptable. The nice thing is that it's very well-tested code, at least for the TRS-80 hard disk controller emulation, and uses FAT-formatted SD cards with hard drive image files instead of direct access.

I had a couple of UnixPC's back in the day; one a 3B1 and one a PC7300 (difference being, of course, the 3B1's 'hump' under the monitor for that full height drive). I actually did the 'two drive' mod that a guy on comp.sys.3b1 put out, and had two Rodime 70MB half-height drive in the 'hump' where the 67MB was. I ran C-News on the box and pulled a partial Usenet feed (primarily to get the admin groups, alt.folklore.computers, and several comp.sys groups, along with uucp e-mail).

But I gave it away about 15 years ago, and lost track of the fellow I gave it to. (The PC7300 I kept for a bit, but it quit working and I parted it out to the same guy).

Anyway, the difficulty you're going to have is the fact that the WD1010 is only half the controller; while it's been a really long time, I seem to remember a WD1014 or WD1015 chip there too that is part of it. At least with the TRS-80 you have a well-defined expansion bus; the 3B1, being a 68010-based box, will have a 16-bit bus, although it may latch down to 8 bits for the HDC.

But, again, the FreHD has the emulation pieces for a PIC microcontroller to emulate the whole circuit; it might be possible to do it as a plug-in arrangement with some modification to the 3B1's circuitry. Search for the comp.sys.3b1 FAQ from around 1992, and you might even find schematics out there if you look hard enough.

If you want to roll your own, the upstream source for the WD1010 emulation for the FreHD is the xtrs TRS-80 emulator.

The other route you might want to look at is a modification of the XT-IDE or a CF/SD to IDE adapter of some sort, as the AT controller (and the ATA/IDE revs past that) are supersets of the WD1010 set; a similar thing has been done with a 'Cheapo IDE Interface' for the TRS-80 as well.

A good starting place is Hans01's review of the difference between the Cheapo IDE and FreHD for the TRS-80 in the Tandy forum on vcf; here's the link:
http://www.vintage-computer.com/vcforum/showthread.php?42354-The-TRS-80-IDE-versus-the-FreHD

Yeah, I know it's for a TRS-80 8-bit system, but that system used the exact same WD1010 controller the 3B1 did. For what it's worth, I had a Tandy 6000HD with it's WD1010 controller replaced with a WD2010; I took that chip out of the T6K's board when I got rid of the T6K and put it in my 3B1, and made the patches to allow greater than 1024 cylinders at the same time I did the dual-drive modification.

Now, an ST506/ST412 interface emulator would be a nice project, and would be very portable to many systems that used that (erroneously called MFM) interface. 'MFM' also includes non-ST506/ST412 interfaces, as 'MFM' is the bit encoding of the data stream, not the physical interface (I know, I know, I'm splitting bits here...).

billdeg
April 20th, 2014, 06:24 AM
Might sound simplistic, but I just replaced the drive in mine with another. I had one that was compatible

Twylo
April 20th, 2014, 03:50 PM
Might sound simplistic, but I just replaced the drive in mine with another. I had one that was compatible

I wouldn't mind doing that in the short term, but they're outrageously expensive now, and I haven't got another. Just a small pile of ESDI drives, but no ST-506/ST-412 drives :(

That said, I spent the better part of today getting a solid understanding of MFM, and then a few hours with a logic analyzer on my 3b1 watching the MFM stream as I wrote to my (very sick) drive. I used the diagnostic floppy to enter step/read/write commands and watch what happened as I wrote different patterns to the disk. Now that I understand what the MFM stream looks like and how to decode and encode it, I think making a ST-506/ST-412 emulator sounds a lot more realistic. I have on hand a 50MHz "CoolRunner-II" CPLD development board, I think that part might be suitable (even overkill) for the job. It'll be useful for prototyping VHDL, if nothing else.

-Twylo

Chuck(G)
April 20th, 2014, 04:01 PM
You may want to check with the DEC folks on cctalk--there's already such a project nearing (if not reaching) maturity.

Twylo
April 20th, 2014, 04:14 PM
You may want to check with the DEC folks on cctalk--there's already such a project nearing (if not reaching) maturity.

Oh! Is this a project different from Reinhard Heuberger's RL02 emulator? His is the only project I know of, and I've been reading his work -- it's excellent. But the timing is also different: 4.1MHz clock for the RL02, 5 MHz for ST-506. If there's another ST-506 project, I'd be very happy indeed not to duplicate effort.

-Twylo

Chuck(G)
April 20th, 2014, 04:50 PM
Hi Seth--I think it was Reinhard's project, but I'd need to check the archives.

You being in Fremont and not able to find a drive seems to be pretty strange to me. Weirdstuff doesn't even have any? If you're really looking for a real 506, I believe that I have one--I'd need to check the operation first. It probably has less than 100 hours on it.

Al Kossow
April 20th, 2014, 07:11 PM
Weirdstuff doesn't even have any?

Drives have pretty much dried up in the surplus channels here. The last of the small IDE drives disappeared within the past few months.
If they still have any, they're not being put in the store any more.

billdeg
April 20th, 2014, 07:31 PM
I value greatly the few drives of this class I have. When I repaired my 3b1 it was about 10 years ago, the drives were more plentiful then. I even chucked a few marginal drives because I did not have the space for them. Wish I did not do that.

lowen
April 21st, 2014, 05:24 AM
Oh! Is this a project different from Reinhard Heuberger's RL02 emulator? His is the only project I know of, and I've been reading his work -- it's excellent. But the timing is also different: 4.1MHz clock for the RL02, 5 MHz for ST-506. If there's another ST-506 project, I'd be very happy indeed not to duplicate effort.

The predecessor to the ST506/412 interface, the SA1000, used 4.34Mb/s but was essentially the same interface (see Frank Durda IV's Tandy MFM reference; the same basic controller design was used for both the 8-inch 8Meg SA1004 and the 15 Meg 5.25-inch Tandon ST506-compatible, but with a different clock rate and control connector; his page is at http://nemesis.lonestar.org/computers/tandy/hardware/storage/mfm.html).

I'm not familiar enough with the RL02 interface to comment on how similar it might be, however. It might be as simple as increasing the data rate to 5Mb/s and massaging the control lines, assuming the data connector's drivers use compatible voltages.

Al Kossow
April 21st, 2014, 09:12 AM
Oh! Is this a project different from Reinhard Heuberger's RL02 emulator?

Different project. He has been hampered by not having a functional drive to test against.
http://fafner.dyndns.org/~heuberger/indexE.html#file:///E:/homepage/indexE.html

Twylo
April 21st, 2014, 10:26 AM
Drives have pretty much dried up in the surplus channels here. The last of the small IDE drives disappeared within the past few months.
If they still have any, they're not being put in the store any more.

Yeah, It's amazing how fast they disappeared. When I last checked WeirdStuff about a week ago, they had ditched 99% of their surplus hard drives from the "As-Is" area. There were two 5.25" full height SCSI drives left, and I bought them both -- but nothing else. Not even IDE, let alone MFM. I have no idea what happened to them, but I assume they were probably scrapped.

I didn't ask at the counter if they have any MFM drives in the back -- they might. But their prices have gone up a lot recently, and assuming they have any I'd be surprised if they let them go for under $100.

A side-rant: 5.25" floppy drives have also dried up. WeirdStuff didn't have any of those, either. Last week I had to spend $25 plus shipping each on eBay to get two of them I needed for a project.

It's a strange new world! The stuff that seemed common as dirt ten years ago is now quickly disappearing.

Twylo
April 21st, 2014, 10:31 AM
You may want to check with the DEC folks on cctalk--there's already such a project nearing (if not reaching) maturity.

Aha, I did some more research and found this project, it might be the one you were thinking of:

http://www.pdp8.net/mfm/mfm.shtml

I got in touch with David yesterday and he's still very actively working on it, so I'm going to build up a prototype and try to get it running this week or next weekend.

Frankly, I'm very happy not to have to reinvent the wheel! I get so discouraged when I see multiple people working on totally different projects with the same goal. There's no point in dividing effort like that unless one design is clearly broken.

-Seth

firebirdta84
August 9th, 2015, 10:01 PM
I just wanted to weight in quickly here, as I ran across this thread.

I have built 6 of David's MFM emulator, and they work wonderfully well! There are several bugs in using them with advanced configuration on my Convergent Technologies MightyFrame, but he is working with me to resolve those in his next hardware upgrade to these.

I highly recommend them to all who have discussed an interest here in this thread!

Thanks all,
-AJ
http://MightyFrame.com

firebirdta84
August 15th, 2015, 12:27 AM
OH, and since this is a thread about using the MFM Emulator specifically on the UNIX PC 3b1, let me say, I'm using several emulators on several UNIX PCs, and they work extremely well.