--- uae/src/uaelib.c 2018/04/24 17:16:44 1.1.1.12 +++ uae/src/uaelib.c 2018/04/24 17:18:34 1.1.1.13 @@ -21,6 +21,7 @@ #include "custom.h" #include "newcpu.h" #include "xwin.h" +#include "traps.h" #include "autoconf.h" #include "disk.h" #include "debug.h" @@ -176,7 +177,7 @@ static uae_u32 emulib_ChgFMemSize (uae_u memsize = 0; write_log ("Unsupported fastmem size!\n"); } - m68k_dreg(regs, 0) = 0; + m68k_dreg (regs, 0) = 0; currprefs.fastmem_size = memsize; uae_reset (0); return 0; @@ -312,10 +313,10 @@ static uae_u32 FindFunctionInObject (uae return 0; } -#define CREATE_NATIVE_FUNC_PTR uae_u32 (* native_func)( uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, \ +#define CREATE_NATIVE_FUNC_PTR uae_u32 (* native_func) (uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, \ uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32) #define SET_NATIVE_FUNC(x) native_func = (uae_u32 (*)(uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32, uae_u32))(x) -#define CALL_NATIVE_FUNC( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 ) if(native_func) native_func( d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6 ) +#define CALL_NATIVE_FUNC(d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6) if(native_func) native_func (d1,d2,d3,d4,d5,d6,d7,a1,a2,a3,a4,a5,a6) /* A0 - Contains a ptr to the native .obj data. This ptr is Amiga-based. */ /* We simply find the first function in this .obj data, and execute it. */ static uae_u32 emulib_ExecuteNativeCode (void) @@ -339,20 +340,20 @@ static uae_u32 emulib_ExecuteNativeCode uae_u8* object_UAM = NULL; CREATE_NATIVE_FUNC_PTR; - if( get_mem_bank( object_AAM ).check( object_AAM, 1 ) ) - object_UAM = get_mem_bank( object_AAM).xlateaddr( object_AAM ); + if (get_mem_bank (object_AAM).check( object_AAM, 1)) + object_UAM = get_mem_bank (object_AAM).xlateaddr (object_AAM); - if( object_UAM ) + if (object_UAM) { - SET_NATIVE_FUNC( FindFunctionInObject( object_UAM ) ); - CALL_NATIVE_FUNC( d1, d2, d3, d4, d5, d6, d7, a1, a2, a3, a4, a5, a6); + SET_NATIVE_FUNC (FindFunctionInObject (object_UAM)); + CALL_NATIVE_FUNC (d1, d2, d3, d4, d5, d6, d7, a1, a2, a3, a4, a5, a6); } return 1; #endif return 0; } -static uae_u32 uaelib_demux (void) +static uae_u32 uaelib_demux (TrapContext *dummy) { #define ARG0 (get_long (m68k_areg (regs, 7) + 4)) #define ARG1 (get_long (m68k_areg (regs, 7) + 8))