30 |
|
#include "sigsegv.h" |
31 |
|
#include "cpu/ppc/ppc-cpu.hpp" |
32 |
|
#include "cpu/ppc/ppc-operations.hpp" |
33 |
+ |
#include "cpu/ppc/ppc-instructions.hpp" |
34 |
|
|
35 |
|
// Used for NativeOp trampolines |
36 |
|
#include "video.h" |
98 |
|
* PowerPC emulator glue with special 'sheep' opcodes |
99 |
|
**/ |
100 |
|
|
101 |
+ |
enum { |
102 |
+ |
PPC_I(SHEEP) = PPC_I(MAX), |
103 |
+ |
PPC_I(SHEEP_MAX) |
104 |
+ |
}; |
105 |
+ |
|
106 |
|
class sheepshaver_cpu |
107 |
|
: public powerpc_cpu |
108 |
|
{ |
118 |
|
uint32 get_cr() const { return cr().get(); } |
119 |
|
void set_cr(uint32 v) { cr().set(v); } |
120 |
|
|
115 |
– |
// Execution loop |
116 |
– |
void execute(uint32 entry, bool enable_cache = false); |
117 |
– |
|
121 |
|
// Execute 68k routine |
122 |
|
void execute_68k(uint32 entry, M68kRegisters *r); |
123 |
|
|
168 |
|
{ "sheep", |
169 |
|
(execute_pmf)&sheepshaver_cpu::execute_sheep, |
170 |
|
NULL, |
171 |
+ |
PPC_I(SHEEP), |
172 |
|
D_form, 6, 0, CFLOW_JUMP | CFLOW_TRAP |
173 |
|
} |
174 |
|
}; |
241 |
|
} |
242 |
|
} |
243 |
|
|
240 |
– |
// Execution loop |
241 |
– |
void sheepshaver_cpu::execute(uint32 entry, bool enable_cache) |
242 |
– |
{ |
243 |
– |
powerpc_cpu::execute(entry, enable_cache); |
244 |
– |
} |
245 |
– |
|
244 |
|
// Handle MacOS interrupt |
245 |
|
void sheepshaver_cpu::interrupt(uint32 entry) |
246 |
|
{ |
677 |
|
current_cpu->start_log(); |
678 |
|
#endif |
679 |
|
// start emulation loop and enable code translation or caching |
680 |
< |
current_cpu->execute(entry, true); |
680 |
> |
current_cpu->execute(entry); |
681 |
|
} |
682 |
|
|
683 |
|
/* |