--- np2/trap/steptrap.c 2005/03/03 06:59:42 1.1 +++ np2/trap/steptrap.c 2005/04/08 19:39:09 1.5 @@ -1,11 +1,14 @@ -// #define IPTRACE (1 << 12) +#define IPTRACE (1 << 12) #include "compiler.h" #if defined(ENABLE_TRAP) #include "dosio.h" +#include "pccore.h" #include "cpucore.h" +#include "sound.h" +#include "fmboard.h" #include "steptrap.h" @@ -17,7 +20,7 @@ static UINT32 treip[IPTRACE]; void CPUCALL steptrap(UINT cs, UINT32 eip) { -// TRACEOUT(("%.4x:%.4x", CPU_CS, CPU_IP)); +// TRACEOUT(("%.4x:%.4x", cs, eip)); #if IPTRACE trcs[trpos & (IPTRACE - 1)] = cs; @@ -27,6 +30,41 @@ void CPUCALL steptrap(UINT cs, UINT32 ei // ---- ここにトラップ条件コードを書きます +// return; + +// if (cs4231.intflag) TRACEOUT(("%.4x:%.4x", cs, eip)); + if (cs == 0x1311) TRACEOUT(("%.4x:%.4x", cs, eip)); + if (cs == 0x0d77) TRACEOUT(("%.4x:%.4x", cs, eip)); + if (cs == 0x0f5d) TRACEOUT(("%.4x:%.4x", cs, eip)); + if (cs == 0x0e91) TRACEOUT(("%.4x:%.4x", cs, eip)); + +#if 0 +{ + static UINT tmp = 0; + if (tmp != *(UINT16 *)(mem + 0xa0000 + 18 * 2)) { + TRACEOUT(("change text %.4x -> %.4x at %.4x:%.4x", tmp, *(UINT16 *)(mem + 0xa0000 + 18 * 2), cs, eip)); + tmp = *(UINT16 *)(mem + 0xa0000 + 18 * 2); + if (tmp == 0x4303) { + steptrap_hisfileout(); + } + } +} +#endif + + + // IDEテスト用 +#if 0 + if ((cs == 0x1300) && (eip == 0x1E97)) { + TRACEOUT(("-------- NECCD: function: %.2x", CPU_AL)); + } + if (cs == 0xdf6) TRACEOUT(("%.4x:%.4x", CPU_CS, CPU_IP)); +#endif +#if 1 + if ((cs == 0x0620) && (eip == 0x1E97)) { + TRACEOUT(("-------- NECCD: function: %.2x", CPU_AL)); + } +#endif + return; #if 0