What is the encoding specification used for?

General discussion forum - for all that doesn't fit in any other category.
Post Reply
mizapf
Posts: 1
Joined: Sun Mar 23, 2025 10:15 pm

What is the encoding specification used for?

Post by mizapf »

Hi all,

I'm currently working on a support for HFE in MAME. I already tried a simple version some time ago (mentioned a long while back on this forum), but it proved to be not flexible enough for a general use in the MAME emulation system, hence my new attempt.

I understood the HFE format far enough in most points, but looking closer, the encoding specification somewhat puzzles me.

The point is: Why is the field track_encoding (and the variations for track 0 side 0 and side 1) needed at all? The HFE format keeps all cell flux changes as provided by the disk controller, and it also delivers the flux changes to the controller. The question about the encoding is to be solved by the controller, not by the floppy drive.

Concretely, for me as the designer of the HFE emulation in MAME, the question arises how I should find the proper value for this field in the header. Supposed that I created a disk image with single density, what does the real Lotharek/Gotek do when I reformat the image to double density? Does it guess the encoding from the flux stream?

Greetings,
Michael
Post Reply