--- np2/pccore.c 2005/03/05 06:02:28 1.100 +++ np2/pccore.c 2005/05/20 13:59:45 1.106 @@ -141,12 +141,23 @@ static void pccore_set(void) { // HDDの接続 (I/Oの使用状態が変わるので.. if (np2cfg.dipsw[1] & 0x20) { pccore.hddif |= PCHDD_IDE; +#if defined(SUPPORT_IDEIO) + sxsi_setdevtype(0x02, SXSIDEV_CDROM); +#endif + } + else { + sxsi_setdevtype(0x02, SXSIDEV_NC); } // 拡張メモリ extsize = 0; if (!(np2cfg.dipsw[2] & 0x80)) { - extsize = min(np2cfg.EXTMEM, 13); + extsize = np2cfg.EXTMEM; +#if defined(CPUCORE_IA32) + extsize = min(extsize, 63); +#else + extsize = min(extsize, 13); +#endif } pccore.extmem = extsize; CopyMemory(pccore.dipsw, np2cfg.dipsw, 3); @@ -320,7 +331,8 @@ void pccore_reset(void) { } // HDDセット - sxsihdd_allbind(); + diskdrv_hddbind(); + // SASI/IDEどっち? #if defined(SUPPORT_SASI) if (sxsi_issasi()) { pccore.hddif &= ~PCHDD_IDE; @@ -347,7 +359,7 @@ void pccore_reset(void) { cbuscore_reset(); fmboard_reset(pccore.sound); - i286_memorymap((pccore.model & PCMODEL_EPSON)?1:0); + MEMM_ARCH((pccore.model & PCMODEL_EPSON)?1:0); iocore_build(); iocore_bind(); cbuscore_bind(); @@ -374,6 +386,10 @@ void pccore_reset(void) { timing_reset(); soundmng_play(); + +#if 0 && defined(SUPPORT_IDEIO) // Test! + sxsi_devopen(0x02, OEMTEXT("e:\\pn\\pn.iso")); +#endif } static void drawscreen(void) { @@ -548,6 +564,8 @@ void screenvsync(NEVENTITEM item) { // --------------------------------------------------------------------------- +// #define SINGLESTEPONLY + #if defined(TRACE) static int resetcnt = 0; static int execcnt = 0; @@ -586,6 +604,7 @@ void pccore_exec(BOOL draw) { CPU_RESETREQ = 0; CPU_SHUT(); } +#if !defined(SINGLESTEPONLY) if (CPU_REMCLOCK > 0) { if (!(CPU_TYPE & CPUTYPE_V30)) { CPU_EXEC(); @@ -594,6 +613,11 @@ void pccore_exec(BOOL draw) { CPU_EXECV30(); } } +#else + while(CPU_REMCLOCK > 0) { + CPU_STEPEXEC(); + } +#endif nevent_progress(); } artic_callback();