• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

Possible? Mount FD through Parlallel Port?

equant

6502
The idea was that I could write a program to run on my box that takes a mac disk image, and serves it to a real mac via the parallel port through the mac's floppy port. This would be useful for booting macs with bad drives, or macs with owners with no way to write a system disk. Perhaps one could even create a bootable iso that boots a mac... Anyway...

I started looking for infomation on the floppy port, and have found little. The IWM seems fairly undocumented. Looking at mini vMac which emulates hardware, I found the quote "Mini vMac emulates the hardware (with the exception of the floppy drive)." which of course begs the question "why?"

I figured someone here might have enough sense to know how likey such a project is to be succesful (ignoring the human element of motivation please).

Any thoughts or resources out there to help? Opinions?

 
Try looking up information on the Apple II disk controller, then find out what the differences between that and a Mac are. If I recall correctly, they are quite similar.

 
A floppy port is expecting to talk to spinning media with sectors and tracks and critical signalling and timing.

It's expecting to receive a waveform taken directly from the read head. You could generate the signal, but you also have to provide the appropriate track and head based on the stepping signals and head selection.

You are also really talking about 400k or 800k disks where the timing varies depending on the actual track under the head ( motor speed varies ).

You'll need to research Apple's custom encoding, which is not MFM as used by IBM format disks.

This is nothing like talking SCSI, RS232, USB or IDE.

 
Perhaps a combination of a parallel port and a soundcard for the analogue waveform. Sounds horrendous, but it would be a good stepping stone on the way to a microcontroller based flash drive that emulates an external floppy.

 
You could do a really crude approach where you actually format the "disk" using the Macintosh and simply record the output signal at a suitable resolution, it's still a digital signal and it's based around transitions.

Then on replay you simply playback the signal and loop it over and over to simulate the spinning disk.

So effectively you have a set of 80 x 2 "tracks" (literally) that you record in such a manner, and also remember to provide the index pulse to simulate the opto-electronic detection of the little hole in the disk.

When the mac wants to read a sector it has to wait till to reads the sector preamble and identifier. You have to then also detect when the mac wants to write to those sectors.

So if you remember how floppies work, the formatting lays down the sector identifiers and blanked sectors, then writing only changes the sector contents, not the identifiers.

For example an IBM formatted sector looks something like

Code:
.........[ C/H/R/N  | CRC ]....[ DATA | CRC ]......
 
This is probably a "doable" project, but it's going to involve at least some hardware. (IE, I don't think you'll be able to get away with just a cable linking bare pins on the parallel port to the Mac floppy connector.)

As previously noted, the IWM in the Macintosh is similar but not identical to the Apple ][ controller. There's a possible-to-build-yourself hardware device out there that emulates a physical floppy drive and works with the Apple ][ (through an additional hardware adapter) called the SVD, aka, Semi-Virtual-Disk. It's a fairly simple device involving about a dozen ICs (including the Apple ][ adapter) and a few discrete components. This device uses a microcontroller and built-in RAM to serve a disk image loaded it into via RS-232 serial, but someone with a bit of digital design experience could probably replace the microcontroller, RAM, and serial hardware with an EPP parallel port and use host software to drive the thing. (The remaining relevant circuitry is just NOR and NAND gates and signal conditioning.)

There's a decent page on parallel-port interfacing here. The software's going to be "tricky" unless you design the hardware to include an I/O buffer that can match the expected clock speed of incoming/outgoing data, because otherwise you're going to have to drive this with polling and software timing loops. (Off the top of my head I think in *theory* the PC's built-in timer chip *might* have sufficient resolution to regulate output, but... looking at it, maybe not. A "Double Density" floppy drive transfers data at about 250Kbps, a high-density one twice that, and... that's outputting a bit 500,000 times a second. PC timers are clocked at 1Mhz so... maybe not. Unless you make your interface board able to accept byte transfers and FIFO them out according to the disk controller's clock this might not work, since you *are* going to be bumping up against the limits of how fast you can bit-bang the parallel port. At the very least you're going to have to do this under DOS or a similar bare-metal environment where you're not going to task-switch away from the driver...)

Ramble ramble ramble...

 
IWM in the Macintosh is similar but not identical to the Apple ][ controller. There's a / device out there that emulates a physical floppy drive and works with the Apple ][ / called the SVD, aka, Semi-Virtual-Disk.
Well now ... that's extremely interesting!

Seems like the best approach might be to work with these guys to adapt their existing project to the IWM

"Double Density" floppy drive transfers data at about 250Kbps, a high-density one twice that
Hmmm. A "CD quality" soundcard can play and record two channels at 44.1 kB/s = 352.8 kb/s. However the timing is probably all wrong. I had no idea the transfer rates were so high - I was basing my thoughts off the projects that use a soundcard to emulate a tape drive.

 
I had no idea the transfer rates were so high
IBM PC's, even with an 8088 (wow!) used a DMA controller for floppy disk because of the data rates. You could just about code a floppy read loop for an i8272 with interrupts disabled on a 4.77Mhz CPU. My first PC had an 8089 IOP to do the DMA!

Notice how the macintoshes grind to a halt when doing any reading or writing to a floppy and the cursor starts being sluggish.

 
Back
Top