22 |
|
|
23 |
|
#include "cpu_emulation.h" |
24 |
|
#include "main.h" |
25 |
+ |
#include "prefs.h" |
26 |
|
#include "emul_op.h" |
27 |
|
#include "rom_patches.h" |
28 |
|
#include "m68k.h" |
29 |
|
#include "memory.h" |
30 |
|
#include "readcpu.h" |
31 |
|
#include "newcpu.h" |
32 |
+ |
#include "compiler/compemu.h" |
33 |
|
|
34 |
|
|
35 |
|
// RAM and ROM pointers |
36 |
< |
uint32 RAMBaseMac = 0; // RAM base (Mac address space) gb-- init is important |
36 |
> |
uint32 RAMBaseMac = 0; // RAM base (Mac address space) gb-- initializer is important |
37 |
|
uint8 *RAMBaseHost; // RAM base (host address space) |
38 |
|
uint32 RAMSize; // Size of RAM |
39 |
|
uint32 ROMBaseMac; // ROM base (Mac address space) |
51 |
|
uintptr MEMBaseDiff; // Global offset between a Mac address and its Host equivalent |
52 |
|
#endif |
53 |
|
|
54 |
+ |
#if USE_JIT |
55 |
+ |
bool UseJIT = false; |
56 |
+ |
#endif |
57 |
+ |
|
58 |
|
// From newcpu.cpp |
59 |
|
extern int quit_program; |
60 |
|
|
96 |
|
#endif |
97 |
|
|
98 |
|
init_m68k(); |
99 |
+ |
#if USE_JIT |
100 |
+ |
UseJIT = compiler_use_jit(); |
101 |
+ |
if (UseJIT) |
102 |
+ |
compiler_init(); |
103 |
+ |
#endif |
104 |
|
return true; |
105 |
|
} |
106 |
|
|
111 |
|
|
112 |
|
void Exit680x0(void) |
113 |
|
{ |
114 |
+ |
#if USE_JIT |
115 |
+ |
if (UseJIT) |
116 |
+ |
compiler_exit(); |
117 |
+ |
#endif |
118 |
|
exit_m68k(); |
119 |
|
} |
120 |
|
|
137 |
|
void Start680x0(void) |
138 |
|
{ |
139 |
|
m68k_reset(); |
140 |
+ |
#if USE_JIT |
141 |
+ |
if (UseJIT) |
142 |
+ |
m68k_compile_execute(); |
143 |
+ |
else |
144 |
+ |
#endif |
145 |
|
m68k_execute(); |
146 |
|
} |
147 |
|
|