English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 17 July 2017, 16:00   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Single-sided PC/ST disk image support?

Is WinUAE supposed to work with images of single-sided PC/ST disks? For example the Atari-Utilities disk from Chamäleon II ST emulator:
Code:
http://www.media!fire.com/file/wlcsyi0p25babcd/Atari-Utilities.tar.gz
Plain binary, PackDev and MFMWarp images in that archive. [The MFMWarp image is huge because all tracks on side 1 are blank/unrecorded.]

On inserting the binary (renamed to end in .img because...) or PackDev images in drive 0, there are lines like this in the log:
Disk decode: checksum error on sector 0 header
Disk decode: weird sector number 184 (aa8ab8d6, 160)
Disk decode: checksum error on sector 0 header
Disk decode: weird sector number 255 (ffdfffd7, 810)


And doing Dir PC0: shows a load of garbled text instead of the proper directory listing. Or is there something about the ST disk filesystem layout which CrossDOS doesn't like?
mark_k is online now  
Old 17 July 2017, 16:48   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
It was detected as double sided 360k floppy. Which wouldn't be compatible with Amiga drive anyway, so only do that if 5.25" drive is selected..
Toni Wilen is offline  
Old 17 July 2017, 17:50   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Thanks. It seems PackDev doesn't record the number of heads/surfaces in its header so you can't easily see whether a .pkd image is single-sided 80-track, or double-sided 40-track.

By the way, CrossDOS can double-step heads to read 40-track disks in 80-track drives. (80-track 5.25" drives sold for Amiga use appeared the same as a normal external 3.5" drive to software.)
mark_k is online now  
Old 20 July 2017, 19:34   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Quote:
Originally Posted by mark_k View Post
Thanks. It seems PackDev doesn't record the number of heads/surfaces in its header so you can't easily see whether a .pkd image is single-sided 80-track, or double-sided 40-track.
Transferring this information from depacker to disk emulation would be too difficult and I wouldn't be surprised that many programs would have included bad geometry..

Quote:
By the way, CrossDOS can double-step heads to read 40-track disks in 80-track drives. (80-track 5.25" drives sold for Amiga use appeared the same as a normal external 3.5" drive to software.)
I added 5.25DD option so that this can be emulated

If 5.25DD and 40 track image: tracks are duplicated to make it 80 track.

(Not tested)
Toni Wilen is offline  
Old 20 July 2017, 22:14   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Not sure it makes sense to add another floppy drive type, because from a software perspective it's identical to 3.5" DD 80-track. Best just to, for any 40-track image, double the tracks when inserted into an 80-track drive.

There were probably (almost?) no IBM PC-compatibles which used 3.5" 40-track drives, but other computers might have, e.g. some Acorn Electron or ZX Spectrum drives. The Amiga XFS package could possibly be used to read those. Its readme mentions a 40-track single-sided Spectrum format.

BTW, 5.25" SD as a drive type is a misnomer, better to have 5.25" 40-track instead.
mark_k is online now  
Old 20 July 2017, 22:37   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
See above. It is only logical method to separate between 720k single sided and 360k double sided images (both are exactly same size)
Toni Wilen is offline  
Old 10 August 2017, 20:20   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Another case where you can't determine disk type from image file size would be PC 10 sectors/track, A-Max and Emplant disk formats, all of which are 800KB.

I'm not sure how A-Max format differs from PC 10-sector since CrossDOS seems to support both. [You can use A-Max-format disks with ShapeShifter via (I assume) mfm.device. Could they be identical???]

Anyway... what I'd suggest is having drop-downs for both drive type and disk type. When you can determine disk type automatically (i.e. 901120 bytes => Amiga trackdisk) that drop-down would be greyed out. If the user chooses an 800KB disk image, the disk type drop-down could offer PC, A-Max and Emplant options.

Another drive type is the Power HD floppy. There's a post from its designer here. Maybe emulation of that would not be completely useless if someone wants to make sure their code works with that product?
mark_k is online now  
Old 11 August 2017, 18:09   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
I don't like disk type selections, no one knows what to choose..

Also, few example files required first.
Toni Wilen is offline  
Old 11 August 2017, 21:17   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
In the usual case there would be nothing to choose of course.

I've created some example extended ADFs in both A-Max and Emplant formats. BTW I think mfm.device (at least v41.47) supports both A-Max and Emplant formats, so it may be possible to convert/create disks in one or the other format without needing the ConverterII program which came with Emplant.

Ideally, support for plain disk images and Apple Disk Copy v4.2 images would be great to have too.

Archive with example images uploaded to:
Code:
https://www.media!fire.com/file/bm0autj6v1p878u/Disk9.tar.gz
Disk9_A-Max.extadf - Blank ext.ADF created with old WinUAE version when chipset set to PAL (so has too-short track lengths). Written to A-Max format using ConverterII in PAL emulation.

Disk9_Emplant.extadf - Blank ext.ADF created with (I think) recent winuae.exe when chipset set to NTSC. ConverterII used to write disk in Emplant format.

Disk9.image - (Data fork of) image file created using Apple Disk Copy 4.2, running under A-Max II. The source disk was A-Max format which had been written by ConverterII.
Some notes on the Apple Disk Copy file format at https://wiki.68kmla.org/DiskCopy_4.2..._specification
Note: The Macintosh 400K/800K physical disk format apparently has 12 bytes "tag data" along with each 512-byte sector. Analogous to Amiga trackdisk "sector label data" I guess. ConverterII must put "DREW (C)1993" in the tag data for every sector when writing an image to disk, because if you load the file into a hex editor, you'll notice that string repeated many times near the end.

Disk9.convII - An image file created using ConverterII from Emplant. This has a simple 32-byte header followed by 819,200 bytes sector data. This image format doesn't contain tag data. Or at least, this specific file doesn't. Header consists of:
Code:
Offset	What
0	"DREW (C)1994" 12 ASCII characters
$0C	$01
$0D-0F	00 00 00
$10.L	$000C8000 Length of all sector data; 819200 here for an 800KB disk
$14-1F	00 bytes
I tried initialising a disk as single-sided (400KB) in A-Max II, but got an "Initialization failed!" message at the end every time. I'm assuming that would also happen on real hardware. Maybe the A-Max floppy driver just wasn't tested or intended to support 400KB disks?
mark_k is online now  
Old 14 August 2017, 19:33   #10
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Over in this thread demolition uploaded raw dumps of 800KB and 1600KB PC-format disks (10 sectors/track). It turns out that CrossDOS works with/recognises that type of disk. There's also a 1581-format dump which may use the same or similar physical format.

So that's four types of disk which could have the same length of image file: A-Max, Emplant, PC 10-sector, 1581.

If you implement auto-detect and manual selection of disk type, in the normal case the user could just leave it at auto.

If "LK" in first two bytes assume Mac disk, so A-Max or Emplant format. Maybe default to A-Max since there's no Emplant board emulation yet. You could also check for a DOS BPB in the first sector, if geometry matches image size then default to that disk format. Similar detection could differentiate between 40-track double-sided and 80-track single-sided (typically Atari ST) images.
mark_k is online now  
Old 15 August 2017, 21:36   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Yeah but only Amiga and PC images are directly supported, I don't see any use for directly supporting any other non-raw image format and raw images work automatically.
Toni Wilen is offline  
Old 15 August 2017, 21:41   #12
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
The main use would be to make using Mac emulators easier. Given Mac (800K) disk images, you need to use ConverterII to write/convert each to an extended ADF beforehand.
mark_k is online now  
Old 17 August 2017, 18:43   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
But someone still needs to write UAE internal converter to support those images first..
Toni Wilen is offline  
Old 17 August 2017, 19:45   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Right. I'm hoping that PC 10-sector/track images would be quite easy since 9-sector images are already supported. Basically just smaller inter-sector gaps?

Following on from that, I'm also hoping that A-Max or Emplant formats are closely related to 10-sector PC.
mark_k is online now  
Old 17 August 2017, 19:55   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
10 track PC images should be already supported. (9, 10, 18, 20 and 21 are included in detection list)
Toni Wilen is offline  
Old 17 August 2017, 20:01   #16
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,336
Aha, just checked and indeed it does support them! (I originally had the image filename ending .bin and WinUAE requires .img in order for the detection to work…)
mark_k is online now  
Old 23 August 2017, 04:57   #17
JimDrew
Registered User
 
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
Quote:
Originally Posted by mark_k View Post
If "LK" in first two bytes assume Mac disk, so A-Max or Emplant format.
Not quite. The LK will only be there if the disk is a bootable Mac disk. That LK is the start of the Mac's boot code. Mac disks need to have their directory tree checked to determine what type they are. Checking just block 0 will only tell you if it is bootable, not that it is Mac format.
JimDrew is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP disk image support in FS-UAE JimDrew support.FS-UAE 16 10 November 2022 14:10
Single sided 8mb ram Gordon support.Hardware 3 18 April 2017 19:33
Wanted 32MB single sided 50-60ns 72 pin simm for Apollo 1240 chrisdew MarketPlace 4 15 December 2015 08:07
WANTED - 32MB Single Sided SIM for Apollo 1240 Card Peter MarketPlace 8 29 September 2010 17:44
Trade double sided128meg simm for single sided 64meg simm CU_AMiGA MarketPlace 0 13 November 2004 16:37

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:34.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08665 seconds with 13 queries