|
|
| version 1.37, 2008/05/19 13:24:19 | version 1.38, 2008/06/02 20:07:30 |
|---|---|
| Line 1 | Line 1 |
| // #define SINGLESTEPONLY | /* #define SINGLESTEPONLY */ |
| // #define IPTRACE (1 << 14) | /* #define IPTRACE (1 << 14) */ |
| // #define NEVENT_COUNTER | /* #define NEVENT_COUNTER */ |
| // #define PCCOUNTER | /* #define PCCOUNTER */ |
| // #define IOCOUNTER | /* #define IOCOUNTER */ |
| // #define CTCCOUNTER | /* #define CTCCOUNTER */ |
| #include "compiler.h" | #include "compiler.h" |
| #if defined(TRACE) && IPTRACE | #if defined(TRACE) && IPTRACE |
| Line 52 const OEMCHAR xmilversion[] = OEMTEXT(XM | Line 52 const OEMCHAR xmilversion[] = OEMTEXT(XM |
| CORESTAT corestat; | CORESTAT corestat; |
| // ---- | /* ---- */ |
| void pccore_initialize(void) { | void pccore_initialize(void) { |
| Line 105 void pccore_reset(void) { | Line 105 void pccore_reset(void) { |
| pccore.ROM_TYPE = xmilcfg.ROM_TYPE; | pccore.ROM_TYPE = xmilcfg.ROM_TYPE; |
| #if defined(SUPPORT_TURBOZ) || defined(SUPPORT_OPM) | #if defined(SUPPORT_TURBOZ) || defined(SUPPORT_OPM) |
| if (xmilcfg.ROM_TYPE >= 3) { | if (xmilcfg.ROM_TYPE >= 3) { |
| pccore.SOUND_SW = 1; // 無条件で搭載 | pccore.SOUND_SW = 1; /* 無条件で搭載 */ |
| } | } |
| else { | else { |
| pccore.SOUND_SW = xmilcfg.SOUND_SW; | pccore.SOUND_SW = xmilcfg.SOUND_SW; |
| Line 113 void pccore_reset(void) { | Line 113 void pccore_reset(void) { |
| #endif | #endif |
| pccore.DIP_SW = xmilcfg.DIP_SW; | pccore.DIP_SW = xmilcfg.DIP_SW; |
| // スクリーンモードの変更... | /* スクリーンモードの変更... */ |
| #if defined(SUPPORT_TURBOZ) | #if defined(SUPPORT_TURBOZ) |
| if (pccore.ROM_TYPE >= 3) { | if (pccore.ROM_TYPE >= 3) { |
| if (scrnmng_setcolormode(TRUE) != SUCCESS) { | if (scrnmng_setcolormode(TRUE) != SUCCESS) { |
| Line 135 void pccore_reset(void) { | Line 135 void pccore_reset(void) { |
| ievent_reset(); | ievent_reset(); |
| calendar_reset(); | calendar_reset(); |
| iocore_reset(); | iocore_reset(); |
| // nevent_set(15, 4000000 / (60 * 50), neitem_dummy, NEVENT_RELATIVE); | /* nevent_set(15, 4000000 / (60 * 50), neitem_dummy, NEVENT_RELATIVE); */ |
| pal_reset(); | pal_reset(); |
| makescrn_reset(); | makescrn_reset(); |
| Line 147 void pccore_reset(void) { | Line 147 void pccore_reset(void) { |
| } | } |
| // ---- | /* ---- */ |
| #if defined(TRACE) && IPTRACE | #if defined(TRACE) && IPTRACE |
| static UINT trpos = 0; | static UINT trpos = 0; |
| Line 234 void neitem_vsync(UINT id) { | Line 234 void neitem_vsync(UINT id) { |
| #endif | #endif |
| // ---- | /* ---- */ |
| #if defined(TRACE) && defined(IOCOUNTER) | #if defined(TRACE) && defined(IOCOUNTER) |
| static UINT iocounter = 0; | static UINT iocounter = 0; |
| Line 283 void pccore_exec(BRESULT draw) { | Line 283 void pccore_exec(BRESULT draw) { |
| frameclock = frameclock * pccore.multiple / 2; | frameclock = frameclock * pccore.multiple / 2; |
| #endif | #endif |
| dispclock = min(frameclock, iocore.e.dispclock); | dispclock = min(frameclock, iocore.e.dispclock); |
| // corestat.dispclock = dispclock; | |
| corestat.syncclock = frameclock - dispclock; | corestat.syncclock = frameclock - dispclock; |
| nevent_set(NEVENT_FRAMES, dispclock, neitem_disp, NEVENT_RELATIVE); | nevent_set(NEVENT_FRAMES, dispclock, neitem_disp, NEVENT_RELATIVE); |
| #endif | #endif |
| Line 298 void pccore_exec(BRESULT draw) { | Line 297 void pccore_exec(BRESULT draw) { |
| } | } |
| #else | #else |
| while(CPU_REMCLOCK > 0) { | while(CPU_REMCLOCK > 0) { |
| // TRACEOUT(("%.4x", Z80_PC)); | /* TRACEOUT(("%.4x", Z80_PC)); */ |
| #if defined(TRACE) && IPTRACE | #if defined(TRACE) && IPTRACE |
| treip[trpos & (IPTRACE - 1)] = Z80_PC; | treip[trpos & (IPTRACE - 1)] = Z80_PC; |
| trpos++; | trpos++; |