--- uae/src/autoconf.c 2018/04/24 17:00:00 1.1.1.9 +++ uae/src/autoconf.c 2018/04/24 17:10:41 1.1.1.11 @@ -16,7 +16,6 @@ #include "memory.h" #include "custom.h" #include "newcpu.h" -#include "compiler.h" #include "autoconf.h" #include "osdep/exectasks.h" @@ -44,9 +43,9 @@ int lasttrap; * setjmp saves current context [1] * longjmp back to execute_fn_on_extra_stack [0] * pointer to new stack is saved on m68k stack. m68k return address set - * to 0xF0FF00. m68k PC set to called function + * to RTAREA_BASE + 0xFF00. m68k PC set to called function * m68k function executes, stack is main - * m68k function returns to 0xF0FF00 + * m68k function returns to RTAREA_BASE + 0xFF00 * calltrap to m68k_mode_return * do_stack_magic is called again * current context is saved again with setjmp [0] @@ -130,9 +129,9 @@ static void do_stack_magic (TrapFunction *((void **)get_real_address (a7 + 4)) = s; /* Save special return address: this address contains a * calltrap that will longjmp to the right stack. */ - put_long (m68k_areg (regs, 7), 0xF0FF00); + put_long (m68k_areg (regs, 7), RTAREA_BASE + 0xFF00); m68k_setpc (m68k_calladdr); - fill_prefetch_0 (); + fill_prefetch_slow (); /*write_log ("native function calls m68k\n");*/ break; } @@ -215,6 +214,7 @@ uae_u32 CallLib (uaecptr base, uae_s16 o uaecptr EXPANSION_explibname, EXPANSION_doslibname, EXPANSION_uaeversion; uaecptr EXPANSION_uaedevname, EXPANSION_explibbase = 0, EXPANSION_haveV36; uaecptr EXPANSION_bootcode, EXPANSION_nullfunc; +uaecptr EXPANSION_cddevice; /* ROM tag area memory access */ @@ -290,7 +290,7 @@ void REGPARAM2 call_calltrap(int func) /* For monitoring only? */ if (traps[func] == NULL) { m68k_setpc(trapoldfunc[func]); - fill_prefetch_0 (); + fill_prefetch_slow (); return; } @@ -307,7 +307,7 @@ void REGPARAM2 call_calltrap(int func) m68k_dreg(regs, 0) = retval; if (implicit_rts) { m68k_do_rts (); - fill_prefetch_0 (); + fill_prefetch_slow (); } } @@ -357,7 +357,7 @@ static int rt_straddr = 0xFF00 - 2; uae_u32 addr (int ptr) { - return (uae_u32)ptr + 0x00F00000; + return (uae_u32)ptr + RTAREA_BASE; } void db (uae_u8 data) @@ -400,7 +400,7 @@ void calltrap (uae_u32 n) void org (uae_u32 a) { - rt_addr = a - 0x00F00000; + rt_addr = a - RTAREA_BASE; } uae_u32 here (void) @@ -429,7 +429,7 @@ void align (int b) static uae_u32 nullfunc(void) { - fprintf (stderr, "Null function called\n"); + write_log ("Null function called\n"); return 0; } @@ -477,13 +477,13 @@ void rtarea_init (void) a = here(); /* Standard "return from 68k mode" trap */ - org (0xF0FF00); + org (RTAREA_BASE + 0xFF00); calltrap (deftrap2 (m68k_mode_return, TRAPFLAG_NO_RETVAL, "")); - org (0xF0FF80); + org (RTAREA_BASE + 0xFF80); calltrap (deftrap2 (getchipmemsize, TRAPFLAG_DORET, "")); - org (0xF0FF10); + org (RTAREA_BASE + 0xFF10); calltrap (deftrap2 (uae_puts, TRAPFLAG_NO_RETVAL, "")); dw (RTS);