Fuse 1.5.3 released

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Fuse 1.5.3 released

Post by druellan »

Thanks for the reply!
Fred wrote: Sun Jun 17, 2018 10:22 am Could you describe what exactly you mean here? By default Fuse emulates a double-sided 80 track disk drive for the +D. What 40 track images are you using, what are you doing with them and what are you expecting to happen? :)
Well, here in Argentina the interface was sold with a 5 1/4 single-density double-side floppy drive. I've recovered several of those disks on .mgt images like this one:
https://www.dropbox.com/s/g1hn5ya8l91a1 ... 5.mgt?dl=0

I thought that setting FUSE to read 40 track images was going to do the trick
Image

But the result is always the same:
Image

Other emulators can read the image, so, is not corruption or bad formatting, so my assumption is that or FUSE is not following the disk configuration (40 tracks), or it just hate non-conventional disk images. Either way, I think there is room for improvement.
User avatar
Fred
Drutt
Posts: 38
Joined: Tue Feb 27, 2018 3:15 am

Re: Fuse 1.5.3 released

Post by Fred »

Thanks for the extra details, I've logged an issue at the Fuse bug tracker here https://sourceforge.net/p/fuse-emulator/bugs/424/.
User avatar
szaszg
Drutt
Posts: 2
Joined: Sat May 25, 2019 4:47 pm

Re: Fuse 1.5.3 released

Post by szaszg »

Hi druellan!

I post a patch to https://sourceforge.net/p/fuse-emulator/bugs/424/#8432. You try to compile fuse with this patch... Fuse will ask you about 1 sided or 2 sided the opened disk.
I thought that setting FUSE to read 40 track images was going to do the trick
These settings related to the emulated disk drives, not to disk images or images "geometry". e.g. if you set "single sided 40 track", then cannot read the second side.. because only one head "exists" in the emulated drive. (Looks like in "real world")

Some technical details:
The MGT disk image format is a very modest format. It only contains the raw data of all the sectors of the disk. There is no any metadata, e.g. information about number of sides, tracks, sector lengths, number of sectors in a track, etc... there is no any "magic" (e.g. some ID byte at the beginning) to be sure this is really an MGT file.

We guess the disk geometry only from:
  • the length of the file
  • and we know that: MGT filesystem (Disciple/+D/SAM Coupé -- G-DOS, G+DOS, SAMDOS, UniDOS, BetaDOS, Master DOS, etc) uses 512 byte length sectors
  • and uses 10 sectors per track
2 sided 80 track disk: 2 x 80 x 10 x 512 = 819200
1 sided 40 track disk: 1 x 40 x 10 x 512 = 204800
But (not a big surprise) a two sided 40 track and a one sided 80 track disk images have the same file length: 409600
So if we have a 409600 byte length MGT file, we cannot know this is a 2 sided 40 track or a one sided 80 track image.
Other emulators can read the image, so, is not corruption or bad formatting, so my assumption is that or FUSE is not following the disk configuration (40 tracks), or it just hate non-conventional disk images. Either way, I think there is room for improvement.
ZXSpin assumes: 2 sided 40 track, Fuse (without the patch) assumes: 1 sided 80 track

I created a one sided 80 track test disk.
ZXSpin:
Image
As you see it fails the same way as the 2 sided 40 track image with Fuse.
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Fuse 1.5.3 released

Post by druellan »

szaszg wrote: Sat May 25, 2019 11:45 pm I post a patch to https://sourceforge.net/p/fuse-emulator/bugs/424/#8432. You try to compile fuse with this patch... Fuse will ask you about 1 sided or 2 sided the opened disk.
Oh, thanks a lot for taking a look!
szaszg wrote: Sat May 25, 2019 11:45 pm
I thought that setting FUSE to read 40 track images was going to do the trick
These settings related to the emulated disk drives, not to disk images or images "geometry". e.g. if you set "single sided 40 track", then cannot read the second side.. because only one head "exists" in the emulated drive. (Looks like in "real world")
Ah, that explains why I was confused. But what's the catch to also enforce this options on disk images, or at least, change the way FUSE autodetect the images based on this options?
ZXSpin assumes: 2 sided 40 track, Fuse (without the patch) assumes: 1 sided 80 track
Eightyone and SpecEmu are also able to read the images (that's why I thought that perhaps something was wrong on FUSE), so, perhaps all emulators unintentionally standarized to 1 side 40 traks as a default?
Thanks again for taking the time to review this, specially since I'm probably the only one trying to read this kind of images :D
User avatar
szaszg
Drutt
Posts: 2
Joined: Sat May 25, 2019 4:47 pm

Re: Fuse 1.5.3 released

Post by szaszg »

Ah, that explains why I was confused. But what's the catch to also enforce this options on disk images, or at least, change the way FUSE autodetect the images based on this options?
Yes, it possible... if i'll have some time, i implement such an autodetection.

BTW: you can use .dsk or .udi images for any emulated disk systems... this images store the disk geometry as well... :)
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Fuse 1.5.3 released

Post by druellan »

szaszg wrote: Wed May 29, 2019 5:59 pm BTW: you can use .dsk or .udi images for any emulated disk systems... this images store the disk geometry as well... :)
Oh, I can try and convert them, but mind that I recovered those images waaaaay back, using a DOS disc utility and later the real disc emulation on RealSpectrum emulator. I'm still amazed that it actually worked!
User avatar
g0blinish
Manic Miner
Posts: 281
Joined: Sun Jun 17, 2018 2:54 pm

Re: Fuse 1.5.3 released

Post by g0blinish »

just played with an emulator. I choose Didaktik 80 and load demo. There are no AY sound(
How to enable it ?
serbalgi
Drutt
Posts: 27
Joined: Sat Jan 06, 2018 11:13 am

Re: Fuse 1.5.3 released

Post by serbalgi »

g0blinish wrote: Fri Jun 14, 2019 6:02 am just played with an emulator. I choose Didaktik 80 and load demo. There are no AY sound(
How to enable it ?
Attach a Melodik AY interface on the 48k machine.
Z80
Drutt
Posts: 9
Joined: Fri Jun 15, 2018 9:27 am

Re: Fuse 1.5.3 released

Post by Z80 »

Hello !

Keep in mind the .MGT uses an interlaced tracks pattern. Each 10 sectors, it swaps sides and the next 10 sectors actually contain the same track from the second side rather than the following track of the same side.

In fact, floppy disks are written that way to minimize disk head moves and accelerate both writing and reading files.

Since it's the natural way data are organized on the real disk, I don't think the emulator should mess with the order the data are organized provided it would still read the tracks stored into the image file in sequence, even if the image has been created from a single side floppy disk.

However, I don't have first hand knowledge of how a single sided floppy disk is converted into a .MGT file. Does it store an empty track once every two tracks, or does it just store the existing data in sequence, the way the floppy disk drives transmits them to the computer ?

On the other hand, it seems like there's another file format for MGT disk images, the .IMG format. And this ones stores all the tracks from the first side in sequence, then goes on with the second side ones, restarting from track #0 !

As a result, loading a .IMG (I'm talking about the data internal organization) file that would for instance be renamed into .MGT (if the emulator would only manage .MGT files, maybe) would result in missing once every two tracks because they're actually stored 80 (or 40, in the case of a single density floppy source) tracks away !

The other way around would probably also fool the emulator (and as pointed, it's probably impossible to tell the difference between a double sided 40 tracks image and a single side 80 tracks image because they're the same size - though I don't think single side double density 3"1/2 floppies were that popular at the time : most single sided floppies were from the 5"1/4 single density era, where you used to punch a second hole in the sleeve to be able to use the second side)... :p

Well, what I mean is a half or quarter size image file should probably be automatically assumed by the emulator it's about a 40 tracks floppy, and if it's the quarter of the usual size, then of course it should be treated as a single sized one.

Anyway, maybe the first thing would to check the actual way your data is stored into the image file, check if the file is named accordingly to its actual format, and in the case the emulator can't mount one of them and it's unfortunately the one you've got, write a simple program to swap tracks as expected inside the file before renaming it accordingly ?
Post Reply