When doing LVO library calls with EmulateTags() you can specify the LVO offset using ET_Offset.
This is from the source code of a xpkmaster.l.main file:
LONG _Xpkmaster_XpkExamine(
struct XpkmasterIFace *Self,
struct XpkFib * fib,
struct TagItem * tags)
{
struct Library *LibBase = Self->Data.LibBase;
struct ExecIFace *IExec = (struct ExecIFace *)Self->Data.IExecPrivate;
LONG retval;
ULONG *regs = (ULONG *)(((struct ExecBase *)(IExec->Data.LibBase))->EmuWS);
ULONG save_a6 = regs[14];
retval = (LONG)IExec->EmulateTags((APTR)LibBase,
ET_Offset, -36,
ET_RegisterA0, fib,
ET_RegisterA1, tags,
ET_RegisterA6, LibBase,
TAG_DONE);
regs[14] = save_a6;
return retval;
}
You can get the full source here:
http://os4depot.net/index.php?functio ... sc/xpkmaster-gluefile.lhaThe "(BoardsBase - 0x24)" you have in your code likely doesn't do what you want because the BoardsBase variable points to a struct Library so you are subtracting 0x24 * sizeof(struct Library) bytes from the pointer rather than just 0x24 bytes. In order to get the result you want you would have to change it to "((uint8 *)BoardsBase - 0x24)".