Tokugawa Corporate Forums

Retro Japanese Computing
It is currently April 28th, 2024, 5:57 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: BKDSK .DD6 and .DDB
PostPosted: July 3rd, 2021, 4:35 pm 
Offline

Joined: January 11th, 2007, 12:46 am
Posts: 257
So... BKDSK created most of the headerless disk images one finds floating around:

*.HDM, *.HDB, *.HD4, *.HD5

Lacking any components other than the extension (which should never really be used for file ID...) and the raw data, for FIVEC, I've fallen back on identifying them by ruling out all other formats, then checking their file size.

That works on most of them, but not all of them. There's two formats with exactly the same size:

2DD-8 sector (640KB) (BKDSK .DD6)
2 sides, 80 tracks, 8 sectors/track, 512 bytes/sector = 655,360 bytes (300rpm)

BASIC 2DD (BKDSK .DDB)
2 sides, 80 tracks, 16 sectors/track, 256 bytes/sector = 655,360 bytes (300rpm)

So my question is... how should FIVEC (or anyone, really) deal with this? Ideas I've had:

1) Throw up my hands and go by the file extension, and just default to .DD6 if it doesn't have the correct one.
2) Attempt to identify it by the first 512 bytes/boot sector (How reliable would this be? Wouldn't work with unformatted/custom bootsectors)
3) Attempt to identify it by the FAT8 table locations (Maybe I could look for them assuming .DDB geometry, then call it .DD6 if I didn't find it?) This of course, assumes all DDB disks have a FAT8.


Top
 Profile  
 
 Post subject: Re: BKDSK .DD6 and .DDB
PostPosted: July 7th, 2021, 12:04 pm 
Offline
User avatar

Joined: June 7th, 2008, 8:51 am
Posts: 928
Location: South Africa
That's a bit of a bugger!

I did see this note:
Code:
Source: https://melog.info/archives/2004/09/30223144.html

It is nowadays ... The following extensions made with software BKDSK are all solid images. 
The type of disk is distinguished by the extension. 
The file size is used to calculate the number of tracks. (160 track use with 1024 × 8 sectors, etc.)
MS-DOS format
 * .HDM → 2HD (360 rpm) 1024 bytes × 8 sectors × 154 tracks
 * .HD5 → 2HD (360 rpm) 512 bytes × 15 sectors × 160 tracks 

 * .HD4 → 2HD (300 rpm) 512 bytes × 18 sectors × 160 tracks 

 * .DD6 → 2DD (300 rpm) 512 bytes × 8 sectors × 160 tracks 

 * .DD9 → 2DD (300 rpm) 512 bytes × 9 sectors × 160 tracks
N88-BASIC format
 * .HDB → 2HD (360 rpm) 128/256 bytes × 26 sectors × 154 tracks 
↑ track 0 only single density 128 bytes, others double density 256 bytes 

 * .DDB → 2DD (300 rpm) 256 bytes × 16 sectors × 160 tracks



https://github.com/barbeque/pc98-disk-t ... -japan.txt

This might imply that the .DD6 is always in MS-DOS format, if there is some way of identifying that, and that the DDB is always N88-Basic, which also might have a distinguishing mark, as it were. Otherwise, go with the extension. If you have some (probable) samples of each, I could try to take a look.


Top
 Profile  
 
 Post subject: Re: BKDSK .DD6 and .DDB
PostPosted: July 8th, 2021, 6:11 am 
Offline
User avatar

Joined: June 7th, 2008, 8:51 am
Posts: 928
Location: South Africa
I also found this on a translated X68k document - might be of interest.

source - http://mijet.eludevisibility.org/X68000 ... 0Docs.html

Code:
*1: Bytes/Sector
*2: Sectors/Track
*3: Number of Cylinders
*4: FAT Sectors x Copies
*5: Root Directory Sectors
*6: Reserved Sectors
*7: Total Sectors
*8: Total Volume (in KB)
*9: Free Area (in KB)

 ------------------------------------------------------------------
|Type|FAT ID| MB | PDA| *1 | *2 | *3 | *4 | *5 | *6 | *7 | *8 | *9 |
|------------------------------------------------------------------|
| 2HD  | FE | FE | 90 |1024|  8 | 77 | 2×2|  6 |  1 |1232|1232|1221|
| 2HDA | FE | ** | ** |1024|  8 | 80 | 2×2|  6 |  1 |1280|1280|1269|
| 2HDE | F8 | EC | ** |1024|  9 | 80 | 3×2|  6 |  1 |1440|1440|1427|
| 2HC  | F9 | FD | 90 | 512| 15 | 80 | 7×2| 14 |  1 |2400|1200|1185|
| 2HCE | F8 | ** | ** | 512| 18 | 80 | 9×2| 14 |  1 |2880|1440|1423|
| 2HQ  | F0 | FA | 70 | 512| 18 | 80 | 9×2| 14 |  1 |2880|1440|1423|
| 2HQ16| ?? | ?? | ?? | 512| 20 | 80 |10×2| 14 |  1 |3200|1600|1582|
| 2HS  | FB | EB | ** |1024|  9 | 80 | 3×1|  6 |  1 |1440|1440|1430|
| 2HT  | FA | EA | ** |----|----| 80 | 3×1|  5 |  1 |----|1599|1590|
| 2DD  | FB | FB | 10 | 512|  8 | 80 | 2×2|  7 |  1 |1280| 640| 634|
| 2DD  | F9 | FC | 30 | 512|  9 | 80 | 3×2|  7 |  1 |1440| 720| 713|
| 2DD  | E0 | E0 | ** | 512| 10 | 80 | 3×2|  7 |  1 |1600| 800| 793|
| 2D   | FF | E8 | ** | 512|  8 | 40 | 1×2|  7 |  1 | 640| 320| 315|
| 2D   | FD | E6 | ** | 512|  9 | 40 | 2×2|  7 |  1 | 720| 360| 354|
| 2ED  | F0 | ** | ** | 512| 36 | 80 | 9×2| 15 |  1 |5760|2880|2863|
|------------------------------------------------------------------|
| 1DD  | FA | EF | ** | 512|  8 | 80 | 1×2|  7 |  1 | 640| 320| 315|
| 1DD  | F8 | EE | ** | 512|  9 | 80 | 2×2|  7 |  1 | 720| 360| 354|
| 1D   | FE | E7 | ** | 512|  8 | 40 | 1×2|  4 |  1 | 320| 160| 156|
| 1D   | FC | E5 | ** | 512|  9 | 40 | 2×2|  4 |  1 | 360| 180| 175|
 ------------------------------------------------------------------

Editor's Notes:

Tracks = Cylinders * Heads

I believe the number of cylinders can actually go up to at least 82
in some cases.



Top
 Profile  
 
 Post subject: Re: BKDSK .DD6 and .DDB
PostPosted: July 10th, 2021, 6:09 pm 
Offline

Joined: January 11th, 2007, 12:46 am
Posts: 257
Well, I previously didn't have any "original" copies (which is to say, I suppose I could have tried to make some from other formats using FIVEC/VFIC), but I got a large collection off PerfectDark recently that had... well, one example of each. I'll try and give it a whirl in the next couple of days.

Upside to it being a very large collection of duplicate games.


Top
 Profile  
 
 Post subject: Re: BKDSK .DD6 and .DDB
PostPosted: July 11th, 2021, 5:09 pm 
Offline

Joined: January 11th, 2007, 12:46 am
Posts: 257
Well, so Hydlide is the game I have in .DDB. VFIC recognizes it correctly and converts it, and NP2 is able to run both the original file and the converted file. However... rename the file to .DD6, and VFIC converts it... with the wrong geometry, and the disk is unusable. So clearly VFIC is depending on the extension. NP2 doesn't fare any better. If you change the extension to .DD6 then load the image, NP2 freezes.

Hydlide doesn't have a standard DOS or N88-Basic bootsector. Instead, it has what looks to be a custom/unrecognized boot sequence:

CLI
MOV AX, CS
MOV SS, AX
MOV AX, 0h
MOV ES, AX
...

Etc, in short, what you'd expect to open with if you were using a custom bootsector with no set-up or OS.

So I'm still unsure what I should do. I'm thinking just follow the crowd and use the extension, otherwise assuming it's a .DD6 image. The formats might be so rare in this day and age there's little chance of confusion.

There's nothing conventional/identifiable after 0x100h, which would be either the second sector (in DDB) or the second half of the first sector (DD6)


Top
 Profile  
 
 Post subject: Re: BKDSK .DD6 and .DDB
PostPosted: July 12th, 2021, 8:36 am 
Offline
User avatar

Joined: June 7th, 2008, 8:51 am
Posts: 928
Location: South Africa
Go with the extension, I reckon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group