If you build plugins for WarpOS, the
hwPluginAPI pointer that is passed to your
InitPlugin() will contain function pointers to PPC code. However,
many of these function pointers will immediately do a context switch and run on
the 68k context. You might already be aware of the fact that context switches are
quite expensive so you should do your best to minimize the number of context switches
your plugin has to perform. To achieve this, you need to know which of the functions
hwPluginAPI base pointer run PPC-native and which of them need a context
switch. So here's an overview on the functions that don't need a context switch.
All other functions not listed here will immediately perform a context switch.
hw_MasterControl()(but this function is only PPC-native when querying the
HWMCP_GETPOWERPCBASEtag to make Hollywood return its
PowerPCBasepointer to you),
FT2Basefor WarpOS is not available before Hollywood 5.3. You need to make sure that your plugin was opened by Hollywood 5.3 at least before trying to make any calls in
hw_MD5(). The other functions are implemented in 68k code and will do a context switch.
Also, be careful about structure alignment when developing for WarpOS. The WarpOS version of Hollywood doesn't use the traditional Amiga structure alignment of 2 bytes but is optimized for performance. This means, for example, that 64-bit double values will always be aligned on an 8 byte boundary.