cache variable, without it is unusably slow in debug mode

This commit is contained in:
Ian Curtis 2020-06-12 17:33:21 +00:00
parent 8b4a4ec93f
commit d688fdd3d5
2 changed files with 7 additions and 5 deletions

View file

@ -971,7 +971,7 @@ UINT8 CModel3::Read8(UINT32 addr)
} }
#endif #endif
#ifdef NET_BOARD #ifdef NET_BOARD
if (m_game.stepping != "1.0" && (NetBoard.IsAttached() && (m_config["EmulateNet"].ValueAs<bool>()))) // check for Step 1.0 if (m_runNetBoard)
{ {
switch ((addr & 0x3ffff) >> 16) switch ((addr & 0x3ffff) >> 16)
{ {
@ -1274,7 +1274,7 @@ UINT32 CModel3::Read32(UINT32 addr)
break; break;
#endif #endif
#ifdef NET_BOARD #ifdef NET_BOARD
if (m_game.stepping != "1.0" && (NetBoard.IsAttached() && (m_config["EmulateNet"].ValueAs<bool>()))) // check for Step 1.0 if (m_runNetBoard)
{ {
UINT32 result; UINT32 result;
@ -1450,7 +1450,7 @@ void CModel3::Write8(UINT32 addr, UINT8 data)
goto Unknown8; goto Unknown8;
#endif #endif
#ifdef NET_BOARD #ifdef NET_BOARD
if (m_game.stepping != "1.0" && (NetBoard.IsAttached() && (m_config["EmulateNet"].ValueAs<bool>()))) if (m_runNetBoard)
{ {
//printf("CModel 3 : write8 %x<-%x\n", addr, data); //printf("CModel 3 : write8 %x<-%x\n", addr, data);
@ -1792,7 +1792,7 @@ void CModel3::Write32(UINT32 addr, UINT32 data)
goto Unknown32; goto Unknown32;
#endif #endif
#ifdef NET_BOARD #ifdef NET_BOARD
if (m_game.stepping != "1.0" && (NetBoard.IsAttached() && (m_config["EmulateNet"].ValueAs<bool>()))) // assuming there is no scsi card for step>1.0 because same address for network card (right or wrong ??) if (m_runNetBoard)
{ {
switch ((addr & 0x3ffff) >> 16) switch ((addr & 0x3ffff) >> 16)
{ {
@ -2472,7 +2472,7 @@ void CModel3::DumpTimings(void)
timings.sndTicks, (timings.sndTicks > 10 ? '!' : ','), timings.sndTicks, (timings.sndTicks > 10 ? '!' : ','),
timings.drvTicks, (timings.drvTicks > 10 ? '!' : ','), timings.drvTicks, (timings.drvTicks > 10 ? '!' : ','),
#ifdef NET_BOARD #ifdef NET_BOARD
timings.netTicks, (timings.netTicks > 10 ? '!' : ','), timings.netTicks, (timings.netTicks > 10 ? '!' : ','), // TODO fix this line 'printf' : too many arguments passed for format string
#endif #endif
timings.frameTicks, (timings.frameTicks > 16 ? '!' : ' ')); timings.frameTicks, (timings.frameTicks > 16 ? '!' : ' '));
} }
@ -3125,6 +3125,7 @@ bool CModel3::Init(void)
#ifdef NET_BOARD #ifdef NET_BOARD
netRAM = &memoryPool[OFFSET_NETRAM]; netRAM = &memoryPool[OFFSET_NETRAM];
netBuffer = &memoryPool[OFFSET_NETBUFFER]; netBuffer = &memoryPool[OFFSET_NETBUFFER];
m_runNetBoard = m_game.stepping != "1.0" && (NetBoard.IsAttached() && (m_config["EmulateNet"].ValueAs<bool>()));
#endif #endif
SetCROMBank(0xFF); SetCROMBank(0xFF);

View file

@ -309,6 +309,7 @@ private:
CJTAG m_jtag; // JTAG interface CJTAG m_jtag; // JTAG interface
#ifdef NET_BOARD #ifdef NET_BOARD
CNetBoard NetBoard; // Net board CNetBoard NetBoard; // Net board
bool m_runNetBoard;
#endif #endif
}; };