Creating HDF File

ask about 32-bit emulators like ArcEm, Red Squirrel, Arculator or RPCEmu here
mfc
Posts: 70
Joined: Mon Dec 22, 2014 9:56 am

Creating HDF File

Postby mfc » Mon Sep 12, 2016 3:57 am

I've been using the default 50MB HDF files on RPCEmu since ever, but I'd like to create a larger one (100MB) how can I do this? I can't find any info about it anywhere. Only reference I could find was here:
http://b-em.bbcmicro.com/arculator/download.html

Which points to use HForm without any real info, so I tried letting RPCEmu create the 1KB hd5.hdf file and then tried to format it using HForm, but then of course it ends up failing at the end when writing the defect list because I'm pretty sure this isn't the way to do it.

mfc
Posts: 70
Joined: Mon Dec 22, 2014 9:56 am

Re: Creating HDF File

Postby mfc » Sun Sep 18, 2016 12:10 am

Anyone can help with this? I'll take an empty HDF file too if anyone has one (has to be 100MB or larger though) don't really need to know how to create one.

g7jjf
Posts: 354
Joined: Sun Aug 07, 2005 7:29 pm
Location: Notts, England
Contact:

Re: Creating HDF File

Postby g7jjf » Sun Sep 18, 2016 4:49 pm

Hi,

You can download a blank 1GB file from
http://www.g7jjf.com/hd4.zip

Jon

mfc
Posts: 70
Joined: Mon Dec 22, 2014 9:56 am

Re: Creating HDF File

Postby mfc » Sun Sep 18, 2016 11:20 pm

Thanks a lot! Any chance for a smaller one? 1GB is a bit too large for my purposes, 100 to 200MB would be perfect over 300MB would start to be way larger than what I need.

g7jjf
Posts: 354
Joined: Sun Aug 07, 2005 7:29 pm
Location: Notts, England
Contact:

Re: Creating HDF File

Postby g7jjf » Mon Sep 19, 2016 6:04 am

I have replaced the previous file with one which is now 128MB in size.

I hope this is OK.

mfc
Posts: 70
Joined: Mon Dec 22, 2014 9:56 am

Re: Creating HDF File

Postby mfc » Mon Sep 19, 2016 9:38 am

It's perfect, thanks a lot for your help!

User avatar
IanS
Posts: 477
Joined: Mon Aug 31, 2009 6:02 pm

Re: Creating HDF File

Postby IanS » Mon Sep 19, 2016 6:33 pm

g7jjf wrote:I have replaced the previous file with one which is now 128MB in size.

I hope this is OK.

Fantastic.
Could you post how you created the file so others can create a file with the size of their own choosing? Thanks.

g7jjf
Posts: 354
Joined: Sun Aug 07, 2005 7:29 pm
Location: Notts, England
Contact:

Re: Creating HDF File

Postby g7jjf » Tue Sep 20, 2016 6:22 am

To create the blank 128MB hd4.hdf file, I performed the following steps :

Followed the article called Installing RPCEmu and RISC OS 3.71 on Windows at

http://www.4corn.co.uk/articles/rpcemu371win/

This installed a fresh copy of RPCEmu 0.8.14 with a universal boot sequence running off HostFS.

After rebooting with this setup, the icon bar showed a hard disc 4 icon and looking in the RPCEmu directory, there was a file called hd4.hdf of zero length.

In the Utilities folder, there is !HForm so I ran this.

It asked which drive to format so I chose 4. It said the drive wasn't formatted so I chose option 9 to specify my own drive format parameters.

I entered 63 sectors per track and 16 heads.

To calculate the cylinders for a required drive size, there are 63 * 16 * 512 bytes per cylinder (sectors * heads * bytes per sector) which is 516,096 bytes. For a 128MB drive, this is 128 * 1024 * 1024 bytes = 134,217,728. Dividing one by the other we get 260.06349 and a bit cyclinders so we round this up to 261.

I therefore entered 261 cylinders at the prompt.

The next question was the drive parameter init flag. I don't know what this is so I left it at 1.

I entered 262 as the parking cylinder (but this I guess could be anything for a virtual drive).

I then entered A for no more changes to defect list, F to format the drive, N for no soak test, Y to make the drive bootable followed by Y to finally format the drive.

Once the drive was formatted, I entered a large file allocation unit of 512 and the process was finished. See the image below :

Image

After clicking back to the desktop, I could then check the free size on the hard disc 4 and it came back with Free 128Mb, Used 75K, Size 128Mb.

Any more questions, please ask.


Return to “emulators”

Who is online

Users browsing this forum: No registered users and 1 guest