Fix a bunch of random typos in comments and logging.

Also update the comment headers for two functions in GCMemcard.cpp.
This commit is contained in:
lioncash
2013-04-19 09:21:45 -04:00
parent 47f1505499
commit d244bca1f5
66 changed files with 122 additions and 117 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ bool OpenALStream::Start()
PanicAlertT("OpenAL: can't find sound devices");
}
// Initialise DPL2 parameters
// Initialize DPL2 parameters
dpl2reset();
soundTouch.clear();
@@ -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)))
{
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
@@ -637,7 +637,7 @@ public:
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);
+2 -2
View File
@@ -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
// -------------------------------------------------------------------------------------------------------------
@@ -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,
+2 -2
View File
@@ -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.
+2 -2
View File
@@ -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;
@@ -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()
{
@@ -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
@@ -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.
//
@@ -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;
@@ -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)
@@ -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);
@@ -30,7 +30,7 @@ public:
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);
+3 -3
View File
@@ -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)
@@ -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;
+1 -1
View File
@@ -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, ']');
@@ -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,
@@ -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()
{
+11 -5
View File
@@ -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)
@@ -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);
@@ -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)
+1 -1
View File
@@ -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

Some files were not shown because too many files have changed in this diff Show More