mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-16 14:30:34 +00:00
Added new keyboardtype preference (stolen from the Windows port)
This commit is contained in:
parent
ddb433382d
commit
35fcf4d98c
@ -524,6 +524,14 @@ nogui <"true" or "false">
|
||||
error alerts. All errors will then be reported to stdout. The default
|
||||
is "false".
|
||||
|
||||
keyboardtype <keyboard-id>
|
||||
|
||||
Specifies the keyboard type that BasiliskII should report to the MacOS.
|
||||
The default is "5" which is a "Apple Extended Keyboard II (ISO)",
|
||||
but many other numbers are understood by most versions of the MacOS
|
||||
(e.g. 11 is a "Macintosh Plus Keyboard with keypad",
|
||||
13 is a "Apple PowerBook Keyboard (ISO)" )
|
||||
|
||||
For additional information, consult the source.
|
||||
|
||||
|
||||
|
@ -28,8 +28,9 @@
|
||||
|
||||
#include "sysdeps.h"
|
||||
#include "cpu_emulation.h"
|
||||
#include "main.h"
|
||||
#include "emul_op.h"
|
||||
#include "main.h"
|
||||
#include "prefs.h"
|
||||
#include "video.h"
|
||||
#include "adb.h"
|
||||
|
||||
@ -57,6 +58,8 @@ static uint8 mouse_reg_3[2] = {0x63, 0x01}; // Mouse ADB register 3
|
||||
static uint8 key_reg_2[2] = {0xff, 0xff}; // Keyboard ADB register 2
|
||||
static uint8 key_reg_3[2] = {0x62, 0x05}; // Keyboard ADB register 3
|
||||
|
||||
static uint8 m_keyboard_type = 0x05;
|
||||
|
||||
// ADB mouse motion lock (for platforms that use separate input thread)
|
||||
static B2_mutex *mouse_lock;
|
||||
|
||||
@ -68,6 +71,8 @@ static B2_mutex *mouse_lock;
|
||||
void ADBInit(void)
|
||||
{
|
||||
mouse_lock = B2_create_mutex();
|
||||
m_keyboard_type = (uint8)PrefsFindInt32("keyboardtype");
|
||||
key_reg_3[1] = m_keyboard_type;
|
||||
}
|
||||
|
||||
|
||||
@ -99,7 +104,7 @@ void ADBOp(uint8 op, uint8 *data)
|
||||
key_reg_2[0] = 0xff;
|
||||
key_reg_2[1] = 0xff;
|
||||
key_reg_3[0] = 0x62;
|
||||
key_reg_3[1] = 0x05;
|
||||
key_reg_3[1] = m_keyboard_type;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,7 @@ prefs_desc common_prefs_items[] = {
|
||||
{"jitdebug", TYPE_BOOLEAN, false, "enable JIT debugger (requires mon builtin)"},
|
||||
{"jitcachesize", TYPE_INT32, false, "translation cache size in KB"},
|
||||
{"jitlazyflush", TYPE_BOOLEAN, false, "enable lazy invalidation of translation cache"},
|
||||
{"keyboardtype", TYPE_INT32, false, "hardware keyboard type"},
|
||||
{NULL, TYPE_END, false, NULL} // End of list
|
||||
};
|
||||
|
||||
@ -97,4 +98,6 @@ void AddPrefsDefaults(void)
|
||||
#else
|
||||
PrefsAddBool("jit", false);
|
||||
#endif
|
||||
|
||||
PrefsAddInt32("keyboardtype", 5);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user