keirf / flashfloppy

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

MB02 support for ZX Spectrum #149

Closed engcameraman closed 6 years ago

engcameraman commented 6 years ago

Could you support the MB02 floppy format for ZX Spectrum as well please? Here's what I've found: The disk fileformat is .MBD (a plain dump of an MB-02 floppy, in a fashion similar to .MGT), typically high-density 82 tracks x 11 sectors of 1024 bytes each.

MBD file is only set of all sectors on the disk. Order of sectors in MBD file corresponds with their logical numbers.

only (no sector headers...) I guess (from the file size and the tap2mdb.cc prog) that, MB02 uses 2 side, 82 cylinder, 11 sector/track and 1024 byte

2 sides, 82 tracks and 11 sec/trk is only one specific case. In general, number of tracks depends on disk drive (usually 40 or 80) and number of sectors per track depends on capacity of physical track. Usually it is 5 for DD disks and 11 for HD disks and 15 for ramdisk. Other logical disks on another media (HDD, CF, SD...) can have any number sec/trk from 2 to 127. There are usually used MBD with 8 sec/trk and 127 tracks. It takes disk with capacity 2 MB.

2 side is mandatory, when diskette has only one side, all sectors on non-existent side has label BAD SECTOR in FAT.

All needed information about sides, tracks and sec/trk are written in boot sector - or the first sector in MBD file.

/sector format, but the sector order is unknown for me. (eg. h0t0s0; h0t0s1 .. h0t0s10, h1t0s0; or h0t0s0; h0t0s1 .. h0t0s10, h0t1s0 ...) And how to sectors numbered (from 0, or from 1)?

All rules for it are the same as on old classic MSDOS diskettes.

Tracks(cylinders) and sides are numbered from zero, sectors on track are numbered from one.

Let sec/trk = 8. Then the order will be:

Physical number (head/track/sector) = Logical number (order in MBD file) h0t0s1 = 0 h0t0s2 = 1 .... h0t0s7 = 6 h0t0s8 = 7 h1t0s1 = 8 h1t0s2 = 9 .... h1t0s7 = 14 h1t0s8 = 15 h0t1s1 = 16 h0t1s2 = 17 .... h0t1s7 = 22 h0t1s8 = 23 h1t1s1 = 24

The MBD files I have are 1.7Mb (1.847.296 Bytes) each. MBSYSDISK.ZIP

keirf commented 6 years ago

Should be easy. I will investigate.

keirf commented 6 years ago

Please try the attached firmware with your MBD images. As well as working, interested to know if read/write speed is approximately correct, too.

ff_149_1.zip

keirf commented 6 years ago

Any update?

engcameraman commented 6 years ago

Sorry its school holidays and I've been busy entertaining the kids. I will try soon though! Thanks for being so fast!

engcameraman commented 6 years ago

I've been trying tonight, I'm getting no response from the Gotek on my MB02, I don't know what jumper settings to use. I've tried all kinds of settings. Does the image need a special extension name other than .img?

keirf commented 6 years ago

The extension needs to be MBD. I thought that was normal for these images? If you want to use IMG extension it will need me to add a FF.CFG option.

engcameraman commented 6 years ago

Yes MBD is normal, but not thinking it through, I had put them on the flashdrive before your new firmware was made and renamed them as IMG when I first tried the Gotek on the MB02. I’ll rename and give it another try soon,

Thanks,

Frans

On 20 Aug 2018, at 23:36 , Keir Fraser notifications@github.com wrote:

The extension needs to be MBD. I thought that was normal for these images? If you want to use IMG extension it will need me to add a FF.CFG option.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/keirf/FlashFloppy/issues/149#issuecomment-414471383, or mute the thread https://github.com/notifications/unsubscribe-auth/AnzaHeMX57ItLvBDIvw7GlB3De3DMAu2ks5uSyvUgaJpZM4VucYm.

engcameraman commented 6 years ago

The MB02 boots fine from an imagefile now, and looks to be at the same speed as a real floppy. My keyboard on the Spectrum seized working so at the moment I cannot test further... Thanks!