mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Avoid shadowing variables.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6613 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
+100
-100
@@ -1,100 +1,100 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Sram.h"
|
||||
#include "../ConfigManager.h"
|
||||
// english
|
||||
SRAM sram_dump = {{
|
||||
0x04, 0x6B,
|
||||
0xFB, 0x91,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0x40,
|
||||
0x05,
|
||||
0x00,
|
||||
0x00,
|
||||
0x2C,
|
||||
0x44, 0x4F, 0x4C, 0x50, 0x48, 0x49, 0x4E, 0x53, 0x4C, 0x4F, 0x54, 0x41,
|
||||
0x44, 0x4F, 0x4C, 0x50, 0x48, 0x49, 0x4E, 0x53, 0x4C, 0x4F, 0x54, 0x42,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x6E, 0x6D,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00
|
||||
}};
|
||||
|
||||
// german
|
||||
SRAM sram_dump_german = {{
|
||||
0x1F, 0x66,
|
||||
0xE0, 0x96,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0xEA, 0x19, 0x40,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x3C,
|
||||
0x12, 0xD5, 0xEA, 0xD3, 0x00, 0xFA, 0x2D, 0x33, 0x13, 0x41, 0x26, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x84, 0xFF,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00
|
||||
}};
|
||||
|
||||
void initSRAM()
|
||||
{
|
||||
FILE *file = fopen(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strSRAM.c_str(), "rb");
|
||||
if (file != NULL)
|
||||
{
|
||||
if (fread(&g_SRAM, 1, 64, file) < 64) {
|
||||
ERROR_LOG(EXPANSIONINTERFACE, "EXI IPL-DEV: Could not read all of SRAM");
|
||||
g_SRAM = sram_dump;
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_SRAM = sram_dump;
|
||||
}
|
||||
}
|
||||
|
||||
void SetCardFlashID(u8* buffer, u8 card_index)
|
||||
{
|
||||
u64 rand = Common::swap64( *(u64*)&(buffer[12]));
|
||||
u8 csum=0;
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
rand = (((rand * (u64)0x0000000041c64e6dULL) + (u64)0x0000000000003039ULL) >> 16);
|
||||
csum += g_SRAM.flash_id[card_index][i] = buffer[i] - ((u8)rand&0xff);
|
||||
rand = (((rand * (u64)0x0000000041c64e6dULL) + (u64)0x0000000000003039ULL) >> 16);
|
||||
rand &= (u64)0x0000000000007fffULL;
|
||||
}
|
||||
g_SRAM.flashID_chksum[card_index] = csum^0xFF;
|
||||
}
|
||||
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "Sram.h"
|
||||
#include "../ConfigManager.h"
|
||||
// english
|
||||
SRAM sram_dump = {{
|
||||
0x04, 0x6B,
|
||||
0xFB, 0x91,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0x40,
|
||||
0x05,
|
||||
0x00,
|
||||
0x00,
|
||||
0x2C,
|
||||
0x44, 0x4F, 0x4C, 0x50, 0x48, 0x49, 0x4E, 0x53, 0x4C, 0x4F, 0x54, 0x41,
|
||||
0x44, 0x4F, 0x4C, 0x50, 0x48, 0x49, 0x4E, 0x53, 0x4C, 0x4F, 0x54, 0x42,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x6E, 0x6D,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00
|
||||
}};
|
||||
|
||||
// german
|
||||
SRAM sram_dump_german = {{
|
||||
0x1F, 0x66,
|
||||
0xE0, 0x96,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0xEA, 0x19, 0x40,
|
||||
0x00,
|
||||
0x00,
|
||||
0x01,
|
||||
0x3C,
|
||||
0x12, 0xD5, 0xEA, 0xD3, 0x00, 0xFA, 0x2D, 0x33, 0x13, 0x41, 0x26, 0x03,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00,
|
||||
0x00,
|
||||
0x84, 0xFF,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00
|
||||
}};
|
||||
|
||||
void initSRAM()
|
||||
{
|
||||
FILE *file = fopen(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strSRAM.c_str(), "rb");
|
||||
if (file != NULL)
|
||||
{
|
||||
if (fread(&g_SRAM, 1, 64, file) < 64) {
|
||||
ERROR_LOG(EXPANSIONINTERFACE, "EXI IPL-DEV: Could not read all of SRAM");
|
||||
g_SRAM = sram_dump;
|
||||
}
|
||||
fclose(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_SRAM = sram_dump;
|
||||
}
|
||||
}
|
||||
|
||||
void SetCardFlashID(u8* buffer, u8 card_index)
|
||||
{
|
||||
u64 rand = Common::swap64( *(u64*)&(buffer[12]));
|
||||
u8 csum=0;
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
rand = (((rand * (u64)0x0000000041c64e6dULL) + (u64)0x0000000000003039ULL) >> 16);
|
||||
csum += g_SRAM.flash_id[card_index][i] = buffer[i] - ((u8)rand&0xff);
|
||||
rand = (((rand * (u64)0x0000000041c64e6dULL) + (u64)0x0000000000003039ULL) >> 16);
|
||||
rand &= (u64)0x0000000000007fffULL;
|
||||
}
|
||||
g_SRAM.flashID_chksum[card_index] = csum^0xFF;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -333,26 +333,27 @@ void DSPEmitter::dmem_write()
|
||||
}
|
||||
|
||||
// ECX - value
|
||||
void DSPEmitter::dmem_write_imm(u16 addr)
|
||||
void DSPEmitter::dmem_write_imm(u16 address)
|
||||
{
|
||||
switch (addr >> 12)
|
||||
switch (address >> 12)
|
||||
{
|
||||
case 0x0: // 0xxx DRAM
|
||||
#ifdef _M_IX86 // All32
|
||||
MOV(16, M(&g_dsp.dram[addr & DSP_DRAM_MASK]), R(ECX));
|
||||
MOV(16, M(&g_dsp.dram[address & DSP_DRAM_MASK]), R(ECX));
|
||||
#else
|
||||
MOV(64, R(RDX), ImmPtr(g_dsp.dram));
|
||||
MOV(16, MDisp(RDX,(addr & DSP_DRAM_MASK)*2), R(ECX));
|
||||
MOV(16, MDisp(RDX,(address & DSP_DRAM_MASK)*2), R(ECX));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0xf: // Fxxx HW regs
|
||||
MOV(16, R(EAX), Imm16(addr));
|
||||
MOV(16, R(EAX), Imm16(address));
|
||||
ABI_CallFunctionRR((void *)gdsp_ifx_write, EAX, ECX);
|
||||
break;
|
||||
|
||||
default: // Unmapped/non-existing memory
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Write to UNKNOWN (%04x) memory", g_dsp.pc, addr);
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Write to UNKNOWN (%04x) memory",
|
||||
g_dsp.pc, address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -431,34 +432,35 @@ void DSPEmitter::dmem_read()
|
||||
SetJumpTarget(end2);
|
||||
}
|
||||
|
||||
void DSPEmitter::dmem_read_imm(u16 addr)
|
||||
void DSPEmitter::dmem_read_imm(u16 address)
|
||||
{
|
||||
switch (addr >> 12)
|
||||
switch (address >> 12)
|
||||
{
|
||||
case 0x0: // 0xxx DRAM
|
||||
#ifdef _M_IX86 // All32
|
||||
MOV(16, R(EAX), M(&g_dsp.dram[addr & DSP_DRAM_MASK]));
|
||||
MOV(16, R(EAX), M(&g_dsp.dram[address & DSP_DRAM_MASK]));
|
||||
#else
|
||||
MOV(64, R(RDX), ImmPtr(g_dsp.dram));
|
||||
MOV(16, R(EAX), MDisp(RDX,(addr & DSP_DRAM_MASK)*2));
|
||||
MOV(16, R(EAX), MDisp(RDX,(address & DSP_DRAM_MASK)*2));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0x1: // 1xxx COEF
|
||||
#ifdef _M_IX86 // All32
|
||||
MOV(16, R(EAX), Imm16(g_dsp.coef[addr & DSP_COEF_MASK]));
|
||||
MOV(16, R(EAX), Imm16(g_dsp.coef[address & DSP_COEF_MASK]));
|
||||
#else
|
||||
MOV(64, R(RDX), ImmPtr(g_dsp.coef));
|
||||
MOV(16, R(EAX), MDisp(RDX,(addr & DSP_COEF_MASK)*2));
|
||||
MOV(16, R(EAX), MDisp(RDX,(address & DSP_COEF_MASK)*2));
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 0xf: // Fxxx HW regs
|
||||
ABI_CallFunctionC16((void *)gdsp_ifx_read, addr);
|
||||
ABI_CallFunctionC16((void *)gdsp_ifx_read, address);
|
||||
break;
|
||||
|
||||
default: // Unmapped/non-existing memory
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Read from UNKNOWN (%04x) memory", g_dsp.pc, addr);
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Read from UNKNOWN (%04x) memory",
|
||||
g_dsp.pc, address);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ void TexDecoder_OpenCL_Initialize()
|
||||
char *header = NULL;
|
||||
size_t nDevices = 0;
|
||||
cl_device_id *devices = NULL;
|
||||
cl_program program = NULL;
|
||||
size_t *binary_sizes = NULL;
|
||||
char **binaries = NULL;
|
||||
char filename[1024];
|
||||
|
||||
Reference in New Issue
Block a user