• Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    @itix
    I created the glue functions using your macros:
    Code:
    #define	RC_START(x)	ULONG ctrstore; struct EmulHandle *old_r2 = MyEmulHandle; x rc; asm ( "mfctr %0" : "=r" (ctrstore)); MyEmulHandle = SysBase->ThisTask->tc_ETask->EmulHandle; SysBase->ThisTask->tc_ETask->EmulHandle = NULL; {
    #define RC_END } asm ("mtctr %0" : : "r" (ctrstore)); SysBase->ThisTask->tc_ETask->EmulHandle = MyEmulHandle; MyEmulHandle = old_r2; return rc;
    #define NR_START ULONG ctrstore; struct EmulHandle *old_r2 = MyEmulHandle; asm ( "mfctr %0" : "=r" (ctrstore)); MyEmulHandle = SysBase->ThisTask->tc_ETask->EmulHandle; SysBase->ThisTask->tc_ETask->EmulHandle = NULL; {
    #define NR_END } asm ("mtctr %0" : : "r" (ctrstore)); SysBase->ThisTask->tc_ETask->EmulHandle = MyEmulHandle; MyEmulHandle = old_r2;

    The problem is that struct ETask no longer seem to have an EmulHandle field, so this doesn't compile with the latest SDK. Has the EmulHandle field in ETask became private?
    This is just like television, only you can see much further.
  • »09.01.14 - 10:36
    Profile Visit Website