Add a debug function to log all access to IO regs.

This commit is contained in:
Godzil
2021-04-04 21:05:48 +01:00
parent a89e253d9c
commit e4cf98bfe1
2 changed files with 30 additions and 2 deletions

View File

@@ -38,6 +38,7 @@
/* cpu state */
/***************************************************************************/
uint64_t nec_monotonicCycles;
int nec_ICount;
nec_Regs I;
@@ -65,6 +66,7 @@ void nec_reset (void *param)
unsigned int i,j,c;
BREGS reg_name[8]= { AL, CL, DL, BL, AH, CH, DH, BH };
nec_monotonicCycles = 0;
memset( &I, 0, sizeof(I) );
@@ -3912,7 +3914,7 @@ const char *instructionsName[256] =
int nec_execute(int cycles)
{
int done;
nec_ICount=cycles;
// cpu_type=V30;
@@ -3928,6 +3930,10 @@ int nec_execute(int cycles)
// nec_ICount++;
}
return cycles - nec_ICount;
done = cycles - nec_ICount;
nec_monotonicCycles += done;
return done;
}