Welcome, Guest. Please login or register.

Author Topic: Help needed with DiskImage  (Read 3162 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Thomas

Re: Help needed with DiskImage
« on: August 28, 2006, 10:52:24 AM »

Why didn't you use the HDF you already created for XFS ?

What does the DIHD0 mountlist look like ?

How big is the image file ?

The geometry you specified in DIHD0 should match the image size.

(HighCyl + 1) * BlocksPerTrack * Surfaces * BlockSize = image size

Bye,
Thomas

Offline Thomas

Re: Help needed with DiskImage
« Reply #1 on: August 28, 2006, 11:29:40 AM »
Yes, the mountlist is not correct. The value for BlockSize is wrong. It should be 512. In memory the block size is stored as number of longwords, but the mountlist has to specify the number of bytes (four times the number of longwords; 128 longwords are 512 bytes).

Also if the image is only one partition, you should change
LowCyl to 0 and HighCyl to 2339.

Finally you should not use FFS with the DosType for SFS.

Bye,
Thomas

Offline Thomas

Re: Help needed with DiskImage
« Reply #2 on: August 28, 2006, 11:41:50 AM »

Yes, the BlockSize mistake is obviously a bug in CreateImage, so the other problems probably are bugs, too.

Bye,
Thomas

Offline Thomas

Re: Help needed with DiskImage
« Reply #3 on: August 28, 2006, 11:50:57 AM »
Quote
I have a 16GB partition with not much on it, and would prefer for the image to be the size of the data, not the size of the partition.


That's not possible. But you can create an empty HDF, format it and copy the data to it.

I am not very experienced with the tools which come with DiskImage. I only use diskimage.device and (because I cannot avoid it) DiskImageCtrl. I even don't remember which program I used to create my HDFs, probably WinUAE.

Bye,
Thomas


Offline Thomas

Re: Help needed with DiskImage
« Reply #4 on: August 28, 2006, 12:47:46 PM »
Try

Surfaces = 1
BlockSize = 512
BlocksPerTrack = 1
LowCyl = 0
HighCyl =

or

Surfaces = 1
BlockSize = 512
BlocksPerTrack = 32
LowCyl = 0
HighCyl =

The calculation is always the same as above:

(HighCyl + 1) * Surfaces * BlocksPerTrack * BlockSize = image size

Bye,
Thomas

Offline Thomas

Re: Help needed with DiskImage
« Reply #5 on: August 28, 2006, 04:01:42 PM »

If you look at the "add hardfile" panel in WinUAE, you'll see that it uses the values from my second suggestion. So if you format the HDF with WinUAE, a mountlist following this suggestion should work.

Bye,
Thomas

Offline Thomas

Re: Help needed with DiskImage
« Reply #6 on: August 28, 2006, 04:52:25 PM »

If you only want to create an empty file for use as an image with DiskImage, you can as well use a simple Rexx program like this:

Code: [Select]

/* rexx */


size = 10 * 1024 * 1024   /* size in bytes (10 mb) */
file = "ram:hdf"          /* file name (will be overwritten if it exists */


buffsize = 32768
buffer = left("",buffsize,'00'x)

if Open(out,file,write) then do

do while (size >= buffsize)
call WriteCh(out,buffer)
size = size - buffsize
end
if size > 0 then
call WriteCh(out,left(buffer,size))

call Close(out)
end


Bye,
Thomas