View Single Post
Old 02 February 2014, 14:34   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,479
Quote:
Originally Posted by Toni Wilen View Post
There was 2 problems, pkd always unpacked to Amiga DD size (There are Amiga .dsq images that are smaller than DD for some reason), now it only pads size to 880k if header information has surfaces==2 and sectors==11.
Could those smaller images have been related to only storing used blocks in the .pkd/dsq file? I never used that feature myself, always using PackDev's ALL option.

Quote:
Originally Posted by Toni Wilen View Post
btw, your images are interesting, they have surfaces==1 and sectors==2*real value. I guess there was no standard..
Do you mean that's what is specified in the DOS boot sector, or the PackDev image header?

I created the example images by mounting PC0: (CrossDOS, mount file has Reserved=1), formatting it then copying a file to the disk. Then PackDev FROM PC0: to filename.pkd ALL

The reserved value in the header of the example images was set to 1. However in some other .pkd files I created from PC disks, the reserved value is 2. For PC disks probably 1 makes more sense. Maybe I was using a different mount file with Reserved=2 back when I created those other .pkd images???

The .pkd format header seems to contain the number of sectors, sector size, number of reserved sectors and track size. It doesn't specify the number of surfaces. PackDev source code is on Aminet. Without looking at that though, just using a hex editor, the .pkd header seems to consist of:
Code:
Offset  What
------  ----
00      50 4B 44 13
04      Total number of sectors, longword
08      Sector size in bytes (e.g. $00000200)
0C      Number of reserved sectors, e.g. 1 or 2.
10      Size of each track in bytes, e.g. $00001200 = 9*512 for PC 5.25" DD
Edit to add: the 50 4B 44 13 is PKD in ASCII, followed by the minimum version of PackDev able to unpack the file, seemingly in BCD. So $13 means version 1.3 or later needed here.

Last edited by mark_k; 02 February 2014 at 19:22.
mark_k is offline  
 
Page generated in 0.04921 seconds with 9 queries