Anex86 PC98 floppy image

The FDI disk image format for NEC PC-98 disk images seems to originate from the Anex86 PC98 emulator.

FDI File Header
The FDI header is 4096 bytes long, Intel little-endian, and starts with this 32-byte header.

typedef struct { BYTE  dummy[4]; BYTE  fddtype[4]; BYTE  headersize[4]; BYTE  fddsize[4]; BYTE  sectorsize[4]; BYTE  sectors[4]; BYTE  surfaces[4]; BYTE  cylinders[4]; } FDIHDR;

The next 4,064 bytes of the header seem to always be pad bytes.

FDI file image contents
The remaining portion of the file is a raw dd-style image of the disk. In the case of an HDM image, you can prepend a 4096-byte header onto the image to turn it into an FDI (see example below).

Examples
For a 1261568-byte "2HD" disk image (like *.HDM format), the header is as follows: