Ideas about ST floppy image make program for PC

WinSTon, Nostalgia, MSA Converter, FloImg, Makedisk and all the others.

Moderators: Mug UK, Moderator Team

Post Reply
ppera

Ideas about ST floppy image make program for PC

Post by ppera »

There is a couple good programm for making ST (or MSA) images from ST floppies on PC, but I'm still not satisfied.

What I expect from such programm:

1. To read all floppies which are readable on standard Atari ST - it is certainly possible, because floppy controllers are similar.
Makedisk does it, Stimage and Image refuse to work with 20 sector/track.

2: Inform about bad and unreadable sectors accurately - it does Makedisk in slow mode (but it is really slow). SamDisk does it very well.
No programm which generates report (log) file about bad sectors.

Here I have some 'great' ideas, which will make restoring of data from old floppies much easier:

Beside of generating report file about exact locations of unreadable sectors programm will inform about damaged files, and what areas of file are damaged. It is little harder to programm, but not too. (calculating cluster # by sector location and finding start cluster in chain, then finding to which file it belongs in directories).

3: User defined count of retries by bad sectors/tracks - most of programs has such option

4: Manual entering of parameters for floppies with non-standard BPB (bootsector)

5: Seek (analysis) mode to get parameters

+ ?

Should be it DOS or Windows program? Until last couple days I was oriented to DOS version, because I had impression that Windows floppy support is weak, and problematic. But there is programm SamDisk by Simon Owen which works very fine under Win XP.

I'm close to start writing it. Maybe should consult obo about some solutions in Win...
User avatar
X3peri_MENTaL
Captain Atari
Captain Atari
Posts: 366
Joined: Fri Nov 07, 2003 6:58 pm
Location: The Broom Cupboard
Contact:

Post by X3peri_MENTaL »

You really seem to know what you're talking about, so I say 'go for it'.

As for making it Windows or DOS, well personally I can never be bothered using DOS, so much so that I wrote a mega Windows frontend (4 in 1 - Makedisk, STimage, Imagebuilder, Disk2fdi) to avoid it :lol:

However, I guess most people with knowledge of writing the type of program you are talking about would recommend DOS. (and knocking up a Windows frontend to use with the program later should be relatively easy).


X3peri_MENTaL
User avatar
PaulB
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2168
Joined: Tue Jun 11, 2002 10:56 pm
Location: You Kay

Post by PaulB »

I would say dos. I'm not particulary a lover of dos but I know that dos allows low level floppy access whereas with windoze you have to go through it's own floppy access routines. A windows front end would be very nice as well though.
ijor
Hardware Guru
Hardware Guru
Posts: 4428
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Ideas about ST floppy image make program for PC

Post by ijor »

The task is more complicated than what you think. There is a huge difference between a DOS (or Win 9X/Me) version and a Windows NT/2k/XP one. For the latter you need a kernel mode driver.
To read all floppies which are readable on standard Atari ST - it is certainly possible, because floppy controllers are similar.
They do are (usually) similar, but not exactly the same. Some disks you won't be able to read them. Plus you have no (directly accessible) controller on newer external (such as USB) drives.
Beside of generating report file about exact locations of unreadable sectors programm will inform about damaged files, and what areas of file are damaged.
That would be nice, but looks a bit out of scope. And you'll be duplicating functionality already available in utilities. It might be better to make a file system filter driver.
But there is programm SamDisk by Simon Owen which works very fine under Win XP.
I downloaded (but not tried) SamDisk. The program is almost trivial. The real work is in the driver. But now that a kernel driver is available, it should be possible to do a lot of development ...
ppera

Re: Ideas about ST floppy image make program for PC

Post by ppera »

ijor wrote:
To read all floppies which are readable on standard Atari ST - it is certainly possible, because floppy controllers are similar.
They do are (usually) similar, but not exactly the same. Some disks you won't be able to read them. Plus you have no (directly accessible) controller on newer external (such as USB) drives.
Actually I didn't express myself correct. I don't have ambitions about copy-protected floppies. I want to save only floppies with standard sectors and tracks. With it is connected that then I don't need low level access.
I have only Chaos Strikes Back with protection, but I cracked it before 15 years. Let people use pasti or whatever for protected floppies (if it has any sense, because everything is now on WEB)

Beside of generating report file about exact locations of unreadable sectors programm will inform about damaged files, and what areas of file are damaged.
------------
That would be nice, but looks a bit out of scope. And you'll be duplicating functionality already available in utilities. It might be better to make a file system filter driver.
It will spare some work - now I make images from damaged floppies like this: use Samdisk or DISK2FDI with >hd33.log at commandline end to have saved list of unreadable sectors. Then must use some disk utility for Atari ST too see to which file (or DIR) damaged sectors belong. Too much handwork...
Question - which programm for ST can say it? (I currently use my diskmap function from Copyacc (unpublished))
Idea about making filesystem driver is good, but it is only partial solution. It still will not make images, which are in some kind more versatile :) (I mean about autostarts, accessories)

I let to someone else to make Atari filesystem driver (perhaps you :D )

Actually, Gemulator has it built in, but it worked well only in Windows 95.
obo
Atari freak
Atari freak
Posts: 52
Joined: Mon Nov 10, 2003 12:38 am
Location: Nottingham, UK

Post by obo »

The current SamDisk version is still a fairly basic disk utility using fdrawcmd.sys, but I'm expanding it to handle a wider range of formats, plus as many copy-protected tricks as I can using the PC controller. There are already some good DOS (and Linux) disk utils, and it's about time we had some better ones for Windows!

If anyone wants to write their own (non-commercial) utility using the driver, or add support directly to an emulator, I can provide documentation on how to use it. It's a fairly thin wrapper over the controller, with commands and settings submitted as individual DeviceIoControl requests, so anyone familiar with floppy controllers should feel right at home.

The SAM Coupé uses the same WD1772 controller as the ST, so a number of the copy protection techniques will be the same. Simple tactics such as faked id field values, blank tracks, mixed sector sizes, and extra tracks/sectors are generally no problem. You can scan the track layout with read id commands, then read the data from any sectors found. The main problem area is with data hidden in the gap areas, which can't be read by the PC controller (without using 2 drives and the Disk2FDI density trick). Only one SAM title used this, but I'd imagine more ST titles probably did. Is there any info available on the protection methods used by various titles?

Writing images back to disks is a little more tricky in places. Disks with very tight gaps, and/or certainly combinations of mixed sector sizes can be an issue. This is mainly down to the lack of format control, which allows only the gap3 size to be specified. Writing 8K sectors on 6K tracks and sector errors is also a bit more challenging, though I've almost got a solution for this (not in the current driver).

Do the ST-side disk dumpers do pretty much the same trick of id scanning? or is there something else that given them a big advantage over traditional DOS utilities? I know the diagnostic track read certainly makes it possible to read data hidden in the gaps, but the MFM sync bug means it can't be used for a full track dump.
ijor
Hardware Guru
Hardware Guru
Posts: 4428
Joined: Sat May 29, 2004 7:52 pm
Contact:

Post by ijor »

Hi Simon,

It is great that you released a kernel driver!
obo wrote:The SAM Coupé uses the same WD1772 controller as the ST, so a number of the copy protection techniques will be the same. Simple tactics such as faked id field values, blank tracks, mixed sector sizes, and extra tracks/sectors are generally no problem. You can scan the track layout with read id commands, then read the data from any sectors found. The main problem area is with data hidden in the gap areas, which can't be read by the PC controller (without using 2 drives and the Disk2FDI density trick). Only one SAM title used this, but I'd imagine more ST titles probably did. Is there any info available on the protection methods used by various titles?
Most ST protections are based on bit-rate variations and weak bits. Custom track layouts was sometimes used in the earlier years, specially in US releases. But on the overall they are the minority of the cases.
Writing images back to disks is a little more tricky in places. Disks with very tight gaps, and/or certainly combinations of mixed sector sizes can be an issue.
You won't be able to write back most protections anyway, so probably not worth the effort of trying copy protected disks. For non copy-protected disks, the only problem should be the smaller gaps required for 11 sectors per track.
Do the ST-side disk dumpers do pretty much the same trick of id scanning? or is there something else that given them a big advantage over traditional DOS utilities? I know the diagnostic track read certainly makes it possible to read data hidden in the gaps
ST dumpers, except Pasti, are all limited to non copy-protected disks. They don't use any FDC trick AFAIK (don't see why they should). Pasti, and copy-protected sectors copiers perform lot of FDC stuff. The track read command must be used, of course.
If anyone wants to write their own (non-commercial) utility using the driver, or add support directly to an emulator, I can provide documentation on how to use it.
I might add an interface to your drive to Pasti.DLL. Integration with the image management would be a little tricky though. Image management is not real-time based, as it is a physical drive interface.
ppera

Post by ppera »

Things are clear now.
To ensure read of non-PC Standard floppies in Win XP, must use (write) low level floppy driver. Standard floppy I/O functions simple refuses to work on non-standard formats or read only 9 instead 10 (18 instead 20 sectors). It is visible in Gemulator when you look in disk info.

Latest version of Real Spec (Spectrum Emulator) uses fdrawcmd.sys for direct work with floppies.
Perhaps somebody here should inform authors of Steem ? :)

However floppy images have some benefits:

You copy floppy just once, then can spare it...
Images fit easy on hard drive, no need to dig in drawer to search real floppies always :D
Post Reply

Return to “Other emulators & tools”