/*
* Update the atc line for a given address by doing a mmu lookup.
*/
-static uaecptr mmu_fill_atc_l2(uaecptr addr, bool super, bool data, bool write,
- struct mmu_atc_line *l)
+static uaecptr mmu_fill_atc_l2(uaecptr addr, bool super, bool data, bool write, struct mmu_atc_line *l)
{
int res;
uae_u32 desc;
static int dma_enable, bitoffset, syncoffset;
static uae_u16 word, dsksync;
static unsigned long dsksync_cycles;
-static int cemode = 1;
#define WORDSYNC_TIME 11
/* Always carried through to the next line. */
static int disk_hpos;
uae_u8 *restore_floppy (uae_u8 *src)
{
- word = restore_u16();
- bitoffset = restore_u8();
- dma_enable = restore_u8();
- disk_hpos = restore_u8() << 8;
- dskdmaen = restore_u8();
- restore_u16 ();
- //word |= restore_u16() << 16;
-
+ word = restore_u16 ();
+ bitoffset = restore_u8 ();
+ dma_enable = restore_u8 ();
+ disk_hpos = restore_u8 () << 8;
+ dskdmaen = restore_u8 ();
+ for (int i = 0; i < 3; i++) {
+ fifo[i] = restore_u16 ();
+ fifo_inuse[i] = restore_u8 () != 0;
+ if (dskdmaen == 0)
+ fifo_inuse[i] = false;
+ }
return src;
}
if (dstptr)
dstbak = dst = dstptr;
else
- dstbak = dst = xmalloc (uae_u8, 2 + 1 + 1 + 1 + 1 + 2);
- save_u16 (word); /* current fifo (low word) */
- save_u8 (bitoffset); /* dma bit offset */
- save_u8 (dma_enable); /* disk sync found */
+ dstbak = dst = xmalloc (uae_u8, 100);
+ save_u16 (word); /* shift register */
+ save_u8 (bitoffset); /* dma bit offset */
+ save_u8 (dma_enable); /* disk sync found */
save_u8 (disk_hpos >> 8); /* next bit read position */
- save_u8 (dskdmaen); /* dma status */
- save_u16 (0); /* was current fifo (high word), but it was wrong???? */
+ save_u8 (dskdmaen); /* dma status */
+ for (int i = 0; i < 3; i++) {
+ save_u16 (fifo[i]);
+ save_u8 (fifo_inuse[i] ? 1 : 0);
+ }
*len = dst - dstbak;
return dstbak;
#if 0
static int done;
if (pc == 0x16AF94) {
- write_log (L"D0=%d A7=%08x\n", regs.regs[0], regs.regs[15]);
+// write_log (L"D0=%d A7=%08x\n", regs.regs[0], regs.regs[15]);
if (regs.regs[0] == 360) {
done = 1;
activate_debugger ();
}
}
+/*
if (pc == 0x16B01A) {
write_log (L"-> ERR\n");
}
if (pc == 0x16B018) {
write_log (L"->\n");
}
+*/
if (pc == 0x17967C || pc == 0x13b5e2 - 4) {
if (done) {
write_log (L"*\n");
static int rawinput_available, rawinput_registered_mouse, rawinput_registered_kb;
+static bool test_rawinput (int usage)
+{
+ RAWINPUTDEVICE rid = { 0 };
+
+ rid.usUsagePage = 1;
+ rid.usUsage = usage;
+ if (RegisterRawInputDevices (&rid, 1, sizeof (RAWINPUTDEVICE)) == FALSE) {
+ write_log (L"RAWINPUT test failed, usage=%d ERR=%d\n", usage, GetLastError ());
+ return false;
+ }
+ rid.dwFlags |= RIDEV_REMOVE;
+ if (RegisterRawInputDevices (&rid, 1, sizeof (RAWINPUTDEVICE)) == FALSE) {
+ write_log (L"RAWINPUT test failed (release), usage=%d, ERR=%d\n", usage, GetLastError ());
+ return false;
+ }
+ write_log (L"RAWINPUT test ok, usage=%d\n", usage);
+ return true;
+}
+
static int register_rawinput (int flags)
{
int num, rm, rkb;
}
}
-static TCHAR *rawkeyboardlabels[256] =
+static const TCHAR *rawkeyboardlabels[256] =
{
L"ESCAPE",
L"1",L"2",L"3",L"4",L"5",L"6",L"7",L"8",L"9",L"0",
L"NUMLOCK",L"SCROLL",L"NUMPAD7",L"NUMPAD8",L"NUMPAD9",L"SUBTRACT",
L"NUMPAD4",L"NUMPAD5",L"NUMPAD6",L"ADD",L"NUMPAD1",L"NUMPAD2",L"NUMPAD3",L"NUMPAD0",
L"DECIMAL",NULL,NULL,L"OEM_102",L"F11",L"F12",
- L"F13",L"F14",L"F15",L"F16",NULL,NULL,NULL,NULL,NULL,NULL,
- NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
- NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
+ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
+ L"F13",L"F14",L"F15",NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
- NULL,NULL,
+ NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
L"NUMPADEQUALS",NULL,NULL,
L"PREVTRACK",NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
L"NEXTTRACK",NULL,NULL,L"NUMPADENTER",L"RCONTROL",NULL,NULL,
}
if (!rawinput_decided) {
+ if (num_mouse > 0 && !test_rawinput (2))
+ num_mouse = 0;
+ if (num_keyboard > 0 && !test_rawinput (6))
+ num_keyboard = 0;
rawinput_enabled_keyboard = num_keyboard > 0;
rawinput_enabled_mouse = num_mouse > 0;
rawinput_decided = true;
{ DIK_SLASH, INPUTEVENT_KEY_DIV },
{ DIK_OEM_102, INPUTEVENT_KEY_30 },
- { DIK_VOLUMEDOWN, INPUTEVENT_SPC_MASTER_VOLUME_DOWN },
- { DIK_VOLUMEUP, INPUTEVENT_SPC_MASTER_VOLUME_UP },
- { DIK_MUTE, INPUTEVENT_SPC_MASTER_VOLUME_MUTE },
+// { DIK_VOLUMEDOWN, INPUTEVENT_SPC_MASTER_VOLUME_DOWN },
+// { DIK_VOLUMEUP, INPUTEVENT_SPC_MASTER_VOLUME_UP },
+// { DIK_MUTE, INPUTEVENT_SPC_MASTER_VOLUME_MUTE },
{ DIK_HOME, INPUTEVENT_KEY_70 },
{ DIK_END, INPUTEVENT_KEY_71 },
- // { DIK_SYSRQ, INPUTEVENT_KEY_6E },
- // { DIK_F12, INPUTEVENT_KEY_6F },
+// { DIK_SYSRQ, INPUTEVENT_KEY_6E },
+// { DIK_F12, INPUTEVENT_KEY_6F },
{ DIK_INSERT, INPUTEVENT_KEY_47 },
- // { DIK_PRIOR, INPUTEVENT_KEY_48 },
+// { DIK_PRIOR, INPUTEVENT_KEY_48 },
{ DIK_PRIOR, INPUTEVENT_SPC_FREEZEBUTTON },
{ DIK_NEXT, INPUTEVENT_KEY_49 },
{ DIK_F11, INPUTEVENT_KEY_4B },
#endif
}
+static int hotkeys[] = { VK_VOLUME_UP, VK_VOLUME_DOWN, VK_VOLUME_MUTE, -1 };
+
static void winuae_active (HWND hWnd, int minimized)
{
struct threadpriorities *pri;
}
sound_closed = 0;
}
+#if 0
+ RegisterHotKey (hAmigaWnd, IDHOT_SNAPDESKTOP, 0, VK_SNAPSHOT);
+ for (int i = 0; hotkeys[i] >= 0; i++)
+ RegisterHotKey (hAmigaWnd, hotkeys[i], 0, hotkeys[i]);
+#endif
if (WIN32GFX_IsPicassoScreen ())
WIN32GFX_EnablePicasso ();
getcapslock ();
SetThreadExecutionState (ES_CONTINUOUS);
if (minimized)
exit_gui (0);
+#if 0
+ for (int i = 0; hotkeys[i] >= 0; i++)
+ UnregisterHotKey (hAmigaWnd, hotkeys[i]);
+ UnregisterHotKey (hAmigaWnd, IDHOT_SNAPDESKTOP);
+#endif
focus = 0;
wait_keyrelease ();
setmouseactive (0);
#define WINUAEPUBLICBETA 1
#define LANG_DLL 1
-#define WINUAEBETA L"17"
-#define WINUAEDATE MAKEBD(2010, 9, 12)
-#define WINUAEEXTRA L""
+#define WINUAEBETA L"18"
+#define WINUAEDATE MAKEBD(2010, 9, 18)
+#define WINUAEEXTRA L"RC1"
#define WINUAEREV L""
#define IHF_WINDOWHIDDEN 6
ew (hDlg, IDC_CPU5, FALSE);
#endif
- cpu_based_enable = workprefs.cpu_model >= 68020 &&
- workprefs.address_space_24 == 0;
+ cpu_based_enable = workprefs.cpu_model >= 68020 && workprefs.address_space_24 == 0;
jitenable = cpu_based_enable;
#ifndef JIT
+Beta 18 (RC1):
+
+- F13/F14/F15 rawinput keycodes fixed (at least available on some apple usb keyboards)
+- removed default volume and mute keyboard mappings because in rawinput mode they
+ are always handled by Windows (which is annoying, I haven't found any simple way to
+ disable them, "disable hotkeys" flag only seems to disable Windows keys)
+- fall back to directinput if rawinput enumeration worked but RegisterRawInputDevices() returns error
+- Paula disk fifo statefile support
+
+Beta 17:
+
- removed duplicate "none" in filter list
- RTD also missed address error check
- MMU emulation bus error handler uses C++ exceptions again (like in original Aranym version),
&& _tcscmp (name, L"A3K1") != 0
&& _tcscmp (name, L"A3K2") != 0)
{
- /* without zeros at the end old state files may not work */
- mem = xcalloc (uae_u8, *totallen + 32);
+ /* extra bytes at the end needed to handle old statefiles that now have new fields */
+ mem = xcalloc (uae_u8, *totallen + 100);
if (!mem)
return NULL;
if (flags & 1) {