This commit is contained in:
saqibakhtar
2008-07-14 09:05:01 +00:00
parent 0827972636
commit 6ad0fb3a35
56 changed files with 53 additions and 1203 deletions

View File

@@ -29,16 +29,10 @@ void COP0() {
}
void COP0_BC0() {
#ifdef COP0_LOG
COP0_LOG("%s\n", disR5900F(cpuRegs.code, cpuRegs.pc));
#endif
Int_COP0BC0PrintTable[(cpuRegs.code >> 16) & 0x03]();
}
void COP0_Func() {
#ifdef COP0_LOG
COP0_LOG("%s\n", disR5900F(cpuRegs.code, cpuRegs.pc));
#endif
Int_COP0C0PrintTable[_Funct_]();
}
@@ -68,81 +62,6 @@ void WriteCP0Status(u32 value) {
extern u32 s_iLastCOP0Cycle;
extern u32 s_iLastPERFCycle[2];
void MFC0() {
if (!_Rt_) return;
#ifdef COP0_LOG
if (_Rd_ != 9) { COP0_LOG("%s\n", disR5900F(cpuRegs.code, cpuRegs.pc)); }
#endif
//if(bExecBIOS == FALSE && _Rd_ == 25) SysPrintf("MFC0 _Rd_ %x = %x\n", _Rd_, cpuRegs.CP0.r[_Rd_]);
switch (_Rd_) {
case 12: cpuRegs.GPR.r[_Rt_].UD[0] = (s64)(cpuRegs.CP0.r[_Rd_] & 0xf0c79c1f); break;
case 25:
switch(_Imm_ & 0x3F){
case 0: cpuRegs.GPR.r[_Rt_].UD[0] = (s64)cpuRegs.PERF.n.pccr; break;
case 1:
if((cpuRegs.PERF.n.pccr & 0x800003E0) == 0x80000020) {
cpuRegs.PERF.n.pcr0 += cpuRegs.cycle-s_iLastPERFCycle[0];
s_iLastPERFCycle[0] = cpuRegs.cycle;
}
cpuRegs.GPR.r[_Rt_].UD[0] = (s64)cpuRegs.PERF.n.pcr0;
break;
case 3:
if((cpuRegs.PERF.n.pccr & 0x800F8000) == 0x80008000) {
cpuRegs.PERF.n.pcr1 += cpuRegs.cycle-s_iLastPERFCycle[1];
s_iLastPERFCycle[1] = cpuRegs.cycle;
}
cpuRegs.GPR.r[_Rt_].UD[0] = (s64)cpuRegs.PERF.n.pcr1;
break;
}
/*SysPrintf("MFC0 PCCR = %x PCR0 = %x PCR1 = %x IMM= %x\n",
cpuRegs.PERF.n.pccr, cpuRegs.PERF.n.pcr0, cpuRegs.PERF.n.pcr1, _Imm_ & 0x3F);*/
break;
case 24:
SysPrintf("MFC0 Breakpoint debug Registers code = %x\n", cpuRegs.code & 0x3FF);
break;
case 9:
// update
cpuRegs.CP0.n.Count += cpuRegs.cycle-s_iLastCOP0Cycle;
s_iLastCOP0Cycle = cpuRegs.cycle;
default: cpuRegs.GPR.r[_Rt_].UD[0] = (s64)cpuRegs.CP0.r[_Rd_];
}
}
void MTC0() {
#ifdef COP0_LOG
COP0_LOG("%s\n", disR5900F(cpuRegs.code, cpuRegs.pc));
#endif
//if(bExecBIOS == FALSE && _Rd_ == 25) SysPrintf("MTC0 _Rd_ %x = %x\n", _Rd_, cpuRegs.CP0.r[_Rd_]);
switch (_Rd_) {
case 25:
/*if(bExecBIOS == FALSE && _Rd_ == 25) SysPrintf("MTC0 PCCR = %x PCR0 = %x PCR1 = %x IMM= %x\n",
cpuRegs.PERF.n.pccr, cpuRegs.PERF.n.pcr0, cpuRegs.PERF.n.pcr1, _Imm_ & 0x3F);*/
switch(_Imm_ & 0x3F){
case 0:
if((cpuRegs.PERF.n.pccr & 0x800003E0) == 0x80000020)
cpuRegs.PERF.n.pcr0 += cpuRegs.cycle-s_iLastPERFCycle[0];
if((cpuRegs.PERF.n.pccr & 0x800F8000) == 0x80008000)
cpuRegs.PERF.n.pcr1 += cpuRegs.cycle-s_iLastPERFCycle[1];
cpuRegs.PERF.n.pccr = cpuRegs.GPR.r[_Rt_].UL[0];
s_iLastPERFCycle[0] = cpuRegs.cycle;
s_iLastPERFCycle[1] = cpuRegs.cycle;
break;
case 1: cpuRegs.PERF.n.pcr0 = cpuRegs.GPR.r[_Rt_].UL[0]; s_iLastPERFCycle[0] = cpuRegs.cycle; break;
case 3: cpuRegs.PERF.n.pcr1 = cpuRegs.GPR.r[_Rt_].UL[0]; s_iLastPERFCycle[1] = cpuRegs.cycle; break;
}
break;
case 24:
SysPrintf("MTC0 Breakpoint debug Registers code = %x\n", cpuRegs.code & 0x3FF);
break;
case 12: WriteCP0Status(cpuRegs.GPR.r[_Rt_].UL[0]); break;
case 9: s_iLastCOP0Cycle = cpuRegs.cycle; cpuRegs.CP0.r[9] = cpuRegs.GPR.r[_Rt_].UL[0]; break;
default: cpuRegs.CP0.r[_Rd_] = cpuRegs.GPR.r[_Rt_].UL[0]; break;
}
}
int CPCOND0() {
if(((psHu16(DMAC_STAT) & psHu16(DMAC_PCR)) & 0x3ff) == (psHu16(DMAC_PCR) & 0x3ff)) return 1;
else return 0;

View File

@@ -27,27 +27,6 @@
#include "Misc.h"
extern FILE *emuLog;
char* disR5900F(u32 code, u32 pc);
char* disR5900Fasm(u32 code, u32 pc);
char* disR3000Fasm(u32 code, u32 pc);
void disR5900AddSym(u32 addr, char *name);
char* disR5900GetSym(u32 addr);
char* disR5900GetUpperSym(u32 addr);
void disR5900FreeSyms();
char* disVU0MicroUF(u32 code, u32 pc);
char* disVU0MicroLF(u32 code, u32 pc);
char* disVU1MicroUF(u32 code, u32 pc);
char* disVU1MicroLF(u32 code, u32 pc);
char* disR3000AF(u32 code, u32 pc);
extern char *CP2VFnames[];
extern char *disRNameCP2f[];
extern char *disRNameCP2i[];
//that way is slower but you now not need to compile every time ;P
#ifdef PCSX2_DEVBUILD

View File

@@ -545,17 +545,6 @@ BOOL loadSectionHeaders( char * Exepath )
SymNames = (char*)&elfdata[elfSectH[ i_dt ].sh_offset];
eS = (Elf32_Sym*)&elfdata[elfSectH[ i_st ].sh_offset];
SysPrintf("found %d symbols\n", elfSectH[ i_st ].sh_size / sizeof( Elf32_Sym ));
for ( i = 1; i < (int)( elfSectH[ i_st ].sh_size / sizeof( Elf32_Sym ) ); i++ ) {
if ( ( eS[ i ].st_value != 0 ) && ( ELF32_ST_TYPE( eS[ i ].st_info ) == 2 ) ) {
// SysPrintf("%x:%s\n", eS[i].st_value, &SymNames[eS[i].st_name]);
disR5900AddSym( eS[i].st_value, &SymNames[ eS[ i ].st_name ] );
/* if (!strcmp(&SymNames[eS[i].st_name], "sceSifCheckStatRpc")) {
psMu32(eS[i].st_value & 0x1ffffff) = (0x3b << 26) | 1;
SysPrintf("found sceSifCheckStatRpc!!\n");
}*/
}
}
}
return TRUE;

View File

@@ -43,9 +43,6 @@
//****************************************************************
void COP1() {
#ifdef FPU_LOG
FPU_LOG("%s\n", disR5900F(cpuRegs.code, cpuRegs.pc));
#endif
Int_COP1PrintTable[_Rs_]();
}

View File

@@ -293,10 +293,6 @@ u64 ipuRead64(u32 mem)
return *(u64*)(((u8*)ipuRegs)+(mem&0xff));
}
#ifndef PCSX2_NORECBUILD
#ifndef __x86_64__
int ipuConstRead32(u32 x86reg, u32 mem)
{
int workingreg, tempreg, tempreg2;
@@ -399,22 +395,6 @@ void ipuConstRead64(u32 mem, int mmreg)
}
}
#else
int ipuConstRead32(u32 x86reg, u32 mem)
{
assert(0);
}
void ipuConstRead64(u32 mem, int mmreg)
{
assert(0);
}
#endif // __x86_64__
#endif // !defined(PCSX2_NORECBUILD)
void ipuSoftReset()
{
if (!mpeg2_inited){
@@ -505,10 +485,6 @@ void ipuWrite64(u32 mem, u64 value)
}
}
#ifndef PCSX2_NORECBUILD
#ifndef __x86_64__
void ipuConstWrite32(u32 mem, int mmreg)
{
iFlushCall(0);
@@ -579,22 +555,6 @@ void ipuConstWrite64(u32 mem, int mmreg)
}
}
#else
void ipuConstWrite32(u32 mem, int mmreg)
{
assert(0);
}
void ipuConstWrite64(u32 mem, int mmreg)
{
assert(0);
}
#endif
#endif
///////////////////////////////////////////
// IPU Commands (exec on worker thread only)

View File

@@ -115,7 +115,7 @@ void (*Int_MMI3PrintTable[32])() =
void (*Int_COP0PrintTable[32])() =
{
MFC0, COP0_Unknown, COP0_Unknown, COP0_Unknown, MTC0, COP0_Unknown, COP0_Unknown, COP0_Unknown,
COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown,
COP0_BC0, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown,
COP0_Func, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown,
COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown, COP0_Unknown,

View File

@@ -299,8 +299,6 @@ void PEXCW();
//****************************************************************************
//** COP0 **
//****************************************************************************
void MFC0();
void MTC0();
void BC0F();
void BC0T();
void BC0FL();

View File

@@ -24,9 +24,6 @@
void MMI() {
#ifdef MMI_LOG
MMI_LOG("%s\n", disR5900F(cpuRegs.code, cpuRegs.pc));
#endif
Int_MMIPrintTable[_Funct_]();
}

View File

@@ -52,15 +52,8 @@ BIOS
#include <stdlib.h>
#include <malloc.h>
#include <sys/stat.h>
#include "Common.h"
#ifdef PCSX2_NORECBUILD
#define REC_CLEARM(mem)
#else
#include "iR5900.h"
#endif
#include "PsxMem.h"
#include "R3000A.h"
#include "PsxHw.h"
@@ -1356,7 +1349,7 @@ int recMemConstWrite32(u32 mem, int mmreg)
CALLFunc((u32)Cpu->ClearVU0);
ADD32ItoR(ESP, 8);
}
else if( mem >= 0x11008000 && mem < 0x1100c0000 ) {
else if( mem >= 0x11008000 && mem < 0x1100c000 ) {
PUSH32I(1);
PUSH32I(mem&0x3ff8);
CALLFunc((u32)Cpu->ClearVU1);
@@ -1912,9 +1905,7 @@ void memWrite8 (u32 mem, u8 value) {
default:
*(u8*)(PS2MEM_BASE+mem) = value;
if (CHECK_EEREC) {
REC_CLEARM(mem&~3);
}
REC_CLEARM(mem&~3);
return;
}
@@ -1940,9 +1931,7 @@ void memWrite16(u32 mem, u16 value) {
default:
*(u16*)(PS2MEM_BASE+mem) = value;
if (CHECK_EEREC) {
REC_CLEARM(mem&~3);
}
REC_CLEARM(mem&~3);
return;
}
@@ -1968,10 +1957,7 @@ void memWrite32(u32 mem, u32 value)
default:
*(u32*)(PS2MEM_BASE+mem) = value;
if (CHECK_EEREC) {
REC_CLEARM(mem);
}
REC_CLEARM(mem);
return;
}
@@ -1990,11 +1976,8 @@ void memWrite64(u32 mem, u64 value) {
default:
*(u64*)(PS2MEM_BASE+mem) = value;
if (CHECK_EEREC) {
REC_CLEARM(mem);
REC_CLEARM(mem+4);
}
REC_CLEARM(mem);
REC_CLEARM(mem+4);
return;
}
@@ -2017,13 +2000,10 @@ void memWrite128(u32 mem, u64 *value) {
default:
*(u64*)(PS2MEM_BASE+mem) = value[0];
*(u64*)(PS2MEM_BASE+mem+8) = value[1];
if (CHECK_EEREC) {
REC_CLEARM(mem);
REC_CLEARM(mem+4);
REC_CLEARM(mem+8);
REC_CLEARM(mem+12);
}
REC_CLEARM(mem);
REC_CLEARM(mem+4);
REC_CLEARM(mem+8);
REC_CLEARM(mem+12);
return;
}

View File

@@ -364,8 +364,6 @@ int GetPS2ElfName(char *name){
}
if (buffer[i] == 0) break;
buffer[i] = 0;
disR5900AddSym(addr, buffer);
}
fclose(fp);
}
@@ -643,33 +641,27 @@ int LoadState(char *file) {
for (i=0; i<48; i++) ClearTLB(i);
Cpu->Reset();
#ifndef PCSX2_NORECBUILD
recResetVU0();
recResetVU1();
#endif
psxCpu->Reset();
SysPrintf("Loading memory\n");
#ifdef PCSX2_VIRTUAL_MEM
// make sure can write
VirtualProtect(PS2MEM_ROM, 0x00400000, PAGE_READWRITE, (PDWORD)&OldProtect);
VirtualProtect(PS2MEM_ROM1, 0x00040000, PAGE_READWRITE, (PDWORD)&OldProtect);
VirtualProtect(PS2MEM_ROM2, 0x00080000, PAGE_READWRITE, (PDWORD)&OldProtect);
VirtualProtect(PS2MEM_EROM, 0x001C0000, PAGE_READWRITE, (PDWORD)&OldProtect);
#endif
gzread(f, PS2MEM_BASE, 0x02000000); // 32 MB main memory
gzread(f, PS2MEM_ROM, 0x00400000); // 4 mb rom memory
gzread(f, PS2MEM_ROM1,0x00040000); // 256kb rom1 memory
gzread(f, PS2MEM_SCRATCH, 0x00004000); // scratch pad
#ifdef PCSX2_VIRTUAL_MEM
VirtualProtect(PS2MEM_ROM, 0x00400000, PAGE_READONLY, (PDWORD)&OldProtect);
VirtualProtect(PS2MEM_ROM1, 0x00040000, PAGE_READONLY, (PDWORD)&OldProtect);
VirtualProtect(PS2MEM_ROM2, 0x00080000, PAGE_READONLY, (PDWORD)&OldProtect);
VirtualProtect(PS2MEM_EROM, 0x001C0000, PAGE_READONLY, (PDWORD)&OldProtect);
#endif
gzread(f, PS2MEM_HW, 0x00010000); // hardware memory
@@ -918,9 +910,6 @@ void ProcessFKeys(int fkey, int shift)
case 4:
#ifdef PCSX2_NORECBUILD
SysPrintf("frame skipping only valid for recompiler build\n");
#else
// cycle
if( shift ) {
// previous
@@ -951,7 +940,6 @@ void ProcessFKeys(int fkey, int shift)
break;
}
SaveConfig();
#endif
break;
// note: VK_F5-VK_F7 are reserved for GS
case 8:
@@ -961,9 +949,6 @@ void ProcessFKeys(int fkey, int shift)
#ifdef PCSX2_DEVBUILD
case 10:
{
#ifdef PCSX2_NORECBUILD
SysPrintf("Block performances times only valid for recompiler builds\n");
#else
int num;
FILE* f;
BASEBLOCKEX** ppblocks = GetAllBaseBlocks(&num, 0);
@@ -979,7 +964,6 @@ void ProcessFKeys(int fkey, int shift)
}
fclose(f);
SysPrintf("perflog.txt written\n");
#endif
break;
}
@@ -1010,10 +994,8 @@ void ProcessFKeys(int fkey, int shift)
case 12:
if( shift ) {
#ifdef PCSX2_DEVBUILD
#ifndef PCSX2_NORECBUILD
iDumpRegisters(cpuRegs.pc, 0);
SysPrintf("hardware registers dumped EE:%x, IOP:%x\n", cpuRegs.pc, psxRegs.pc);
#endif
#endif
}
else {
@@ -1094,63 +1076,3 @@ void injectIRX(char *filename){
rd[i].fileSize=filesize;
rd[i].extInfoSize=0;
}
// failed inline calls, this is because of inline hell and gcc syntax
#ifndef _WIN32
void InterlockedExchangePointer(PVOID volatile* Target, void* Value)
{
#ifdef __x86_64__
__asm__ __volatile__(".intel_syntax\n"
"lock xchg [%0], %%rax\n"
".att_syntax\n" : : "r"(Target), "a"(Value) : "memory" );
#else
__asm__ __volatile__(".intel_syntax\n"
"lock xchg [%0], %%eax\n"
".att_syntax\n" : : "r"(Target), "a"(Value) : "memory" );
#endif
}
long InterlockedExchange(long volatile* Target, long Value)
{
__asm__ __volatile__(".intel_syntax\n"
"lock xchg [%0], %%eax\n"
".att_syntax\n" : : "r"(Target), "a"(Value) : "memory" );
}
long InterlockedExchangeAdd(long volatile* Addend, long Value)
{
__asm__ __volatile__(".intel_syntax\n"
"lock xadd [%0], %%eax\n"
".att_syntax\n" : : "r"(Addend), "a"(Value) : "memory" );
}
u32 timeGetTime()
{
struct timeb t;
ftime(&t);
return (u32)(t.time*1000+t.millitm);
}
void* pcsx2_aligned_malloc(size_t size, size_t align)
{
assert( align < 0x10000 );
char* p = (char*)malloc(size+align);
int off = 2+align - ((int)(uptr)(p+2) % align);
p += off;
*(u16*)(p-2) = off;
return p;
}
void pcsx2_aligned_free(void* pmem)
{
if( pmem != NULL ) {
char* p = (char*)pmem;
free(p - (int)*(u16*)(p-2));
}
}
#endif

View File

@@ -50,7 +50,6 @@
#define CHECK_MULTIGS (Config.Options&PCSX2_GSMULTITHREAD)
#define CHECK_DUALCORE (Config.Options&PCSX2_DUALCORE)
#define CHECK_EEREC (Config.Options&PCSX2_EEREC)
#define CHECK_COP2REC (Config.Options&PCSX2_COP2REC) // goes with ee option
#define CHECK_FORCEABS (~(Config.Hacks >> 1) & 1) // always on, (Config.Options&PCSX2_FORCEABS)
@@ -184,22 +183,11 @@ u32 GetBiosVersion();
int IsBIOS(char *filename, char *description);
// check to see if needs freezing
#ifdef PCSX2_NORECBUILD
#define FreezeMMXRegs(save)
#define FreezeXMMRegs(save)
#else
void FreezeXMMRegs_(int save);
extern u32 g_EEFreezeRegs;
#define FreezeXMMRegs(save) if( g_EEFreezeRegs ) { FreezeXMMRegs_(save); }
#ifndef __x86_64__
void FreezeMMXRegs_(int save);
#define FreezeMMXRegs(save) if( g_EEFreezeRegs ) { FreezeMMXRegs_(save); }
#else
#define FreezeMMXRegs(save)
#endif
#endif
// define a PCS2 specific memcpy and make sure it is used all in real-time code
#if _MSC_VER >= 1400 // vs2005+ uses xmm/mmx in memcpy
@@ -214,22 +202,10 @@ __forceinline void memcpy_pcsx2(void* dest, const void* src, size_t n)
#define memcpy_pcsx2 memcpy
#endif
#ifdef PCSX2_NORECBUILD
#define memcpy_fast memcpy
#else
#if defined(_WIN32) && !defined(__x86_64__)
// faster memcpy
void * memcpy_amd_(void *dest, const void *src, size_t n);
#define memcpy_fast memcpy_amd_
//#define memcpy_fast memcpy //Dont use normal memcpy, it has sse in 2k5!
#else
// for now disable linux fast memcpy
#define memcpy_fast memcpy_pcsx2
#endif
#endif
u8 memcmp_mmx(const void* src1, const void* src2, int cmpsize);
void memxor_mmx(void* dst, const void* src1, int cmpsize);

View File

@@ -558,20 +558,16 @@ int AddPatch(int Mode, int Place, int Address, int Size, u64 data)
void patchFunc_fastmemory( char * cmd, char * param )
{
#ifndef PCSX2_NORECBUILD
// only valid for recompilers
SetFastMemory(1);
#endif
}
extern void SetVUNanMode(int mode);
void patchFunc_vunanmode( char * cmd, char * param )
{
#ifndef PCSX2_NORECBUILD
// only valid for recompilers
SetVUNanMode(param != NULL ? atoi(param) : 1);
#endif
}
extern int path3hack;
@@ -632,7 +628,5 @@ void patchFunc_zerogs(char* cmd, char* param)
void SetRoundMode(u32 ee, u32 vu)
{
// don't set a state for interpreter only
#ifndef PCSX2_NORECBUILD
SetCPUState(0x9f80|ee, 0x9f80|vu);
#endif
}

View File

@@ -33,7 +33,7 @@ PCSX2_ALIGNED16(psxRegisters psxRegs);
int psxInit()
{
psxCpu = CHECK_EEREC ? &psxRec : &psxInt;
psxCpu = &psxRec;
#ifdef PCSX2_DEVBUILD
Log=0;
@@ -94,44 +94,6 @@ void psxException(u32 code, u32 bd) {
// Set the Status
psxRegs.CP0.n.Status = (psxRegs.CP0.n.Status &~0x3f) |
((psxRegs.CP0.n.Status & 0xf) << 2);
/*if ((((PSXMu32(psxRegs.CP0.n.EPC) >> 24) & 0xfe) == 0x4a)) {
// "hokuto no ken" / "Crash Bandicot 2" ... fix
PSXMu32(psxRegs.CP0.n.EPC)&= ~0x02000000;
}*/
if (Config.PsxOut && !CHECK_EEREC) {
u32 call = psxRegs.GPR.n.t1 & 0xff;
switch (psxRegs.pc & 0x1fffff) {
case 0xa0:
#ifdef PSXBIOS_LOG
if (call != 0x28 && call != 0xe) {
PSXBIOS_LOG("Bios call a0: %s (%x) %x,%x,%x,%x\n", biosA0n[call], call, psxRegs.GPR.n.a0, psxRegs.GPR.n.a1, psxRegs.GPR.n.a2, psxRegs.GPR.n.a3); }
#endif
if (biosA0[call])
biosA0[call]();
break;
case 0xb0:
#ifdef PSXBIOS_LOG
if (call != 0x17 && call != 0xb) {
PSXBIOS_LOG("Bios call b0: %s (%x) %x,%x,%x,%x\n", biosB0n[call], call, psxRegs.GPR.n.a0, psxRegs.GPR.n.a1, psxRegs.GPR.n.a2, psxRegs.GPR.n.a3); }
#endif
if (biosB0[call])
biosB0[call]();
break;
case 0xc0:
#ifdef PSXBIOS_LOG
PSXBIOS_LOG("Bios call c0: %s (%x) %x,%x,%x,%x\n", biosC0n[call], call, psxRegs.GPR.n.a0, psxRegs.GPR.n.a1, psxRegs.GPR.n.a2, psxRegs.GPR.n.a3);
#endif
if (biosC0[call])
biosC0[call]();
break;
}
}
/*if (psxRegs.CP0.n.Cause == 0x400 && (!(psxHu32(0x1450) & 0x8))) {
hwIntcIrq(1);
}*/
}
#define PSX_TESTINT(n, callback) \
@@ -208,7 +170,7 @@ void psxExecuteBios() {
void psxRestartCPU()
{
psxCpu->Shutdown();
psxCpu = CHECK_EEREC ? &psxRec : &psxInt;
psxCpu = &psxRec;
if (psxCpu->Init() == -1) {
SysClose();

View File

@@ -58,22 +58,15 @@ int cpuInit()
InitFPUOps();
cpuRegs.constzero = 0;
#ifdef PCSX2_NORECBUILD
Cpu = &intCpu;
#else
cpudetectInit();
Cpu = CHECK_EEREC ? &recCpu : &intCpu;
#endif
Cpu = &recCpu;
ret = Cpu->Init();
if (ret == -1 && CHECK_EEREC) {
SysMessage(_("Error initializing Recompiler, switching to Interpreter"));
Config.Options &= ~(PCSX2_EEREC|PCSX2_VU1REC|PCSX2_VU0REC);
Cpu = &intCpu;
ret = Cpu->Init();
if (ret == -1)
{
return -1;
}
#ifdef PCSX2_VIRTUAL_MEM
if (memInit() == -1) {
PROCESS_INFORMATION pi;
STARTUPINFO si;
@@ -99,13 +92,9 @@ int cpuInit()
return -1;
}
#endif
if (hwInit() == -1) return -1;
if (vu0Init() == -1) return -1;
if (vu1Init() == -1) return -1;
#ifndef PCSX2_VIRTUAL_MEM
if (memInit() == -1) return -1;
#endif
#ifdef PCSX2_DEVBUILD
Log = 0;
@@ -149,8 +138,6 @@ void cpuShutdown()
vu1Shutdown();
memShutdown();
gsShutdown();
disR5900FreeSyms();
Cpu->Shutdown();
}
@@ -396,15 +383,13 @@ extern void gsWaitGS();
void cpuBranchTest()
{
#ifndef PCSX2_NORECBUILD
// dont' remove this check unless doing an official release
if( g_globalXMMSaved X86_32CODE(|| g_globalMMXSaved) )
SysPrintf("frozen regs have not been restored!!!\n");
assert( !g_globalXMMSaved X86_32CODE(&& !g_globalMMXSaved) );
g_EEFreezeRegs = 0;
#endif
// if( !loaded && cpuRegs.cycle > 0x20000000 ) {
// if( !loaded && cpuRegs.cycle > 0x20000000 ) {
// char strstate[255];
// sprintf(strstate, SSTATES_DIR "/%8.8X.000", ElfCRC);
// LoadState(strstate);
@@ -449,10 +434,8 @@ void cpuBranchTest()
if( (int)cpuRegs.cycle-(int)g_nextBranchCycle > 0 )
g_nextBranchCycle = cpuRegs.cycle+1;
#ifndef PCSX2_NORECBUILD
assert( !g_globalXMMSaved X86_32CODE(&& !g_globalMMXSaved) );
g_EEFreezeRegs = 1;
#endif
}
static void _cpuTestINTC() {
@@ -504,14 +487,11 @@ void cpuTestTIMRInts() {
void cpuExecuteBios()
{
// filter CPU options
if( CHECK_EEREC ) Config.Options |= PCSX2_COP2REC;
else Config.Options &= ~PCSX2_COP2REC;
#ifndef PCSX2_NORECBUILD
Config.Options |= PCSX2_COP2REC;
if( !cpucaps.hasStreamingSIMDExtensions ) {
Config.Options &= ~(PCSX2_VU1REC|PCSX2_VU0REC);
}
#endif
// remove frame skipping if GS doesn't support it
switch(CHECK_FRAMELIMIT) {
@@ -563,7 +543,7 @@ void cpuExecuteBios()
// REC_CLEARM(0x00200008);
// REC_CLEARM(0x00100008);
// REC_CLEARM(cpuRegs.pc);
if( CHECK_EEREC ) Cpu->Reset();
Cpu->Reset();
SysPrintf("* PCSX2 *: ExecuteBios Complete\n");
GSprintf(5, "PCSX2 v" PCSX2_VERSION "\nExecuteBios Complete\n");
@@ -571,12 +551,7 @@ void cpuExecuteBios()
void cpuRestartCPU()
{
#ifdef PCSX2_NORECBUILD
Cpu = &intCpu;
#else
Cpu = CHECK_EEREC ? &recCpu : &intCpu;
#endif
Cpu = &recCpu;
// restart vus
if (Cpu->Init() == -1) {
SysClose();
@@ -592,9 +567,7 @@ void cpuRestartCPU()
// for interpreter only
void IntcpuBranchTest()
{
#ifndef PCSX2_NORECBUILD
g_EEFreezeRegs = 0;
#endif
g_nextBranchCycle = cpuRegs.cycle + EE_WAIT_CYCLE;
@@ -627,7 +600,5 @@ void IntcpuBranchTest()
if( (int)cpuRegs.cycle-(int)g_nextBranchCycle > 0 )
g_nextBranchCycle = cpuRegs.cycle+1;
#ifndef PCSX2_NORECBUILD
g_EEFreezeRegs = 1;
#endif
}

View File

@@ -53,8 +53,7 @@ void statsClose() {
#endif
fprintf(f, "Total EE Instructions Executed: %lld\n", stats.eeCycles);
fprintf(f, "Total IOP Instructions Executed: %lld\n", stats.iopCycles);
if (!CHECK_EEREC) fprintf(f, "Interpreter Mode\n");
else fprintf(f, "Recompiler Mode: VUrec1 %s, VUrec0 %s\n",
fprintf(f, "Recompiler Mode: VUrec1 %s, VUrec0 %s\n",
CHECK_VU1REC ? "Enabled" : "Disabled", CHECK_VU0REC ? "Enabled" : "Disabled");
fclose(f);
}

View File

@@ -51,9 +51,6 @@
PCSX2_ALIGNED16(VURegs VU0);
void COP2() {
#ifdef VU0_LOG
VU0_LOG("%s\n", disR5900Fasm(cpuRegs.code, cpuRegs.pc));
#endif
Int_COP2PrintTable[_Rs_]();
}

View File

@@ -113,11 +113,9 @@ int vu0Init()
VU0.vuExec = vu0Exec;
VU0.vifRegs = vif0Regs;
#ifndef PCSX2_NORECBUILD
if( CHECK_VU0REC ) {
SuperVUInit(0);
}
#endif
vu0Reset();
@@ -126,21 +124,14 @@ int vu0Init()
void vu0Shutdown()
{
#ifndef PCSX2_NORECBUILD
if( CHECK_VU0REC ) {
SuperVUDestroy(0);
}
#endif
#ifdef PCSX2_VIRTUAL_MEM
if( !SysMapUserPhysicalPages(VU0.Mem, 16, NULL, 0) )
SysPrintf("err releasing vu0 mem %d\n", GetLastError());
if( VirtualFree(VU0.Mem, 0, MEM_RELEASE) == 0 )
SysPrintf("err freeing vu0 %d\n", GetLastError());
#else
_aligned_free(VU0.Mem);
_aligned_free(VU0.Micro);
#endif
VU0.Mem = NULL;
VU0.Micro = NULL;
@@ -173,11 +164,9 @@ void vu0Reset()
void recResetVU0( void )
{
#ifndef PCSX2_NORECBUILD
if( CHECK_VU0REC ) {
SuperVUReset(0);
}
#endif
}
void vu0Freeze(gzFile f, int Mode) {
@@ -215,13 +204,11 @@ void vu0ExecMicro(u32 addr) {
void _vu0ExecUpper(VURegs* VU, u32 *ptr) {
VU->code = ptr[1];
IdebugUPPER(VU0);
VU0_UPPER_OPCODE[VU->code & 0x3f]();
}
void _vu0ExecLower(VURegs* VU, u32 *ptr) {
VU->code = ptr[0];
IdebugLOWER(VU0);
VU0_LOWER_OPCODE[VU->code >> 25]();
}

View File

@@ -87,11 +87,9 @@ int vu1Init()
VU1.vuExec = vu1Exec;
VU1.vifRegs = vif1Regs;
#ifndef PCSX2_NORECBUILD
if( CHECK_VU1REC ) {
recVU1Init();
}
#endif
vu1Reset();
@@ -99,11 +97,9 @@ int vu1Init()
}
void vu1Shutdown() {
#ifndef PCSX2_NORECBUILD
if( CHECK_VU1REC ) {
recVU1Shutdown();
}
#endif
}
void vu1ResetRegs()
@@ -125,9 +121,7 @@ void vu1Reset() {
memset(VU1.Mem, 0, 16*1024);
memset(VU1.Micro, 0, 16*1024);
#ifndef PCSX2_NORECBUILD
recResetVU1();
#endif
}
void vu1Freeze(gzFile f, int Mode) {
@@ -174,13 +168,11 @@ void vu1ExecMicro(u32 addr)
void _vu1ExecUpper(VURegs* VU, u32 *ptr) {
VU->code = ptr[1];
IdebugUPPER(VU1);
VU1_UPPER_OPCODE[VU->code & 0x3f]();
}
void _vu1ExecLower(VURegs* VU, u32 *ptr) {
VU->code = ptr[0];
IdebugLOWER(VU1);
VU1_LOWER_OPCODE[VU->code >> 25]();
}

View File

@@ -91,11 +91,7 @@ extern "C" u32* _vifRow, *_vifCol;
extern "C" VIFregisters *_vifRegs;
extern "C" PCSX2_ALIGNED16(u32 s_TempDecompress[4]);
#ifndef PCSX2_NORECBUILD
void SetNewMask(u32* vif1masks, u32* hasmask, u32 mask, u32 oldmask);
#else
#define SetNewMask 0&&
#endif
#define XMM_R0 xmm0
#define XMM_R1 xmm1

View File

@@ -113,8 +113,6 @@ static const VIFUnpackFuncTable VIFfuncTable[16] = {
extern "C"
{
#if !defined(PCSX2_NORECBUILD)
typedef struct {
// regular 0, 1, 2; mask 0, 1, 2
UNPACKPARTFUNCTYPESSE funcU[9], funcS[9];
@@ -193,7 +191,6 @@ static const VIFSSEUnpackTable VIFfuncTableSSE[16] = {
{ _UNPACK_TABLE_SSE(V4_5, u), _UNPACK_TABLE_SSE(V4_5, u) },
};
#endif
}
__forceinline void vif0FLUSH() {
@@ -541,8 +538,6 @@ static void VIFunpack(u32 *data, vifCode *v, int size, const unsigned int VIFdma
}
#if !defined(PCSX2_NORECBUILD)
if( size >= ft->gsize && !(v->addr&0xf) && cpucaps.hasStreamingSIMD2Extensions) {
const UNPACKPARTFUNCTYPESSE* pfn;
int writemask;
@@ -558,11 +553,6 @@ static void VIFunpack(u32 *data, vifCode *v, int size, const unsigned int VIFdma
// memset(dest, 0xcd, 64*4);
// VIFfuncTableSSE[1].funcS[6](dest, (u32*)tempdata, 8);
#ifdef _MSC_VER
#ifdef __x86_64__
_vifCol = VIFdmanum ? g_vifCol1 : g_vifCol0;
#else
if( VIFdmanum ) {
__asm movaps XMM_ROW, qword ptr [g_vifRow1]
__asm movaps XMM_COL, qword ptr [g_vifCol1]
@@ -571,22 +561,6 @@ static void VIFunpack(u32 *data, vifCode *v, int size, const unsigned int VIFdma
__asm movaps XMM_ROW, qword ptr [g_vifRow0]
__asm movaps XMM_COL, qword ptr [g_vifCol0]
}
#endif
#else
if( VIFdmanum ) {
__asm__(".intel_syntax\n"
"movaps %%xmm6, qword ptr [%0]\n"
"movaps %%xmm7, qword ptr [%1]\n"
".att_syntax\n" : :"r"(g_vifRow1), "r"(g_vifCol1) );
}
else {
__asm__(".intel_syntax\n"
"movaps %%xmm6, qword ptr [%0]\n"
"movaps %%xmm7, qword ptr [%1]\n"
".att_syntax\n" : : "r"(g_vifRow0), "r"(g_vifCol0) );
}
#endif
if( vifRegs->cycle.cl == 0 || vifRegs->cycle.wl == 0 || (vifRegs->cycle.cl == vifRegs->cycle.wl && !(vifRegs->code&0x10000000)) ) {
oldcycle = *(u32*)&vifRegs->cycle;
@@ -626,7 +600,6 @@ static void VIFunpack(u32 *data, vifCode *v, int size, const unsigned int VIFdma
//((LARGE_INTEGER*)g_nCounters)->QuadPart += lfinal.QuadPart - lbase.QuadPart;
}
else
#endif // !PCSX2_NORECBUILD
{
if(unpackType == 0xC && vifRegs->cycle.cl == vifRegs->cycle.wl) { //No use when SSE is available

View File

@@ -89,7 +89,7 @@ BOOL CALLBACK CpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
SetDlgItemText(hW, IDC_FEATURESINPUT, features);
CheckDlgButton(hW, IDC_CPU_EEREC, !!CHECK_EEREC);
CheckDlgButton(hW, IDC_CPU_EEREC, 1);
//#ifdef PCSX2_DEVBUILD
CheckDlgButton(hW, IDC_CPU_VU0REC, !!CHECK_VU0REC);

View File

@@ -52,6 +52,7 @@
/>
<Tool
Name="VCCLCompilerTool"
EnableEnhancedInstructionSet="2"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -66,6 +67,8 @@
Name="VCLinkerTool"
AdditionalOptions="/FORCE:MULTIPLE /IGNORE:4006"
OutputFile="..\..\..\bin\pcsx2.exe"
OptimizeForWindows98="1"
LinkTimeCodeGeneration="1"
TurnOffAssemblyGeneration="false"
TargetMachine="0"
/>
@@ -479,10 +482,6 @@
RelativePath="..\..\InterTables.cpp"
>
</File>
<File
RelativePath="..\..\InterTables.h"
>
</File>
<File
RelativePath="..\..\MMI.cpp"
>
@@ -548,26 +547,6 @@
>
</File>
</Filter>
<Filter
Name="Debugger"
>
<File
RelativePath=".\..\Debugger.cpp"
>
</File>
<File
RelativePath=".\..\Debugger.h"
>
</File>
<File
RelativePath=".\..\DebugMemory.cpp"
>
</File>
<File
RelativePath=".\..\Debugreg.cpp"
>
</File>
</Filter>
<Filter
Name="Elf"
>
@@ -615,54 +594,10 @@
<Filter
Name="Debug"
>
<File
RelativePath="..\..\DebugTools\cpuopsDebug.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\cpuopsDebug.h"
>
</File>
<File
RelativePath="..\..\DebugTools\Debug.h"
>
</File>
<File
RelativePath="..\..\DebugTools\DisASM.h"
>
</File>
<File
RelativePath="..\..\DebugTools\DisR3000A.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\DisR3000asm.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\DisR5900.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\DisR5900asm.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\DisVU0Micro.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\DisVU1Micro.cpp"
>
</File>
<File
RelativePath="..\..\DebugTools\DisVUmicro.h"
>
</File>
<File
RelativePath="..\..\DebugTools\DisVUops.h"
>
</File>
</Filter>
<Filter
Name="Misc"
@@ -795,10 +730,6 @@
RelativePath="..\..\VUflags.h"
>
</File>
<File
RelativePath="..\..\VUmicro.h"
>
</File>
<File
RelativePath="..\..\VUops.cpp"
>

View File

@@ -879,35 +879,6 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
return TRUE;
#ifdef PCSX2_DEVBUILD
case ID_DEBUG_ENTERDEBUGGER:
RunExecute(0);
DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_DEBUG), NULL, (DLGPROC)DebuggerProc);
CreateMainWindow(SW_SHOWNORMAL);
RunGui();
return TRUE;
case ID_DEBUG_REMOTEDEBUGGING:
//read debugging params
if (Config.Options & PCSX2_EEREC){
MessageBox(hWnd, _("Nah, you have to be in\nInterpreter Mode to debug"), 0, 0);
return FALSE;
} else {
remoteDebugBios=DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_RDEBUGPARAMS), NULL, (DLGPROC)RemoteDebuggerParamsProc);
if (remoteDebugBios){
RunExecute(0);
DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_RDEBUG), NULL, (DLGPROC)RemoteDebuggerProc);
CreateMainWindow(SW_SHOWNORMAL);
RunGui();
}
}
return TRUE;
case ID_DEBUG_MEMORY_DUMP:
DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_MEMORY), hWnd, (DLGPROC)MemoryProc);
return TRUE;
case ID_DEBUG_LOGGING:
DialogBox(gApp.hInstance, MAKEINTRESOURCE(IDD_LOGGING), hWnd, (DLGPROC)LogProc);
return TRUE;
@@ -1126,9 +1097,6 @@ void CreateMainMenu() {
#ifdef PCSX2_DEVBUILD
ADDSUBMENU(0, _("&Debug"));
ADDMENUITEM(0,_("&Logging"), ID_DEBUG_LOGGING);
ADDMENUITEM(0,_("Memory Dump"), ID_DEBUG_MEMORY_DUMP);
ADDMENUITEM(0,_("&Remote Debugging"), ID_DEBUG_REMOTEDEBUGGING);
ADDMENUITEM(0,_("Enter &Debugger..."), ID_DEBUG_ENTERDEBUGGER);
#endif
ADDSUBMENU(0, _("&Misc"));

View File

@@ -30,8 +30,6 @@
Austin, TX 78741
3dsdk.support@amd.com
******************************************************************************/
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <assert.h>
/*****************************************************************************
@@ -587,6 +585,4 @@ End:
FreezeMMXRegs(0);
}
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
@@ -879,5 +875,3 @@ void recCOP2_SPECIAL2()
int opc=(cpuRegs.code & 0x3) | ((cpuRegs.code >> 4) & 0x7c);
recCOP2SPECIAL2t[opc]();
}
#endif

View File

@@ -15,9 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include "Common.h"
#include "InterTables.h"
#include "ix86/ix86.h"
@@ -28,27 +25,6 @@
* COP0 opcodes *
* *
*********************************************************/
#ifndef CP0_RECOMPILE
REC_SYS(MFC0);
REC_SYS(MTC0);
REC_SYS(BC0F);
REC_SYS(BC0T);
REC_SYS(BC0FL);
REC_SYS(BC0TL);
REC_SYS(TLBR);
REC_SYS(TLBWI);
REC_SYS(TLBWR);
REC_SYS(TLBP);
REC_SYS(ERET);
REC_SYS(DI);
REC_SYS(EI);
#else
////////////////////////////////////////////////////
//REC_SYS(MTC0);
////////////////////////////////////////////////////
REC_SYS(BC0F);
////////////////////////////////////////////////////
@@ -359,7 +335,3 @@ void rec(TLBP) {
void rec(ERET) {
}
*/
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -15,9 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -1471,6 +1468,4 @@ void ResetBaseBlockEx(int cpu)
BASEBLOCKEX** GetAllBaseBlocks(int* pnum, int cpu)
{
return s_vecBaseBlocksEx[cpu].GetAll(pnum);
}
#endif // PCSX2_NORECBUILD
}

View File

@@ -14,11 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
*/
#include "Common.h"
#include "InterTables.h"
#include "ix86/ix86.h"
@@ -336,40 +332,6 @@ void recCOP1_W( void )
recCP1W[ _Funct_ ]( );
}
#ifndef FPU_RECOMPILE
REC_FPUFUNC(ADD_S);
REC_FPUFUNC(SUB_S);
REC_FPUFUNC(MUL_S);
REC_FPUFUNC(DIV_S);
REC_FPUFUNC(SQRT_S);
REC_FPUFUNC(RSQRT_S);
REC_FPUFUNC(ABS_S);
REC_FPUFUNC(MOV_S);
REC_FPUFUNC(NEG_S);
REC_FPUFUNC(ADDA_S);
REC_FPUFUNC(SUBA_S);
REC_FPUFUNC(MULA_S);
REC_FPUFUNC(MADD_S);
REC_FPUFUNC(MSUB_S);
REC_FPUFUNC(MADDA_S);
REC_FPUFUNC(MSUBA_S);
REC_FPUFUNC(CVT_S);
REC_FPUFUNC(CVT_W);
REC_FPUFUNC(MIN_S);
REC_FPUFUNC(MAX_S);
REC_FPUBRANCH(BC1F);
REC_FPUBRANCH(BC1T);
REC_FPUBRANCH(BC1FL);
REC_FPUBRANCH(BC1TL);
REC_FPUFUNC(C_F);
REC_FPUFUNC(C_EQ);
REC_FPUFUNC(C_LE);
REC_FPUFUNC(C_LT);
#else
// define the FPU ops using the x86 FPU. x86-64 doesn't use FPU
#ifndef __x86_64__
@@ -1501,7 +1463,3 @@ void recBC1TL( void ) {
LoadBranchState();
SetBranchImm(pc);
}
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -15,18 +15,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include "PS2Etypes.h"
#if defined(_WIN32)
#include <windows.h>
#endif
#include <assert.h>
#include <vector>
#include <list>
@@ -509,5 +500,3 @@ void gsConstRead128(u32 mem, int xmmreg)
#endif
_eeReadConstMem128( xmmreg, (uptr)PS2GS_BASE(mem));
}
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <string.h>
#include <malloc.h>
#include <assert.h>
@@ -1292,6 +1288,4 @@ void hwConstWrite128(u32 mem, int mmreg)
#endif
break;
}
}
#endif // PCSX2_NORECBUILD
}

View File

@@ -20,57 +20,12 @@
* cached MMI opcodes *
* *
*********************************************************/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include "Common.h"
#include "InterTables.h"
#include "ix86/ix86.h"
#include "iR5900.h"
#include "iMMI.h"
#ifndef MMI_RECOMPILE
REC_FUNC( PLZCW, _Rd_ );
#ifndef MMI0_RECOMPILE
REC_FUNC( MMI0, _Rd_ );
#endif
#ifndef MMI1_RECOMPILE
REC_FUNC( MMI1, _Rd_ );
#endif
#ifndef MMI2_RECOMPILE
REC_FUNC( MMI2, _Rd_ );
#endif
#ifndef MMI3_RECOMPILE
REC_FUNC( MMI3, _Rd_ );
#endif
REC_FUNC( PMFHL, _Rd_ );
REC_FUNC( PMTHL, _Rd_ );
REC_FUNC( PSRLW, _Rd_ );
REC_FUNC( PSRLH, _Rd_ );
REC_FUNC( PSRAH, _Rd_ );
REC_FUNC( PSRAW, _Rd_ );
REC_FUNC( PSLLH, _Rd_ );
REC_FUNC( PSLLW, _Rd_ );
#else
void recPLZCW()
{
int regd = -1;
@@ -562,81 +517,31 @@ void recPLZCW( void )
}
*/
#ifdef MMI0_RECOMPILE
void recMMI0( void )
{
recMMI0t[ _Sa_ ]( );
}
#endif
#ifdef MMI1_RECOMPILE
void recMMI1( void )
{
recMMI1t[ _Sa_ ]( );
}
#endif
#ifdef MMI2_RECOMPILE
void recMMI2( void )
{
recMMI2t[ _Sa_ ]( );
}
#endif
#ifdef MMI3_RECOMPILE
void recMMI3( void )
{
recMMI3t[ _Sa_ ]( );
}
#endif
#endif
/*********************************************************
* MMI0 opcodes *
* *
*********************************************************/
#ifndef MMI0_RECOMPILE
REC_FUNC( PADDB, _Rd_);
REC_FUNC( PADDH, _Rd_);
REC_FUNC( PADDW, _Rd_);
REC_FUNC( PADDSB, _Rd_);
REC_FUNC( PADDSH, _Rd_);
REC_FUNC( PADDSW, _Rd_);
REC_FUNC( PSUBB, _Rd_);
REC_FUNC( PSUBH, _Rd_);
REC_FUNC( PSUBW, _Rd_);
REC_FUNC( PSUBSB, _Rd_);
REC_FUNC( PSUBSH, _Rd_);
REC_FUNC( PSUBSW, _Rd_);
REC_FUNC( PMAXW, _Rd_);
REC_FUNC( PMAXH, _Rd_);
REC_FUNC( PCGTW, _Rd_);
REC_FUNC( PCGTH, _Rd_);
REC_FUNC( PCGTB, _Rd_);
REC_FUNC( PEXTLW, _Rd_);
REC_FUNC( PPACW, _Rd_);
REC_FUNC( PEXTLH, _Rd_);
REC_FUNC( PPACH, _Rd_);
REC_FUNC( PEXTLB, _Rd_);
REC_FUNC( PPACB, _Rd_);
REC_FUNC( PEXT5, _Rd_);
REC_FUNC( PPAC5, _Rd_);
#else
////////////////////////////////////////////////////
void recPMAXW()
@@ -1529,40 +1434,10 @@ CPU_SSE_XMMCACHE_END
MOV16MtoR(EAX, (uptr)&cpuRegs.GPR.r[_Rt_].US[0]);
MOV16RtoM((uptr)&cpuRegs.GPR.r[_Rd_].US[0], EAX);
}
#endif
/*********************************************************
* MMI1 opcodes *
* *
*********************************************************/
#ifndef MMI1_RECOMPILE
REC_FUNC( PABSW, _Rd_);
REC_FUNC( PABSH, _Rd_);
REC_FUNC( PMINW, _Rd_);
REC_FUNC( PADSBH, _Rd_);
REC_FUNC( PMINH, _Rd_);
REC_FUNC( PCEQB, _Rd_);
REC_FUNC( PCEQH, _Rd_);
REC_FUNC( PCEQW, _Rd_);
REC_FUNC( PADDUB, _Rd_);
REC_FUNC( PADDUH, _Rd_);
REC_FUNC( PADDUW, _Rd_);
REC_FUNC( PSUBUB, _Rd_);
REC_FUNC( PSUBUH, _Rd_);
REC_FUNC( PSUBUW, _Rd_);
REC_FUNC( PEXTUW, _Rd_);
REC_FUNC( PEXTUH, _Rd_);
REC_FUNC( PEXTUB, _Rd_);
REC_FUNC( QFSRV, _Rd_);
#else
////////////////////////////////////////////////////
PCSX2_ALIGNED16(int s_MaskHighBitD[4]) = { 0x80000000, 0x80000000, 0x80000000, 0x80000000 };
PCSX2_ALIGNED16(int s_MaskHighBitW[4]) = { 0x80008000, 0x80008000, 0x80008000, 0x80008000 };
@@ -1836,10 +1711,12 @@ CPU_SSE_XMMCACHE_END
////////////////////////////////////////////////////
void recQFSRV()
{
//u8* pshift1, *pshift2, *poldptr, *pnewptr;
s8* pshift1, *pshift2, *poldptr, *pnewptr;
if ( ! _Rd_ ) return;
/*
REC_FUNC_INLINE( QFSRV, _Rd_ );
return;
CPU_SSE2_XMMCACHE_START((_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED)
if( _Rs_ == 0 ) {
@@ -1891,9 +1768,7 @@ CPU_SSE2_XMMCACHE_START((_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED)
_freeXMMreg(t0reg);
}
CPU_SSE_XMMCACHE_END*/
REC_FUNC_INLINE( QFSRV, _Rd_ );
CPU_SSE_XMMCACHE_END
}
@@ -2030,11 +1905,6 @@ CPU_SSE_XMMCACHE_END
SetMMXstate();
)
}
else {
MOV32ItoM( (uptr)&cpuRegs.code, cpuRegs.code );
MOV32ItoM( (uptr)&cpuRegs.pc, pc );
CALLFunc( (u32)PMINH );
}
}
////////////////////////////////////////////////////
@@ -2195,39 +2065,10 @@ CPU_SSE_XMMCACHE_END
)
}
#endif
/*********************************************************
* MMI2 opcodes *
* *
*********************************************************/
#ifndef MMI2_RECOMPILE
REC_FUNC( PMFHI, _Rd_);
REC_FUNC( PMFLO, _Rd_);
REC_FUNC( PCPYLD, _Rd_);
REC_FUNC( PAND, _Rd_);
REC_FUNC( PXOR, _Rd_);
REC_FUNC( PMADDW, _Rd_);
REC_FUNC( PSLLVW, _Rd_);
REC_FUNC( PSRLVW, _Rd_);
REC_FUNC( PMSUBW, _Rd_);
REC_FUNC( PINTH, _Rd_);
REC_FUNC( PMULTW, _Rd_);
REC_FUNC( PDIVW, _Rd_);
REC_FUNC( PMADDH, _Rd_);
REC_FUNC( PHMADH, _Rd_);
REC_FUNC( PMSUBH, _Rd_);
REC_FUNC( PHMSBH, _Rd_);
REC_FUNC( PEXEH, _Rd_);
REC_FUNC( PREVH, _Rd_);
REC_FUNC( PMULTH, _Rd_);
REC_FUNC( PDIVBW, _Rd_);
REC_FUNC( PEXEW, _Rd_);
REC_FUNC( PROT3W, _Rd_ );
#else
////////////////////////////////////////////////////
void recPMADDW()
{
@@ -2936,30 +2777,10 @@ CPU_SSE_XMMCACHE_END
MOV32RtoM( (uptr)&cpuRegs.GPR.r[_Rd_].UL[3], EAX);
}
}
#endif
/*********************************************************
* MMI3 opcodes *
* *
*********************************************************/
#ifndef MMI3_RECOMPILE
REC_FUNC( PMADDUW, _Rd_);
REC_FUNC( PSRAVW, _Rd_);
REC_FUNC( PMTHI, _Rd_);
REC_FUNC( PMTLO, _Rd_);
REC_FUNC( PINTEH, _Rd_);
REC_FUNC( PMULTUW, _Rd_);
REC_FUNC( PDIVUW, _Rd_);
REC_FUNC( PCPYUD, _Rd_);
REC_FUNC( POR, _Rd_);
REC_FUNC( PNOR, _Rd_);
REC_FUNC( PCPYH, _Rd_);
REC_FUNC( PEXCW, _Rd_);
REC_FUNC( PEXCH, _Rd_);
#else
////////////////////////////////////////////////////
REC_FUNC( PSRAVW, _Rd_ );
@@ -3370,7 +3191,3 @@ CPU_SSE_XMMCACHE_END
MOV32RtoM( (uptr)&cpuRegs.GPR.r[ _Rd_ ].UL[ 3 ], EDX );
//POP32R( EBX );
}
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdio.h>
#include <string.h>
@@ -1159,6 +1155,3 @@ void psxHw4ConstWrite8(u32 add, int mmreg) {
return;
}
}
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
@@ -873,6 +869,4 @@ int psxRecMemConstWrite32(u32 mem, int mmreg)
}
}
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -19,9 +19,6 @@
// recompiler reworked to add dynamic linking Jan06
// and added reg caching, const propagation, block analysis Jun06
// zerofrog(@gmail.com)
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#ifdef _WIN32
#pragma warning(disable:4244)
#pragma warning(disable:4761)
@@ -60,8 +57,6 @@
extern u32 psxNextCounter, psxNextsCounter;
u32 g_psxMaxRecMem = 0;
extern char *disRNameGPR[];
extern char* disR3000Fasm(u32 code, u32 pc);
void psxRecRecompile(u32 startpc);
@@ -161,9 +156,6 @@ sprintf( filename, "dumps\\psxdump%.8X.txt", startpc);
f = fopen( filename, "w" );
assert( f != NULL );
for ( i = startpc; i < s_nEndBlock; i += 4 ) {
fprintf( f, "%s\n", disR3000Fasm( *(u32*)PSXM( i ), i ) );
}
// write the instruction info
fprintf(f, "\n\nlive0 - %x, lastuse - %x used - %x\n", EEINST_LIVE0, EEINST_LASTUSE, EEINST_USED);
@@ -184,9 +176,6 @@ sprintf( filename, "dumps\\psxdump%.8X.txt", startpc);
fprintf(f, "\n");
fprintf(f, " ");
for(i = 0; i < ARRAYSIZE(s_pInstCache->regs); ++i) {
if( used[i] ) fprintf(f, "%s ", disRNameGPR[i]);
}
fprintf(f, "\n");
pcur = s_pInstCache+1;
@@ -1165,7 +1154,6 @@ void iDumpPsxRegisters(u32 startpc, u32 temp)
const char* pstr = temp ? "t" : "";
__Log("%spsxreg: %x %x ra:%x k0: %x %x\n", pstr, startpc, psxRegs.cycle, psxRegs.GPR.n.ra, psxRegs.GPR.n.k0, *(int*)PSXM(0x13c128));
for(i = 0; i < 34; i+=2) __Log("%spsx%s: %x %x\n", pstr, disRNameGPR[i], psxRegs.GPR.r[i], psxRegs.GPR.r[i+1]);
__Log("%scycle: %x %x %x %x; counters %x %x\n", pstr, psxRegs.cycle, g_psxNextBranchCycle, EEsCycle, IOPoCycle,
(uptr)psxNextsCounter, (uptr)psxNextCounter);
@@ -1515,6 +1503,4 @@ R3000Acpu psxRec = {
recExecuteBlock,
recClear,
recShutdown
};
#endif // PCSX2_NORECBUILD
};

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -45,11 +41,6 @@
#include "iCore.h"
#include "iR3000A.h"
extern void psxLWL();
extern void psxLWR();
extern void psxSWL();
extern void psxSWR();
extern int g_psxWriteOk;
extern u32 g_psxMaxRecMem;
@@ -618,8 +609,6 @@ void rpsxDIVU_(int info) { rpsxDIVsuper(info, 0); }
PSXRECOMPILE_CONSTCODE3(DIVU, 1);
//// LoadStores
#ifdef PCSX2_VIRTUAL_MEM
// VM load store functions (fastest)
//#define REC_SLOWREAD
@@ -656,9 +645,6 @@ void recLoad32(u32 bit, u32 sign)
{
int mmreg = -1;
#ifdef REC_SLOWREAD
_psxFlushConstReg(_Rs_);
#else
if( PSX_IS_CONST1( _Rs_ ) ) {
// do const processing
int ineax = 0;
@@ -681,7 +667,6 @@ void recLoad32(u32 bit, u32 sign)
if( _Rt_ ) MOV32RtoM( (int)&psxRegs.GPR.r[ _Rt_ ], EAX );
}
else
#endif
{
int dohw;
int mmregs = _psxPrepareReg(_Rs_);
@@ -775,9 +760,6 @@ ClearRet:
extern u32 s_psxBlockCycles;
void recStore(int bit)
{
#ifdef REC_SLOWWRITE
_psxFlushConstReg(_Rs_);
#else
if( PSX_IS_CONST1( _Rs_ ) ) {
u8* pjmpok;
u32 addr = g_psxConstRegs[_Rs_]+_Imm_;
@@ -826,7 +808,6 @@ void recStore(int bit)
}
}
else
#endif
{
int dohw;
int mmregs = _psxPrepareReg(_Rs_);
@@ -915,145 +896,6 @@ REC_FUNC(LWR);
REC_FUNC(SWL);
REC_FUNC(SWR);
#else
// TLB loadstore functions (slower
REC_FUNC(LWL);
REC_FUNC(LWR);
REC_FUNC(SWL);
REC_FUNC(SWR);
static void rpsxLB()
{
_psxDeleteReg(_Rs_, 1);
_psxOnWriteReg(_Rt_);
_psxDeleteReg(_Rt_, 0);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg1((uptr)psxMemRead8, X86ARG1|MEM_X86TAG, 0);
if (_Rt_) {
MOVSX32R8toR(EAX, EAX);
MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX);
}
PSX_DEL_CONST(_Rt_);
}
static void rpsxLBU()
{
_psxDeleteReg(_Rs_, 1);
_psxOnWriteReg(_Rt_);
_psxDeleteReg(_Rt_, 0);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg1((uptr)psxMemRead8, X86ARG1|MEM_X86TAG, 0);
if (_Rt_) {
MOVZX32R8toR(EAX, EAX);
MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX);
}
PSX_DEL_CONST(_Rt_);
}
static void rpsxLH()
{
_psxDeleteReg(_Rs_, 1);
_psxOnWriteReg(_Rt_);
_psxDeleteReg(_Rt_, 0);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg1((uptr)psxMemRead16, X86ARG1|MEM_X86TAG, 0);
if (_Rt_) {
MOVSX32R16toR(EAX, EAX);
MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX);
}
PSX_DEL_CONST(_Rt_);
}
static void rpsxLHU()
{
_psxDeleteReg(_Rs_, 1);
_psxOnWriteReg(_Rt_);
_psxDeleteReg(_Rt_, 0);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg1((uptr)psxMemRead16, X86ARG1|MEM_X86TAG, 0);
if (_Rt_) {
MOVZX32R16toR(EAX, EAX);
MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX);
}
PSX_DEL_CONST(_Rt_);
}
static void rpsxLW()
{
_psxDeleteReg(_Rs_, 1);
_psxOnWriteReg(_Rt_);
_psxDeleteReg(_Rt_, 0);
_psxFlushCall(FLUSH_EVERYTHING);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
#ifndef TLB_DEBUG_MEM
TEST32ItoR(X86ARG1, 0x10000000);
j8Ptr[0] = JZ8(0);
#endif
_callFunctionArg1((uptr)psxMemRead32, X86ARG1|MEM_X86TAG, 0);
if (_Rt_) {
MOV32RtoM((uptr)&psxRegs.GPR.r[_Rt_], EAX);
}
#ifndef TLB_DEBUG_MEM
j8Ptr[1] = JMP8(0);
x86SetJ8(j8Ptr[0]);
// read from psM directly
AND32ItoR(X86ARG1, 0x1fffff);
ADD32ItoR(X86ARG1, (uptr)psxM);
MOV32RmtoR( X86ARG1, X86ARG1 );
MOV32RtoM( (uptr)&psxRegs.GPR.r[_Rt_], X86ARG1);
x86SetJ8(j8Ptr[1]);
#endif
PSX_DEL_CONST(_Rt_);
}
static void rpsxSB()
{
_psxDeleteReg(_Rs_, 1);
_psxDeleteReg(_Rt_, 1);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg2((uptr)psxMemWrite8, X86ARG1|MEM_X86TAG, MEM_MEMORYTAG, 0, (uptr)&psxRegs.GPR.r[_Rt_]);
}
static void rpsxSH()
{
_psxDeleteReg(_Rs_, 1);
_psxDeleteReg(_Rt_, 1);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg2((uptr)psxMemWrite16, X86ARG1|MEM_X86TAG, MEM_MEMORYTAG, 0, (uptr)&psxRegs.GPR.r[_Rt_]);
}
static void rpsxSW()
{
_psxDeleteReg(_Rs_, 1);
_psxDeleteReg(_Rt_, 1);
MOV32MtoR(X86ARG1, (uptr)&psxRegs.GPR.r[_Rs_]);
if (_Imm_) ADD32ItoR(X86ARG1, _Imm_);
_callFunctionArg2((uptr)psxMemWrite32, X86ARG1|MEM_X86TAG, MEM_MEMORYTAG, 0, (uptr)&psxRegs.GPR.r[_Rt_]);
}
#endif // end load store
//// SLL
void rpsxSLL_const()
{
@@ -2046,6 +1888,4 @@ void rpsxpropCP0(EEINST* prev, EEINST* pinst)
default:
assert(0);
}
}
#endif // PCSX2_NORECBUILD
}

View File

@@ -14,11 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
*/
#include <stdlib.h>
#include <string.h>
@@ -777,6 +773,4 @@ void recVU0MI_BAL() { REC_VUOP(VU0, BAL); }
void recVU0MI_JR() { REC_VUOP(VU0, JR); }
void recVU0MI_JALR() { REC_VUOP(VU0, JALR); }
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <float.h>
@@ -112,10 +108,7 @@ void recResetVU1( void ) {
static void iDumpBlock()
{
FILE *f;
char filename[ 256 ];
u32 *mem;
u32 i;
#ifdef _WIN32
CreateDirectory("dumps", NULL);
@@ -125,19 +118,6 @@ static void iDumpBlock()
sprintf( filename, "dumps/vu%.4X.txt", VU1.VI[ REG_TPC ].UL );
#endif
SysPrintf( "dump1 %x => %x (%s)\n", VU1.VI[ REG_TPC ].UL, pc, filename );
f = fopen( filename, "wb" );
for ( i = VU1.VI[REG_TPC].UL; i < pc; i += 8 ) {
char* pstr;
mem = (u32*)&VU1.Micro[i];
pstr = disVU1MicroUF( mem[1], i+4 );
fprintf(f, "%x: %-40s ", i, pstr);
pstr = disVU1MicroLF( mem[0], i );
fprintf(f, "%s\n", pstr);
}
fclose( f );
}
u32 g_VUProgramId = 0;
@@ -213,6 +193,4 @@ void recClearVU1( u32 Addr, u32 Size ) {
if( CHECK_VU1REC ) {
SuperVUClear(Addr, Size*4, 1);
}
}
#endif
}

View File

@@ -14,11 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
*/
#include <stdlib.h>
#include <assert.h>
#include <string.h>
@@ -735,10 +731,6 @@ void _vurecAnalyzeOp(VURegs *VU, _vuopinfo *info) {
ptr = (int*)&VU->Micro[pc];
pc += 8;
/* SysPrintf("_vurecAnalyzeOp Upper: %s\n", disVU1MicroUF( ptr[1], pc ) );
if ((ptr[1] & 0x80000000) == 0) {
SysPrintf("_vurecAnalyzeOp Lower: %s\n", disVU1MicroLF( ptr[0], pc ) );
}*/
if (ptr[1] & 0x40000000) {
branch |= 8;
}
@@ -5341,6 +5333,4 @@ void recVUMI_XGKICK( VURegs *VU, int info )
FreezeMMXRegs(0);
//FreezeXMMRegs(0);
}
}
#endif // PCSX2_NORECBUILD
}

View File

@@ -17,10 +17,6 @@
*/
// Super VU recompiler - author: zerofrog(@gmail.com)
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <float.h>
@@ -62,9 +58,6 @@ extern u32 vudump;
extern void iDumpVU0Registers();
extern void iDumpVU1Registers();
extern char* disVU1MicroUF(u32 code, u32 pc);
extern char* disVU1MicroLF(u32 code, u32 pc);
extern _GSgifTransfer1 GSgifTransfer1;
#include <vector>
@@ -555,10 +548,7 @@ void SuperVUDumpBlock(list<VuBaseBlock*>& blocks, int vuindex)
}
else {
mem = (u32*)&VU->Micro[i];
char* pstr = disVU1MicroUF( mem[1], i+4 );
fprintf(f, "%.4x: %-40s", i, pstr);
if( mem[1] & 0x80000000 ) fprintf(f, " I=%f(%.8x)\n", *(float*)mem, mem[0]);
else fprintf(f, "%s\n", disVU1MicroLF( mem[0], i ));
i += 8;
}
@@ -4558,6 +4548,4 @@ void recSVULowerOP_T3_11( void )
void recSVUunknown( void )
{
SysPrintf("Unknown SVU micromode opcode called\n");
}
#endif // PCX2_NORECBUILD
}

View File

@@ -14,11 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
*/
#include <math.h>
#include <string.h>
@@ -147,6 +143,4 @@ void SetNewMask(u32* vif1masks, u32* hasmask, u32 mask, u32 oldmask)
FreezeXMMRegs(0);
}
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -17,10 +17,6 @@
*/
// Holds instruction tables for the r5900 recompiler
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -1280,6 +1276,4 @@ void rpropMMI3(EEINST* prev, EEINST* pinst)
rpropSetFast(_Rd_, _Rs_, _Rt_, EEINST_LIVE1|EEINST_LIVE2|EEINST_REALXMM);
break;
}
}
#endif // PCSX2_NORECBUILD
}

View File

@@ -20,9 +20,6 @@
// Recompiled completely rewritten to add block level recompilation/reg-caching/
// liveness analysis/constant propagation Apr06 (zerofrog@gmail.com)
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -143,7 +140,6 @@ void iDumpBlock( int startpc, char * ptr )
char filename[ 256 ];
u32 i, j;
EEINST* pcur;
extern char *disRNameGPR[];
u8 used[34];
u8 fpuused[33];
int numused, count, fpunumused;
@@ -167,12 +163,6 @@ void iDumpBlock( int startpc, char * ptr )
f = fopen( filename, "w" );
if( disR5900GetSym(startpc) != NULL )
fprintf(f, "%s\n", disR5900GetSym(startpc));
for ( i = startpc; i < s_nEndBlock; i += 4 ) {
fprintf( f, "%s\n", disR5900Fasm( PSMu32( i ), i ) );
}
// write the instruction info
fprintf(f, "\n\nlive0 - %x, live1 - %x, live2 - %x, lastuse - %x\nmmx - %x, xmm - %x, used - %x\n",
@@ -206,9 +196,6 @@ void iDumpBlock( int startpc, char * ptr )
fprintf(f, "\n");
fprintf(f, " ");
for(i = 0; i < ARRAYSIZE(s_pInstCache->regs); ++i) {
if( used[i] ) fprintf(f, "%s ", disRNameGPR[i]);
}
for(i = 0; i < ARRAYSIZE(s_pInstCache->fpuregs); ++i) {
if( fpuused[i] ) fprintf(f, "%s ", i<32?"FR":"FA");
}
@@ -2300,10 +2287,6 @@ REC_SYS(COP2);
void recCOP2( void )
{
#ifdef CPU_LOG
CPU_LOG( "Recompiling COP2:%s\n", disR5900Fasm( cpuRegs.code, cpuRegs.pc ) );
#endif
if ( !cpucaps.hasStreamingSIMDExtensions ) {
MOV32ItoM( (u32)&cpuRegs.code, cpuRegs.code );
MOV32ItoM( (u32)&cpuRegs.pc, pc );
@@ -2717,16 +2700,8 @@ void iDumpRegisters(u32 startpc, u32 temp)
int i;
char* pstr = temp ? "t" : "";
const u32 dmacs[] = {0x8000, 0x9000, 0xa000, 0xb000, 0xb400, 0xc000, 0xc400, 0xc800, 0xd000, 0xd400 };
extern char *disRNameGPR[];
char* psymb;
psymb = disR5900GetSym(startpc);
if( psymb != NULL )
__Log("%sreg(%s): %x %x c:%x\n", pstr, psymb, startpc, cpuRegs.interrupt, cpuRegs.cycle);
else
__Log("%sreg: %x %x c:%x\n", pstr, startpc, cpuRegs.interrupt, cpuRegs.cycle);
for(i = 1; i < 32; ++i) __Log("%s: %x_%x_%x_%x\n", disRNameGPR[i], cpuRegs.GPR.r[i].UL[3], cpuRegs.GPR.r[i].UL[2], cpuRegs.GPR.r[i].UL[1], cpuRegs.GPR.r[i].UL[0]);
__Log("%sreg: %x %x c:%x\n", pstr, startpc, cpuRegs.interrupt, cpuRegs.cycle);
//for(i = 0; i < 32; i+=4) __Log("cp%d: %x_%x_%x_%x\n", i, cpuRegs.CP0.r[i], cpuRegs.CP0.r[i+1], cpuRegs.CP0.r[i+2], cpuRegs.CP0.r[i+3]);
//for(i = 0; i < 32; ++i) __Log("%sf%d: %f %x\n", pstr, i, fpuRegs.fpr[i].f, fpuRegs.fprc[i]);
//for(i = 1; i < 32; ++i) __Log("%svf%d: %f %f %f %f, vi: %x\n", pstr, i, VU0.VF[i].F[3], VU0.VF[i].F[2], VU0.VF[i].F[1], VU0.VF[i].F[0], VU0.VI[i].UL);
@@ -3319,5 +3294,3 @@ R5900cpu recCpu = {
recClearVU1,
recShutdown
};
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -1997,5 +1993,3 @@ void recSLTU( void )
}
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -25,9 +25,6 @@
#include "ix86/ix86.h"
#include "iR5900.h"
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#ifdef _WIN32
#pragma warning(disable:4244)
#pragma warning(disable:4761)
@@ -659,5 +656,3 @@ void recXORI( void )
}
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
// recompiler reworked to add dynamic linking zerofrog(@gmail.com) Jan06
#include <stdlib.h>
@@ -1150,5 +1146,3 @@ void recBGTZL( void )
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
// recompiler reworked to add dynamic linking zerofrog(@gmail.com) Jan06
#include <stdlib.h>
@@ -132,5 +128,3 @@ void recJALR( void )
}
#endif
#endif // PCSX2_NORECBUILD

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -4292,6 +4288,4 @@ void recSQC2( void )
#endif
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -836,6 +832,4 @@ REC_FUNC( MFLO1, 0 );
REC_FUNC( MTHI1, 0 );
REC_FUNC( MTLO1, 0 );
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -953,6 +949,4 @@ REC_FUNC( MADDU, _Rd_ );
REC_FUNC( MADD1, _Rd_ );
REC_FUNC( MADDU1, _Rd_ );
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -15,10 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -1349,6 +1345,4 @@ void recDSRAV( void )
SetMMXstate();
}
#endif
#endif // PCSX2_NORECBUILD
#endif

View File

@@ -22,10 +22,6 @@
* goldfinger
* zerofrog(@gmail.com)
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdio.h>
#include <string.h>
#include <assert.h>
@@ -3286,5 +3282,3 @@ void LEA32RStoR(x86IntRegType to, x86IntRegType from, u32 scale)
LEA32RStoR(to, to, scale);
}
}
#endif

View File

@@ -15,9 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include "ix86.h"
/**********************/
@@ -201,5 +198,3 @@ void PFMINRtoR( x86IntRegType to, x86IntRegType from )
ModRM( 3, to, from );
write8( 0x94 );
}
#endif

View File

@@ -15,9 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <stdio.h>
#include <string.h>
#include "ix86.h"
@@ -287,5 +284,3 @@ void FCMOVNB32( x86IntRegType from ) { FCMOV32( 0xDB, 0xC0 ); }
void FCMOVNE32( x86IntRegType from ) { FCMOV32( 0xDB, 0xC8 ); }
void FCMOVNBE32( x86IntRegType from ) { FCMOV32( 0xDB, 0xD0 ); }
void FCMOVNU32( x86IntRegType from ) { FCMOV32( 0xDB, 0xD8 ); }
#endif

View File

@@ -15,9 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include "ix86.h"
#include <assert.h>
@@ -649,5 +646,3 @@ void MASKMOVQRtoR(x86MMXRegType to, x86MMXRegType from)
write16(0xf70f);
ModRM( 3, to, from );
}
#endif

View File

@@ -15,9 +15,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
// stop compiling if NORECBUILD build (only for Visual Studio)
#if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
#include <assert.h>
#include "ix86.h"
@@ -1539,5 +1536,3 @@ void SSE2EMU_MOVD_R_to_XMM( x86SSERegType to, x86IntRegType from ) {
MOV32ItoM((u32)p+12, 0);
SSE_MOVAPS_M128_to_XMM(to, (u32)p);
}
#endif

View File

@@ -175,13 +175,10 @@ int LoadGroup(TiXmlNode *group,int gParent)
int gIndex=groups.size()-1;
#ifndef PCSX2_NORECBUILD
// only valid for recompilers
TiXmlNode *fastmemory=group->FirstChild("FASTMEMORY");
if(fastmemory!=NULL)
SetFastMemory(1);
#endif
TiXmlNode *zerogs=group->FirstChild("ZEROGS");
if(zerogs!=NULL)