keirf / flashfloppy

Floppy drive emulator for Gotek hardware
Other
1.35k stars 194 forks source link

TI-99/4a DSK support #88

Closed Sinphaltimus closed 6 years ago

Sinphaltimus commented 6 years ago

Hello, as per your request, here's mine. :)

There is a need for native DSK (v9t9). Hopeful you can address this in your firmware.

Here are specifics to the TI's DSK v9t9 formats: https://www.ninerpedia.org/wiki/Sector_Dump_Format

Here are specifics concerns raised by the active TI community on the format and needs in particular. Any technical question regarding the DSK v9t9 format can be asked here. http://atariage.com/forums/topic/276608-important-news-and-i-need-some-help/

Here is a repository of DSK images for testing. ftp://ftp.whtech.com/Diskettes/

I understand the implementation of this is contingent on other work currently being done on the firmware.

keirf commented 6 years ago

Thanks, implementation depends on completion of #16 (which appears to be just about done).

keirf commented 6 years ago

By the way is there any use for PC99 image support? Or is everything available as V9T9 no problem?

EDIT: Note to self, link to PC99 images: http://www.99er.net/sftware.html

keirf commented 6 years ago

Okay here is an initial implementation, which I have smoke tested.

ff_88_1.zip

It detects track layout/geometry solely by image file size, supporting: SSSD, DSSD, DSDD, DSDD80, DSHD80. An alternative is to detect based on geometry description in sector 0 as described here: http://www.unige.ch/medecine/nouspikel/ti99/disks.htm The question is whether this can be relied upon for all images (and eg. the format must be extended/modified for HD images, where the allocation bitmap would not wholly fit in sector 0). So some alternatives are:

  1. Use file size, fall back to sector 0 for conflicts (eg. DSSD ve SSDD).
  2. Use sector 0, fall back to file size if values in sector 0 are nonsense.
  3. ??
Sinphaltimus commented 6 years ago

As a priority, v0t0 is the preferred dsk format. Adding PC99 support would be a bonus. I'm going to send TI99er folks here shortly to help test and answer any questions.

mizapf commented 6 years ago

Here's Michael Zapf, maintainer of MAME's TI-99 family emulation. I suggest to have a look at https://github.com/mamedev/mame/blob/master/src/lib/formats/ti99_dsk.cpp which has various format detection algorithms.

keirf commented 6 years ago

Forgot to mention: need v9t9 file suffix or host = ti99 in FF.CFG to use dsk suffix.

keirf commented 6 years ago

@mizapf Thank you very much that looks super useful! I think I'm pretty close to your code on the filesize hinting, and I can take a look at your use of the volume info block :)

keirf commented 6 years ago

Here's an updated firmware handling more formats: SSDD, DSSD80, and the 16-sector-per-track DD formats.

ff_88_2.zip

keirf commented 6 years ago

Closing this pending user testing. Please open new tickets for any issues raised by user testing.