• Please review our updated Terms and Rules here

floppy drive emulator with SD (was: Don Maslin's archive)

NobodyIsHere

Veteran Member
Joined
Dec 21, 2006
Messages
2,410
Hi

Now that the miracle has happened and Don Maslin's archive has resurfaced it makes me think what we (the vintage/hobbyist computer community) really need is a sophisticated free/open source floppy drive emulator.

Chuck and I were working on a PCB several months ago based on his design he developed. However the project basically collapsed under its own weight and never made it past the initial stages.

In retrospect, I am thinking what might work better would be a dual Propeller based system. One Propeller would handle the VGA, PS/2 keyboard, and microSD. The second Propeller would handle the floppy drive interface and serial port. The two Propellers would communicate over SPI or other 2 wire serial protocol.

With such a device, we could (in theory) load up a bunch of disk images on a microSD, use the video display and keyboard for configuration, and plug in to any Shugart SA-400 or Tandon TM-100-2A compatible floppy controller and viola! instant boot disk.

Is this just a dream or is this really doable? Has someone else already done this project or something similar?

Thanks and have a happy holidays!

Andrew Lynch

PS, the N8VEM "ECB PropIO" board is already a dual Propeller based peripheral which is about 80% of the above. All it would need is a serial port section and OC buffers (4 74LS07's) to allow the second Propeller to drive the floppy drive. The ECB interface would be removed since there would be no need for it.

http://n8vem-sbc.pbworks.com/w/browse/#view=ViewFolder&param=ECB Prop IO
 
Isn't the HxC free/open source? They provide schematics for the hardware, and sources for the CPLD and and the PC based utility. Why not use an existing device, is the hardware insufficient for what you have planned?
 
Hi

What I am thinking would use the 34 pin Shugart minifloppy drive interface and would be completely architecture neutral. There would be no dependency on the PC or its architecture. With the right firmware the floppy emulator could interface to essentially any computer with a minifloppy interface. It would not be necessarily dependent on soft vs hard sector and could serve up any sort of disk image.

The advantage of using the Propellers is they are hobbyist friendly and a pair of them provide enough GPIO pins for a rich, diverse user interface and still be able to control the floppy drive interface.

One of the major problems with the earlier design is in order to get enough GPIO pins in a single uC package you are essentially forced to go to a high end device -- typically that is only available in non-hobbyist friendly large SMT packages.

Using two Propellers connected via SPI neatly solves both problems as they are available in DIP-40 for easy assembly and would have sufficient GPIO pins (~60) to support a rich, diverse user interface.

However the firmware to emulate a floppy drive at its lowest level is not a trivial undertaking. This would be a difficult hard-realtime project. Fortunately the Propeller excels at those jobs.

Ideas? Thoughts? Comments? Questions?

Thanks and have a happy holidays!

Andrew Lynch

PS, don't get me wrong, there many fine PIC32 devices available for very inexpensive. However, I think you'd need a 100 pin QFP to pull it off. That's a good sized SMT package that will severely winnow the DIY hobbyist crowd. The only alternative would be pre-assembled boards which drives the costs up into the stratosphere (think many thousands to organize instead of a few hundred for the PCB only option -- who has that sort of hobby cash laying about?).
 
Last edited:
But that isn't going to work for non-PC stuff. I've got a partially-completed emulator using a PIC32 micro, but that's SMT and I know that folks don't like fine-pitch SMT here.

PIC32 comes in DIP-28 FYI.

My general question about this idea and things like the SCSI2IDE project is what is the design focus? It seems like the proposed architectures are cases of something looking like a nail to a very specific hammer (Prop in this case, Z80 SBC in Douglas' case). If end board cost or overall simplicity is the motivating factor, you could refine some of the ideas used in previous projects of this type like Catweasel, HxC, DiscFerret, Chuck's own design, etc. SMT isn't a barrier. There are people here that can get us through the proto-phases (I volunteer time and money) to a kickstart funded out-sourced production run. However if hobby friendly assembly and long term availability (ala the N8VEM distribution model) is the primary focus, lets commit to that now, but have some open discussion about the best hammer to use.

PIC32 seems like a better solution than a coupled pair of props. It would give you ~40-80 instructions per floppy tick at 40 MHz. It would also give you USB host mode for images. It is pinned constrained but you could build a latch/driver network out from 3-5 pins to make a hex display and/or key matrix. The main con is a programmer is needed vs simple serial for the props. However many ROM programmers will work and PICkits are fairly inexpensive.

On the SMT front, there has been lots of discussion at times at using the same basic design for a general MFM/RLL emulator for 5 MHz/7.5 MHz hard disk speeds. Most of those drives, like SCSI, are disappearing. That could be done in a two capitol chip solution using a PLD with enough block RAM to hold a single oversampled PCM track + a MCU to perform the track interchange + optional low level format emulation. Along with a few PHYs sprinkled around.
 
@eeg, it's the SMT PIC32s that have all the goodies, however, including lots of memory--and they run at 80MHz in case you need extra cycles. The DIP models are pretty basic. Like all things Microchip, programming is a strange thing. You do use a PICKit--but the odd thing is that the chip translates the SPI signals into EJTAG, because that's the native programming mode for these things. But Microchip doesn't sell an EJTAG programmer! Unbelievable.

I've been using the PIC32MX795 and it's pretty cool. An AVR-core MCU would also do the job--Freescale has some nice choices, including some with 5V-tolerant inputs.
 
For SMT, yes the sky is the limit. My personal MCU of choice is a M3/M4 and ST, SiLabs, and Cypress make some really flexible ones. In fact a PSoC 5 might be the best choice as it offers a few PLD blocks that might make state processing or serdes a bit easier. USB dual mode or OTG would also raise some interesting possibilities of making it go both ways. In one mode a floppy emulator using USB MSC. Flip a switch and get DiscFerret type functionality while connected to a PC host. 5V tolerance probably isn't an issue as you'll have to additionally buffer the lines anyway for enhanced sink current.

Of course if 5+ MHz HD rate cases were in scope, a small integrated PLD like a MachXO2 would be ideal.

For the entirely through-hole route, a DIP28 PIC still favors comparatively with a Prop. ~2.5x less CPU power, 4 times the flash, 40% of the cost, and dual mode USB. Still a good option if fast enough.
 
You really don't need much CPU horsepower--I did an emulator using a 16MHz AVR. That included encoding data, adding ID headers and CRCs. A floppy drive spins at around 200 msec./rev; head-settling time is generally 15msec when on-track, so you've got a lot of time to do things--just set two buffers up--one with the outgoing data and the other with incoming data--decode and splice the two together when writing back to SD. You do need RAM, however--about 24K for each buffer if you are doing MFM. Make it 32K for each to be safe and some for work spaces.
 
So this is why I'm asking, what would make this project unique or extra useful other than write-back support over just buying one of the hundreds of existing floppy emulators on eBay for $30 or a HxC for a bit more? (or AztecMonsters on eBay in the case of SCSI2IDE)

Making the emulation both ways is the best feature add I can think of. Andrew has a good base idea, but if you cram a lot of parts on the board, it can easily exceed $100. I just don't see the point of designing to that price point with the eBay alternatives for floppy emulation and the existing commercial alternative for host emulation. For about the same price you could buy one of both and have it UPS ground in a week.

The HxC PLD state machine is very clever. It is also 5V PTH. You could replace the USB fifo with just about any processor with 10 GPIOs. They also do self-contained emulation with a PIC18F4620 @ 40 MHz.
 
Last edited:
Hi
Yes, I looked over the HxC and this idea seems overcome by events.

Thanks and have a happy holidays!

Andrew Lynch
 
The HxC is probably the best solution--the Chinese floppy emulators are pretty rigid with respect to supported formats. If you're using them for PC disks, they'd probably be fine, but for CP/M disks, probably not.
 
Looking at things a bit more, I see that the HxC, neat as it is, may be well outside the range of most people's budget.

The GOTEK floppy emulators can be had for less than $30, shipped on that auction site. They have the bonus that they're in a nice 3.5" form-factor unit. They use a single ARM microcontroller and usually interface to a USB stick.

I'm wondering if the cost-effective alternative might be to use the GOTEK as a hardware platform and use custom software. I'd simply want to put one of these permanently in each system that requires one. So custom software for a platform would be a program it and forget it affair.

Just thinking aloud. Some things are best bought already assembled by Chinese vendors.
 
Looking at things a bit more, I see that the HxC, neat as it is, may be well outside the range of most people's budget.

Hi,

Wait a little :

We are aware of this problem and that's why we are working on a "low cost" HxC Floppy Emulator :

The Slim HxC Floppy Emulator (here is the prototype during parts assembly):
SDHxCSLIM_Proto.jpg


More details soon ;)

About your idea, i have thought to do myself this new firmware. But i have some doubt about the sustainability of this kind of solution :
There are a lot of pcb version of these emulators, we don't know if they still in production and how many time they will.
And also : Who is exactly "Gotek System" ? What about the possible legal issues ? : Unlike the HxC, It seems that the same hardware is sold at very different price depending of the disk format emulated. For example 80*2*9*512 (720KB) Gotek drives are more expensive than the 80*2*18*512 (1.44MB) version. The hardware seems to be the same, but not the price.
I suppose that Gotek will not be very happy if their devices are "unlocked" by another firmware ?
Just some thought...
 
That "slim version" looks very promising. Does it still use a CPLD? That MAX7000S device on the old one is really nearly obsolete now.

Gotek is a Chinese company in Zhangjiagang China--I've seen their unit being sold by US, Indian, Vietnamese and German companies. I don't think they care about the use of their physical unit and probably wouldn't even care if their software was hacked--which I'm not proposing, BTW. Just use their nice physical platform, writing our own software.

From what I've read on the web, Gotek evidently didn't develop their own firmware anyway. They'd probably even offer a wholesale purchase price on a carton of their units. Certainly a couple of emails might be in order. The Chinese, in my experience, never pass up an opportunity to make a sale.
 
SD HxC doesn't use a PLD at all. It uses only a PIC18F4620 and some phy logic. I suspect the above is just a 44 QFP version of the same circuit instead of a DIP. The USB (device only to a PC host) version uses the MAX7K with a very clever state machine to clock both a data and control pattern from an SRAM. USB provided by a FT245 is just to load the SRAM on track change. The ATF1508 is pin compatible to the MAX7K and (relatively) common and less expensive. But the USB version does not support spliced writes to the floppy pattern.

EDIT: @Jeff - what's up with that big coil? I can't imagine what it's needed for and it must be a bulge in the BoM.
 
SD HxC doesn't use a PLD at all. It uses only a PIC18F4620 and some phy logic.

Ah, okay, I went to the HxC web page and saw that big PLCC package and drew a premature conclusion. But even the PIC18F series is pretty ancient technology. I suspect that the Chinese emulator has far fewer active components.

My project with the PIC32 was actually for ST506-interface hard disk emulation. Still working out the design, but it looks promising. There are some platforms that require a 506-interface drive as the controller is either unique or not separable from the unit.
 
SD HxC doesn't use a PLD at all. It uses only a PIC18F4620 and some phy logic. ...

Not exactly : It use the new PIC18F46k22 :More powerfull for less money. ;)

...USB provided by a FT245 is just to load the SRAM on track change...
No, not at the track change. The SRAM is only used as a double page buffer. By this way the track lenght maybe infinite : The USB HxC Floppy Emulator may be used to emulate a tape for example. The PC constantly feed the Emulator. In fact the USB HxC Floppy EMulator is just an specialised shifter.

EDIT: @Jeff - what's up with that big coil? I can't imagine what it's needed for and it must be a bulge in the BoM.

This is not a coil but an audio transductor. Some demo here :
http://www.youtube.com/watch?v=WFg7Fi1wFqE
http://www.youtube.com/watch?v=MMu_-IlyR_U
http://www.youtube.com/watch?v=I4C2wng7vt4


About the BOM price, i can tell that the Slim version is very similar to the chinese one. :cool:
 
Here's a first crack at a design that uses a PC for control to minimize the cost of a front panel. Focus is on keeping the complexity, board size, and BoM cost down while still providing what I think would be enough RAM (32KB) and horse power to get the job done. If you don't like the processor choice, could sub-in any MCU instead.

fdemu_min.zip
 
Is it that expensive to put a small display and a couple of buttons on a rig like this? Just please don't include a piezo buzzer--I've never heard anything so irritating as the one in that video!

I've heard rumblings in the pipeline that ST Micro is in some deep financial weeds due to their losses in their PV ventures. You may want to reconsider the MCU choice just in case the worst happens. Fortunately, vendors offering ARM-based MCUs seem to be about as numerous as fleas on a dog...
 
Back
Top