Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More log elaborating. Final time I'm doing this.
Logs should actually be somewhat understandable to some people outside of programming and stuff (in a way). It's certainly better than being bombarded by abbreviations when errors/general logging occur, at least.
  • Loading branch information
lioncash committed Apr 1, 2013
1 parent 04913a8 commit f36e185
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/DSP/DSPHWInterface.cpp
Expand Up @@ -318,11 +318,11 @@ static void gdsp_do_dma()

if (len > 0x4000)
{
ERROR_LOG(DSPLLE, "DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
ERROR_LOG(DSPLLE, "DMA ERROR: PC: %04x, Control: %04x, Address: %08x, DSP Address: %04x, Size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
exit(0);
}
#if defined(_DEBUG) || defined(DEBUGFAST)
DEBUG_LOG(DSPLLE, "DMA pc: %04x ctl: %04x addr: %08x da: %04x size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
DEBUG_LOG(DSPLLE, "DMA pc: %04x, Control: %04x, Address: %08x, DSP Address: %04x, Size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
#endif
switch (ctl & 0x3)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/DSP/DSPMemoryMap.cpp
Expand Up @@ -52,7 +52,7 @@ u16 dsp_dmem_read(u16 addr)
return g_dsp.dram[addr & DSP_DRAM_MASK];

case 0x1: // 1xxx COEF
DEBUG_LOG(DSPLLE, "%04x : Coef Read @ %04x", g_dsp.pc, addr);
DEBUG_LOG(DSPLLE, "%04x : Coefficient Read @ %04x", g_dsp.pc, addr);
return g_dsp.coef[addr & DSP_COEF_MASK];

case 0xf: // Fxxx HW regs
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX.cpp
Expand Up @@ -243,7 +243,7 @@ void CUCode_AX::HandleCommandList()
}

default:
ERROR_LOG(DSPHLE, "Unknown command in AX cmdlist: %04x", cmd);
ERROR_LOG(DSPHLE, "Unknown command in AX command list: %04x", cmd);
end = true;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AXWii.cpp
Expand Up @@ -173,7 +173,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
{
u16 iCommand = HLEMemory_Read_U16(uAddress);
uAddress += 2;
//NOTICE_LOG(DSPHLE,"AXWII - AXLIST CMD %X",iCommand);
//NOTICE_LOG(DSPHLE,"AXWII - AXLIST Command %X",iCommand);

switch (iCommand)
{
Expand Down Expand Up @@ -245,7 +245,7 @@ bool CUCode_AXWii::AXTask(u32& _uMail)
break;

default:
INFO_LOG(DSPHLE,"DSPHLE - AXwii - AXLIST - Unknown CMD: %x",iCommand);
INFO_LOG(DSPHLE,"DSPHLE - AXwii - AXLIST - Unknown Command: %x",iCommand);
// unknown command so stop the execution of this TaskList
bExecuteList = false;
break;
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_CARD.cpp
Expand Up @@ -48,11 +48,11 @@ void CUCode_CARD::HandleMail(u32 _uMail)
{
if (_uMail == 0xFF000000) // unlock card
{
// m_Mails.push(0x00000001); // ACK (actualy anything != 0)
// m_Mails.push(0x00000001); // ACK (actually anything != 0)
}
else
{
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown cmd: %x", _uMail);
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown command: %x", _uMail);
}

m_rMailHandler.PushMail(DSP_DONE);
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_GBA.cpp
Expand Up @@ -122,8 +122,8 @@ void CUCode_GBA::HandleMail(u32 _uMail)
*(u32*)HLEMemory_Get_Pointer(sec_params.dest_addr+4) = Common::swap32((x22 << 16) | x23);

// Done!
DEBUG_LOG(DSPHLE, "\n%08x -> key %08x len %08x dest_addr %08x unk1 %08x unk2 %08x"
" 22 %04x 23 %04x",
DEBUG_LOG(DSPHLE, "\n%08x -> key: %08x, len: %08x, dest_addr: %08x, unk1: %08x, unk2: %08x"
" 22: %04x, 23: %04x",
mramaddr,
*(u32*)sec_params.key, sec_params.length, sec_params.dest_addr,
*(u32*)sec_params.unk1, *(u32*)sec_params.unk2,
Expand All @@ -143,12 +143,12 @@ void CUCode_GBA::HandleMail(u32 _uMail)
m_DSPHLE->SetUCode(UCODE_ROM);
break;
default:
DEBUG_LOG(DSPHLE, "CUCode_GBA - unknown 0xcdd1 cmd: %08x", _uMail);
DEBUG_LOG(DSPHLE, "CUCode_GBA - unknown 0xcdd1 command: %08x", _uMail);
break;
}
}
else
{
DEBUG_LOG(DSPHLE, "CUCode_GBA - unknown cmd: %08x", _uMail);
DEBUG_LOG(DSPHLE, "CUCode_GBA - unknown command: %08x", _uMail);
}
}
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda.cpp
Expand Up @@ -445,7 +445,7 @@ void CUCode_Zelda::ExecuteList()
Sync = CmdMail >> 16;

DEBUG_LOG(DSPHLE, "==============================================================================");
DEBUG_LOG(DSPHLE, "Zelda UCode - execute dlist (cmd: 0x%04x : sync: 0x%04x)", Command, Sync);
DEBUG_LOG(DSPHLE, "Zelda UCode - execute dlist (command: 0x%04x : sync: 0x%04x)", Command, Sync);

switch (Command)
{
Expand Down Expand Up @@ -545,7 +545,7 @@ void CUCode_Zelda::ExecuteList()

// default ... zelda ww jumps to 0x0043
default:
PanicAlert("Zelda UCode - unknown cmd: %x (size %i)", Command, m_numSteps);
PanicAlert("Zelda UCode - unknown command: %x (size %i)", Command, m_numSteps);
break;
}

Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/Src/HW/EXI_Channel.cpp
Expand Up @@ -180,13 +180,13 @@ void CEXIChannel::Read32(u32& _uReturnValue, const u32 _iRegister)
_uReturnValue = 0xDEADBEEF;
}

DEBUG_LOG(EXPANSIONINTERFACE, "(r32) 0x%08x channel: %i reg: %s",
DEBUG_LOG(EXPANSIONINTERFACE, "(r32) 0x%08x channel: %i register: %s",
_uReturnValue, m_ChannelId, Debug_GetRegisterName(_iRegister));
}

void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister)
{
DEBUG_LOG(EXPANSIONINTERFACE, "(w32) 0x%08x channel: %i reg: %s",
DEBUG_LOG(EXPANSIONINTERFACE, "(w32) 0x%08x channel: %i register: %s",
_iValue, m_ChannelId, Debug_GetRegisterName(_iRegister));

switch (_iRegister)
Expand Down Expand Up @@ -222,17 +222,17 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister)
break;

case EXI_DMAADDR:
INFO_LOG(EXPANSIONINTERFACE, "Wrote DMAAddr, chan %i", m_ChannelId);
INFO_LOG(EXPANSIONINTERFACE, "Wrote DMAAddr, channel %i", m_ChannelId);
m_DMAMemoryAddress = _iValue;
break;

case EXI_DMALENGTH:
INFO_LOG(EXPANSIONINTERFACE, "Wrote DMALength, chan %i", m_ChannelId);
INFO_LOG(EXPANSIONINTERFACE, "Wrote DMALength, channel %i", m_ChannelId);
m_DMALength = _iValue;
break;

case EXI_DMACONTROL:
INFO_LOG(EXPANSIONINTERFACE, "Wrote DMAControl, chan %i", m_ChannelId);
INFO_LOG(EXPANSIONINTERFACE, "Wrote DMAControl, channel %i", m_ChannelId);
m_Control.Hex = _iValue;

if (m_Control.TSTART)
Expand Down Expand Up @@ -274,7 +274,7 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister)
break;

case EXI_IMMDATA:
INFO_LOG(EXPANSIONINTERFACE, "Wrote IMMData, chan %i", m_ChannelId);
INFO_LOG(EXPANSIONINTERFACE, "Wrote IMMData, channel %i", m_ChannelId);
m_ImmData = _iValue;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/EXI_DeviceAMBaseboard.cpp
Expand Up @@ -111,7 +111,7 @@ void CEXIAMBaseboard::TransferByte(u8& _byte)
_byte = m_have_irq ? 0xFF : 0;
break;
default:
_dbg_assert_msg_(SP1, 0, "Unknown AM-BB cmd");
_dbg_assert_msg_(SP1, 0, "Unknown AM-BB command");
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/ProcessorInterface.cpp
Expand Up @@ -202,7 +202,7 @@ void Write32(const u32 _uValue, const u32 _iAddress)
break;

case PI_FLIPPER_UNK:
DEBUG_LOG(PROCESSORINTERFACE, "Write %08x to unknown PI reg %08x", _uValue, _iAddress);
DEBUG_LOG(PROCESSORINTERFACE, "Write %08x to unknown PI register %08x", _uValue, _iAddress);
break;

default:
Expand Down
22 changes: 11 additions & 11 deletions Source/Core/Core/Src/HW/SI_DeviceAMBaseboard.cpp
Expand Up @@ -143,7 +143,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
{
case 0x10:
{
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 10, %02x (READ STATUS&SWITCHES)", ptr(1));
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 10, %02x (READ STATUS&SWITCHES)", ptr(1));
SPADStatus PadStatus;
memset(&PadStatus, 0 ,sizeof(PadStatus));
Pad::GetStatus(ISIDevice::m_iDeviceNumber, &PadStatus);
Expand All @@ -161,13 +161,13 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
break;
}
case 0x12:
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 12, %02x %02x", ptr(1), ptr(2));
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 12, %02x %02x", ptr(1), ptr(2));
res[resp++] = 0x12;
res[resp++] = 0x00;
break;
case 0x11:
{
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 11, %02x (READ SERIAL NR)", ptr(1));
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 11, %02x (READ SERIAL NR)", ptr(1));
char string[] = "AADE-01A14964511";
res[resp++] = 0x11;
res[resp++] = 0x10;
Expand All @@ -183,7 +183,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
res[resp++] = 0x29; // FIRM VERSION
break;
case 0x16:
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 16, %02x (READ FPGA VERSION)", ptr(1));
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 16, %02x (READ FPGA VERSION)", ptr(1));
res[resp++] = 0x16;
res[resp++] = 0x02;
res[resp++] = 0x07;
Expand All @@ -196,7 +196,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
break;
case 0x1f:
{
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 1f, %02x %02x %02x %02x %02x (REGION)", ptr(1), ptr(2), ptr(3), ptr(4), ptr(5));
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 1f, %02x %02x %02x %02x %02x (REGION)", ptr(1), ptr(2), ptr(3), ptr(4), ptr(5));
unsigned char string[] =
"\x00\x00\x30\x00"
//"\x01\xfe\x00\x00" // JAPAN
Expand All @@ -211,14 +211,14 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
break;
}
case 0x31:
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 31 (UNKNOWN)");
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 31 (UNKNOWN)");
res[resp++] = 0x31;
res[resp++] = 0x02;
res[resp++] = 0x00;
res[resp++] = 0x00;
break;
case 0x32:
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 32 (UNKNOWN)");
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 32 (UNKNOWN)");
res[resp++] = 0x32;
res[resp++] = 0x02;
res[resp++] = 0x00;
Expand All @@ -241,7 +241,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
case 0x4e:
case 0x4f:
{
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD %02x, %02x %02x %02x %02x %02x %02x %02x (JVS IO)",
DEBUG_LOG(AMBASEBOARDDEBUG, "GC-AM: Command %02x, %02x %02x %02x %02x %02x %02x %02x (JVS IO)",
ptr(0), ptr(1), ptr(2), ptr(3), ptr(4), ptr(5), ptr(6), ptr(7));
int pptr = 2;
JVSIOMessage msg;
Expand All @@ -262,7 +262,7 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
{

int cmd = *jvs_io++;
DEBUG_LOG(AMBASEBOARDDEBUG, "JVS IO, node=%d, cmd=%02x", node, cmd);
DEBUG_LOG(AMBASEBOARDDEBUG, "JVS IO, node=%d, command=%02x", node, cmd);

switch (cmd)
{
Expand Down Expand Up @@ -391,10 +391,10 @@ int CSIDevice_AMBaseboard::RunBuffer(u8* _pBuffer, int _iLength)
break;
}
case 0x60:
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD 60, %02x %02x %02x", ptr(1), ptr(2), ptr(3));
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command 60, %02x %02x %02x", ptr(1), ptr(2), ptr(3));
break;
default:
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: CMD %02x (unknown) %02x %02x %02x %02x %02x", ptr(0), ptr(1), ptr(2), ptr(3), ptr(4), ptr(5));
ERROR_LOG(AMBASEBOARDDEBUG, "GC-AM: Command %02x (unknown) %02x %02x %02x %02x %02x", ptr(0), ptr(1), ptr(2), ptr(3), ptr(4), ptr(5));
break;
}
p += ptr(1) + 2;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/SI_DeviceGBA.cpp
Expand Up @@ -107,7 +107,7 @@ void GBASockServer::Transfer(char* si_buffer)
else
client.Send(current_data, 1);

DEBUG_LOG(SERIALINTERFACE, "> cmd %02x %02x%02x%02x%02x",
DEBUG_LOG(SERIALINTERFACE, "> command %02x %02x%02x%02x%02x",
(u8)current_data[0], (u8)current_data[1], (u8)current_data[2],
(u8)current_data[3], (u8)current_data[4]);

Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/Src/HW/VideoInterface.cpp
Expand Up @@ -407,11 +407,11 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)

case VI_UNK_AA_REG_HI:
_uReturnValue = (m_UnkAARegister & 0xffff0000) >> 16;
WARN_LOG(VIDEOINTERFACE, "(r16) unknown AA reg, not sure what it does :)");
WARN_LOG(VIDEOINTERFACE, "(r16) unknown AA register, not sure what it does :)");
break;
case VI_UNK_AA_REG_LO:
_uReturnValue = m_UnkAARegister & 0x0000ffff;
WARN_LOG(VIDEOINTERFACE, "(r16) unknown AA reg, not sure what it does :)");
WARN_LOG(VIDEOINTERFACE, "(r16) unknown AA register, not sure what it does :)");
break;

case VI_CLOCK:
Expand Down Expand Up @@ -659,11 +659,11 @@ void Write16(const u16 _iValue, const u32 _iAddress)

case VI_UNK_AA_REG_HI:
m_UnkAARegister = (m_UnkAARegister & 0x0000ffff) | (u32)(_iValue << 16);
WARN_LOG(VIDEOINTERFACE, "(w16) to unknown AA reg, not sure what it does :)");
WARN_LOG(VIDEOINTERFACE, "(w16) to unknown AA register, not sure what it does :)");
break;
case VI_UNK_AA_REG_LO:
m_UnkAARegister = (m_UnkAARegister & 0xffff0000) | _iValue;
WARN_LOG(VIDEOINTERFACE, "(w16) to unknown AA reg, not sure what it does :)");
WARN_LOG(VIDEOINTERFACE, "(w16) to unknown AA register, not sure what it does :)");
break;

case VI_CLOCK:
Expand All @@ -686,7 +686,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
break;

default:
ERROR_LOG(VIDEOINTERFACE, "(w16) %04x to unknown reg %x", _iValue, _iAddress & 0xfff);
ERROR_LOG(VIDEOINTERFACE, "(w16) %04x to unknown register %x", _iValue, _iAddress & 0xfff);
break;
}
}
Expand Down Expand Up @@ -812,7 +812,7 @@ static void BeginField(FieldType field)

static const char* const fieldTypeNames[] = { "Progressive", "Upper", "Lower" };

DEBUG_LOG(VIDEOINTERFACE, "(VI->BeginField): addr: %.08X | FieldSteps %u | FbSteps %u | ACV %u | Field %s",
DEBUG_LOG(VIDEOINTERFACE, "(VI->BeginField): Address: %.08X | FieldSteps %u | FbSteps %u | ACV %u | Field %s",
xfbAddr, m_HorizontalStepping.FieldSteps, m_HorizontalStepping.FbSteps, m_VerticalTimingRegister.ACV,
fieldTypeNames[field]
);
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/HW/WiimoteEmu/EmuSubroutines.cpp
Expand Up @@ -360,7 +360,7 @@ void Wiimote::WriteData(const wm_write_data* const wd)
/* TODO?
if (region_ptr == &m_reg_speaker)
{
ERROR_LOG(WIIMOTE, "Write to speaker reg %x %s", address,
ERROR_LOG(WIIMOTE, "Write to speaker register %x %s", address,
ArrayToString(wd->data, wd->size, 100, false).c_str());
}
*/
Expand Down Expand Up @@ -511,7 +511,7 @@ void Wiimote::ReadData(const wm_read_data* const rd)
break;

default :
PanicAlert("WmReadData: unimplemented parameters (size: %i, addr: 0x%x)!", size, rd->space);
PanicAlert("WmReadData: unimplemented parameters (size: %i, address: 0x%x)!", size, rd->space);
break;
}

Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
Expand Up @@ -223,7 +223,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
}
else
{
INFO_LOG(WII_IPC_DVD, "DVDLowRead: file unkw - (DVDAddr: 0x%llx, Size: 0x%x)",
INFO_LOG(WII_IPC_DVD, "DVDLowRead: file unknown - (DVDAddr: 0x%llx, Size: 0x%x)",
DVDAddress, Size);
}
}
Expand Down Expand Up @@ -360,7 +360,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
}
else
{
INFO_LOG(WII_IPC_DVD, "DVDLowSeek: file unkw - (DVDAddr: 0x%llx)",
INFO_LOG(WII_IPC_DVD, "DVDLowSeek: file unknown - (DVDAddr: 0x%llx)",
DVDAddress);
}
}
Expand Down Expand Up @@ -446,15 +446,15 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
// but it seems we don't need to implement anything
case 0x95:
case 0x96:
WARN_LOG(WII_IPC_DVD, "Unimplemented cmd 0x%08x (Buffer 0x%08x, 0x%x)",
WARN_LOG(WII_IPC_DVD, "Unimplemented command 0x%08x (Buffer 0x%08x, 0x%x)",
Command, _BufferOut, _BufferOutSize);
break;

default:
ERROR_LOG(WII_IPC_DVD, "Unknown cmd 0x%08x (Buffer 0x%08x, 0x%x)",
ERROR_LOG(WII_IPC_DVD, "Unknown command 0x%08x (Buffer 0x%08x, 0x%x)",
Command, _BufferOut, _BufferOutSize);

PanicAlertT("Unknown cmd 0x%08x", Command);
PanicAlertT("Unknown command 0x%08x", Command);
break;
}

Expand Down Expand Up @@ -497,7 +497,7 @@ int CWII_IPC_HLE_Device_di::GetCmdDelay(u32 _CommandAddress)
// case DVDLowReset:
// case DVDLowClosePartition:
default:
// ranom numbers here!
// random numbers here!
// More than ~1/2000th of a second hangs DKCR with DSP HLE, maybe.
return SystemTimers::GetTicksPerSecond() / 15000;
break;
Expand Down

0 comments on commit f36e185

Please sign in to comment.