02 January 2006, 15:12 | #1 |
Posts: n/a
|
Could WinUAE make use of fdrawcmd.sys?
Hello everyone
I was trawling the net just now and totally at random fell upon this floppy driver http://simonowen.com/fdrawcmd/ basically it allows low level access to the floppy controller under xp/xp64. As some of you may know the catweasel board is currently out of production due to germanys new enviromental laws (the catweasel pcb used some now banned substances) so until that situation can be solved no more catweasel If someone here with uber programming skills has some spare time would they cast an eye over and see if it could be used to generate adf files or even allow some form of native access under WinUAE? There was an old dos prog which allowed standard amiga ofs disks to be read on pc's using twin floppy drives and some weird timing hack so it may be possible but we all know how weird (and wonderfull) the amiga floppy system was. |
02 January 2006, 15:23 | #2 | |||
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,004
|
Quote:
I am sure, if it was a software problem, UAE would have got support for Amiga disks long ago, even without a special DLL. But it is not, it is a hardware problem. Quote:
Quote:
|
|||
03 January 2006, 20:08 | #3 |
Posts: n/a
|
Ta for the reply.
I did try Disk2FDI a long time back I had just forgotten the name of it I realise that it was an extreme hack where they basically twitched one of the drives to generate stepping signals while reading in the other (I never got it to work though). While not as flexable as the amiga controller the pc controller can be quite abused both fuji and sony brought out smart media/memory stick to floppy adapters which basically 'fired' the info at the floppy head (god knows what they were smoking when they came up with that idea) again that was an extreme hack which barely worked, but still the amiga floppy remains unbeatable. Its good to see that the catweasel could be back in production one day as that still offers the best way for folk without an amiga to read the disks and such I will get round to buying one one day |
04 January 2006, 09:12 | #4 |
Registered User
Join Date: Jul 2004
Location: Germany
Posts: 105
|
Disk2FDI works great
I used the Disk2FDI prog to create *.adf of all my old amiga disks. It works great. More instructions will follow tommorow.
It would be really great, if fdrawcmd.sys would allow to use Amiga formatted disks under Windows 2000/XP. Is there a possibility to make this wish come true? |
05 January 2006, 14:19 | #5 |
[Satan^God]
|
So does fdrawcmd.sys really works? Can you read real Amiga disks with it?
|
09 January 2006, 13:37 | #6 |
Registered User
Join Date: Jul 2004
Location: Germany
Posts: 105
|
At least I guess I could create an .adf file under Windows XP. Till now with Disk2FDI, this was only possible under pure DOS or Windows 9x. But I didn't have an amigaformatted floppy disk.
So could someone else try it again together with the fdrawcmd.sys? Under http://www.oldskool.org/disk2fdi/support.html , there is also a stand-alone Windows 95, 98 and ME frontend for Disk2FDI. The ADF creation of ADFOpus from http://adfopus.sourceforge.net/ should also work even under Windows NT,2k,XP. Please give me a feedback! Kind regards |
23 February 2006, 20:56 | #7 |
Posts: n/a
|
Not yet...
fdrawcmd.sys works at the PC controller level, so it can read/write almost any PC protected disks, but won't work for Amiga disks... yet.
I'm currently experimenting with the same 2-drive technique as Disk2FDI (under W2K/XP/2003). I can already raw-read data+clock bits from double-density disks, which should be enough to read most Amiga disks. This is still at a very early stage though, and lacks the bitstream decoding needed to make sense of the track and create a working disk image from it. There'd be nothing to stop someone writing their own application to read the raw track using my driver, and decode it to something meaningful... IIRC, the Amiga track decoding is all done by software anyway? In which case the raw track data might just what WinUAE needs Si |
24 February 2006, 08:20 | #8 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Quote:
Long enough raw track starting from random position and ending to random position is basically everything UAE needs but preferably streamed so there is no need to wait for track and cause emulation slowdowns (nice extra would be timing info for some copy protections) Unfortunately fully real-time and transparent disk access may not be possible. Some programs (usually games and demos) expect new data quite quickly after starting disk DMA (maybe in 1/3th of disk revolution or so), it may be good idea to have multiple "sector start markers" in second disk. And some programs don't use DMA but simple read disk byte register in tight loop. Some pre-buffering may be needed but it will cause slowdowns.. btw, doing decoding and adf-conversion is easy, just rip decoding code from uae or my rawread-utility (ADDED) I can do raw->adf-conversion utility quickly, I only need new enough driver (64-bit) and pointers to examples. Last edited by Toni Wilen; 24 February 2006 at 09:57. |
|
24 February 2006, 15:43 | #9 | ||||
Posts: n/a
|
Quote:
Quote:
Quote:
Quote:
Si |
||||
25 February 2006, 20:16 | #10 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Quote:
|
|
27 February 2006, 12:08 | #11 |
Posts: n/a
|
Quote:
Originally Posted by obo I'll package up a test driver and sample utility (+source) over the weekend, which should hopefully be all you need as input to your utility. Of course, I'm also interested! ;-) Vincent. |
27 February 2006, 12:48 | #12 |
Posts: n/a
|
The test program is about 95% done, but there's still a drive sync issue to improve before I upload it...
I'm doing the raw read, then checking for the longest run length in the data. Any run of 4 zero bits is treated as a sync failure (write splice or other problem), and ends the current run. If it's not long enough I'm retrying the read in the hope I get a better copy next time. With Amiga tracks written in a single pass, as long as my raw read begins near the original track start, I'll get a long enough run to accept. With the drives spinning at approximately the same speed, after a successful read it's likely that the next track will also read successfully. However, when the slight variations in drive speed means the track isn't positioned correct to read a full track, it may take while before they're back to being in a suitable sync. To help get Toni started with processing the data, I've dumped a single Amiga disk. The output is a dump of 80 cyls x 2 head x 16K per track, with each track starting with a run of at least 12400 data+clock bytes. The file is ordered Cyl 0 Head 0, Cyl 0 Head 1, Cyl 1 Head 0, ... You can get the data file from: http://obo.homeip.net/amidisk.zip (323K). I'll need another day or so to try and improve the test program itself, but will release it then even if I haven't. I've noticed that Disk2FDI (Hi Vincent!) seems to have moved towards using a floppy->parallel cable for dumps. Was the 2-drive method not good/reliable enough? Or does it work well enough for Amiga disks, so it's still worth doing a Windows version? (the parallel method is a bit more timing critical, and may not be as suitable for use under a multi-tasking OS). Si Last edited by obo; 27 February 2006 at 14:32. |
27 February 2006, 18:34 | #13 | |||
Posts: n/a
|
Quote:
Still, I'm working on a version that should work with 2 floppy drives, but will create images of a lesser quality, and probably won't take weak bits into account, since it seems it would be nearly impossible. The other problem is that you can't read disks with strange bitrates (for example Mac GCR disks), so it's necessarily limited. Quote:
There is something I can recommend though: you should not use the "double rate" (i.e. high-density) reading method, because it is far less compatible with many FDCs than reading with the normal (double-density) rate. Or maybe you can let the user choose. Of course, when reading at double-density rate, you will read either the actual data, or the clock bits, which are not very useful in this case. That would mean only supporting standard Amiga sectors, since an MFM $4489 synchronization word (or any other sync word) cannot be reliably detected. But it is safe enough to assume a $A1A1 followed by an Amiga header with a valid CRC is really an Amiga sector (method used by Disk2FDI to dump to ADF). By letting the user choose, you could have a "compatible" but "standard disks only" mode, and a "less compatible" but "some non-standard/protected disks support" mode. Quote:
BTW, do you think it would be possible to interface your driver with a DOS (Windows DOS box I mean) program? For example by calling a special INT number that would return data read with your driver at an address specified by DS:SI (that would be translated by your driver of course). That would easily allow at least a partial Disk2FDI for Windows version, which I'm sure many people would appreciate. Vincent. |
|||
02 March 2006, 01:49 | #14 | ||||||
Posts: n/a
|
Quote:
Quote:
Quote:
I haven't yet tried the normal rate reading, but I've left the option open in the driver. I'll be sure to confirm that works before I release a public update, just in case there's a problem. Quote:
Quote:
Quote:
I've got the sample utility into a reasonable alpha state to try, so I'll PM you and Toni when I'm done here. Si |
||||||
02 March 2006, 12:10 | #15 | |||||||
Posts: n/a
|
Quote:
Quote:
Quote:
And yes, using 7 for high-density reading is a little too short. So that's one of the best reasons to switch back to double-density. Quote:
Quote:
Quote:
Quote:
Anyways, I'm not going to start doing this code rewrite until a few months from now, so we'll see how to proceed by then. If I do it, I'll probably start with ADF imaging only, since it's the easiest. Other formats require much more code because of the write splices. Thank you for your wondeful driver! Vincent. |
|||||||
02 March 2006, 16:43 | #16 | ||||||
Posts: n/a
|
Quote:
Quote:
Quote:
I also currently expect the PC-formatted drive to be positioned over the correct track for the READ TRACK. I may simplify it further and insist that track 0 is always used. That way I could check the TRACK0 line, and recalibrate back to track 0 if it's not already there. Quote:
Even with those limitations, there's still plenty of scope for interesting things to be done inside Windows. As well as the DOR switching, I support short-write commands for terminating data writes early. This allows ~6K of data to be written to 8K sectors, writing of sector errors, as well as some mixed-density track writing - the latter used to write 'weak sectors' for some Spectrum +3 / Amstrad CPC copy-protections. It's all no substitute for a proper CatWeasel setup (I've got one of those too), but for a standard hardware setup it is still surprisingly flexible. Quote:
Quote:
Si |
||||||
02 March 2006, 17:01 | #17 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
About Amiga disk reading:
OS will abort the read with a disk error if DMA transfer won't end quickly enough (2 disk revolutions?) Games and demos can do anything.. Some will wait until DMA transfer is finished, some will complain about read errors, some will freeze, some will simply crash... |
14 March 2006, 19:52 | #18 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,534
|
Not really about reading Amiga floppies but I just implemented new WinUAE floppy drive sound option: floppy sound from PC floppy drive (uses fdrawcmd.sys)
|
15 March 2006, 01:20 | #19 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,396
|
Do you need a disk in the drive for it to work?
|
15 March 2006, 01:26 | #20 | |
Posts: n/a
|
Quote:
Si |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I now own the 1 peice of hardware to make WINUAE perfect! | mrbob2 | Amiga scene | 33 | 03 July 2007 20:47 |
Can I make WinUAE faster? (loading time and such) | EssKung | support.WinUAE | 15 | 29 May 2007 11:59 |
how do i make savedisks for WinUAE?? | alec | New to Emulation or Amiga scene | 1 | 29 October 2001 21:40 |
|
|