[Rpcemu] hdf file format

Reuben Thomas rrt at sc3d.org
Thu Dec 13 15:20:02 PST 2018

On Thu, 13 Dec 2018 at 22:02, Reuben Thomas <rrt at sc3d.org> wrote:

> I can't find any documentation on the file format for .hdf files. I would
> like to turn an ADFS disc image (which I can mount under Linux) into a .hdf
> file. (I can already get at the data by mounting it under Linux on my
> hostfs directory; however, some things then don't work that e.g. rely on
> the disc name).
> Any hints before I dive into the source code will be gratefully accepted!

In fact, only a little source-diving was required.

The problem was that the disk image has its first few sectors mostly
containing &deadbeef. In the loadhd function in ide.c, at the check marked
with the log message "First check", rpcemu assumes that non-zero values are

I'm afraid I don't know enough about IDE disks to know whether this is a
valid assumption; I didn't make the disk image myself (it was made by Chris
Evans at CJE Micros), but as far as I know it's just a raw disk image, and
there's nothing funny about the disk it came from (an old Connor 420Mb

So should the check be loosened to for example check for sane values, or
even the specific bytes of &deadbeef that might be found at offset 0xfc1?
Or should I simply hand-edit some zeros into my disk image file, and expect
to have to do that again possibly in future?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riscos.info/pipermail/rpcemu/attachments/20181213/8a9191b0/attachment.html>

More information about the RPCEmu mailing list