Another new timing image


For newcomers: Top trace is the signal coming out of the floppy drive, bottom is a debug output lead from the SX which illustrates detected falling-edges(1’s in the raw MFM), detected rollovers (timeouts which following a 1 indicate a 0 in the raw MFM), and small spikes which indicate a byte transfer to the PC.

Notice some changes here:

First, the overall length of the ISR is reduced. This is because its now in assembly. This saves me minimum 27 cycles because it eliminates overhead of SX/B of preserving SX/B internal variables.

Second, because I’ve moved the point at which the debug lead gets raised closer to the actual firing of the ISR, you can REALLY tell exactly how fast the ISR triggers as a result of an edge. This is alot clearer than it was before. And man is it fast, it’s usually about 60ns, or three cycles.

Third, from advice from Brian, I’ve moved the rollover start point to be EARLIER. This means that instead of detecting rollovers in the MIDDLE of the bitcell, it’s closer to the beginning of the cell. The first “0”-bit ISR used to fire at about 2.7us from the real edge. I’ve moved that to 2.26us, so that main has plenty of processing time AFTER the current ISR but still in the same cell. I had room before TOO, but I’ve given main more room now.

The data portion of the sectors is still getting corrupted. This is because I’m dropping tons of data. Normal sector size is 1088, and I’m getting sizes between 940 and 1084. So I’m dropping approximately 10% of the data someplace.

One thought on “Another new timing image

  1. Good news. Assembly is the right way to do I think.

    I had to code my own MFM routine in assembly in order not to loose every precious cycle, of which there hadn’t been many.

    Now the MFM part of my project is complete, I’m struggling with the rest – interfacing with DRAM (old 1 Megabyte SIMM for storing the whole floppy image), reading MMC card (and FAT16 in particular), dealing with LCD and buttons etc. I will also have to switch to a more advanced MCU (24 more IO lines to interface with Amiga’s floppy bus, and probably to deal with real floppy in the future, to be able to read/write floppies to/from images on an MMC card).