ISAFLOP

XCore Project reviews, ideas, videos and proposals.
User avatar
JohnWilson
Active Member
Posts: 38
Joined: Fri Oct 28, 2011 10:53 pm

ISAFLOP

Post by JohnWilson »

Version: 2
Status: Under development
License: Custom Licence
Download: /files/project_builds/isaflop.zip

ISA floppy controller which emulates the no-longer-available NatSemi PC8477B FDC chip (which isn't RoHS compliant anyway) using an XS1-L1-128. Emulating the FDC in software makes it possible to support non-IBM formats. The XS1 handles the ISA bus too, and also emulates the BIOS ROM and scratchpad RAM. The board supports up to four drives with a combination of internal and external connectors, and has a 50-pin connector for 8" drives. This is a great fit to the XS1 since it's bit-banging two different busses (ISA and Shugart) at the same time, each in its own thread, with a third thread that acts as a FIFO, and a fourth that encodes the bitstream during write/format.
Images:


User avatar
JohnWilson
Active Member
Posts: 38
Joined: Fri Oct 28, 2011 10:53 pm

Post by JohnWilson »

Coding in assembly. ISA-bus thread supports programmed-I/O access (no DMA yet) to I/O and memory space. Floppy-disk thread steps to track 0 and can read a single sector in either single- or double-density. Seems like a good start but MAN the PC8477B sure has a lot of annoying little status bits and error conditions to emulate! I'm trying to do a very detailed emulation since the point of doing an ISA board at all is to be compatible with 30 years' worth of disk utilities (and to be bootable), as well as with new programs that know about extended commands. If it's not compatible then it might as well be a USB device (that'll be the next project).
User avatar
JohnWilson
Active Member
Posts: 38
Joined: Fri Oct 28, 2011 10:53 pm

Post by JohnWilson »

A lot of the code is now fleshed out. Most of the (emulated) FDC chip's registers now work, as does some of the FDC command set. Select/seek/recalibrate code basically works. Interrupts don't (I'm sure I'll feel dumb when I find the bug -- it IS asserting IRQ6 OK, yet, no ints). FIFO code path may be a little too long. Currently there are three threads -- one for the ISA bus, one for the FDC bus, and one for copying a byte at a time between the FDC and ISA code (requesting DMA as needed -- that part is untested).
User avatar
JohnWilson
Active Member
Posts: 38
Joined: Fri Oct 28, 2011 10:53 pm

Post by JohnWilson »

I do indeed feel dumb -- it was a trivial typo in my DOS code. The firmware is sending interrupts to the PC just fine.
User avatar
JohnWilson
Active Member
Posts: 38
Joined: Fri Oct 28, 2011 10:53 pm

Post by JohnWilson »

Fixed several hardware bugs/misfeatures and updated firmware to match changes and fix bugs. Reads 1.44 MB floppies OK, one sector at a time (using FDCDEMO.COM from www.dbit.com). Much more to do before it's SW-compatible with the world in general but at this point it's clearly going to work. I need to order a lot more DC37 ISA brackets while there's still such thing!
User avatar
Ross
XCore Expert
Posts: 966
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Keep up the great work!