mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-12 16:30:44 +00:00
Add "jit68k" prefs item to enable built-in 68k DR emulator.
This commit is contained in:
parent
bf17f78ac4
commit
a9c38c3598
@ -525,18 +525,24 @@ static void read_jit_settings(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
// "Use built-in 68k DR emulator" button toggled
|
||||
static void tb_jit_68k(GtkWidget *widget)
|
||||
{
|
||||
PrefsReplaceBool("jit68k", GTK_TOGGLE_BUTTON(widget)->active);
|
||||
}
|
||||
|
||||
// Create "JIT Compiler" pane
|
||||
static void create_jit_pane(GtkWidget *top)
|
||||
{
|
||||
#if USE_JIT
|
||||
GtkWidget *box, *table, *label, *menu;
|
||||
char str[32];
|
||||
|
||||
box = make_pane(top, STR_JIT_PANE_TITLE);
|
||||
#if USE_JIT
|
||||
make_checkbox(box, STR_JIT_CTRL, "jit", GTK_SIGNAL_FUNC(tb_jit));
|
||||
|
||||
set_jit_sensitive();
|
||||
#endif
|
||||
make_checkbox(box, STR_JIT_68K_CTRL, "jit68k", GTK_SIGNAL_FUNC(tb_jit_68k));
|
||||
}
|
||||
|
||||
|
||||
|
@ -287,17 +287,18 @@ void EmulOp(M68kRegisters *r, uint32 pc, int selector)
|
||||
TimerReset();
|
||||
MacOSUtilReset();
|
||||
AudioReset();
|
||||
#if 0
|
||||
|
||||
// Enable DR emulator
|
||||
D(bug("DR activated\n"));
|
||||
WriteMacInt32(KernelDataAddr + 0x17a0, 3); // Prepare for DR emulator activation
|
||||
WriteMacInt32(KernelDataAddr + 0x17c0, DR_CACHE_BASE);
|
||||
WriteMacInt32(KernelDataAddr + 0x17c4, DR_CACHE_SIZE);
|
||||
WriteMacInt32(KernelDataAddr + 0x1b04, DR_CACHE_BASE);
|
||||
WriteMacInt32(KernelDataAddr + 0x1b00, DR_EMULATOR_BASE);
|
||||
memcpy((void *)DR_EMULATOR_BASE, (void *)(ROM_BASE + 0x370000), DR_EMULATOR_SIZE);
|
||||
MakeExecutable(0, (void *)DR_EMULATOR_BASE, DR_EMULATOR_SIZE);
|
||||
#endif
|
||||
if (PrefsFindBool("jit68k")) {
|
||||
D(bug("DR activated\n"));
|
||||
WriteMacInt32(KernelDataAddr + 0x17a0, 3); // Prepare for DR emulator activation
|
||||
WriteMacInt32(KernelDataAddr + 0x17c0, DR_CACHE_BASE);
|
||||
WriteMacInt32(KernelDataAddr + 0x17c4, DR_CACHE_SIZE);
|
||||
WriteMacInt32(KernelDataAddr + 0x1b04, DR_CACHE_BASE);
|
||||
WriteMacInt32(KernelDataAddr + 0x1b00, DR_EMULATOR_BASE);
|
||||
memcpy((void *)DR_EMULATOR_BASE, (void *)(ROM_BASE + 0x370000), DR_EMULATOR_SIZE);
|
||||
MakeExecutable(0, (void *)DR_EMULATOR_BASE, DR_EMULATOR_SIZE);
|
||||
}
|
||||
break;
|
||||
|
||||
case OP_IRQ: // Level 1 interrupt
|
||||
|
@ -134,6 +134,7 @@ enum {
|
||||
// JIT Compiler pane
|
||||
STR_JIT_PANE_TITLE = 3700,
|
||||
STR_JIT_CTRL,
|
||||
STR_JIT_68K_CTRL,
|
||||
|
||||
// Mac window
|
||||
STR_WINDOW_TITLE = 4000,
|
||||
|
@ -54,6 +54,7 @@ prefs_desc common_prefs_items[] = {
|
||||
{"noclipconversion", TYPE_BOOLEAN, false, "don't convert clipboard contents"},
|
||||
{"ignoresegv", TYPE_BOOLEAN, false, "ignore illegal memory accesses"},
|
||||
{"jit", TYPE_BOOLEAN, false, "enable JIT compiler"},
|
||||
{"jit68k", TYPE_BOOLEAN, false, "enable 68k DR emulator"},
|
||||
{"keyboardtype", TYPE_INT32, false, "hardware keyboard type"},
|
||||
{NULL, TYPE_END, false, NULL} // End of list
|
||||
};
|
||||
@ -83,6 +84,7 @@ void AddPrefsDefaults(void)
|
||||
#else
|
||||
PrefsAddBool("jit", false);
|
||||
#endif
|
||||
PrefsAddBool("jit68k", false);
|
||||
|
||||
PrefsAddInt32("keyboardtype", 5);
|
||||
}
|
||||
|
@ -141,6 +141,7 @@ user_string_def common_strings[] = {
|
||||
|
||||
{STR_JIT_PANE_TITLE, "JIT Compiler"},
|
||||
{STR_JIT_CTRL, "Enable JIT Compiler"},
|
||||
{STR_JIT_68K_CTRL, "Enable built-in 68k DR Emulator"},
|
||||
|
||||
{STR_WINDOW_TITLE, "SheepShaver"},
|
||||
{STR_WINDOW_TITLE_FROZEN, "SheepShaver *** FROZEN ***"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user