--- np2/i286x/v30patch.cpp 2005/02/08 09:57:26 1.9 +++ np2/i286x/v30patch.cpp 2005/03/03 06:59:41 1.11 @@ -11,6 +11,9 @@ #include "i286x.mcr" #include "i286xea.mcr" #include "dmax86.h" +#if defined(ENABLE_TRAP) +#include "steptrap.h" +#endif typedef struct { @@ -25,7 +28,7 @@ static I286TBL v30ope0xf6_xtable[8]; static I286TBL v30ope0xf7_xtable[8]; -static const BYTE shiftbase16[256] = +static const UINT8 shiftbase16[256] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, @@ -43,7 +46,7 @@ static const BYTE shiftbase16[256] = 16, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15}; -static const BYTE shiftbase09[256] = +static const UINT8 shiftbase09[256] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, @@ -61,7 +64,7 @@ static const BYTE shiftbase09[256] = 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3}; -static const BYTE shiftbase17[256] = +static const UINT8 shiftbase17[256] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, 16,17, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, 15,16,17, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13, @@ -1184,7 +1187,13 @@ LABEL void v30x(void) { jne short v30_dma_mnlp align 4 -v30_mnlp: movzx eax, bl +v30_mnlp: +#if defined(ENABLE_TRAP) + mov edx, esi + movzx ecx, I286_CS + call steptrap +#endif + movzx eax, bl call v30op[eax*4] cmp I286_REMCLOCK, 0 jg v30_mnlp @@ -1194,7 +1203,13 @@ v30_mnlp: movzx eax, bl ret align 4 -v30_dma_mnlp: movzx eax, bl +v30_dma_mnlp: +#if defined(ENABLE_TRAP) + mov edx, esi + movzx ecx, I286_CS + call steptrap +#endif + movzx eax, bl call v30op[eax*4] call dmax86 cmp I286_REMCLOCK, 0 @@ -1205,7 +1220,13 @@ v30_dma_mnlp: movzx eax, bl ret align 4 -v30_trapping: movzx eax, bl +v30_trapping: +#if defined(ENABLE_TRAP) + mov edx, esi + movzx ecx, I286_CS + call steptrap +#endif + movzx eax, bl call v30op[eax*4] cmp I286_TRAP, 0 je v30notrap