--- np2/pccore.c 2004/01/22 08:40:30 1.46 +++ np2/pccore.c 2004/01/23 12:04:07 1.49 @@ -76,6 +76,7 @@ static const BYTE msw_default[8] = int soundrenewal = 0; BOOL drawframe; UINT drawcount = 0; + BOOL hardwarereset = FALSE; // --------------------------------------------------------------------------- @@ -178,9 +179,9 @@ static void pccore_set(void) { pccore.extmem = 0; // HDDの接続 (I/Oの使用状態が変わるので.. -// if (np2cfg.dipsw[1] & 0x20) { + if (np2cfg.dipsw[1] & 0x20) { pccore.hddif |= PCHDD_IDE; -// } + } pccore.hddif |= PCHDD_SCSI; // サウンドボードの接続 @@ -365,7 +366,6 @@ void pccore_reset(void) { cbuscore_bind(); fmboard_bind(); - timing_reset(); fddmtr_init(); calendar_init(); vram_init(); @@ -396,6 +396,8 @@ void pccore_reset(void) { #if defined(SUPPORT_HOSTDRV) hostdrv_reset(); #endif + + timing_reset(); } static void drawscreen(void) { @@ -605,9 +607,9 @@ static int resetcnt = 0; static int execcnt = 0; int piccnt = 0; int tr = 0; +UINT cflg; #endif - UINT cflg; void pccore_exec(BOOL draw) { @@ -646,7 +648,7 @@ void pccore_exec(BOOL draw) { #endif } -#if 1 // ndef TRACE +#if 0 // ndef TRACE if (CPU_REMCLOCK > 0) { if (!(CPU_TYPE & CPUTYPE_V30)) { CPU_EXEC(); @@ -662,7 +664,9 @@ void pccore_exec(BOOL draw) { trpos++; #endif if (tr) { - TRACEOUT(("%.4x:%.4x", CPU_CS, CPU_IP)); + if ((CPU_CS == 0xf760) || (CPU_CS == 0xf990)) { + TRACEOUT(("%.4x:%.4x", CPU_CS, CPU_IP)); + } } #if 0 if ((tr & 2) && (mem[0x0471e] == '\\')) { @@ -682,8 +686,13 @@ void pccore_exec(BOOL draw) { } } #endif -// i286x_step(); - i286c_step(); +#if 0 + if ((CPU_CS == 0x0620) || (CPU_CS == 0x08a0)) { + TRACEOUT(("%.4x:%.4x", CPU_CS, CPU_IP)); + } +#endif + i286x_step(); +// i286c_step(); } #endif nevent_progress(); @@ -695,6 +704,12 @@ void pccore_exec(BOOL draw) { S98_sync(); sound_sync(); // happy! + if (hardwarereset) { + hardwarereset = FALSE; + pccore_cfgupdate(); + pccore_reset(); + } + #if defined(TRACE) execcnt++; if (execcnt >= 60) {