mirror of https://github.com/PCSX2/pcsx2.git
Cleanup various things g++ doesn't like.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@242 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
4390e0a922
commit
7ef953567d
|
@ -24,7 +24,7 @@
|
|||
#include "Cache.h"
|
||||
|
||||
#ifndef PCSX2_VIRTUAL_MEM
|
||||
_cacheS pCache[64];
|
||||
/*_cacheS pCache[64];*/
|
||||
int getFreeCache(u32 mem, int mode, int * way) {
|
||||
u8 * out;
|
||||
u32 paddr;
|
||||
|
|
|
@ -93,7 +93,6 @@ PluginConf USBConfS;
|
|||
PluginConf FWConfS;
|
||||
PluginConf BiosConfS;
|
||||
|
||||
GtkWidget *CmdLine;
|
||||
GtkWidget *ListDV;
|
||||
GtkListStore *ListDVModel;
|
||||
GtkWidget *SetPCDlg, *SetPCEntry;
|
||||
|
|
|
@ -1107,7 +1107,7 @@ void injectIRX(char *filename){
|
|||
// failed inline calls, this is because of inline hell and gcc syntax
|
||||
#ifndef _WIN32
|
||||
|
||||
void InterlockedExchangePointer(PVOID volatile* Target, void* Value)
|
||||
/*void InterlockedExchangePointer(PVOID volatile* Target, void* Value)
|
||||
{
|
||||
#ifdef __x86_64__
|
||||
__asm__ __volatile__(".intel_syntax\n"
|
||||
|
@ -1134,9 +1134,9 @@ long InterlockedExchangeAdd(long volatile* Addend, long Value)
|
|||
"lock xadd [%0], %%eax\n"
|
||||
".att_syntax\n" : : "r"(Addend), "a"(Value) : "memory" );
|
||||
// fixme - This is supposed to return a long
|
||||
}
|
||||
}*/
|
||||
|
||||
u32 timeGetTime()
|
||||
/*u32 timeGetTime()
|
||||
{
|
||||
struct timeb t;
|
||||
ftime(&t);
|
||||
|
@ -1161,7 +1161,7 @@ void pcsx2_aligned_free(void* pmem)
|
|||
char* p = (char*)pmem;
|
||||
free(p - (int)*(u16*)(p-2));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,12 +22,16 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include "PsxCommon.h"
|
||||
|
||||
#include "Paths.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "windows/cheats/cheats.h"
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
|
|
@ -64,12 +64,12 @@ static u32 branchPC;
|
|||
}
|
||||
|
||||
// Subsets
|
||||
void (*psxBSC[64])();
|
||||
void (*psxSPC[64])();
|
||||
void (*psxREG[32])();
|
||||
void (*psxCP0[32])();
|
||||
void (*psxCP2[64])();
|
||||
void (*psxCP2BSC[32])();
|
||||
extern void (*psxBSC[64])();
|
||||
extern void (*psxSPC[64])();
|
||||
extern void (*psxREG[32])();
|
||||
extern void (*psxCP0[32])();
|
||||
extern void (*psxCP2[64])();
|
||||
extern void (*psxCP2BSC[32])();
|
||||
|
||||
extern void bios_write();
|
||||
extern void bios_printf();
|
||||
|
|
|
@ -54,8 +54,9 @@ typedef struct tag_DECI2_DBGP_BRK{
|
|||
#define RUN 1
|
||||
|
||||
extern DECI2_DBGP_BRK ebrk[32], ibrk[32];
|
||||
extern int ebrk_count, ibrk_count;
|
||||
extern int runStatus, runCode, runCount;
|
||||
extern int ebrk_count, ibrk_count;
|
||||
extern volatile long runStatus;
|
||||
extern int runCode, runCount;
|
||||
|
||||
#ifdef _WIN32
|
||||
extern HANDLE runEvent; //i don't like this;
|
||||
|
|
|
@ -48,7 +48,7 @@ void _EraseMCDBlock(u32 adr) {
|
|||
EraseMcd(sio.CtrlReg&0x2000?2:1, adr);
|
||||
}
|
||||
|
||||
unsigned char xor(unsigned char *buf, unsigned int length){
|
||||
unsigned char sio_xor(unsigned char *buf, unsigned int length){
|
||||
register unsigned char i, x;
|
||||
|
||||
for (x=0, i=0; i<length; i++) x ^= buf[i];
|
||||
|
@ -346,14 +346,14 @@ void SIO_CommandWrite(u8 value,int way) {
|
|||
#endif
|
||||
} else
|
||||
if (sio.parp==sio.bufcount-2) {
|
||||
if (xor(&sio.buf[3], sio.bufcount-5)==value) {
|
||||
if (sio_xor(&sio.buf[3], sio.bufcount-5)==value) {
|
||||
_SaveMcd(&sio.buf[3], (512+16)*sio.sector+sio.k, sio.bufcount-5);
|
||||
sio.buf[sio.bufcount-1]=value;
|
||||
sio.k+=sio.bufcount-5;
|
||||
}else {
|
||||
#ifdef MEMCARDS_LOG
|
||||
MEMCARDS_LOG("MC(%d) write XOR value error 0x%02X != ^0x%02X\n",
|
||||
((sio.CtrlReg&0x2000)>>13)+1, value, xor(&sio.buf[3], sio.bufcount-5));
|
||||
((sio.CtrlReg&0x2000)>>13)+1, value, sio_xor(&sio.buf[3], sio.bufcount-5));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ void SIO_CommandWrite(u8 value,int way) {
|
|||
}
|
||||
|
||||
sio.k+=value;
|
||||
sio.buf[sio.bufcount-1]=xor(&sio.buf[4], value);
|
||||
sio.buf[sio.bufcount-1]=sio_xor(&sio.buf[4], value);
|
||||
sio.buf[sio.bufcount]=sio.terminator;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -104,7 +104,7 @@ struct mc_command_0x26_tag{
|
|||
u16 sectorSize; //+03 divide to it
|
||||
u16 field_2C; //+05 divide to it
|
||||
u32 mc_size; //+07
|
||||
u8 xor; //+0b don't forget to recalculate it!!!
|
||||
u8 mc_xor; //+0b don't forget to recalculate it!!!
|
||||
u8 Z; //+0c
|
||||
#ifdef _MSC_VER
|
||||
};
|
||||
|
|
|
@ -393,13 +393,13 @@ void VCALLMSR() {
|
|||
|
||||
#ifndef _MSC_VER
|
||||
|
||||
u32* GET_VU_MEM(VURegs* VU, u32 addr)
|
||||
/*u32* GET_VU_MEM(VURegs* VU, u32 addr)
|
||||
{
|
||||
if( VU == g_pVU1 ) return (u32*)(VU1.Mem+(addr&0x3fff));
|
||||
|
||||
if( addr >= 0x4200 ) return &VU1.VI[(addr>>2)&0x1f].UL;
|
||||
|
||||
return (u32*)(VU0.Mem+(addr&0x0fff));
|
||||
}
|
||||
}*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -67,10 +67,10 @@ extern void * memcpy_fast(void *dest, const void *src, size_t n);
|
|||
|
||||
typedef void (*UNPACKFUNCTYPE)( u32 *dest, u32 *data, int size );
|
||||
typedef int (*UNPACKPARTFUNCTYPESSE)( u32 *dest, u32 *data, int size );
|
||||
void (*Vif1CMDTLB[82])();
|
||||
void (*Vif0CMDTLB[75])();
|
||||
int (*Vif1TransTLB[128])(u32 *data);
|
||||
int (*Vif0TransTLB[128])(u32 *data);
|
||||
extern void (*Vif1CMDTLB[82])();
|
||||
extern void (*Vif0CMDTLB[75])();
|
||||
extern int (*Vif1TransTLB[128])(u32 *data);
|
||||
extern int (*Vif0TransTLB[128])(u32 *data);
|
||||
|
||||
typedef struct {
|
||||
UNPACKFUNCTYPE funcU;
|
||||
|
|
|
@ -3,8 +3,8 @@ AC_INIT(pcsx2,0.9.4,zerofrog@gmail.com)
|
|||
AM_INIT_AUTOMAKE(pcsx2,0.9.4)
|
||||
|
||||
AC_PROG_CC([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
|
||||
AC_PROG_CXX([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
|
||||
AC_PROG_CPP([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
|
||||
AC_PROG_CXX([g++ gcc cl KCC CC cxx cc++ xlC aCC c++])
|
||||
AC_PROG_CPP([g++ gcc cl KCC CC cxx cc++ xlC aCC c++])
|
||||
|
||||
AC_PROG_RANLIB
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@ u32 port=8510;
|
|||
SOCKET serversocket, remote;
|
||||
char message[1024]; //message to add to listbox
|
||||
|
||||
int runStatus=STOP, runCode=0, runCount=1;
|
||||
volatile long runStatus=STOP;
|
||||
int runCode=0, runCount=1;
|
||||
HANDLE runEvent=NULL;
|
||||
|
||||
DECI2_DBGP_BRK ebrk[32],
|
||||
|
|
|
@ -102,10 +102,10 @@ void _vuRegs_C2UNK(VURegs * VU, _VURegsNum *VUregsn)
|
|||
|
||||
void _vuRegsCOP22(VURegs * VU, _VURegsNum *VUregsn);
|
||||
|
||||
void (*recCOP2t[32])();
|
||||
/*void (*recCOP2t[32])();
|
||||
void (*recCOP2_BC2t[32])();
|
||||
void (*recCOP2SPECIAL1t[64])();
|
||||
void (*recCOP2SPECIAL2t[128])();
|
||||
void (*recCOP2SPECIAL2t[128])();*/
|
||||
|
||||
void recCOP2();
|
||||
void recCOP2_SPECIAL();
|
||||
|
|
|
@ -21,21 +21,21 @@
|
|||
#endif
|
||||
|
||||
#define REC_VUOP(VU, f) { \
|
||||
_freeXMMregs(&VU); \
|
||||
_freeXMMregs(/*&VU*/); \
|
||||
X86_32CODE(_freeMMXregs(); SetFPUstate();) \
|
||||
MOV32ItoM((uptr)&VU.code, (u32)VU.code); \
|
||||
CALLFunc((uptr)VU##MI_##f); \
|
||||
}
|
||||
|
||||
#define REC_VUOPFLAGS(VU, f) { \
|
||||
_freeXMMregs(&VU); \
|
||||
_freeXMMregs(/*&VU*/); \
|
||||
X86_32CODE(_freeMMXregs(); SetFPUstate();) \
|
||||
MOV32ItoM((uptr)&VU.code, (u32)VU.code); \
|
||||
CALLFunc((uptr)VU##MI_##f); \
|
||||
}
|
||||
|
||||
#define REC_VUBRANCH(VU, f) { \
|
||||
_freeXMMregs(&VU); \
|
||||
_freeXMMregs(/*&VU*/); \
|
||||
X86_32CODE(_freeMMXregs(); SetFPUstate();) \
|
||||
MOV32ItoM((uptr)&VU.code, (u32)VU.code); \
|
||||
MOV32ItoM((uptr)&VU.VI[REG_TPC].UL, (u32)pc); \
|
||||
|
|
Loading…
Reference in New Issue