Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Some more logging typos and clarifications. Missed these in my last c…
…ommit.

This commit mainly elaborates on some messages a little more. Also fixes some typos that slipped through the last commit.

A large change in text can be seen in EXI_DeviceMemoryCard.cpp. I added more info as to why a write to a memory card may fail. (This actually was a reason I was unable to write to a memcard recently).

Elaborations can be seen in WGL.cpp

I did change some comments in some files that I was correcting logging messages in, however this is only if I spot a typo or if an abbreviation is lower-cased. Even in that case, the amount of changes done to comments is very minimal.
  • Loading branch information
lioncash committed Apr 1, 2013
1 parent 5ae8bec commit 58159a1
Show file tree
Hide file tree
Showing 20 changed files with 78 additions and 76 deletions.
4 changes: 2 additions & 2 deletions Source/Core/AudioCommon/Src/Mixer.h
Expand Up @@ -76,7 +76,7 @@ class CMixer {
g_wave_writer.SetSkipSilence(false);
NOTICE_LOG(DSPHLE, "Starting Audio logging");
} else {
WARN_LOG(DSPHLE, "Audio logging already started");
WARN_LOG(DSPHLE, "Audio logging has already been started");
}
}

Expand All @@ -86,7 +86,7 @@ class CMixer {
g_wave_writer.Stop();
NOTICE_LOG(DSPHLE, "Stopping Audio logging");
} else {
WARN_LOG(DSPHLE, "Audio logging already stopped");
WARN_LOG(DSPHLE, "Audio logging has already been stopped");
}
}

Expand Down
8 changes: 4 additions & 4 deletions Source/Core/Common/Src/FileUtil.cpp
Expand Up @@ -124,7 +124,7 @@ bool Delete(const std::string &filename)
// being there, not the actual delete.
if (!Exists(filename))
{
WARN_LOG(COMMON, "Delete: %s does not exists", filename.c_str());
WARN_LOG(COMMON, "Delete: %s does not exist", filename.c_str());
return true;
}

Expand Down Expand Up @@ -216,7 +216,7 @@ bool CreateFullPath(const std::string &fullPath)
panicCounter--;
if (panicCounter <= 0)
{
ERROR_LOG(COMMON, "CreateFullPath: directory structure too deep");
ERROR_LOG(COMMON, "CreateFullPath: directory structure is too deep");
return false;
}
position++;
Expand Down Expand Up @@ -324,7 +324,7 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename)
goto bail;
}
}
// close flushs
// close files
fclose(input);
fclose(output);
return true;
Expand Down Expand Up @@ -727,7 +727,7 @@ std::string &GetUserPath(const unsigned int DirIDX, const std::string &newPath)

if (!File::IsDirectory(newPath))
{
WARN_LOG(COMMON, "Invalid path specified %s, wii user path will be set to default", newPath.c_str());
WARN_LOG(COMMON, "Invalid path specified %s, Wii user path will be set to default", newPath.c_str());
paths[D_WIIROOT_IDX] = paths[D_USER_IDX] + WII_USER_DIR;
}
else
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/DSPLLE/DSPSymbols.cpp
Expand Up @@ -269,7 +269,7 @@ void AutoDisassembly(u16 start_addr, u16 end_addr)
break;
}

//NOTICE_LOG(DSPLLE, "added %04x %i %s", addr, line_counter, buf.c_str());
//NOTICE_LOG(DSPLLE, "Added %04x %i %s", addr, line_counter, buf.c_str());
lines.push_back(buf);
line_counter++;
}
Expand Down
24 changes: 12 additions & 12 deletions Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp
Expand Up @@ -113,7 +113,7 @@ CEXIETHERNET::CEXIETHERNET()
memcpy(&mBbaMem[BBA_NAFR_PAR0], mac_addr, 6);
}

// hax .. fully established 100BASE-T link
// HACK: .. fully established 100BASE-T link
mBbaMem[BBA_NWAYS] = NWAYS_LS100 | NWAYS_LPNWAY | NWAYS_100TXF | NWAYS_ANCLPT;

#if defined(_WIN32)
Expand Down Expand Up @@ -175,7 +175,7 @@ void CEXIETHERNET::ImmWrite(u32 data, u32 size)

if (transfer.address == BBA_IOB && transfer.region == transfer.MX)
{
ERROR_LOG(SP1, "Usage of BBA_IOB indicates that the rx packet descriptor has been corrupted, killing dolphin...");
ERROR_LOG(SP1, "Usage of BBA_IOB indicates that the rx packet descriptor has been corrupted. Killing Dolphin...");
exit(0);
}

Expand Down Expand Up @@ -248,7 +248,7 @@ u32 CEXIETHERNET::ImmRead(u32 size)

void CEXIETHERNET::DMAWrite(u32 addr, u32 size)
{
DEBUG_LOG(SP1, "dma w: %08x %x", addr, size);
DEBUG_LOG(SP1, "DMA write: %08x %x", addr, size);

if (transfer.region == transfer.MX &&
transfer.direction == transfer.WRITE &&
Expand All @@ -258,15 +258,15 @@ void CEXIETHERNET::DMAWrite(u32 addr, u32 size)
}
else
{
ERROR_LOG(SP1, "dma w in %s %s mode - not implemented",
ERROR_LOG(SP1, "DMA write in %s %s mode - not implemented",
transfer.region == transfer.EXI ? "exi" : "mx",
transfer.direction == transfer.READ ? "read" : "write");
}
}

void CEXIETHERNET::DMARead(u32 addr, u32 size)
{
DEBUG_LOG(SP1, "dma r: %08x %x", addr, size);
DEBUG_LOG(SP1, "DMA read: %08x %x", addr, size);

memcpy(Memory::GetPointer(addr), &mBbaMem[transfer.address], size);

Expand Down Expand Up @@ -400,16 +400,16 @@ void CEXIETHERNET::MXCommandHandler(u32 data, u32 size)
// Only start transfer if there isn't one currently running
if (!(mBbaMem[BBA_NCRA] & (NCRA_ST0 | NCRA_ST1)))
{
// Technically transfer dma status is kept in TXDMA - not implemented
// Technically transfer DMA status is kept in TXDMA - not implemented

if (data & NCRA_ST0)
{
WARN_LOG(SP1, "start tx - local dma");
WARN_LOG(SP1, "start tx - local DMA");
SendFromPacketBuffer();
}
else if (data & NCRA_ST1)
{
DEBUG_LOG(SP1, "start tx - direct fifo");
DEBUG_LOG(SP1, "start tx - direct FIFO");
SendFromDirectFIFO();
// Kind of a hack: send completes instantly, so we don't
// actually write the "send in status" bit to the register
Expand Down Expand Up @@ -451,7 +451,7 @@ void CEXIETHERNET::DirectFIFOWrite(u8 *data, u32 size)
memcpy(tx_fifo + *tx_fifo_count, data, size);

*tx_fifo_count += size;
// TODO not sure this mask is correct.
// TODO: not sure this mask is correct.
// However, BBA_TXFIFOCNT should never get even close to this amount,
// so it shouldn't matter
*tx_fifo_count &= (1 << 12) - 1;
Expand All @@ -464,7 +464,7 @@ void CEXIETHERNET::SendFromDirectFIFO()

void CEXIETHERNET::SendFromPacketBuffer()
{
ERROR_LOG(SP1, "tx packet buffer not implemented");
ERROR_LOG(SP1, "tx packet buffer not implemented.");
}

void CEXIETHERNET::SendComplete()
Expand All @@ -484,7 +484,7 @@ void CEXIETHERNET::SendComplete()

inline u8 CEXIETHERNET::HashIndex(u8 *dest_eth_addr)
{
// Calculate crc
// Calculate CRC
u32 crc = 0xffffffff;

for (size_t byte_num = 0; byte_num < 6; ++byte_num)
Expand Down Expand Up @@ -601,7 +601,7 @@ bool CEXIETHERNET::RecvHandlePacket()
if (AUTORCVR)
discard bad packet
else
inc MPC instad of recving packets
inc MPC instead of receiving packets
*/
status |= DESC_FO | DESC_BF;
mBbaMem[BBA_IR] |= mBbaMem[BBA_IMR] & INT_RBF;
Expand Down
14 changes: 8 additions & 6 deletions Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp
Expand Up @@ -40,7 +40,7 @@

void CEXIMemoryCard::FlushCallback(u64 userdata, int cyclesLate)
{
// note that userdata is forbidden to be a pointer, due to the implemenation of EventDoState
// note that userdata is forbidden to be a pointer, due to the implementation of EventDoState
int card_index = (int)userdata;
CEXIMemoryCard* pThis = (CEXIMemoryCard*)ExpansionInterface::FindDevice(EXIDEVICE_MEMORYCARD, card_index);
if (pThis)
Expand Down Expand Up @@ -86,7 +86,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index)
//0x00000510 16Mb "bigben" card
//card_id = 0xc243;

card_id = 0xc221; // It's a nintendo brand memcard
card_id = 0xc221; // It's a Nintendo brand memcard

File::IOFile pFile(m_strFilename, "rb");
if (pFile)
Expand All @@ -110,7 +110,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index)
memory_card_content = new u8[memory_card_size];
GCMemcard::Format(memory_card_content, m_strFilename.find(".JAP.raw") != std::string::npos, nintendo_card_id);
memset(memory_card_content+MC_HDR_SIZE, 0xFF, memory_card_size-MC_HDR_SIZE);
WARN_LOG(EXPANSIONINTERFACE, "No memory card found. Will create new.");
WARN_LOG(EXPANSIONINTERFACE, "No memory card found. Will create a new one.");
}
SetCardFlashID(memory_card_content, card_index);
}
Expand All @@ -130,7 +130,9 @@ void innerFlush(FlushData* data)
if (!pFile) // Note - pFile changed inside above if
{
PanicAlertT("Could not write memory card file %s.\n\n"
"Are you running Dolphin from a CD/DVD, or is the save file maybe write protected?", data->filename.c_str());
"Are you running Dolphin from a CD/DVD, or is the save file maybe write protected?\n\n"
"Are you receiving this after moving the emulator directory?\nIf so, then you may "
"need to re-specify your memory card location in the options.", data->filename.c_str());
return;
}

Expand Down Expand Up @@ -337,11 +339,11 @@ void CEXIMemoryCard::TransferByte(u8 &byte)
{
case cmdNintendoID:
//
// nintendo card:
// Nintendo card:
// 00 | 80 00 00 00 10 00 00 00
// "bigben" card:
// 00 | ff 00 00 05 10 00 00 00 00 00 00 00 00 00 00
// we do it the nintendo way.
// we do it the Nintendo way.
if (m_uPosition == 1)
byte = 0x80; // dummy cycle
else
Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp
Expand Up @@ -333,7 +333,7 @@ bool Wiimote::Connect()
/*
if (!SetThreadPriority(m_wiimote_thread.native_handle(), THREAD_PRIORITY_TIME_CRITICAL))
{
ERROR_LOG(WIIMOTE, "Failed to set wiimote thread priority");
ERROR_LOG(WIIMOTE, "Failed to set Wiimote thread priority");
}
*/
#ifdef SHARE_WRITE_WIIMOTES
Expand Down Expand Up @@ -386,22 +386,22 @@ int Wiimote::IORead(u8* buf)
{
// Timeout - cancel and continue
if (*buf)
WARN_LOG(WIIMOTE, "Packet ignored. This may indicate a problem (timeout is %i ms).",
WARN_LOG(WIIMOTE, "Packet ignored. This may indicate a problem (timeout is %i ms).",
WIIMOTE_DEFAULT_TIMEOUT);

CancelIo(dev_handle);
bytes = -1;
}
else if (WAIT_FAILED == r)
{
WARN_LOG(WIIMOTE, "A wait error occurred on reading from wiimote %i.", index + 1);
WARN_LOG(WIIMOTE, "A wait error occurred on reading from Wiimote %i.", index + 1);
bytes = 0;
}
else if (WAIT_OBJECT_0 == r)
{
if (!GetOverlappedResult(dev_handle, &hid_overlap_read, &bytes, TRUE))
{
WARN_LOG(WIIMOTE, "GetOverlappedResult failed on wiimote %i.", index + 1);
WARN_LOG(WIIMOTE, "GetOverlappedResult failed on Wiimote %i.", index + 1);
bytes = 0;
}
}
Expand Down Expand Up @@ -468,7 +468,7 @@ int Wiimote::IOWrite(const u8* buf, int len)
if (err == 121)
{
// Semaphore timeout
NOTICE_LOG(WIIMOTE, "WiimoteIOWrite[MSBT_STACK_MS]: Unable to send data to wiimote");
NOTICE_LOG(WIIMOTE, "WiimoteIOWrite[MSBT_STACK_MS]: Unable to send data to the Wiimote");
}
else
{
Expand Down Expand Up @@ -647,7 +647,7 @@ bool ForgetWiimote(BLUETOOTH_DEVICE_INFO_STRUCT& btdi)
{
// Make Windows forget about device so it will re-find it if visible.
// This is also required to detect a disconnect for some reason..
NOTICE_LOG(WIIMOTE, "Removing remembered wiimote.");
NOTICE_LOG(WIIMOTE, "Removing remembered Wiimote.");
Bth_BluetoothRemoveDevice(&btdi.Address);
return true;
}
Expand Down

0 comments on commit 58159a1

Please sign in to comment.