--- uae/src/uaelib.c 2018/04/24 16:42:13 1.1.1.4 +++ uae/src/uaelib.c 2018/04/24 16:56:48 1.1.1.7 @@ -20,7 +20,6 @@ #include "uae.h" #include "include/memory.h" #include "custom.h" -#include "readcpu.h" #include "newcpu.h" #include "xwin.h" #include "autoconf.h" @@ -69,7 +68,8 @@ static uae_u32 emulib_EnableSound (uae_u */ static uae_u32 emulib_EnableJoystick (uae_u32 val) { - currprefs.fake_joystick = val; + currprefs.jport0 = val & 255; + currprefs.jport1 = (val >> 8) & 255; return 1; } @@ -83,7 +83,7 @@ static uae_u32 emulib_SetFrameRate (uae_ else if (val > 20) return 0; else { - currprefs.framerate = val; + currprefs.gfx_framerate = val; return 1; } } @@ -218,9 +218,9 @@ static uae_u32 emulib_GetUaeConfig (uaec put_long (place + 4, allocated_chipmem); put_long (place + 8, allocated_bogomem); put_long (place + 12, allocated_fastmem); - put_long (place + 16, currprefs.framerate); + put_long (place + 16, currprefs.gfx_framerate); put_long (place + 20, currprefs.produce_sound); - put_long (place + 24, currprefs.fake_joystick); + put_long (place + 24, currprefs.jport0 | (currprefs.jport1 << 8)); put_long (place + 28, currprefs.keyboard_lang); if (disk_empty (0)) put_byte (place + 32, 0); @@ -286,6 +286,13 @@ static uae_u32 emulib_Debug (void) * and add that offset to the base address of the object. Now we've got code to execute. * * @@@ Brian: does anything actually use this yet? + * @@@ Bernd: Not yet. It needs to get much better. Should spawn off a seperate task to handle the + * function, and then somehow "signal" the Amiga caller that completion or error has + * occurred. I don't know how to do that, so right now it is a synchronous call. Yuck! + * Would be nice to implement jpg decompression functionality for the Amiga which used + * the UAE Host to do all the work, for example. + * @@@ Brian: I disabled it to prevent people from starting to use it - if that happens, we're + * stuck with this. */ static uae_u32 FindFunctionInObject (uae_u8 *objectptr) { @@ -307,6 +314,7 @@ static uae_u32 FindFunctionInObject (uae /* We simply find the first function in this .obj data, and execute it. */ static uae_u32 emulib_ExecuteNativeCode (void) { +#if 0 uaecptr object_AAM = m68k_areg( regs, 0 ); uae_u32 d1 = m68k_dreg( regs, 1 ); uae_u32 d2 = m68k_dreg( regs, 2 ); @@ -334,6 +342,8 @@ static uae_u32 emulib_ExecuteNativeCode 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)