#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"
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;
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
}
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);
}
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]);
|| 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)
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)
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 */
}
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);
};
#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
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;
static void set_cpu_caches (void)
{
- int i, j;
+ int i;
#ifdef JIT
if (currprefs.cachesize) {
} 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;
}
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);
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);
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;
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)
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;
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;
int rmouse = 0, rkb = 0;
TCHAR tmp[100];
- if (no_rawinput)
- goto error;
-
bufsize = 10000 * sizeof (TCHAR);
buf = xmalloc (TCHAR, bufsize / sizeof (TCHAR));
rawinput_available = 1;
return 1;
-error:
write_log (L"RAWINPUT not available or failed to initialize\n");
error2:
xfree (ridl);
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)) {
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);
}
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 = {
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);
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);
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 = {
int input_get_default_keyboard (int i)
{
- if (rawinput_enabled) {
+ if (rawinput_enabled_keyboard) {
return 1;
} else {
if (i == 0)
#include "zfile.h"
#define hfd_log write_log
+#define hdf_log2
+//#define hdf_log2 write_log
#ifdef WINDDK
#include <devioctl.h>
*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)
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)) {
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 {
break;
}
FindVolumeClose (h);
+ hdf_log2 (L"\n");
return mounted;
}
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;
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;
BEGIN\r
GROUPBOX "Emulated Hardware",IDC_QUICKSTART_CONFIG,3,0,294,54\r
RTEXT "Model:",IDC_STATIC,5,14,50,10,SS_CENTERIMAGE\r
- COMBOBOX IDC_QUICKSTART_MODEL,59,12,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
+ COMBOBOX IDC_QUICKSTART_MODEL,59,12,192,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
RTEXT "Configuration:",IDC_STATIC,5,33,50,10,SS_CENTERIMAGE\r
COMBOBOX IDC_QUICKSTART_CONFIGURATION,59,31,233,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
GROUPBOX "Compatibility vs Required CPU Power ",IDC_QUICKSTART_COMPA,3,56,294,33\r
GROUPBOX "Mode",IDC_STATIC,190,211,107,27,BS_LEFT\r
CONTROL "Start in Quickstart mode",IDC_QUICKSTARTMODE,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,197,222,94,10\r
COMBOBOX IDC_CD0Q_TYPE,191,173,63,50,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP\r
+ CONTROL "NTSC [] North American and Japanese display standard, 60Hz refresh rate. Other countries use PAL (50Hz. display refresh rate)",IDC_NTSC,\r
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,256,15,35,10\r
END\r
\r
IDD_FRONTEND DIALOGEX 0, 0, 420, 242\r
BEGIN\r
END\r
\r
+ IDD_CHIPSET, DIALOG\r
+ BEGIN\r
+ END\r
+\r
IDD_INPUT, DIALOG\r
BEGIN\r
END\r
BEGIN\r
END\r
\r
+ IDD_QUICKSTART, DIALOG\r
+ BEGIN\r
+ END\r
+\r
IDD_FRONTEND, DIALOG\r
BEGIN\r
END\r
#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""
}
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);
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);
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;
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");
} 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);
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)