Skip to main content
Home▸ Forums▸ 68kMLA▸ Plus Too: a DIY Mac clone project (128k -> Plus) — #6
Post #6 by techknight
Source Forum68kMLA
CategoryHardware
Post DateSat, 27 Aug 2011 - 03:55
Original URLhttps://68kmla.org/bb/threads/plus-too-a-diy-mac-clone-project-128k-gt-plus.23753/
Post
how would the byte-by-byte be difficult? Just a question because maybe im seeing something differently or wrong. lol.

All you need is to put the sector information into RAM. Not sure what the sector sizes are on a floppy diskette, but standard HDD its 512bytes? So you could just buffer the 512byte request from the SD card into RAM inside an array. and your IWM emu subroutine will pull the bytes out of the array when requested. problem solved :-) Just need to keep track of an index register, and the index register is calculated upon depending on the data stored in the IWM emulated registers. I will say that i know zip about an FPGA, so i cant speak for how to do it in there. But thats how i would do that in an MCU.

As far as a circular buffer, it could be. I havent studied the IWM. But maybe its not? maybe the IWM has its own RAM? but yes when the head does an advance it starts wherever in the track, but its the job of the IWM to be able to look at the start/stop markers and stuff (GCR) stored on the diskette, to streighten out the data and buffer it into the IWM, so it looks like a real datablock, kind of like what you would get from an SD card or logical HDD. to be fetched by the driver? I could be all wrong about this. but thats my guess. I doubt the IWM has RAM, so im sure the driver has to pick apart the sector formatting, but as i said, i have not studied it extensively.

I breifed over the IWM documentation, its a state-machine device, so all you need to do is emulate the state machine...

or practice with the real IWM or real drive and see what data comes out, compare against a valid diskimage. Easy way to learn the state machine.

problem is, its the "back-end" the IWM docs dont talk about. (the floppy drive to IWM)