Conclusion
~~~~~~~~~~
There are no anti-WOS routines in Blizzard PPC flashrom.
There are just bugs in WarpUP and Warp3D and other libraries.
ppc.library install patch to dos/LoadSeg() function that does
OpenLibrary("ppc.library", x) and does not test for failure.
Seems like there were bugs in PUP as well...
malloc() can return NULL... so can OpenLibrary()...
As I already explain in the document, in this case OpenLibrary() cannot fail. Apparently you missed it, so let me try to explain in in more detail.
ppc.library LIB_OPEN does (roughly):
struct Library *lib_open(...)
{
LibBase->lib.lib_OpenCnt++;
return &LibBase->lib;
}
Also, the ppc.library LIB_EXPUNGE does:
BPTR lib_expunge(...)
{
return 0;
}
This means that once ppc.library is in memory it
1) cannot be removed
2) OpenLibrary("ppc.library", 0) cannot fail
This in turn means that it is perfectly legal to perform PPCBase = OpenLibrary("ppc.library", 0);
inside the library code and expect it to succeed. The library code in question cannot be executing in the first place unless if the library is in memory already.
No bug there. I'm not saying ppc.library would have been 100% bug free, but this is NOT one of the bugs.
The problems only can appear when someone does something as stupid is forcibly remove the library from memory. WarpUP did exactly this. Doing hacks like this can only lead to trouble. The obvious (and 100% system legal) way to handle this is to add a replacement resident tag for the ppc.library which overrides the original library, making sure it never even gets loaded. This is what bppcfix application does. WarpUP coders themselves were just unable to figure such a basic thing out, but instead resorted to unreliable hacks.
When those hacks failed who did they blame? The ppc.library authors.