Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Help to read 5 1/4" floppy disks via Arduino?

  1. #11
    Fresh Paint
    Join Date
    Jan 2013
    Posts
    2

    Default Re: Help to read 5 1/4" floppy disks via Arduino?

    Heh.. it all comes down to timing ;p

    You want to record the time deltas between each pulse from the rdata line.. for a 3.5" DD disk, they would normally be 4us, 6us, and 8us wide. Of course, this is a real spinning lump of plastic driven by 1980s motor tech.. so they are never exactly right ;p and once copy protection gets involved then all bets are off..

    If you want to record the data to make an image to use, look into how the image data is represented, it may only store the bytes decoded from the mfm bits.. in which case storing all the timings exactly is only needed to give you a better chance at deciding if something is a 4/6/8us delta.. (eg, if you see 5us.. is it a long 4us, or a short 6us?)

    So, timings.. 1st trying to time the deltas between the pulses.. that's kinda tough on an arduino.. 16mhz clock, 1 cycle per instruction, gives 62.5 ns per instruction.. or putting it another way.. 32 instructions 2us, or 64 in 4us.. in a worst case, you could have a whole track full of 4us gaps.. (although mfm may not like that) .. so you really have to be able to respond to the rdata pin transition, and store/output the data, within that, else you risk missing the next pulse..

    With that kind of margin, beware of using an interrupt handler to service the pin transitions, the overhead may be more expensive that just busy looping.. it's also why the sketch was written using..
    if( ( PORTD & _BV(RDATA) ) != rdataflip){
    instead of
    if(digitalRead(RDATA) != rdataflip){
    as the overhead of calling digitalRead is noticeable with these kind of tolerances.. If I were serious and still wanted to use the arduino.. I suspect I'd need to ditch using Wiring entirely for the main loop, and drop to inline assembler.. (or.. just buy a faster micro cpu ;p)

  2. #12
    The floppy drive is no longer obsolete. AmEv's Avatar
    Join Date
    Nov 2010
    Location
    Idaho, USA
    Posts
    3,052

    Default Re: Help to read 5 1/4" floppy disks via Arduino?

    Or just do what you did and just buy a Kryoflux....

    Definitely going to do that, but see what I can do with the Arduino.
    Two years. They were great. Let's make the next ones even better!

    Tri.fecta

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •