Skip to content

geby/ArduinoFDCbetadisk

Repository files navigation

ArduinoFDC Betadisk

This is a sketch that implements a floppy disk controller based on https://github.com/dhansel/ArduinoFDC and using exactly same hardware wiring. It works with Arduino Uno, Leonardo, Nano, Pro Mini, Micro and Mega.

Goal of this modification is to support formats for old 8bit computers, especially ZX Spectrum Betadisk and CP/M.

Changes to original ArduinoFDC

  1. Removed ArduDOS, because it is not usable here.
  2. Support for 128, 256 and 512 sectior sizes.
  3. Geometry definitions enhanced by sector size.
  4. Allow to change disk geometry on the fly.
  5. Ignore "side" sector mark, because Betadisk wrongly write 0 here on both sides.
  6. Less conservative seek timing, since my very old drives knows 6ms steps and 30ms head stabilizations.
  7. Enhanced interactive monitor, especially for partial image download and for ignore read errors. Easy to create TRD, IMG or other raw disk images.
  8. Added simple disk content type identification. (MS-DOS, TR-DOS, CP/M, MDOS)

Supported disk/drive types

To properly read/write data, the library must be configured for the drive/disk combination that is being used. The drive type can be passed into the begin functions or set afterwards by calling the setDriveType function. Supported types are:

  • ArduinoFDC::DT_5_DD: DD disk in a DD 40 track drive (2x40x9x512)
  • ArduinoFDC::DT_5_DDonHD: DD 40 track disk in a HD 80 track drive (2x40x9x512)
  • ArduinoFDC::DT_5_HD: HD disk in a HD drive (2x80x15x512)
  • ArduinoFDC::DT_3_DD: DD disk in a DD or HD 80 track drive (2x80x9x512)
  • ArduinoFDC::DT_3_HD: HD disk in a HD drive (2x80x18x512)

Low-level disk monitor

The following commands are changed or added:

  • S [0/1][,l[,l]] Read RAW duisk image of the current disk and transmit them via XModem protocol. (fail/skip errors, start and end position by logical sequence sector number 0-based.)
  • R [0/1][,l[,l]] Receive RAW disk image via XModem and write it to the current disk. (without/with verify, start and end position by logical sequence sector number 0-based.)
  • g Show drive track geometry.
  • g h,t,ts Modify drive track geometry, 0=ignore. (num heads, num tracks, track-spacing)
  • G Show drive sector geometry.
  • G s,ss Modify drive sector geometry, 0=ignore. (num sectors, sector size)
  • i Try to identify disk in drive.
  • 4 Turn 80tr. drive to 40tr. mode
  • 8 Turn 80tr. drive to 80tr. mode

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages