IPF Library Enhancements

31 July 2004

From the IPF library history.txt, the following entry was added. “Multiple interfaces, overlap/dropout access, version & capability info”. This WIP update describes these new features.

Multiple Interfaces

It was necessary to introduce new structures for data that cannot be retrieved with the current API, as well as it is convenient to drop data that is no longer needed (such as multiple revolution related data) using the new functionality.

You can set a specific locking flag DI_LOCK_TYPE to tell the system you want version control over the passed structures. If it is set, the .type member of the specific structure passed to the API is the revision number of the structure you expect the API to return. For this purpose each structure always starts with the .type variable, but can be drastically different afterwards. Asking for type 0 is asking for the original, now legacy, stuff.

Overlap/Dropout Access

Some disk routines (most notably anything written by Titus, like Knight Force or Titan) can get stuck if the track size is constant due to very poor programming. To allow them to them work, a few dropout bits are introduced by the emulator to change the track size randomly that will sooner or later satisfy the program. Obviously these dropout bits should be placed into the track gap where the original writing would overlap. There is no way a program can tell this position without the help of the library, so it can now can be queried.

Version Info

You can now get version information from the library through an API call without any “voodoo magic” or operating system specific calls. If the function for this does not exist it is an 1.x version, otherwise it is whatever it reports. Currently 2.0.

Capability Info

Along with the new version info, the API can now inform the caller what capabilities / functionality / flags are supported. Programs can now decide how to perform a specific action, if it is possible at all.