Commented out verbose/debug output in drive board code for release.

This commit is contained in:
Bart Trzynadlowski 2011-09-22 09:02:50 +00:00
parent 08fe5bb91b
commit 2a314041ad

View file

@ -190,7 +190,7 @@ void CDriveBoard::LoadState(CBlockFile *SaveState)
if (m_attached) if (m_attached)
{ {
if (m_tmpDisabled) if (m_tmpDisabled)
printf("Disabled DriveBoard due to incompatible save state\n"); printf("Disabled DriveBoard due to incompatible save state.\n");
SendStopAll(); SendStopAll();
} }
@ -468,7 +468,7 @@ UINT8 CDriveBoard::Read8(UINT32 addr)
return m_ram[(addr-0xE000)&0x1FFF]; return m_ram[(addr-0xE000)&0x1FFF];
else else
{ {
printf("Unhandled Z80 read of %08X (at PC = %04X)\n", addr, m_z80.GetPC()); //printf("Unhandled Z80 read of %08X (at PC = %04X)\n", addr, m_z80.GetPC());
return 0xFF; return 0xFF;
} }
} }
@ -477,8 +477,10 @@ void CDriveBoard::Write8(UINT32 addr, UINT8 data)
{ {
if (addr >= 0xE000) // RAM is 0xE000-0xFFFF if (addr >= 0xE000) // RAM is 0xE000-0xFFFF
m_ram[(addr-0xE000)&0x1FFF] = data; m_ram[(addr-0xE000)&0x1FFF] = data;
#ifdef DEBUG
else else
printf("Unhandled Z80 write to %08X (at PC = %04X)\n", addr, m_z80.GetPC()); printf("Unhandled Z80 write to %08X (at PC = %04X)\n", addr, m_z80.GetPC());
#endif
} }
UINT8 CDriveBoard::IORead8(UINT32 portNum) UINT8 CDriveBoard::IORead8(UINT32 portNum)
@ -514,14 +516,18 @@ UINT8 CDriveBoard::IORead8(UINT32 portNum)
adcVal = 0x00; adcVal = 0x00;
break; break;
default: default:
#ifdef DEBUG
printf("Unhandled Z80 input on ADC port %u (at PC = %04X)\n", portNum, m_z80.GetPC()); printf("Unhandled Z80 input on ADC port %u (at PC = %04X)\n", portNum, m_z80.GetPC());
#endif
return 0xFF; return 0xFF;
} }
return (adcVal>>m_adcPortBit)&0x01; return (adcVal>>m_adcPortBit)&0x01;
} }
else else
{ {
#ifdef DEBUG
printf("Unhandled Z80 input on ADC port %u (at PC = %04X)\n", portNum, m_z80.GetPC()); printf("Unhandled Z80 input on ADC port %u (at PC = %04X)\n", portNum, m_z80.GetPC());
#endif
return 0xFF; return 0xFF;
} }
case 40: // PPC command case 40: // PPC command
@ -534,7 +540,9 @@ UINT8 CDriveBoard::IORead8(UINT32 portNum)
// 1 1 = encoder error 3 - encoder error, reinitializes board // 1 1 = encoder error 3 - encoder error, reinitializes board
return 0x00; return 0x00;
default: default:
#ifdef DEBUG
printf("Unhandled Z80 input on port %u (at PC = %04X)\n", portNum, m_z80.GetPC()); printf("Unhandled Z80 input on port %u (at PC = %04X)\n", portNum, m_z80.GetPC());
#endif
return 0xFF; return 0xFF;
} }
} }
@ -594,7 +602,9 @@ void CDriveBoard::IOWrite8(UINT32 portNum, UINT8 data)
case 241: // Unsure? - single byte 0x4E sent regularly - some sort of watchdog? case 241: // Unsure? - single byte 0x4E sent regularly - some sort of watchdog?
return; return;
default: default:
#ifdef DEBUG
printf("Unhandled Z80 output on port %u (at PC = %04X)\n", portNum, m_z80.GetPC()); printf("Unhandled Z80 output on port %u (at PC = %04X)\n", portNum, m_z80.GetPC());
#endif
return; return;
} }
} }
@ -703,7 +713,7 @@ void CDriveBoard::ProcessEncoderCmd(void)
void CDriveBoard::SendStopAll(void) void CDriveBoard::SendStopAll(void)
{ {
printf(">> Stop All Effects\n"); //printf(">> Stop All Effects\n");
ForceFeedbackCmd ffCmd; ForceFeedbackCmd ffCmd;
ffCmd.id = FFStop; ffCmd.id = FFStop;
@ -719,6 +729,7 @@ void CDriveBoard::SendConstantForce(INT8 val)
{ {
if (val == m_lastConstForce) if (val == m_lastConstForce)
return; return;
/*
if (val > 0) if (val > 0)
{ {
printf(">> Force Right %02X [%8s", val, ""); printf(">> Force Right %02X [%8s", val, "");
@ -735,6 +746,7 @@ void CDriveBoard::SendConstantForce(INT8 val)
} }
else else
printf(">> Stop Force [%16s]\n", ""); printf(">> Stop Force [%16s]\n", "");
*/
ForceFeedbackCmd ffCmd; ForceFeedbackCmd ffCmd;
ffCmd.id = FFConstantForce; ffCmd.id = FFConstantForce;
@ -748,10 +760,12 @@ void CDriveBoard::SendSelfCenter(UINT8 val)
{ {
if (val == m_lastSelfCenter) if (val == m_lastSelfCenter)
return; return;
/*
if (val == 0) if (val == 0)
printf(">> Stop Self-Center\n"); printf(">> Stop Self-Center\n");
else else
printf(">> Self-Center %02X\n", val); printf(">> Self-Center %02X\n", val);
*/
ForceFeedbackCmd ffCmd; ForceFeedbackCmd ffCmd;
ffCmd.id = FFSelfCenter; ffCmd.id = FFSelfCenter;
@ -765,10 +779,12 @@ void CDriveBoard::SendFriction(UINT8 val)
{ {
if (val == m_lastFriction) if (val == m_lastFriction)
return; return;
/*
if (val == 0) if (val == 0)
printf(">> Stop Friction\n"); printf(">> Stop Friction\n");
else else
printf(">> Friction %02X\n", val); printf(">> Friction %02X\n", val);
*/
ForceFeedbackCmd ffCmd; ForceFeedbackCmd ffCmd;
ffCmd.id = FFFriction; ffCmd.id = FFFriction;
@ -782,10 +798,12 @@ void CDriveBoard::SendVibrate(UINT8 val)
{ {
if (val == m_lastVibrate) if (val == m_lastVibrate)
return; return;
/*
if (val == 0) if (val == 0)
printf(">> Stop Vibrate\n"); printf(">> Stop Vibrate\n");
else else
printf(">> Vibrate %02X\n", val); printf(">> Vibrate %02X\n", val);
*/
ForceFeedbackCmd ffCmd; ForceFeedbackCmd ffCmd;
ffCmd.id = FFVibrate; ffCmd.id = FFVibrate;