From 34e9d18633581af1d25d17650a68de02583faab4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 26 May 2010 17:17:22 +0300 Subject: [PATCH] 2200b5 --- akiko.cpp | 25 ++++++++------- cfgfile.cpp | 10 ++++-- drawing.cpp | 2 +- gencpu.cpp | 2 -- include/newcpu.h | 11 ++----- include/options.h | 2 +- newcpu.cpp | 61 +++++++++++++++++++++--------------- od-win32/dinput.cpp | 56 +++++++++++++-------------------- od-win32/hardfile_win32.cpp | 46 ++++++++++++++++++++------- od-win32/resources/winuae.rc | 12 ++++++- od-win32/win32.h | 4 +-- od-win32/win32gui.cpp | 15 +++++++-- 12 files changed, 144 insertions(+), 102 deletions(-) diff --git a/akiko.cpp b/akiko.cpp index b06a86a4..74699581 100644 --- a/akiko.cpp +++ b/akiko.cpp @@ -29,8 +29,8 @@ #include "newcpu.h" #define AKIKO_DEBUG_NVRAM 0 -#define AKIKO_DEBUG_IO 0 -#define AKIKO_DEBUG_IO_CMD 0 +#define AKIKO_DEBUG_IO 1 +#define AKIKO_DEBUG_IO_CMD 1 // 43 48 49 4E 4F 4E 20 20 4F 2D 36 35 38 2D 32 20 32 34 #define FIRMWAREVERSION "CHINON O-658-2 24" @@ -403,7 +403,7 @@ static int qcode_valid; static int cdrom_disk, cdrom_paused, cdrom_playing; static int cdrom_command_active; static int cdrom_command_length; -static int cdrom_checksum_error; +static int cdrom_checksum_error, cdrom_unknown_command; static int cdrom_data_offset, cdrom_speed, cdrom_sector_counter; static int cdrom_current_sector, cdrom_seek_delay; static int cdrom_data_end, cdrom_leadout; @@ -941,30 +941,33 @@ static void cdrom_run_command (void) uae_u8 checksum; uae_u8 *pp = get_real_address (cdtx_address); + if (!(cdrom_flags & CDFLAG_TXD)) + return; for (;;) { if (cdrom_command_active) return; if (cdcomtxinx == cdcomtxcmp) return; cdrom_command = get_byte (cdtx_address + cdcomtxinx); - if (command_lengths[cdrom_command & 0x0f] < 0) { - cdcomtxinx = (cdcomtxinx + 1) & 0xff; - return; - } if ((cdrom_command & 0xf0) == 0) { cdcomtxinx = (cdcomtxinx + 1) & 0xff; return; } cdrom_checksum_error = 0; + cdrom_unknown_command = 0; + cmd_len = command_lengths[cdrom_command & 0x0f]; -#if 0 if (cmd_len < 0) { #if AKIKO_DEBUG_IO_CMD write_log (L"unknown command %x\n", cdrom_command & 0x0f); #endif - cmd_len = 1; + cdrom_unknown_command = 1; + cdrom_command_active = 1; + cdrom_command_length = 1; + set_status (CDINTERRUPT_TXDMADONE); + return; } -#endif + #if AKIKO_DEBUG_IO_CMD write_log (L"IN:"); #endif @@ -1025,7 +1028,7 @@ static void cdrom_run_command_run (void) } if (len == 0) return; - if (cdrom_checksum_error) + if (cdrom_checksum_error || cdrom_unknown_command) cdrom_result_buffer[1] |= 0x80; cdrom_start_return_data (len); } diff --git a/cfgfile.cpp b/cfgfile.cpp index b287cd9a..0f7e8c3a 100644 --- a/cfgfile.cpp +++ b/cfgfile.cpp @@ -674,7 +674,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type) cfgfile_write (f, L"gfx_refreshrate", L"%d", p->gfx_refreshrate); cfgfile_write_bool (f, L"gfx_autoresolution", p->gfx_autoresolution); cfgfile_write_str (f, L"gfx_vsync", vsyncmodes[p->gfx_avsync]); - cfgfile_write_bool (f, L"gfx_vsync_picasso", p->gfx_pvsync); + cfgfile_write_str (f, L"gfx_vsync_picasso", vsyncmodes[p->gfx_pvsync]); cfgfile_write_bool (f, L"gfx_lores", p->gfx_resolution == 0); cfgfile_write_str (f, L"gfx_resolution", lorestype1[p->gfx_resolution]); cfgfile_write_str (f, L"gfx_lores_mode", loresmode[p->gfx_lores_mode]); @@ -1190,7 +1190,6 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) || cfgfile_yesno (option, value, L"avoid_cmov", &p->avoid_cmov) || cfgfile_yesno (option, value, L"log_illegal_mem", &p->illegal_mem) || cfgfile_yesno (option, value, L"filesys_no_fsdb", &p->filesys_no_uaefsdb) - || cfgfile_yesno (option, value, L"gfx_vsync_picasso", &p->gfx_pvsync) || cfgfile_yesno (option, value, L"gfx_blacker_than_black", &p->gfx_blackerthanblack) || cfgfile_yesno (option, value, L"gfx_flickerfixer", &p->gfx_scandoubler) || cfgfile_yesno (option, value, L"synchronize_clock", &p->tod_hack) @@ -1234,10 +1233,15 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value) if (_tcscmp (option, L"gfx_vsync") == 0) { - if (cfgfile_strboolval (option, value, L"gfx_vsync", &p->gfx_avsync, vsyncmodes, 0) >= 0) + if (cfgfile_strval (option, value, L"gfx_vsync", &p->gfx_avsync, vsyncmodes, 0) >= 0) return 1; return cfgfile_yesno (option, value, L"gfx_vsync", &p->gfx_avsync); } + if (_tcscmp (option, L"gfx_vsync_picasso") == 0) { + if (cfgfile_strval (option, value, L"gfx_vsync_picasso", &p->gfx_pvsync, vsyncmodes, 0) >= 0) + return 1; + return cfgfile_yesno (option, value, L"gfx_vsync_picasso", &p->gfx_pvsync); + } if (cfgfile_yesno (option, value, L"show_leds", &vb)) { if (vb) diff --git a/drawing.cpp b/drawing.cpp index e1f80d9f..8a4e1646 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -1773,7 +1773,7 @@ STATIC_INLINE void do_flush_screen (int start, int stop) unlockscr (); if (start <= stop) flush_screen (start, stop); - else if (currprefs.gfx_afullscreen == 1 && currprefs.gfx_avsync) + else if (currprefs.gfx_afullscreen == GFX_FULLSCREEN && currprefs.gfx_avsync) flush_screen (0, 0); /* vsync mode */ } diff --git a/gencpu.cpp b/gencpu.cpp index 476d5312..3b5afb51 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -2112,8 +2112,6 @@ static void gen_opcode (unsigned long int opcode) if (next_cpu_level < 0) next_cpu_level = 0; printf ("\tuae_u16 newsr; uae_u32 newpc;\n"); - if (using_ce020) // need some delay so that interrupts have time to clear if previous ins was move to INTREQ - printf ("\tdo_cycles_ce (6 * CYCLE_UNIT);\n"); printf ("\tfor (;;) {\n"); printf ("\t\tuaecptr a = m68k_areg (regs, 7);\n"); printf ("\t\tuae_s16 sr = %s (a);\n", srcw); diff --git a/include/newcpu.h b/include/newcpu.h index d9a398bf..011f76b5 100644 --- a/include/newcpu.h +++ b/include/newcpu.h @@ -106,17 +106,12 @@ struct cache030 }; #define CACHESETS040 64 -struct cache040set -{ - uae_u32 data[4]; - bool valid[4]; - uae_u32 tag; -}; #define CACHELINES040 4 struct cache040 { - struct cache040set cs[4]; - int count; + uae_u32 data[CACHELINES040][4]; + bool valid[CACHELINES040]; + uae_u32 tag[CACHELINES040]; }; struct regstruct diff --git a/include/options.h b/include/options.h index e170f735..9d801a0d 100644 --- a/include/options.h +++ b/include/options.h @@ -174,7 +174,7 @@ struct uae_prefs { bool gfx_autoresolution; bool gfx_scandoubler; int gfx_refreshrate; - bool gfx_avsync, gfx_pvsync; + int gfx_avsync, gfx_pvsync; int gfx_resolution; int gfx_lores_mode; int gfx_linedbl; diff --git a/newcpu.cpp b/newcpu.cpp index b4ffd4f5..d0e70312 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -206,7 +206,7 @@ static void set_x_funcs (void) static void set_cpu_caches (void) { - int i, j; + int i; #ifdef JIT if (currprefs.cachesize) { @@ -261,12 +261,10 @@ static void set_cpu_caches (void) } else if (currprefs.cpu_model == 68040) { if (!(regs.cacr & 0x8000)) { for (i = 0; i < CACHESETS040; i++) { - for (j = 0; j < CACHELINES040; j++) { - caches040[i].cs[j].valid[0] = 0; - caches040[i].cs[j].valid[1] = 0; - caches040[i].cs[j].valid[2] = 0; - caches040[i].cs[j].valid[3] = 0; - } + caches040[i].valid[0] = 0; + caches040[i].valid[1] = 0; + caches040[i].valid[2] = 0; + caches040[i].valid[3] = 0; } regs.prefetch020addr = 0xff000000; } @@ -1193,6 +1191,11 @@ void REGPARAM2 MakeFromSR (void) int oldm = regs.m; int olds = regs.s; + if (currprefs.cpu_cycle_exact && currprefs.cpu_model >= 68020) { + do_cycles_ce (6 * CYCLE_UNIT); + regs.ce020memcycles = 0; + } + SET_XFLG ((regs.sr >> 4) & 1); SET_NFLG ((regs.sr >> 3) & 1); SET_ZFLG ((regs.sr >> 2) & 1); @@ -2357,11 +2360,13 @@ unsigned long REGPARAM2 op_illg (uae_u32 opcode) warned++; } Exception (0xA, 0); + //activate_debugger(); return 4; } if (warned < 20) { write_log (L"Illegal instruction: %04x at %08X -> %08X\n", opcode, pc, get_long (regs.vbr + 0x10)); warned++; + //activate_debugger(); } Exception (4, 0); @@ -3796,7 +3801,7 @@ uae_u8 *restore_cpu (uae_u8 *src) changed_prefs.address_space_24 = 0; if (flags & CPUTYPE_EC) changed_prefs.address_space_24 = 1; - if (model > 68000) + if (model > 68020) changed_prefs.cpu_compatible = 0; currprefs.address_space_24 = changed_prefs.address_space_24; currprefs.cpu_compatible = changed_prefs.cpu_compatible; @@ -4251,42 +4256,42 @@ int getDivs68kCycles (uae_s32 dividend, uae_s16 divisor) return mcycles * 2; } -#if 0 + STATIC_INLINE void fill_cache040 (uae_u32 addr) { - int index, i, j; + int index, i, lws; uae_u32 tag; uae_u32 data; struct cache040 *c; + static int linecnt; addr &= ~15; index = (addr >> 4) & (CACHESETS040 - 1); tag = regs.s | (addr & ~((CACHESETS040 << 4) - 1)); + lws = (addr >> 2) & 3; c = &caches040[index]; for (i = 0; i < CACHELINES040; i++) { - struct cache040set *cs = &c->cs; - for (j = 0; j < 4; j++) { - if (cs->valid[j] && c->tag == tag[j]) { - // cache hit - regs.prefetch020addr = addr; - regs.prefetch020data = c->data[j]; - return; - } if (cs->valid[j] == 0) { - inv = &cs->valid[j]; - } + if (c->valid[i] && c->tag[i] == tag) { + // cache hit + regs.prefetch020addr = addr; + regs.prefetch020data = c->data[i][lws]; + return; } } // cache miss - data = mem_access_delay_longi_read_020 (addr); - if (1) { - c->tag = tag; - c->valid = !!(regs.cacr & 0x8000); - c->data = data; + data = mem_access_delay_longi_read_ce020 (addr); + int line = linecnt; + for (i = 0; i < CACHELINES040; i++) { + int line = (linecnt + i) & (CACHELINES040 - 1); + if (c->tag[i] != tag || c->valid[i] == false) { + c->tag[i] = tag; + c->valid[i] = true; + c->data[i][0] = data; + } } regs.prefetch020addr = addr; regs.prefetch020data = data; } -#endif // this one is really simple and easy void fill_icache020 (uae_u32 addr) @@ -4395,6 +4400,10 @@ void write_dcache030 (uaecptr addr, uae_u32 val, int size) return; c1 = getcache030 (dcaches030, addr, &tag1, &lws1); + if (!(regs.cacr & 0x2000)) { // write allocate + if (c1->tag != tag1 || c1->valid[lws1] == false) + return; + } #if 0 uaecptr a = 0x1db0c; diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index 03792a58..25c752dd 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -105,7 +105,7 @@ static HANDLE kbhandle = INVALID_HANDLE_VALUE; static int oldleds, oldusedleds, newleds, oldusbleds; static int normalmouse, supermouse, rawmouse, winmouse, winmousenumber, winmousemode, winmousewheelbuttonstart; static int normalkb, superkb, rawkb; -static bool rawinput_enabled; +static bool rawinput_enabled_mouse, rawinput_enabled_keyboard; int no_rawinput = 0; int dinput_enum_all; @@ -737,9 +737,6 @@ static int initialize_rawinput (void) int rmouse = 0, rkb = 0; TCHAR tmp[100]; - if (no_rawinput) - goto error; - bufsize = 10000 * sizeof (TCHAR); buf = xmalloc (TCHAR, bufsize / sizeof (TCHAR)); @@ -901,7 +898,6 @@ static int initialize_rawinput (void) rawinput_available = 1; return 1; -error: write_log (L"RAWINPUT not available or failed to initialize\n"); error2: xfree (ridl); @@ -1465,20 +1461,12 @@ static int di_do_init (void) di_dev_free (&di_mouse[i]); di_dev_free (&di_keyboard[i]); } - write_log (L"RawInput enumeration..\n"); - initialize_rawinput (); - if (num_keyboard == 0 || num_mouse == 0) { - write_log (L"Disabling RAWINPUT, keyboard or mouse missing\n"); - num_keyboard = num_mouse = 0; - for (i = 0; i < MAX_INPUT_DEVICES; i++) { - di_dev_free (&di_joystick[i]); - di_dev_free (&di_mouse[i]); - di_dev_free (&di_keyboard[i]); - } - rawinput_enabled = false; - } else { - rawinput_enabled = true; + if (!no_rawinput) { + write_log (L"RawInput enumeration..\n"); + initialize_rawinput (); } + rawinput_enabled_keyboard = num_keyboard > 0; + rawinput_enabled_mouse = num_mouse > 0; hr = DirectInput8Create (hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID *)&g_lpdi, NULL); if (FAILED(hr)) { @@ -1488,11 +1476,11 @@ static int di_do_init (void) write_log (L"DirectInput enumeration..\n"); g_lpdi->EnumDevices (DI8DEVCLASS_ALL, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); } else { - if (!rawinput_enabled) { + if (!rawinput_enabled_keyboard) { write_log (L"DirectInput enumeration.. Keyboards..\n"); g_lpdi->EnumDevices (DI8DEVCLASS_KEYBOARD, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); } - if (!rawinput_enabled) { + if (!rawinput_enabled_mouse) { write_log (L"DirectInput enumeration.. Pointing devices..\n"); g_lpdi->EnumDevices (DI8DEVCLASS_POINTER, di_enumcallback, 0, DIEDFL_ATTACHEDONLY); } @@ -1789,12 +1777,10 @@ static void read_mouse (void) static int get_mouse_flags (int num) { - if (di_mouse[num].rawinput) + if (di_mouse[num].rawinput || !rawinput_enabled_mouse) return 0; if (di_mouse[num].catweasel) return 0; - if (di_mouse[num].wininput == 1 && !rawinput_available) - return 0; return 1; } struct inputdevice_functions inputdevicefunc_mouse = { @@ -2177,11 +2163,10 @@ static void read_kb (void) elements = DI_KBBUFFER; hr = IDirectInputDevice8_GetDeviceData (lpdi, sizeof (DIDEVICEOBJECTDATA), didod, &elements, 0); if ((SUCCEEDED (hr) || hr == DI_BUFFEROVERFLOW) && (isfocus () || istest)) { -// if (did->superdevice && (normalkb || rawkb)) -// continue; for (j = 0; j < elements; j++) { int scancode = didod[j].dwOfs; int pressed = (didod[j].dwData & 0x80) ? 1 : 0; + //write_log (L"%d: %02X %d\n", j, scancode, pressed); if (!istest) scancode = keyhack (scancode, pressed, i); @@ -2189,7 +2174,16 @@ static void read_kb (void) continue; di_keycodes[i][scancode] = pressed; if (istest) { - inputdevice_testrecord (IDTYPE_KEYBOARD, i, IDEV_WIDGET_BUTTON, scancode, pressed); + if (pressed && (scancode == DIK_F12 || scancode == DIK_F11)) + return; + if (scancode == DIK_F12) + scancode = -1; + if (scancode == DIK_F11) { + inputdevice_testrecord (IDTYPE_KEYBOARD, i, IDEV_WIDGET_BUTTON, 0x100, 1); + inputdevice_testrecord (IDTYPE_KEYBOARD, i, IDEV_WIDGET_BUTTON, 0x100, 0); + } else { + inputdevice_testrecord (IDTYPE_KEYBOARD, i, IDEV_WIDGET_BUTTON, scancode, pressed); + } } else { if (stopoutput == 0) my_kbd_handler (i, scancode, pressed); @@ -2265,13 +2259,7 @@ void wait_keyrelease (void) static int get_kb_flags (int num) { - if (di_keyboard[num].rawinput) - return 0; - if (di_keyboard[num].catweasel) - return 0; - if (di_keyboard[num].wininput == 1 && !rawinput_available) - return 0; - return 1; + return 0; } struct inputdevice_functions inputdevicefunc_keyboard = { @@ -2578,7 +2566,7 @@ int dinput_wmkey (uae_u32 key) int input_get_default_keyboard (int i) { - if (rawinput_enabled) { + if (rawinput_enabled_keyboard) { return 1; } else { if (i == 0) diff --git a/od-win32/hardfile_win32.cpp b/od-win32/hardfile_win32.cpp index 443acab7..410e45ee 100644 --- a/od-win32/hardfile_win32.cpp +++ b/od-win32/hardfile_win32.cpp @@ -17,6 +17,8 @@ #include "zfile.h" #define hfd_log write_log +#define hdf_log2 +//#define hdf_log2 write_log #ifdef WINDDK #include @@ -121,23 +123,33 @@ static int getsignfromhandle (HANDLE h, DWORD *sign, DWORD *pstyle) *sign = dli->Mbr.Signature; *pstyle = dli->PartitionStyle; ok = 1; - } else if (DeviceIoControl (h, IOCTL_DISK_GET_DRIVE_LAYOUT, NULL, 0, dli, outsize, &written, NULL)) { - DRIVE_LAYOUT_INFORMATION *dli2 = (DRIVE_LAYOUT_INFORMATION*)dli; - *sign = dli2->Signature; - *pstyle = PARTITION_STYLE_MBR; - ok = 1; + } else { + hdf_log2 (L"IOCTL_DISK_GET_DRIVE_LAYOUT_EX() returned %08x\n", GetLastError ()); + } + if (!ok) { + if (DeviceIoControl (h, IOCTL_DISK_GET_DRIVE_LAYOUT, NULL, 0, dli, outsize, &written, NULL)) { + DRIVE_LAYOUT_INFORMATION *dli2 = (DRIVE_LAYOUT_INFORMATION*)dli; + *sign = dli2->Signature; + *pstyle = PARTITION_STYLE_MBR; + ok = 1; + } else { + hdf_log2 (L"IOCTL_DISK_GET_DRIVE_LAYOUT() returned %08x\n", GetLastError ()); + } } + hdf_log2 (L"getsignfromhandle(signature=%08X,pstyle=%d)\n", *sign, *pstyle); xfree (dli); return ok; } -static int ismounted (HANDLE hd) +static int ismounted (const TCHAR *name, HANDLE hd) { HANDLE h; TCHAR volname[MAX_DPATH]; int mounted; DWORD sign, pstyle; + hdf_log2 (L"\n"); + hdf_log2 (L"Name='%s'\n", name); if (!getsignfromhandle (hd, &sign, &pstyle)) return 0; if (pstyle == PARTITION_STYLE_GPT) @@ -152,25 +164,31 @@ static int ismounted (HANDLE hd) volname[_tcslen (volname) - 1] = 0; d = CreateFile (volname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + hdf_log2 (L"volname='%s' %08x\n", volname, d); if (d != INVALID_HANDLE_VALUE) { DWORD isntfs, outsize, written; isntfs = 0; if (DeviceIoControl (d, FSCTL_IS_VOLUME_MOUNTED, NULL, 0, NULL, 0, &written, NULL)) { VOLUME_DISK_EXTENTS *vde; NTFS_VOLUME_DATA_BUFFER ntfs; + hdf_log2 (L"FSCTL_IS_VOLUME_MOUNTED returned is mounted\n"); if (DeviceIoControl (d, FSCTL_GET_NTFS_VOLUME_DATA, NULL, 0, &ntfs, sizeof ntfs, &written, NULL)) { isntfs = 1; } + hdf_log2 (L"FSCTL_GET_NTFS_VOLUME_DATA returned %d\n", isntfs); outsize = sizeof (VOLUME_DISK_EXTENTS) + sizeof (DISK_EXTENT) * 32; vde = (VOLUME_DISK_EXTENTS*)xmalloc (uae_u8, outsize); if (DeviceIoControl (d, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, NULL, 0, vde, outsize, &written, NULL)) { int i; + hdf_log2 (L"IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returned %d extents\n", vde->NumberOfDiskExtents); for (i = 0; i < vde->NumberOfDiskExtents; i++) { TCHAR pdrv[MAX_DPATH]; HANDLE ph; _stprintf (pdrv, L"\\\\.\\PhysicalDrive%d", vde->Extents[i].DiskNumber); ph = CreateFile (pdrv, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + hdf_log2 (L"PhysicalDrive%d: Extent %d Start=%I64X Len=%I64X\n", i, + vde->Extents[i].DiskNumber, vde->Extents[i].StartingOffset.QuadPart, vde->Extents[i].ExtentLength.QuadPart); if (ph != INVALID_HANDLE_VALUE) { DWORD sign2; if (getsignfromhandle (ph, &sign2, &pstyle)) { @@ -180,7 +198,11 @@ static int ismounted (HANDLE hd) CloseHandle (ph); } } + } else { + hdf_log2 (L"IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returned %08x\n", GetLastError ()); } + } else { + hdf_log2 (L"FSCTL_IS_VOLUME_MOUNTED returned not mounted\n"); } CloseHandle (d); } else { @@ -190,6 +212,7 @@ static int ismounted (HANDLE hd) break; } FindVolumeClose (h); + hdf_log2 (L"\n"); return mounted; } @@ -265,7 +288,7 @@ static int safetycheck (HANDLE h, const TCHAR *name, uae_u64 offset, uae_u8 *buf return -7; } } - mounted = ismounted (h); + mounted = ismounted (name, h); if (!mounted) { write_log (L"hd accepted, not empty and not mounted in Windows\n"); return -8; @@ -274,10 +297,11 @@ static int safetycheck (HANDLE h, const TCHAR *name, uae_u64 offset, uae_u8 *buf write_log (L"hd ignored, NTFS partitions\n"); return 0; } - if (harddrive_dangerous == 0x1234dead) - return -6; - write_log (L"hd ignored, not empty and no RDB detected or Windows mounted\n"); - return 0; + return -6; + //if (harddrive_dangerous == 0x1234dead) + // return -6; + //write_log (L"hd ignored, not empty and no RDB detected or Windows mounted\n"); + //return 0; } write_log (L"hd accepted (empty)\n"); return -9; diff --git a/od-win32/resources/winuae.rc b/od-win32/resources/winuae.rc index 3036de62..21cb1342 100644 --- a/od-win32/resources/winuae.rc +++ b/od-win32/resources/winuae.rc @@ -879,7 +879,7 @@ FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN GROUPBOX "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54 RTEXT "Model:",IDC_STATIC,5,14,50,10,SS_CENTERIMAGE - COMBOBOX IDC_QUICKSTART_MODEL,59,12,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_QUICKSTART_MODEL,59,12,192,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP RTEXT "Configuration:",IDC_STATIC,5,33,50,10,SS_CENTERIMAGE COMBOBOX IDC_QUICKSTART_CONFIGURATION,59,31,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP GROUPBOX "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33 @@ -906,6 +906,8 @@ BEGIN GROUPBOX "Mode",IDC_STATIC,190,211,107,27,BS_LEFT CONTROL "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10 COMBOBOX IDC_CD0Q_TYPE,191,173,63,50,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP + CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,256,15,35,10 END IDD_FRONTEND DIALOGEX 0, 0, 420, 242 @@ -1203,6 +1205,10 @@ BEGIN BEGIN END + IDD_CHIPSET, DIALOG + BEGIN + END + IDD_INPUT, DIALOG BEGIN END @@ -1228,6 +1234,10 @@ BEGIN BEGIN END + IDD_QUICKSTART, DIALOG + BEGIN + END + IDD_FRONTEND, DIALOG BEGIN END diff --git a/od-win32/win32.h b/od-win32/win32.h index 9c5c53ec..c28a3310 100644 --- a/od-win32/win32.h +++ b/od-win32/win32.h @@ -18,8 +18,8 @@ #define WINUAEPUBLICBETA 1 #define LANG_DLL 1 -#define WINUAEBETA L"4" -#define WINUAEDATE MAKEBD(2010, 5, 22) +#define WINUAEBETA L"5" +#define WINUAEDATE MAKEBD(2010, 5, 26) #define WINUAEEXTRA L"" #define WINUAEREV L"" diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index d4681cfa..0084b08c 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -136,7 +136,7 @@ void WIN32GUI_LoadUIString (DWORD id, TCHAR *string, DWORD dwStringLen) } static int quickstart_model = 0, quickstart_conf = 0, quickstart_compa = 1; -static int quickstart_floppy = 1, quickstart_cd = 0; +static int quickstart_floppy = 1, quickstart_cd = 0, quickstart_ntsc = 0; static int quickstart_cdtype = 0; static int quickstart_ok, quickstart_ok_floppy; static void addfloppytype (HWND hDlg, int n); @@ -4578,6 +4578,7 @@ static void load_quickstart (HWND hDlg, int romcheck) ew (guiDlg, IDC_RESETAMIGA, FALSE); workprefs.nr_floppies = quickstart_floppy; quickstart_ok = built_in_prefs (&workprefs, quickstart_model, quickstart_conf, quickstart_compa, romcheck); + workprefs.ntscmode = quickstart_ntsc != 0; quickstart_cd = workprefs.dfxtype[1] == DRV_NONE && (quickstart_model == 8 || quickstart_model == 9); enable_for_quickstart (hDlg); addfloppytype (hDlg, 0); @@ -4629,6 +4630,7 @@ static void init_quickstartdlg (HWND hDlg) regqueryint (NULL, L"QuickStartCompatibility", &quickstart_compa); regqueryint (NULL, L"QuickStartFloppies", &quickstart_floppy); regqueryint (NULL, L"QuickStartCDType", &quickstart_cdtype); + regqueryint (NULL, L"QuickStartNTSC", &quickstart_ntsc); if (quickstart) { workprefs.df[0][0] = 0; workprefs.df[1][0] = 0; @@ -4642,6 +4644,7 @@ static void init_quickstartdlg (HWND hDlg) firsttime = 1; CheckDlgButton (hDlg, IDC_QUICKSTARTMODE, quickstart); + CheckDlgButton (hDlg, IDC_NTSC, quickstart_ntsc != 0); WIN32GUI_LoadUIString (IDS_QS_MODELS, tmp1, sizeof (tmp1) / sizeof (TCHAR)); _tcscat (tmp1, L"\n"); @@ -4914,6 +4917,14 @@ static INT_PTR CALLBACK QuickstartDlgProc (HWND hDlg, UINT msg, WPARAM wParam, L } else { switch (LOWORD (wParam)) { + case IDC_NTSC: + quickstart_ntsc = ischecked (hDlg, IDC_NTSC); + regsetint (NULL, L"QuickStartNTSC", quickstart_ntsc); + if (quickstart) { + init_quickstartdlg (hDlg); + load_quickstart (hDlg, 0); + } + break; case IDC_QUICKSTARTMODE: quickstart = ischecked (hDlg, IDC_QUICKSTARTMODE); regsetint (NULL, L"QuickStartMode", quickstart); @@ -5317,7 +5328,7 @@ static int display_toselect (int fs, int vsync, int p96) return 3; return fs; } -static void display_fromselect (int val, int *fs, bool *vsync, int p96) +static void display_fromselect (int val, int *fs, int *vsync, int p96) { int ofs = *fs; if (val == CB_ERR) -- 2.47.3