Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a bunch of random typos in comments and logging.
Also update the comment headers for two functions in GCMemcard.cpp.
  • Loading branch information
lioncash committed Apr 19, 2013
1 parent 47f1505 commit d244bca
Show file tree
Hide file tree
Showing 66 changed files with 122 additions and 117 deletions.
2 changes: 1 addition & 1 deletion Source/Core/AudioCommon/Src/OpenALStream.cpp
Expand Up @@ -59,7 +59,7 @@ bool OpenALStream::Start()
PanicAlertT("OpenAL: can't find sound devices");
}

// Initialise DPL2 parameters
// Initialize DPL2 parameters
dpl2reset();

soundTouch.clear();
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/AudioCommon/Src/XAudio2Stream.cpp
Expand Up @@ -94,7 +94,7 @@ bool XAudio2::Start()
{
HRESULT hr;

// callback dosent seem to run on a speecific cpu anyways
// callback doesn't seem to run on a specific cpu anyways
IXAudio2* xaudptr;
if (FAILED(hr = XAudio2Create(&xaudptr, 0, XAUDIO2_DEFAULT_PROCESSOR)))
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/Hash.cpp
Expand Up @@ -43,7 +43,7 @@ u32 HashFletcher(const u8* data_u8, size_t length)


// Implementation from Wikipedia
// Slightly slower than Fletcher above, but slighly more reliable.
// Slightly slower than Fletcher above, but slightly more reliable.
#define MOD_ADLER 65521
// data: Pointer to the data to be summed; len is in bytes
u32 HashAdler32(const u8* data, size_t len)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/MemArena.h
Expand Up @@ -13,7 +13,7 @@
#include "Common.h"

// This class lets you create a block of anonymous RAM, and then arbitrarily map views into it.
// Multiple views can mirror the same section of the block, which makes it very convient for emulating
// Multiple views can mirror the same section of the block, which makes it very convenient for emulating
// memory mirrors.

class MemArena
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/x64Emitter.cpp
Expand Up @@ -1315,7 +1315,7 @@ void XEmitter::MOVDDUP(X64Reg regOp, OpArg arg)

//There are a few more left

// Also some integer instrucitons are missing
// Also some integer instructions are missing
void XEmitter::PACKSSDW(X64Reg dest, OpArg arg) {WriteSSEOp(64, 0x6B, true, dest, arg);}
void XEmitter::PACKSSWB(X64Reg dest, OpArg arg) {WriteSSEOp(64, 0x63, true, dest, arg);}
//void PACKUSDW(X64Reg dest, OpArg arg) {WriteSSEOp(64, 0x66, true, dest, arg);} // WRONG
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Common/Src/x64Emitter.h
Expand Up @@ -107,7 +107,7 @@ struct OpArg
scale = (u8)_scale;
offsetOrBaseReg = (u16)rmReg;
indexReg = (u16)scaledReg;
//if scale == 0 never mind offseting
//if scale == 0 never mind offsetting
offset = _offset;
}
void WriteRex(XEmitter *emit, int opBits, int bits, int customOp = -1) const;
Expand Down Expand Up @@ -637,7 +637,7 @@ class XEmitter
void ABI_CallFunctionAC(void *func, const Gen::OpArg &arg1, u32 param2);
void ABI_CallFunctionA(void *func, const Gen::OpArg &arg1);

// Pass a register as a paremeter.
// Pass a register as a parameter.
void ABI_CallFunctionR(void *func, Gen::X64Reg reg1);
void ABI_CallFunctionRR(void *func, Gen::X64Reg reg1, Gen::X64Reg reg2);

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/ActionReplay.cpp
Expand Up @@ -14,7 +14,7 @@

// -------------------------------------------------------------------------------------------------------------
// Code Types:
// (Unconditonal) Normal Codes (0): this one has subtypes inside
// (Unconditional) Normal Codes (0): this one has subtypes inside
// (Conditional) Normal Codes (1 - 7): these just compare values and set the line skip info
// Zero Codes: any code with no address. These codes are used to do special operations like memory copy, etc
// -------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -42,7 +42,7 @@ enum
ZCODE_ROW = 0x03,
ZCODE_04 = 0x04,

// Conditonal Codes
// Conditional Codes
CONDTIONAL_EQUAL = 0x01,
CONDTIONAL_NOT_EQUAL = 0x02,
CONDTIONAL_LESS_THAN_SIGNED = 0x03,
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/DSP/DSPCore.h
Expand Up @@ -155,14 +155,14 @@
#define SR_OVERFLOW 0x0002
#define SR_ARITH_ZERO 0x0004
#define SR_SIGN 0x0008
#define SR_OVER_S32 0x0010 // set when there there was mod/tst/cmp on accu and result is over s32
#define SR_OVER_S32 0x0010 // set when there was mod/tst/cmp on accu and result is over s32
#define SR_TOP2BITS 0x0020 // if the upper (ac?.m/ax?.h) 2 bits are equal
#define SR_LOGIC_ZERO 0x0040
#define SR_OVERFLOW_STICKY 0x0080 // set at the same time as 0x2 (under same conditions) - but not cleared the same
#define SR_100 0x0100 // unknown
#define SR_INT_ENABLE 0x0200 // Not 100% sure but duddie says so. This should replace the hack, if so.
#define SR_400 0x0400 // unknown
#define SR_EXT_INT_ENABLE 0x0800 // Appears in zelda - seems to disable external interupts
#define SR_EXT_INT_ENABLE 0x0800 // Appears in zelda - seems to disable external interrupts
#define SR_1000 0x1000 // unknown
#define SR_MUL_MODIFY 0x2000 // 1 = normal. 0 = x2 (M0, M2) (Free mul by 2)
#define SR_40_MODE_BIT 0x4000 // 0 = "16", 1 = "40" (SET16, SET40) Controls sign extension when loading mid accums and data saturation for stores from mid accums.
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/DSP/DSPIntExtOps.cpp
Expand Up @@ -161,7 +161,7 @@ void l(const UDSPInstruction opc)
// LN $axD.D, @$arS
// xxxx xxxx 01dd d0ss
// Load $axD.D/$acD.D with value from memory pointed by register $arS.
// Add indexing register register $ixS to register $arS.
// Add indexing register $ixS to register $arS.
void ln(const UDSPInstruction opc)
{
u8 sreg = opc & 0x3;
Expand Down Expand Up @@ -531,7 +531,7 @@ void applyWriteBackLog()
// apply the ext command output, because if the main op didn't change the value
// then 0 | ext output = ext output and if it did then bitwise or is still the
// right thing to do
// Only needed for cases when when mainop and extended are modifying the same ACC
// Only needed for cases when mainop and extended are modifying the same ACC
// Games are not doing that + in motorola (similar dsp) dox this is forbidden to do.
void zeroWriteBackLog()
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/DSP/DspIntArithmetic.cpp
Expand Up @@ -1116,7 +1116,7 @@ void lsrnr(const UDSPInstruction opc)

// ASRNR $acD
// 0011 111d 1xxx xxxx
// Arithmeticaly shift left/right accumulator $ACC[D] by lower 7-bit (signed) value in $AC[1-D].M
// Arithmetically shift left/right accumulator $ACC[D] by lower 7-bit (signed) value in $AC[1-D].M
// x = extension (7 bits!!)
//
// flags out: --xx xx00
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/DSP/Jit/DSPJitArithmetic.cpp
Expand Up @@ -286,7 +286,7 @@ void DSPEmitter::cmpi(const UDSPInstruction opc)

// CMPIS $acD, #I
// 0000 011d iiii iiii
// Compares accumulator with short immediate. Comaprison is executed
// Compares accumulator with short immediate. Comparison is executed
// by subtracting short immediate (8bit sign extended) from mid accumulator
// $acD.hm and computing flags based on whole accumulator $acD.
//
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/Src/DSP/Jit/DSPJitExtOps.cpp
Expand Up @@ -143,7 +143,7 @@ void DSPEmitter::l(const UDSPInstruction opc)
// LN $axD.D, @$arS
// xxxx xxxx 01dd d0ss
// Load $axD.D/$acD.D with value from memory pointed by register $arS.
// Add indexing register register $ixS to register $arS.
// Add indexing register $ixS to register $arS.
void DSPEmitter::ln(const UDSPInstruction opc)
{
u8 sreg = opc & 0x3;
Expand Down Expand Up @@ -686,7 +686,7 @@ void DSPEmitter::pushExtValueFromMem2(u16 dreg, u16 sreg)

void DSPEmitter::popExtValueToReg()
{
// in practise, we rarely ever have a non-NX main op
// in practice, we rarely ever have a non-NX main op
// with an extended op, so the OR here is either
// not run (storeIndex == -1) or ends up OR'ing
// EBX with 0 (becoming the MOV we have here)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/FifoPlayer/FifoPlaybackAnalyzer.cpp
Expand Up @@ -64,7 +64,7 @@ void FifoPlaybackAnalyzer::AnalyzeFrames(FifoDataFile *file, std::vector<Analyze

while (cmdStart < frame.fifoDataSize)
{
// Add memory updates that have occured before this point in the frame
// Add memory updates that have occurred before this point in the frame
while (nextMemUpdate < frame.memoryUpdates.size() && frame.memoryUpdates[nextMemUpdate].fifoPosition <= cmdStart)
{
AddMemoryUpdate(frame.memoryUpdates[nextMemUpdate], analyzed);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/FifoPlayer/FifoRecorder.h
Expand Up @@ -30,7 +30,7 @@ class FifoRecorder

void EndFrame(u32 fifoStart, u32 fifoEnd);

// This function must be called before writting GP commands
// This function must be called before writing GP commands
// bpMem must point to the actual bp mem array used by the plugin because it will be read as fifo data is recorded
void SetVideoMemory(u32 *bpMem, u32 *cpMem, u32 *xfMem, u32 *xfRegs, u32 xfRegsSize);

Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/Src/GeckoCode.cpp
Expand Up @@ -916,14 +916,14 @@ bool SpecialIf()

// CT6 ASM Codes, On/Off switch and Address Range Check
// NOT COMPLETE, asm stuff not started
// fix the uglyness
// TODO: Fix the ugliness
bool AsmSwitchRange()
{
// the switch subtype modifies the code :/
GeckoCode::Code& code = *current_code;

// only run if code_execution is set or this code is a switch or rangecheck subtype
// the switch and rangecheck run if exectution_counter is 1 (directly inside the failed if) if they are an endif
// the switch and rangecheck run if execution_counter is 1 (directly inside the failed if) if they are an endif
if (false == CodeExecution())
{
if (code.subtype < 0x6)
Expand Down Expand Up @@ -962,7 +962,7 @@ bool AsmSwitchRange()
}

// Though the next code starts at current_code+number_of_codes+1,
// we add only number_of_codes. It is because the for statemet in
// we add only number_of_codes. It is because the for statement in
// RunGeckoCode() increments current_code.
current_code += number_of_codes;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/GeckoCodeConfig.cpp
Expand Up @@ -45,7 +45,7 @@ void LoadCodes(const IniFile& inifile, std::vector<GeckoCode>& gcodes)
gcode.enabled = (1 == ss.tellg()); // silly
ss.seekg(1, std::ios_base::cur);
// read the code name
std::getline(ss, gcode.name, '['); // stop at [ character (begining of contributer name)
std::getline(ss, gcode.name, '['); // stop at [ character (beginning of contributor name)
gcode.name = StripSpaces(gcode.name);
// read the code creator name
std::getline(ss, gcode.creator, ']');
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
Expand Up @@ -265,7 +265,7 @@ u16 AcceleratorGetSample()
// stream, and the lower 16 bits are the decimal part.
//
// We start getting samples not from sample 0, but 0.<curr_pos_frac>. This
// avoids discontinuties in the audio stream, especially with very low ratios
// avoids discontinuities in the audio stream, especially with very low ratios
// which interpolate a lot of values between two "real" samples.
u32 ResampleAudio(std::function<s16(u32)> input_callback, s16* output, u32 count,
s16* last_samples, u32 curr_pos, u32 ratio, int srctype,
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp
Expand Up @@ -537,7 +537,7 @@ inline void CEXIETHERNET::inc_rwp()
(*rwp)++;
}

// This function is on the critical path for recving data.
// This function is on the critical path for receiving data.
// Be very careful about calling into the logger and other slow things
bool CEXIETHERNET::RecvHandlePacket()
{
Expand Down
16 changes: 11 additions & 5 deletions Source/Core/Core/Src/HW/GCMemcard.cpp
Expand Up @@ -1333,8 +1333,11 @@ void GCMemcard::CARD_GetSerialNo(u32 *serial1,u32 *serial2)
/* FZEROGX_MakeSaveGameValid */
/* (use just before writing a F-Zero GX system .gci file) */
/* */
/* chn: Destination memory card port */
/* ret: Error code */
/* Parameters: */
/* direntry: [Description needed] */
/* FileBuffer: [Description needed] */
/* */
/* Returns: Error code */
/*************************************************************/

s32 GCMemcard::FZEROGX_MakeSaveGameValid(DEntry& direntry, std::vector<GCMBlock> &FileBuffer)
Expand All @@ -1351,7 +1354,7 @@ s32 GCMemcard::FZEROGX_MakeSaveGameValid(DEntry& direntry, std::vector<GCMBlock>
CARD_GetSerialNo(&serial1,&serial2);

// set new serial numbers
*(u16*)&FileBuffer[1].block[0x0066] = BE16(BE32(serial1) >> 16);
*(u16*)&FileBuffer[1].block[0x0066] = BE16(BE32(serial1) >> 16);
*(u16*)&FileBuffer[3].block[0x1580] = BE16(BE32(serial2) >> 16);
*(u16*)&FileBuffer[1].block[0x0060] = BE16(BE32(serial1) & 0xFFFF);
*(u16*)&FileBuffer[1].block[0x0200] = BE16(BE32(serial2) & 0xFFFF);
Expand All @@ -1378,8 +1381,11 @@ s32 GCMemcard::FZEROGX_MakeSaveGameValid(DEntry& direntry, std::vector<GCMBlock>
/* PSO_MakeSaveGameValid */
/* (use just before writing a PSO system .gci file) */
/* */
/* chn: Destination memory card port */
/* ret: Error code */
/* Parameters: */
/* direntry: [Description needed] */
/* FileBuffer: [Description needed] */
/* */
/* Returns: Error code */
/***********************************************************/

s32 GCMemcard::PSO_MakeSaveGameValid(DEntry& direntry, std::vector<GCMBlock> &FileBuffer)
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/SystemTimers.cpp
Expand Up @@ -23,7 +23,7 @@
of frames. So if a game runs slow, on a slow computer for example, these updates will occur
less frequently. This makes sense because almost all console games are controlled by frames
rather than time, so if a game can't keep up with the normal framerate all animations and
actions slows down and the game runs to slow. This is different from PC games that are are
actions slows down and the game runs to slow. This is different from PC games that are
often controlled by time instead and may not have maximum framerates.
However, I'm not sure if the Bluetooth communication for the Wiimote is entirely frame
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/WiimoteEmu/UDPTLayer.h
Expand Up @@ -45,7 +45,7 @@ namespace UDPTLayer
{
if (!(m->inst)) return;
if (!(m->updIR)) return;
if ((*x >= -0.999) && (*x <= 0.999) && (*y >= -0.999) && (*y <= 0.999)) return; //the recieved values are used ONLY when the normal pointer is offscreen
if ((*x >= -0.999) && (*x <= 0.999) && (*y >= -0.999) && (*y <= 0.999)) return; //the received values are used ONLY when the normal pointer is offscreen
float _x, _y;
m->inst->getIR(_x, _y);
*x = _x * 2 - 1;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.h
Expand Up @@ -163,7 +163,7 @@ class Wiimote : public ControllerEmu
ADPCMState m_adpcm_state;

// read data request queue
// maybe it isn't actualy a queue
// maybe it isn't actually a queue
// maybe read requests cancel any current requests
std::queue< ReadRequest > m_read_requests;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp
Expand Up @@ -363,7 +363,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::SendACLPacket(u16 _ConnectionHandle, u
}
else
{
DEBUG_LOG(WII_IPC_WIIMOTE, "ACL endpoint not currently valid, queueing...");
DEBUG_LOG(WII_IPC_WIIMOTE, "ACL endpoint not currently valid, queuing...");
m_acl_pool.Store(_pData, _Size, _ConnectionHandle);
}
}
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/Src/NetPlayServer.cpp
Expand Up @@ -107,7 +107,7 @@ void NetPlayServer::ThreadFunc()
switch (ready_socket.Receive(rpac))
{
case sf::Socket::Done :
// if a bad packet is recieved, disconnect the client
// if a bad packet is received, disconnect the client
if (0 == OnData(rpac, ready_socket))
break;

Expand Down Expand Up @@ -267,7 +267,7 @@ unsigned int NetPlayServer::OnDisconnect(sf::SocketTCP& socket)

sf::Packet spac;
spac << (MessageId)NP_MSG_DISABLE_GAME;
// this thread doesnt need players lock
// this thread doesn't need players lock
std::lock_guard<std::recursive_mutex> lks(m_crit.send);
SendToClients(spac);
}
Expand Down Expand Up @@ -465,7 +465,7 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, sf::SocketTCP& socket)
map = -1;

// if not, they are hacking, so disconnect them
// this could happen right after a pad map change, but that isn't implimented yet
// this could happen right after a pad map change, but that isn't implemented yet
if (map < 0)
return 1;

Expand Down
Expand Up @@ -433,7 +433,7 @@ void Interpreter::mcrf(UGeckoInstruction _inst)

void Interpreter::isync(UGeckoInstruction _inst)
{
//shouldnt do anything
//shouldn't do anything
}

// the following commands read from FPSCR
Expand Down
Expand Up @@ -3,7 +3,7 @@
// Refer to the license.txt file included.

// TODO(ector): Tons of pshufb optimization of the loads/stores, for SSSE3+, possibly SSE4, only.
// Should give a very noticable speed boost to paired single heavy code.
// Should give a very noticeable speed boost to paired single heavy code.

#include "Common.h"

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStorePaired.cpp
Expand Up @@ -3,7 +3,7 @@
// Refer to the license.txt file included.

// TODO(ector): Tons of pshufb optimization of the loads/stores, for SSSE3+, possibly SSE4, only.
// Should give a very noticable speed boost to paired single heavy code.
// Should give a very noticeable speed boost to paired single heavy code.

#include "Common.h"

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/PowerPC/PPCAnalyst.cpp
Expand Up @@ -329,7 +329,7 @@ u32 Flatten(u32 address, int *realsize, BlockStats *st, BlockRegStats *gpa,
if (!cst1_instructions.empty())
{
// If the Gecko CST1 instruction queue is not empty,
// we comsume the first instruction.
// we consume the first instruction.
inst = UGeckoInstruction(cst1_instructions.front());
cst1_instructions.pop();
address -= 4;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/PowerPC/SignatureDB.cpp
Expand Up @@ -191,7 +191,7 @@ void SignatureDB::Initialize(PPCSymbolDB *symbol_db, const char *prefix)
break;
}
// Checksum only uses opcode, not opcode data, because opcode data changes
// in all compilations, but opcodes dont!
// in all compilations, but opcodes don't!
sum = ( ( (sum << 17 ) & 0xFFFE0000 ) | ( (sum >> 15) & 0x0001FFFF ) );
sum = sum ^ (op | op2 | op3);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DiscIO/Src/CISOBlob.cpp
Expand Up @@ -59,7 +59,7 @@ bool CISOFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
auto const bytes_to_read = std::min(m_block_size - data_offset, nbytes);
if (block < CISO_MAP_SIZE && UNUSED_BLOCK_ID != m_ciso_map[block])
{
// calcualte the base address
// calculate the base address
auto const file_off = CISO_HEADER_SIZE + m_ciso_map[block] * m_block_size + data_offset;

if (!(m_file.Seek(file_off, SEEK_SET) && m_file.ReadArray(out_ptr, bytes_to_read)))
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/DiscIO/Src/CompressedBlob.cpp
Expand Up @@ -288,10 +288,10 @@ bool DecompressBlobToFile(const char* infile, const char* outfile, CompressCB ca

File::IOFile f(outfile, "wb");
if (!f)
{
delete reader;
{
delete reader;
return false;
}
}

const CompressedBlobHeader &header = reader->GetHeader();
u8* buffer = new u8[header.block_size];
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/Src/CheatsWindow.cpp
Expand Up @@ -311,7 +311,7 @@ void wxCheatsWindow::OnEvent_CheatsList_ItemToggled(wxCommandEvent& WXUNUSED (ev

void wxCheatsWindow::OnEvent_ApplyChanges_Press(wxCommandEvent& ev)
{
// Appply AR Code changes
// Apply AR Code changes
for (size_t i = 0; i < indexList.size(); i++)
{
ActionReplay::SetARCode_IsActive(m_CheckListBox_CheatsList->IsChecked(indexList[i].uiIndex), indexList[i].index);
Expand Down

0 comments on commit d244bca

Please sign in to comment.