20 February 2021, 01:04 | #1 |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
HDF file format
Hi,
I'm looking for the specification of the HDF file format, because I want to develop a tool to create new empy HDF's of a given size. I would also like to know if there are any such tools out there (not WinUAE/FS-UAE). I've done a little reverse engineering in the past and I came to the conclusion that an HDF file is just the string "rdsk" followed by the disk data. So if I want to create a 32GB HDF, I can run these 2 instructions in a bash shell: Code:
$ printf "rdsk" >> 32gb.hdf $ dd if=/dev/zero bs=1000000000 count=32 >> 32gb.hdf But I'm afraid there's something more I should take into account. That's why I want to take a peek at the documentation. Thanks. |
20 February 2021, 02:37 | #2 |
Registered User
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 302
|
HDF can be at least 2 formats. One is RDB RDSK and second is as like a big floppy disk format with boot block. RDB is like MBR but different than MBR. Search for Amiga RDB.
|
20 February 2021, 09:20 | #3 | |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
Additionally, when using a. hdf file in FS-UAE/WinUAE, if the disk contains these 4 bytes at the start of the file, it will be used as a full RDB disk image, instead of a single partition image (like Tomislav mentioned, there are two kinds of .hdf files, really). |
|
20 February 2021, 09:26 | #4 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
HDF is like ADF, it has no format. It's just the raw data as read from or written to disk. Whatever is on the disk is also in the HDF. There is no header or footer. And no documentation.
|
20 February 2021, 09:31 | #5 |
Registered User
Join Date: Oct 2012
Location: Italy
Age: 49
Posts: 2,942
|
From what i know the header for ADF files exist instead
It is always the text string "DOS" |
20 February 2021, 09:37 | #6 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
|
20 February 2021, 13:13 | #7 |
Registered User
Join Date: Sep 2016
Location: italy
Posts: 1,480
|
@madcap
Can this tool you are creating can be run inside an .exe installer? or can it be run directly from windows to prepare an .hdf without using winuae? Thanks for more information. |
20 February 2021, 13:27 | #8 |
Registered User
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 302
|
I saw HDFs which starts with PC MBR (512B), then had 512B zeroed and after that had Amiga RDB.
|
20 February 2021, 14:07 | #9 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
The Amiga RDSK block can be in any of the first 16 sectors of the HDD. So you can have an MBR in sector 0 and an RDB in sector 1. This way you can make PC partitions visible on the Amiga automatically. The Boot95 utility which comes with FAT95 does this, for example.
|
20 February 2021, 17:34 | #10 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Also nothing forces HDF to have anything to do with Amiga. It is simply image file of harddrive-like device (for example memory card or USB stick).
|
20 February 2021, 18:20 | #11 |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
Wow, guys. Thanks a lot for your help.
From what you told me, I made a few searches and I think that now I'm on the right track. |
20 February 2021, 18:25 | #12 | |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
Quote:
I don't use windows, but I will probably develop it in Python, so it will be cross-platform (it will be just a few lines, really). So I guess the answer to your question is yes, as long as you have python on your machine. I will keep you posted. Just watch this thread. |
|
21 February 2021, 11:10 | #13 | |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Btw, there is already a python tool / library for working with HDF and ADF files: https://amitools.readthedocs.io/en/l...s/xdftool.html
Quote:
|
|
22 February 2021, 17:20 | #14 | |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
Quote:
Thanks @FrodeSolheim. I also just found that tool when I started researching for the options already available. That's a very good tool and it does so much more that I could have asked for. I will finish my own tool anyway, mainly for educational purposes, but also because it will be so much simpler (limited) and probably easier to use. |
|
25 February 2021, 12:35 | #15 |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
If anyone is still interested (@White ?), here's the script:
https://framagit.org/epifanio/hdfcreate It would be nice to have some feedback if anyone tests it. |
25 February 2021, 20:20 | #16 |
Registered User
Join Date: Sep 2016
Location: italy
Posts: 1,480
|
@madcap
Thank you, i wanted to ask besides satisfying dependencies on win 10 (python) for personal use in this case as my host system. If there can be a way to somehow make it an executable for windows and then include it together with a package that installs winuae and then immediately asks for the creation of the .hdf In this case I can get help from someone, do you think it is possible to do it somehow? Thank you. |
26 February 2021, 13:19 | #17 |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
@White
I'm not sure I understand your question. Maybe you could try to explain why you need to do that (run winuae and immediately ask for the creation of the .hdf). The thing you seem to want to do is probably much more complicated than my script I know there are ways to compile Python to static binaries, but I've never done that. Cheers. |
26 February 2021, 16:04 | #18 |
Registered User
Join Date: Sep 2016
Location: italy
Posts: 1,480
|
@madcap
Thanks for answering me, some time ago I made a script that works on amigaos 4.1FE. once installed, the base system fetches files from the internet via wget, unpacks them, installs them in their relative positions, configuring them to be compatible with winuae and deletes them once installed. (the packages to download are public domain on the osdepot site) The only missing step is the creation of an .hdf in the system pre-installation phase. The script is made up of two parts: the first downloads all the necessary software, the second installs and configures it for use with winuae. here you can see an example: first part: [ Show youtube player ] second part: [ Show youtube player ] |
26 February 2021, 16:38 | #19 |
Registered User
Join Date: May 2014
Location: Lisbon / Portugal
Posts: 61
|
@White
If your windows executable can call the python script, I think you can do that. Where would you set the parameters (size of the hdf, etc). Will the user enter that info in some kind of UI ou shell? |
26 February 2021, 16:55 | #20 |
Registered User
Join Date: Sep 2016
Location: italy
Posts: 1,480
|
@madcap
From the command line I have no idea. Probably Toni can answer this. But two predefined .hdfs would be enough, for example of 8 or 16 gigabytes to be chosen during installation. But even one would be more than enough :-) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Make HDF (or other format) image of real Amiga CompactFlash HD? | ProdigalAmigan | support.Other | 2 | 23 July 2019 19:48 |
HDF File in WinUAE... | Stl75 | support.WinUAE | 7 | 25 May 2018 19:30 |
Why format HDF file in Workbench ? | amiga_Forever | support.FS-UAE | 11 | 17 February 2017 11:50 |
Format hdf larger than 1GB | Bigby | support.WinUAE | 10 | 06 March 2009 01:45 |
hdf file is full, what to do? | lostfriend | New to Emulation or Amiga scene | 2 | 04 August 2005 13:09 |
|
|