Massive update of the GPL license headers. I don't know if I missed something, but I hope not.

This commit is contained in:
gigaherz
2008-06-27 14:45:25 +00:00
parent 60834609c6
commit c15da3a209
222 changed files with 12382 additions and 11807 deletions

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2007 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stddef.h>
@@ -1339,14 +1339,14 @@ void cdvdWrite07(u8 rt) { // BREAK
}
/*
Interrupts
0x00 No interrupt
0x01 Data Ready
0x02 Command Complete
0x03 Acknowledge (reserved)
0x04 End of Data Detected
0x05 Error Detected
Interrupts
0x00 No interrupt
0x01 Data Ready
0x02 Command Complete
0x03 Acknowledge (reserved)
0x04 End of Data Detected
0x05 Error Detected
0x06 Drive Not Ready
*/

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __CDVD_H__

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* Original code from libcdvd by Hiryu & Sjeep (C) 2002
* Modified by Florin for PCSX2 emu

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* Original code from libcdvd by Hiryu & Sjeep (C) 2002
* Modified by Florin for PCSX2 emu

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* Original code from libcdvd by Hiryu & Sjeep (C) 2002
* Modified by Florin for PCSX2 emu

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* Original code from libcdvd by Hiryu & Sjeep (C) 2002
* Linux kernel headers

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdio.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __COP0_H__

View File

@@ -1,391 +1,391 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2005 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "Common.h"
#include "Cache.h"
#ifndef PCSX2_VIRTUAL_MEM
_cacheS pCache[64];
int getFreeCache(u32 mem, int mode, int * way) {
u8 * out;
u32 paddr;
u32 taddr[2];
u8 * t;
int number;
int i = (mem >> 6) & 0x3F;
paddr = memLUTR[mem >> 12];
taddr[0] = memLUTW[pCache[i].tag[0]>>12];
taddr[1] = memLUTW[pCache[i].tag[1]>>12];
if (taddr[0] == paddr && (pCache[i].tag[0] & 0x20))
{
*way = 0;
return i;
}else if(taddr[1] == paddr && (pCache[i].tag[1] & 0x20))
{
*way = 1;
return i;
}
number = ((pCache[i].tag[0]>>4) & 1) ^ ((pCache[i].tag[1]>>4) & 1);
if(pCache[i].tag[number] & 0x60) // Valid Dirty
{
t = (char *)(taddr[number]);
out = (u8*)(t + (mem & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[i].data[number][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[i].data[number][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[i].data[number][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[i].data[number][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[i].data[number][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[i].data[number][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[i].data[number][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[i].data[number][3].b8._8)[1];
}
if(mode == 1)
{
pCache[i].tag[number] |= 0x40; // Set Dirty Bit if mode == write
}
pCache[i].tag[number] &= ~(0xFFFFF000);
pCache[i].tag[number] |= ((mem>>12) & 0xFFFFF) << 12;
t = (u8 *)paddr;
out= (u8*)(t + (mem & 0xFC0));
((u64*)pCache[i].data[number][0].b8._8)[0] = ((u64*)out)[0];
((u64*)pCache[i].data[number][0].b8._8)[1] = ((u64*)out)[1];
((u64*)pCache[i].data[number][1].b8._8)[0] = ((u64*)out)[2];
((u64*)pCache[i].data[number][1].b8._8)[1] = ((u64*)out)[3];
((u64*)pCache[i].data[number][2].b8._8)[0] = ((u64*)out)[4];
((u64*)pCache[i].data[number][2].b8._8)[1] = ((u64*)out)[5];
((u64*)pCache[i].data[number][3].b8._8)[0] = ((u64*)out)[6];
((u64*)pCache[i].data[number][3].b8._8)[1] = ((u64*)out)[7];
if(pCache[i].tag[number] & 0x10) pCache[i].tag[number] &= ~(0x10);
else pCache[i].tag[number] |= 0x10;
pCache[i].tag[number] |= 0x20;
*way = number;
return i;
}
void writeCache8(u32 mem, u8 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache8 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)] = value;
}
void writeCache16(u32 mem, u16 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache16 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
*(u16*)(&pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)]) = value;
}
void writeCache32(u32 mem, u32 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache32 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
*(u32*)(&pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)]) = value;
}
void writeCache64(u32 mem, u64 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache64 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
*(u64*)(&pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)]) = value;
}
void writeCache128(u32 mem, u64 *value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache128 %8.8x adding to %d\n", mem, i);
((u64*)pCache[i].data[number][(mem>>4) & 0x3].b8._8)[0] = value[0];
((u64*)pCache[i].data[number][(mem>>4) & 0x3].b8._8)[1] = value[1];
}
u8 *readCache(u32 mem) {
int i, number;
i = getFreeCache(mem,0,&number);
// CACHE_LOG("readCache %8.8x from %d, way %d\n", mem, i,number);
return pCache[i].data[number][(mem>>4) & 0x3].b8._8;
}
extern int Dcache;
void CACHE() {
u32 addr;
//if(Dcache == 0) return;
addr = cpuRegs.GPR.r[_Rs_].UL[0] + _Imm_;
switch (_Rt_) {
case 0x1a:
{
int index = (addr >> 6) & 0x3F;
u32 paddr[2];
int way;
u32 taddr = memLUTR[addr >> 12];
paddr[0] = memLUTW[pCache[index].tag[0] >> 12];
paddr[1] = memLUTW[pCache[index].tag[1] >> 12];
if(paddr[0] == taddr && (pCache[index].tag[0] & 0x20))
{
way = 0;
}
else if(paddr[1] == taddr && (pCache[index].tag[1] & 0x20))
{
way = 1;
}
else
{
return;
}
#ifdef CACHE_LOG
CACHE_LOG("CACHE DHIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
case 0x18:
{
u8 * out;
int index = (addr >> 6) & 0x3F;
u32 paddr[2];
int way;
u32 taddr = memLUTW[addr >> 12];
paddr[0] = memLUTW[pCache[index].tag[0] >> 12];
paddr[1] = memLUTW[pCache[index].tag[1] >> 12];
if(paddr[0] == taddr && (pCache[index].tag[0] & 0x20))
{
way = 0;
}
else if(paddr[1] == taddr && (pCache[index].tag[1] & 0x20))
{
way = 1;
}
else
{
return;
}
#ifdef CACHE_LOG
CACHE_LOG("CACHE DHWBIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
if(pCache[index].tag[way] & 0x60) // Valid Dirty
{
char * t = (char *)(taddr);//paddr[way]);
out = (u8*)(t + (addr & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[index].data[way][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[index].data[way][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[index].data[way][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[index].data[way][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[index].data[way][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[index].data[way][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[index].data[way][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[index].data[way][3].b8._8)[1];
}
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
case 0x1c:
{
u8 * out;
int index = (addr >> 6) & 0x3F;
u32 paddr[2];
int way;
u32 taddr = memLUTW[addr >> 12];
paddr[0] = memLUTW[pCache[index].tag[0] >> 12];
paddr[1] = memLUTW[pCache[index].tag[1] >> 12];
if(paddr[0] == taddr && (pCache[index].tag[0] & 0x20))
{
way = 0;
}
else if(paddr[1] == taddr && (pCache[index].tag[1] & 0x20))
{
way = 1;
}
else
{
return;
}
#ifdef CACHE_LOG
CACHE_LOG("CACHE DHWOIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
if(pCache[index].tag[way] & 0x60) // Valid Dirty
{
char * t = (char *)(taddr);
out = (u8*)(t + (addr & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[index].data[way][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[index].data[way][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[index].data[way][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[index].data[way][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[index].data[way][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[index].data[way][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[index].data[way][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[index].data[way][3].b8._8)[1];
}
pCache[index].tag[way] &= ~(0x40);
break;
}
case 0x16:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXIN addr %x, index %d, way %d, flag %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
case 0x11:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
u8 * out = pCache[index].data[way][(addr>>4) & 0x3].b8._8;
cpuRegs.CP0.r[28] = *(u32 *)(out+(addr&0xf));
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXLDT addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28]);
#endif
break;
}
case 0x10:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
cpuRegs.CP0.r[28] = 0;
cpuRegs.CP0.r[28] = pCache[index].tag[way];
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXLTG addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28]);
#endif
break;
}
case 0x13:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
u8 * out = pCache[index].data[way][(addr>>4) & 0x3].b8._8;
*(u32*)(&pCache[index].data[way][(addr>>4) & 0x3].b8._8[(addr&0xf)]) = cpuRegs.CP0.r[28];
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXSDT addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28]);
#endif
break;
}
case 0x12:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
pCache[index].tag[way] = cpuRegs.CP0.r[28];
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXSTG addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28] & 0x6F);
#endif
break;
}
case 0x14:
{
u8 * out;
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXWBIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
if(pCache[index].tag[way] & 0x60) // Dirty
{
u32 paddr = memLUTW[pCache[index].tag[way] >> 12];
char * t = (char *)(paddr);
out = (u8*)(t + (addr & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[index].data[way][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[index].data[way][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[index].data[way][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[index].data[way][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[index].data[way][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[index].data[way][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[index].data[way][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[index].data[way][3].b8._8)[1];
}
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
}
}
#else
void CACHE() {
}
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "Common.h"
#include "Cache.h"
#ifndef PCSX2_VIRTUAL_MEM
_cacheS pCache[64];
int getFreeCache(u32 mem, int mode, int * way) {
u8 * out;
u32 paddr;
u32 taddr[2];
u8 * t;
int number;
int i = (mem >> 6) & 0x3F;
paddr = memLUTR[mem >> 12];
taddr[0] = memLUTW[pCache[i].tag[0]>>12];
taddr[1] = memLUTW[pCache[i].tag[1]>>12];
if (taddr[0] == paddr && (pCache[i].tag[0] & 0x20))
{
*way = 0;
return i;
}else if(taddr[1] == paddr && (pCache[i].tag[1] & 0x20))
{
*way = 1;
return i;
}
number = ((pCache[i].tag[0]>>4) & 1) ^ ((pCache[i].tag[1]>>4) & 1);
if(pCache[i].tag[number] & 0x60) // Valid Dirty
{
t = (char *)(taddr[number]);
out = (u8*)(t + (mem & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[i].data[number][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[i].data[number][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[i].data[number][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[i].data[number][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[i].data[number][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[i].data[number][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[i].data[number][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[i].data[number][3].b8._8)[1];
}
if(mode == 1)
{
pCache[i].tag[number] |= 0x40; // Set Dirty Bit if mode == write
}
pCache[i].tag[number] &= ~(0xFFFFF000);
pCache[i].tag[number] |= ((mem>>12) & 0xFFFFF) << 12;
t = (u8 *)paddr;
out= (u8*)(t + (mem & 0xFC0));
((u64*)pCache[i].data[number][0].b8._8)[0] = ((u64*)out)[0];
((u64*)pCache[i].data[number][0].b8._8)[1] = ((u64*)out)[1];
((u64*)pCache[i].data[number][1].b8._8)[0] = ((u64*)out)[2];
((u64*)pCache[i].data[number][1].b8._8)[1] = ((u64*)out)[3];
((u64*)pCache[i].data[number][2].b8._8)[0] = ((u64*)out)[4];
((u64*)pCache[i].data[number][2].b8._8)[1] = ((u64*)out)[5];
((u64*)pCache[i].data[number][3].b8._8)[0] = ((u64*)out)[6];
((u64*)pCache[i].data[number][3].b8._8)[1] = ((u64*)out)[7];
if(pCache[i].tag[number] & 0x10) pCache[i].tag[number] &= ~(0x10);
else pCache[i].tag[number] |= 0x10;
pCache[i].tag[number] |= 0x20;
*way = number;
return i;
}
void writeCache8(u32 mem, u8 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache8 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)] = value;
}
void writeCache16(u32 mem, u16 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache16 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
*(u16*)(&pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)]) = value;
}
void writeCache32(u32 mem, u32 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache32 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
*(u32*)(&pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)]) = value;
}
void writeCache64(u32 mem, u64 value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache64 %8.8x adding to %d, way %d, value %x\n", mem, i,number,value);
*(u64*)(&pCache[i].data[number][(mem>>4) & 0x3].b8._8[(mem&0xf)]) = value;
}
void writeCache128(u32 mem, u64 *value) {
int i, number;
i = getFreeCache(mem,1,&number);
// CACHE_LOG("writeCache128 %8.8x adding to %d\n", mem, i);
((u64*)pCache[i].data[number][(mem>>4) & 0x3].b8._8)[0] = value[0];
((u64*)pCache[i].data[number][(mem>>4) & 0x3].b8._8)[1] = value[1];
}
u8 *readCache(u32 mem) {
int i, number;
i = getFreeCache(mem,0,&number);
// CACHE_LOG("readCache %8.8x from %d, way %d\n", mem, i,number);
return pCache[i].data[number][(mem>>4) & 0x3].b8._8;
}
extern int Dcache;
void CACHE() {
u32 addr;
//if(Dcache == 0) return;
addr = cpuRegs.GPR.r[_Rs_].UL[0] + _Imm_;
switch (_Rt_) {
case 0x1a:
{
int index = (addr >> 6) & 0x3F;
u32 paddr[2];
int way;
u32 taddr = memLUTR[addr >> 12];
paddr[0] = memLUTW[pCache[index].tag[0] >> 12];
paddr[1] = memLUTW[pCache[index].tag[1] >> 12];
if(paddr[0] == taddr && (pCache[index].tag[0] & 0x20))
{
way = 0;
}
else if(paddr[1] == taddr && (pCache[index].tag[1] & 0x20))
{
way = 1;
}
else
{
return;
}
#ifdef CACHE_LOG
CACHE_LOG("CACHE DHIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
case 0x18:
{
u8 * out;
int index = (addr >> 6) & 0x3F;
u32 paddr[2];
int way;
u32 taddr = memLUTW[addr >> 12];
paddr[0] = memLUTW[pCache[index].tag[0] >> 12];
paddr[1] = memLUTW[pCache[index].tag[1] >> 12];
if(paddr[0] == taddr && (pCache[index].tag[0] & 0x20))
{
way = 0;
}
else if(paddr[1] == taddr && (pCache[index].tag[1] & 0x20))
{
way = 1;
}
else
{
return;
}
#ifdef CACHE_LOG
CACHE_LOG("CACHE DHWBIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
if(pCache[index].tag[way] & 0x60) // Valid Dirty
{
char * t = (char *)(taddr);//paddr[way]);
out = (u8*)(t + (addr & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[index].data[way][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[index].data[way][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[index].data[way][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[index].data[way][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[index].data[way][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[index].data[way][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[index].data[way][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[index].data[way][3].b8._8)[1];
}
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
case 0x1c:
{
u8 * out;
int index = (addr >> 6) & 0x3F;
u32 paddr[2];
int way;
u32 taddr = memLUTW[addr >> 12];
paddr[0] = memLUTW[pCache[index].tag[0] >> 12];
paddr[1] = memLUTW[pCache[index].tag[1] >> 12];
if(paddr[0] == taddr && (pCache[index].tag[0] & 0x20))
{
way = 0;
}
else if(paddr[1] == taddr && (pCache[index].tag[1] & 0x20))
{
way = 1;
}
else
{
return;
}
#ifdef CACHE_LOG
CACHE_LOG("CACHE DHWOIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
if(pCache[index].tag[way] & 0x60) // Valid Dirty
{
char * t = (char *)(taddr);
out = (u8*)(t + (addr & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[index].data[way][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[index].data[way][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[index].data[way][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[index].data[way][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[index].data[way][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[index].data[way][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[index].data[way][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[index].data[way][3].b8._8)[1];
}
pCache[index].tag[way] &= ~(0x40);
break;
}
case 0x16:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXIN addr %x, index %d, way %d, flag %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
case 0x11:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
u8 * out = pCache[index].data[way][(addr>>4) & 0x3].b8._8;
cpuRegs.CP0.r[28] = *(u32 *)(out+(addr&0xf));
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXLDT addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28]);
#endif
break;
}
case 0x10:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
cpuRegs.CP0.r[28] = 0;
cpuRegs.CP0.r[28] = pCache[index].tag[way];
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXLTG addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28]);
#endif
break;
}
case 0x13:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
u8 * out = pCache[index].data[way][(addr>>4) & 0x3].b8._8;
*(u32*)(&pCache[index].data[way][(addr>>4) & 0x3].b8._8[(addr&0xf)]) = cpuRegs.CP0.r[28];
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXSDT addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28]);
#endif
break;
}
case 0x12:
{
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
pCache[index].tag[way] = cpuRegs.CP0.r[28];
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXSTG addr %x, index %d, way %d, DATA %x\n",addr,index,way,cpuRegs.CP0.r[28] & 0x6F);
#endif
break;
}
case 0x14:
{
u8 * out;
int index = (addr >> 6) & 0x3F;
int way = addr & 0x1;
#ifdef CACHE_LOG
CACHE_LOG("CACHE DXWBIN addr %x, index %d, way %d, Flags %x\n",addr,index,way,pCache[index].tag[way] & 0x78);
#endif
if(pCache[index].tag[way] & 0x60) // Dirty
{
u32 paddr = memLUTW[pCache[index].tag[way] >> 12];
char * t = (char *)(paddr);
out = (u8*)(t + (addr & 0xFC0));
((u64*)out)[0] = ((u64*)pCache[index].data[way][0].b8._8)[0];
((u64*)out)[1] = ((u64*)pCache[index].data[way][0].b8._8)[1];
((u64*)out)[2] = ((u64*)pCache[index].data[way][1].b8._8)[0];
((u64*)out)[3] = ((u64*)pCache[index].data[way][1].b8._8)[1];
((u64*)out)[4] = ((u64*)pCache[index].data[way][2].b8._8)[0];
((u64*)out)[5] = ((u64*)pCache[index].data[way][2].b8._8)[1];
((u64*)out)[6] = ((u64*)pCache[index].data[way][3].b8._8)[0];
((u64*)out)[7] = ((u64*)pCache[index].data[way][3].b8._8)[1];
}
pCache[index].tag[way] &= ~(0x6F);
((u64*)pCache[index].data[way][0].b8._8)[0] = 0;
((u64*)pCache[index].data[way][0].b8._8)[1] = 0;
((u64*)pCache[index].data[way][1].b8._8)[0] = 0;
((u64*)pCache[index].data[way][1].b8._8)[1] = 0;
((u64*)pCache[index].data[way][2].b8._8)[0] = 0;
((u64*)pCache[index].data[way][2].b8._8)[1] = 0;
((u64*)pCache[index].data[way][3].b8._8)[0] = 0;
((u64*)pCache[index].data[way][3].b8._8)[1] = 0;
break;
}
}
}
#else
void CACHE() {
}
#endif

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2005 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __CACHE_H__

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __CDROM_H__

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __COMMON_H__

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __COUNTERS_H__

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Debug.h"

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <string.h>

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <string.h>

View File

@@ -1,22 +1,21 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
nclude <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
#include "Common.h"

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
void UpdateR5900op();

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
//============================================
//=== Audio XA decoding
//=== Kazzuya

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
//============================================
//=== Audio XA decoding
//=== Kazzuya

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __EEREGS_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __ELF_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <math.h>
#include "Common.h"

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <math.h>
// sqrtf only defined in C++

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
#include <string.h>

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
// rewritten by zerofrog to add multithreading/gs caching to GS and VU1

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __GS_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __HW_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Common.h"
#include "IPU.h"

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __IPU_H__

View File

@@ -1,5 +1,5 @@
; Pcsx2 - Pc Ps2 Emulator
; Copyright (C) 2002-2007 Pcsx2 Team
; Copyright (C) 2002-2008 Pcsx2 Team
;
; 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
;; x86-64 coroutine fucntions
extern g_pCurrentRoutine:ptr

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdio.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef PCSX2_COROUTINE_LIB

View File

@@ -19,7 +19,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
//#include <stdlib.h>

View File

@@ -19,7 +19,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Mpeg.h"

View File

@@ -19,7 +19,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __MPEG_H__

View File

@@ -19,7 +19,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __VLC_H__

View File

@@ -19,7 +19,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>

View File

@@ -19,7 +19,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef YUV2RGB_H

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
//all tables for R5900 are define here..

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef INTERTABLES_H
#define INTERTABLES_H

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdlib.h>

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdio.h>

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __LINUX_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdarg.h>

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <gtk/gtk.h>

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/

View File

@@ -1,21 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
#include "Common.h"

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* This code was based on the FPSE v0.08 Mdec decoder*/

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __MDEC_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
//////////

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdio.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2007 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __MISC_H__

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#ifndef __PS2EDEFS_H__
#define __PS2EDEFS_H__

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#ifndef __PS2ETYPES_H__
#define __PS2ETYPES_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
//
// Includes

View File

@@ -1,3 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#ifndef __PATCH_H__
#define __PATCH_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PLUGINS_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
#include <stdio.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXBIOS_H__

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/***** sysmem imageInfo

View File

@@ -1,4 +1,4 @@
/* Pcsx2 - Pc Ps2 Emulator * Copyright (C) 2002-2003 Pcsx2 Team
/* Pcsx2 - Pc Ps2 Emulator * Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -12,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXCOMMON_H__

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXCOUNTERS_H__

View File

@@ -1,289 +1,289 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2004 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string.h>
#include "PsxCommon.h"
// Dma0/1 in Mdec.c
// Dma3 in CdRom.c
// Dma8 in PsxSpd.c
// Dma11/12 in PsxSio2.c
//static int spudmaenable[2];
int spu2interrupts[2];
int iopsifbusy[2] = { 0, 0 };
void psxDma4(u32 madr, u32 bcr, u32 chcr) { // SPU
int size;
/*if(chcr & 0x400) SysPrintf("SPU 2 DMA 4 linked list chain mode! chcr = %x madr = %x bcr = %x\n", chcr, madr, bcr);
if(chcr & 0x40000000) SysPrintf("SPU 2 DMA 4 Unusual bit set on 'to' direction chcr = %x madr = %x bcr = %x\n", chcr, madr, bcr);
if((chcr & 0x1) == 0) SysPrintf("SPU 2 DMA 4 loading from spu2 memory chcr = %x madr = %x bcr = %x\n", chcr, madr, bcr);
*/
if(SPU2async)
{
//if((psxRegs.cycle - psxCounters[6].sCycleT) >= psxCounters[6].CycleT){
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>
#include "PsxCommon.h"
// Dma0/1 in Mdec.c
// Dma3 in CdRom.c
// Dma8 in PsxSpd.c
// Dma11/12 in PsxSio2.c
//static int spudmaenable[2];
int spu2interrupts[2];
int iopsifbusy[2] = { 0, 0 };
void psxDma4(u32 madr, u32 bcr, u32 chcr) { // SPU
int size;
/*if(chcr & 0x400) SysPrintf("SPU 2 DMA 4 linked list chain mode! chcr = %x madr = %x bcr = %x\n", chcr, madr, bcr);
if(chcr & 0x40000000) SysPrintf("SPU 2 DMA 4 Unusual bit set on 'to' direction chcr = %x madr = %x bcr = %x\n", chcr, madr, bcr);
if((chcr & 0x1) == 0) SysPrintf("SPU 2 DMA 4 loading from spu2 memory chcr = %x madr = %x bcr = %x\n", chcr, madr, bcr);
*/
if(SPU2async)
{
//if((psxRegs.cycle - psxCounters[6].sCycleT) >= psxCounters[6].CycleT){
SPU2async(psxRegs.cycle - psxCounters[6].sCycleT);
//SysPrintf("cycles sent to SPU2 %x\n", psxRegs.cycle - psxCounters[6].sCycleT);
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = ((bcr >> 16) * (bcr & 0xFFFF)) * 3;
//}
psxNextCounter -= (psxRegs.cycle-psxNextsCounter);
psxNextsCounter = psxRegs.cycle;
if(psxCounters[6].CycleT < psxNextCounter) psxNextCounter = psxCounters[6].CycleT;
}
switch (chcr) {
case 0x01000201: //cpu to spu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 4 - SPU mem2spu *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA4 write blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2writeDMA4Mem((u16 *)PSXM(madr), size*2);
break;
case 0x01000200: //spu to cpu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 4 - SPU spu2mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA4 read blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2readDMA4Mem((u16 *)PSXM(madr), size*2);
psxCpu->Clear(HW_DMA4_MADR, size);
break;
default:
SysPrintf("*** DMA 4 - SPU unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
break;
}
//spudmaenable[0] = size;
}
int psxDma4Interrupt() {
HW_DMA4_CHCR &= ~0x01000000;
psxDmaInterrupt(4);
psxHu32(0x1070)|= 1<<9;
return 1;
}
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
HW_DMA2_CHCR &= ~0x01000000;
psxDmaInterrupt(2);
}
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
u32 *mem = (u32 *)PSXM(madr);
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 6 - OT *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
if (chcr == 0x11000002) {
while (bcr--) {
*mem-- = (madr - 4) & 0xffffff;
madr -= 4;
}
mem++; *mem = 0xffffff;
} else {
// Unknown option
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 6 - OT unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
}
HW_DMA6_CHCR &= ~0x01000000;
psxDmaInterrupt(6);
}
void psxDma7(u32 madr, u32 bcr, u32 chcr) {
int size;
if(SPU2async)
{
//if((psxRegs.cycle - psxCounters[6].sCycleT) >= psxCounters[6].CycleT){
//}
psxNextCounter -= (psxRegs.cycle-psxNextsCounter);
psxNextsCounter = psxRegs.cycle;
if(psxCounters[6].CycleT < psxNextCounter) psxNextCounter = psxCounters[6].CycleT;
}
switch (chcr) {
case 0x01000201: //cpu to spu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 4 - SPU mem2spu *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA4 write blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2writeDMA4Mem((u16 *)PSXM(madr), size*2);
break;
case 0x01000200: //spu to cpu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 4 - SPU spu2mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA4 read blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2readDMA4Mem((u16 *)PSXM(madr), size*2);
psxCpu->Clear(HW_DMA4_MADR, size);
break;
default:
SysPrintf("*** DMA 4 - SPU unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
break;
}
//spudmaenable[0] = size;
}
int psxDma4Interrupt() {
HW_DMA4_CHCR &= ~0x01000000;
psxDmaInterrupt(4);
psxHu32(0x1070)|= 1<<9;
return 1;
}
void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU
HW_DMA2_CHCR &= ~0x01000000;
psxDmaInterrupt(2);
}
void psxDma6(u32 madr, u32 bcr, u32 chcr) {
u32 *mem = (u32 *)PSXM(madr);
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 6 - OT *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
if (chcr == 0x11000002) {
while (bcr--) {
*mem-- = (madr - 4) & 0xffffff;
madr -= 4;
}
mem++; *mem = 0xffffff;
} else {
// Unknown option
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 6 - OT unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
}
HW_DMA6_CHCR &= ~0x01000000;
psxDmaInterrupt(6);
}
void psxDma7(u32 madr, u32 bcr, u32 chcr) {
int size;
if(SPU2async)
{
//if((psxRegs.cycle - psxCounters[6].sCycleT) >= psxCounters[6].CycleT){
SPU2async(psxRegs.cycle - psxCounters[6].sCycleT);
//SysPrintf("cycles sent to SPU2 %x\n", psxRegs.cycle - psxCounters[6].sCycleT);
psxCounters[6].sCycleT = psxRegs.cycle;
psxCounters[6].CycleT = ((bcr >> 16) * (bcr & 0xFFFF)) * 3;
//}
psxNextCounter -= (psxRegs.cycle-psxNextsCounter);
psxNextsCounter = psxRegs.cycle;
if(psxCounters[6].CycleT < psxNextCounter) psxNextCounter = psxCounters[6].CycleT;
}
switch (chcr) {
case 0x01000201: //cpu to spu2 transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 7 - SPU2 mem2spu *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA7 write blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2writeDMA7Mem((u16 *)PSXM(madr), size*2);
break;
case 0x01000200: //spu2 to cpu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 7 - SPU2 spu2mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA4 read blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2readDMA7Mem((u16 *)PSXM(madr), size*2);
psxCpu->Clear(HW_DMA7_MADR, size);
break;
default:
SysPrintf("*** DMA 7 - SPU unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
break;
}
}
int psxDma7Interrupt() {
HW_DMA7_CHCR &= ~0x01000000;
psxDmaInterrupt2(0);
return 1;
}
extern int eesifbusy[2];
void psxDma9(u32 madr, u32 bcr, u32 chcr) {
DMACh *dma = (DMACh*)&PS2MEM_HW[0xc000];
#ifdef SIF_LOG
SIF_LOG("IOP: dmaSIF0 chcr = %lx, madr = %lx, bcr = %lx, tadr = %lx\n", chcr, madr, bcr, HW_DMA9_TADR);
#endif
iopsifbusy[0] = 1;
psHu32(0x1000F240) |= 0x2000;
if (eesifbusy[0] == 1 && iopsifbusy[0] == 1) {
SIF0Dma();
psHu32(0x1000F240) &= ~0x20;
psHu32(0x1000F240) &= ~0x2000;
}
}
void psxDma10(u32 madr, u32 bcr, u32 chcr) {
DMACh *dma = (DMACh*)&PS2MEM_HW[0xc400];
#ifdef SIF_LOG
SIF_LOG("IOP: dmaSIF1 chcr = %lx, madr = %lx, bcr = %lx\n", chcr, madr, bcr);
#endif
iopsifbusy[1] = 1;
psHu32(0x1000F240) |= 0x4000;
if (eesifbusy[1] == 1 && iopsifbusy[1] == 1) {
SIF1Dma();
psHu32(0x1000F240) &= ~0x40;
psHu32(0x1000F240) &= ~0x100;
psHu32(0x1000F240) &= ~0x4000;
}
}
void psxDma8(u32 madr, u32 bcr, u32 chcr) {
int size;
switch (chcr & 0x01000201) {
case 0x01000201: //cpu to dev9 transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 8 - DEV9 mem2dev9 *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
DEV9writeDMA8Mem((u32*)PSXM(madr), size*8);
break;
case 0x01000200: //dev9 to cpu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 8 - DEV9 dev9mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
DEV9readDMA8Mem((u32*)PSXM(madr), size*8);
break;
#ifdef PSXDMA_LOG
default:
PSXDMA_LOG("*** DMA 8 - DEV9 unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
break;
#endif
}
HW_DMA8_CHCR &= ~0x01000000;
psxDmaInterrupt2(1);
}
void dev9Interrupt() {
if (dev9Handler == NULL) goto irq;
if (dev9Handler() != 1) {
psxRegs.interrupt&= ~(1 << 20);
return;
}
irq:
psxHu32(0x1070)|= 1<<13;
//SBUS
hwIntcIrq(INTC_SBUS);
psxRegs.interrupt&= ~(1 << 20);
}
void dev9Irq(int cycles) {
PSX_INT(20, cycles);
}
void usbInterrupt() {
if (usbHandler == NULL) goto irq;
if (usbHandler() != 1) {
psxRegs.interrupt&= ~(1 << 21);
return;
}
irq:
psxHu32(0x1070)|= 1<<22;
//SBUS
hwIntcIrq(INTC_SBUS);
psxRegs.interrupt&= ~(1 << 21);
}
void usbIrq(int cycles) {
PSX_INT(21, cycles);
}
void fwIrq() {
psxHu32(0x1070)|= 1<<24;
//SBUS
hwIntcIrq(INTC_SBUS);
}
void spu2DMA4Irq() {
SPU2interruptDMA4();
//HW_DMA4_BCR = 0;
HW_DMA4_CHCR &= ~0x01000000;
psxDmaInterrupt(4);
}
void spu2DMA7Irq() {
SPU2interruptDMA7();
//HW_DMA7_BCR = 0;
HW_DMA7_CHCR &= ~0x01000000;
psxDmaInterrupt2(0);
}
void spu2Irq() {
psxHu32(0x1070)|= 1<<9;
//SBUS
hwIntcIrq(INTC_SBUS);
}
//}
psxNextCounter -= (psxRegs.cycle-psxNextsCounter);
psxNextsCounter = psxRegs.cycle;
if(psxCounters[6].CycleT < psxNextCounter) psxNextCounter = psxCounters[6].CycleT;
}
switch (chcr) {
case 0x01000201: //cpu to spu2 transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 7 - SPU2 mem2spu *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA7 write blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2writeDMA7Mem((u16 *)PSXM(madr), size*2);
break;
case 0x01000200: //spu2 to cpu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 7 - SPU2 spu2mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
//SysPrintf("DMA4 read blocks %x, size per block %x\n", (bcr >> 16), (bcr & 0xFFFF));
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
SPU2readDMA7Mem((u16 *)PSXM(madr), size*2);
psxCpu->Clear(HW_DMA7_MADR, size);
break;
default:
SysPrintf("*** DMA 7 - SPU unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
break;
}
}
int psxDma7Interrupt() {
HW_DMA7_CHCR &= ~0x01000000;
psxDmaInterrupt2(0);
return 1;
}
extern int eesifbusy[2];
void psxDma9(u32 madr, u32 bcr, u32 chcr) {
DMACh *dma = (DMACh*)&PS2MEM_HW[0xc000];
#ifdef SIF_LOG
SIF_LOG("IOP: dmaSIF0 chcr = %lx, madr = %lx, bcr = %lx, tadr = %lx\n", chcr, madr, bcr, HW_DMA9_TADR);
#endif
iopsifbusy[0] = 1;
psHu32(0x1000F240) |= 0x2000;
if (eesifbusy[0] == 1 && iopsifbusy[0] == 1) {
SIF0Dma();
psHu32(0x1000F240) &= ~0x20;
psHu32(0x1000F240) &= ~0x2000;
}
}
void psxDma10(u32 madr, u32 bcr, u32 chcr) {
DMACh *dma = (DMACh*)&PS2MEM_HW[0xc400];
#ifdef SIF_LOG
SIF_LOG("IOP: dmaSIF1 chcr = %lx, madr = %lx, bcr = %lx\n", chcr, madr, bcr);
#endif
iopsifbusy[1] = 1;
psHu32(0x1000F240) |= 0x4000;
if (eesifbusy[1] == 1 && iopsifbusy[1] == 1) {
SIF1Dma();
psHu32(0x1000F240) &= ~0x40;
psHu32(0x1000F240) &= ~0x100;
psHu32(0x1000F240) &= ~0x4000;
}
}
void psxDma8(u32 madr, u32 bcr, u32 chcr) {
int size;
switch (chcr & 0x01000201) {
case 0x01000201: //cpu to dev9 transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 8 - DEV9 mem2dev9 *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
DEV9writeDMA8Mem((u32*)PSXM(madr), size*8);
break;
case 0x01000200: //dev9 to cpu transfer
#ifdef PSXDMA_LOG
PSXDMA_LOG("*** DMA 8 - DEV9 dev9mem *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
#endif
size = (bcr >> 16) * (bcr & 0xFFFF); // Number of blocks to transfer
DEV9readDMA8Mem((u32*)PSXM(madr), size*8);
break;
#ifdef PSXDMA_LOG
default:
PSXDMA_LOG("*** DMA 8 - DEV9 unknown *** %lx addr = %lx size = %lx\n", chcr, madr, bcr);
break;
#endif
}
HW_DMA8_CHCR &= ~0x01000000;
psxDmaInterrupt2(1);
}
void dev9Interrupt() {
if (dev9Handler == NULL) goto irq;
if (dev9Handler() != 1) {
psxRegs.interrupt&= ~(1 << 20);
return;
}
irq:
psxHu32(0x1070)|= 1<<13;
//SBUS
hwIntcIrq(INTC_SBUS);
psxRegs.interrupt&= ~(1 << 20);
}
void dev9Irq(int cycles) {
PSX_INT(20, cycles);
}
void usbInterrupt() {
if (usbHandler == NULL) goto irq;
if (usbHandler() != 1) {
psxRegs.interrupt&= ~(1 << 21);
return;
}
irq:
psxHu32(0x1070)|= 1<<22;
//SBUS
hwIntcIrq(INTC_SBUS);
psxRegs.interrupt&= ~(1 << 21);
}
void usbIrq(int cycles) {
PSX_INT(21, cycles);
}
void fwIrq() {
psxHu32(0x1070)|= 1<<24;
//SBUS
hwIntcIrq(INTC_SBUS);
}
void spu2DMA4Irq() {
SPU2interruptDMA4();
//HW_DMA4_BCR = 0;
HW_DMA4_CHCR &= ~0x01000000;
psxDmaInterrupt(4);
}
void spu2DMA7Irq() {
SPU2interruptDMA7();
//HW_DMA7_BCR = 0;
HW_DMA7_CHCR &= ~0x01000000;
psxDmaInterrupt2(0);
}
void spu2Irq() {
psxHu32(0x1070)|= 1<<9;
//SBUS
hwIntcIrq(INTC_SBUS);
}

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXDMA_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2005 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <string.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXHW_H__

View File

@@ -1,20 +1,21 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
#include <string.h>

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <string.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXMEMORY_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <string.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __PSXSIO2_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdio.h>
#include <stdlib.h>

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __R3000A_H__

View File

@@ -1,19 +1,19 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#include <stdlib.h>

View File

@@ -1,282 +1,282 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __R5900_H__
#define __R5900_H__
#include <stdio.h>
typedef struct {
int (*Init)();
void (*Reset)();
void (*Step)();
void (*Execute)(); /* executes up to a break */
void (*ExecuteBlock)(); /* executes up to a jump */
void (*ExecuteVU0Block)(); /* executes up to a jump */
void (*ExecuteVU1Block)(); /* executes up to a jump */
void (*EnableVU0micro)(int enable);
void (*EnableVU1micro)(int enable);
void (*Clear)(u32 Addr, u32 Size);
void (*ClearVU0)(u32 Addr, u32 Size);
void (*ClearVU1)(u32 Addr, u32 Size);
void (*Shutdown)();
} R5900cpu;
extern R5900cpu *Cpu;
extern R5900cpu intCpu;
extern R5900cpu recCpu;
extern u32 bExecBIOS;
typedef union { // Declare union type GPR register
u64 UD[2]; //128 bits
s64 SD[2];
u32 UL[4];
s32 SL[4];
u16 US[8];
s16 SS[8];
u8 UC[16];
s8 SC[16];
} GPR_reg;
typedef union {
struct {
GPR_reg r0, at, v0, v1, a0, a1, a2, a3,
t0, t1, t2, t3, t4, t5, t6, t7,
s0, s1, s2, s3, s4, s5, s6, s7,
t8, t9, k0, k1, gp, sp, s8, ra;
} n;
GPR_reg r[32];
} GPRregs;
typedef union {
struct {
u32 pccr, pcr0, pcr1, pad;
} n;
u32 r[4];
} PERFregs;
typedef union {
struct {
u32 Index, Random, EntryLo0, EntryLo1,
Context, PageMask, Wired, Reserved0,
BadVAddr, Count, EntryHi, Compare;
union {
struct {
int IE:1;
int EXL:1;
int ERL:1;
int KSU:2;
int unused0:3;
int IM:8;
int EIE:1;
int _EDI:1;
int CH:1;
int unused1:3;
int BEV:1;
int DEV:1;
int unused2:2;
int FR:1;
int unused3:1;
int CU:4;
} b;
u32 val;
} Status;
u32 Cause, EPC, PRid,
Config, LLAddr, WatchLO, WatchHI,
XContext, Reserved1, Reserved2, Debug,
DEPC, PerfCnt, ErrCtl, CacheErr,
TagLo, TagHi, ErrorEPC, DESAVE;
} n;
u32 r[32];
} CP0regs;
typedef struct {
GPRregs GPR; // GPR regs
// NOTE: don't change order since recompiler uses it
GPR_reg HI;
GPR_reg LO; // hi & log 128bit wide
CP0regs CP0; // is COP0 32bit?
u32 sa; // shift amount (32bit), needs to be 16 byte aligned
u32 constzero; // always 0, for MFSA
u32 pc; // Program counter, when changing offset in struct, check iR5900-X.S to make sure offset is correct
u32 code; // The instruction
PERFregs PERF;
u32 eCycle[32];
u32 sCycle[32]; // for internal counters
u32 cycle; // calculate cpucycles..
u32 interrupt;
int branch;
int opmode; // operating mode
u32 tempcycles;
} cpuRegisters;
extern int EEsCycle;
extern u32 EEoCycle, IOPoCycle;
extern PCSX2_ALIGNED16_DECL(cpuRegisters cpuRegs);
// used for optimization
typedef union {
u64 UD[1]; //64 bits
s64 SD[1];
u32 UL[2];
s32 SL[3];
u16 US[4];
s16 SS[4];
u8 UC[8];
s8 SC[8];
} GPR_reg64;
#define GPR_IS_CONST1(reg) ((reg)<32 && (g_cpuHasConstReg&(1<<(reg))))
#define GPR_IS_CONST2(reg1, reg2) ((g_cpuHasConstReg&(1<<(reg1)))&&(g_cpuHasConstReg&(1<<(reg2))))
#define GPR_SET_CONST(reg) { \
if( (reg) < 32 ) { \
g_cpuHasConstReg |= (1<<(reg)); \
g_cpuFlushedConstReg &= ~(1<<(reg)); \
} \
}
#define GPR_DEL_CONST(reg) { \
if( (reg) < 32 ) g_cpuHasConstReg &= ~(1<<(reg)); \
}
extern PCSX2_ALIGNED16_DECL(GPR_reg64 g_cpuConstRegs[32]);
extern u32 g_cpuHasConstReg, g_cpuFlushedConstReg;
typedef union {
float f;
u32 UL;
} FPRreg;
typedef struct {
FPRreg fpr[32]; // 32bit floating point registers
u32 fprc[32]; // 32bit floating point control registers
FPRreg ACC; // 32 bit accumulator
} fpuRegisters;
extern PCSX2_ALIGNED16_DECL(fpuRegisters fpuRegs);
typedef struct {
u32 PageMask,EntryHi;
u32 EntryLo0,EntryLo1;
u32 Mask, nMask;
u32 G;
u32 ASID;
u32 VPN2;
u32 PFN0;
u32 PFN1;
} tlbs;
extern PCSX2_ALIGNED16_DECL(tlbs tlb[48]);
#ifndef _PC_
#define _i64(x) (s64)x
#define _u64(x) (u64)x
#define _i32(x) (s32)x
#define _u32(x) (u32)x
#define _i16(x) (s16)x
#define _u16(x) (u16)x
#define _i8(x) (s8)x
#define _u8(x) (u8)x
/**** R3000A Instruction Macros ****/
#define _PC_ cpuRegs.pc // The next PC to be executed
#define _Funct_ ((cpuRegs.code ) & 0x3F) // The funct part of the instruction register
#define _Rd_ ((cpuRegs.code >> 11) & 0x1F) // The rd part of the instruction register
#define _Rt_ ((cpuRegs.code >> 16) & 0x1F) // The rt part of the instruction register
#define _Rs_ ((cpuRegs.code >> 21) & 0x1F) // The rs part of the instruction register
#define _Sa_ ((cpuRegs.code >> 6) & 0x1F) // The sa part of the instruction register
#define _Im_ ((u16)cpuRegs.code) // The immediate part of the instruction register
#define _Target_ (cpuRegs.code & 0x03ffffff) // The target part of the instruction register
#define _Imm_ ((s16)cpuRegs.code) // sign-extended immediate
#define _ImmU_ (cpuRegs.code&0xffff) // zero-extended immediate
//#define _JumpTarget_ ((_Target_ * 4) + (_PC_ & 0xf0000000)) // Calculates the target during a jump instruction
//#define _BranchTarget_ ((s16)_Im_ * 4 + _PC_) // Calculates the target during a branch instruction
#define _JumpTarget_ ((_Target_ << 2) + (_PC_ & 0xf0000000)) // Calculates the target during a jump instruction
#define _BranchTarget_ (((s32)(s16)_Im_ * 4) + _PC_) // Calculates the target during a branch instruction
#define _SetLink(x) cpuRegs.GPR.r[x].UD[0] = _PC_ + 4; // Sets the return address in the link register
#endif
int cpuInit();
void cpuReset();
void cpuShutdown();
void cpuException(u32 code, u32 bd);
void cpuTlbMissR(u32 addr, u32 bd);
void cpuTlbMissW(u32 addr, u32 bd);
void IntcpuBranchTest();
void cpuBranchTest();
void cpuTestHwInts();
void cpuTestINTCInts();
void cpuTestDMACInts();
void cpuTestTIMRInts();
void _cpuTestInterrupts();
void cpuExecuteBios();
void cpuRestartCPU();
u32 VirtualToPhysicalR(u32 addr);
u32 VirtualToPhysicalW(u32 addr);
void intDoBranch(u32 target);
void intSetBranch();
void intExecuteVU0Block();
void intExecuteVU1Block();
void JumpCheckSym(u32 addr, u32 pc);
void JumpCheckSymRet(u32 addr);
extern u32 g_EEFreezeRegs;
//exception code
#define EXC_CODE(x) ((x)<<2)
#define EXC_CODE_Int EXC_CODE(0)
#define EXC_CODE_Mod EXC_CODE(1) /* TLB Modification exception */
#define EXC_CODE_TLBL EXC_CODE(2) /* TLB Miss exception (load or instruction fetch) */
#define EXC_CODE_TLBS EXC_CODE(3) /* TLB Miss exception (store) */
#define EXC_CODE_AdEL EXC_CODE(4)
#define EXC_CODE_AdES EXC_CODE(5)
#define EXC_CODE_IBE EXC_CODE(6)
#define EXC_CODE_DBE EXC_CODE(7)
#define EXC_CODE_Sys EXC_CODE(8)
#define EXC_CODE_Bp EXC_CODE(9)
#define EXC_CODE_Ri EXC_CODE(10)
#define EXC_CODE_CpU EXC_CODE(11)
#define EXC_CODE_Ov EXC_CODE(12)
#define EXC_CODE_Tr EXC_CODE(13)
#define EXC_CODE_FPE EXC_CODE(15)
#define EXC_CODE_WATCH EXC_CODE(23)
#define EXC_CODE__MASK 0x0000007c
#define EXC_CODE__SHIFT 2
#define EXC_TLB_STORE 1
#define EXC_TLB_LOAD 0
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
* 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 for more details.
*
* 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
*/
#ifndef __R5900_H__
#define __R5900_H__
#include <stdio.h>
typedef struct {
int (*Init)();
void (*Reset)();
void (*Step)();
void (*Execute)(); /* executes up to a break */
void (*ExecuteBlock)(); /* executes up to a jump */
void (*ExecuteVU0Block)(); /* executes up to a jump */
void (*ExecuteVU1Block)(); /* executes up to a jump */
void (*EnableVU0micro)(int enable);
void (*EnableVU1micro)(int enable);
void (*Clear)(u32 Addr, u32 Size);
void (*ClearVU0)(u32 Addr, u32 Size);
void (*ClearVU1)(u32 Addr, u32 Size);
void (*Shutdown)();
} R5900cpu;
extern R5900cpu *Cpu;
extern R5900cpu intCpu;
extern R5900cpu recCpu;
extern u32 bExecBIOS;
typedef union { // Declare union type GPR register
u64 UD[2]; //128 bits
s64 SD[2];
u32 UL[4];
s32 SL[4];
u16 US[8];
s16 SS[8];
u8 UC[16];
s8 SC[16];
} GPR_reg;
typedef union {
struct {
GPR_reg r0, at, v0, v1, a0, a1, a2, a3,
t0, t1, t2, t3, t4, t5, t6, t7,
s0, s1, s2, s3, s4, s5, s6, s7,
t8, t9, k0, k1, gp, sp, s8, ra;
} n;
GPR_reg r[32];
} GPRregs;
typedef union {
struct {
u32 pccr, pcr0, pcr1, pad;
} n;
u32 r[4];
} PERFregs;
typedef union {
struct {
u32 Index, Random, EntryLo0, EntryLo1,
Context, PageMask, Wired, Reserved0,
BadVAddr, Count, EntryHi, Compare;
union {
struct {
int IE:1;
int EXL:1;
int ERL:1;
int KSU:2;
int unused0:3;
int IM:8;
int EIE:1;
int _EDI:1;
int CH:1;
int unused1:3;
int BEV:1;
int DEV:1;
int unused2:2;
int FR:1;
int unused3:1;
int CU:4;
} b;
u32 val;
} Status;
u32 Cause, EPC, PRid,
Config, LLAddr, WatchLO, WatchHI,
XContext, Reserved1, Reserved2, Debug,
DEPC, PerfCnt, ErrCtl, CacheErr,
TagLo, TagHi, ErrorEPC, DESAVE;
} n;
u32 r[32];
} CP0regs;
typedef struct {
GPRregs GPR; // GPR regs
// NOTE: don't change order since recompiler uses it
GPR_reg HI;
GPR_reg LO; // hi & log 128bit wide
CP0regs CP0; // is COP0 32bit?
u32 sa; // shift amount (32bit), needs to be 16 byte aligned
u32 constzero; // always 0, for MFSA
u32 pc; // Program counter, when changing offset in struct, check iR5900-X.S to make sure offset is correct
u32 code; // The instruction
PERFregs PERF;
u32 eCycle[32];
u32 sCycle[32]; // for internal counters
u32 cycle; // calculate cpucycles..
u32 interrupt;
int branch;
int opmode; // operating mode
u32 tempcycles;
} cpuRegisters;
extern int EEsCycle;
extern u32 EEoCycle, IOPoCycle;
extern PCSX2_ALIGNED16_DECL(cpuRegisters cpuRegs);
// used for optimization
typedef union {
u64 UD[1]; //64 bits
s64 SD[1];
u32 UL[2];
s32 SL[3];
u16 US[4];
s16 SS[4];
u8 UC[8];
s8 SC[8];
} GPR_reg64;
#define GPR_IS_CONST1(reg) ((reg)<32 && (g_cpuHasConstReg&(1<<(reg))))
#define GPR_IS_CONST2(reg1, reg2) ((g_cpuHasConstReg&(1<<(reg1)))&&(g_cpuHasConstReg&(1<<(reg2))))
#define GPR_SET_CONST(reg) { \
if( (reg) < 32 ) { \
g_cpuHasConstReg |= (1<<(reg)); \
g_cpuFlushedConstReg &= ~(1<<(reg)); \
} \
}
#define GPR_DEL_CONST(reg) { \
if( (reg) < 32 ) g_cpuHasConstReg &= ~(1<<(reg)); \
}
extern PCSX2_ALIGNED16_DECL(GPR_reg64 g_cpuConstRegs[32]);
extern u32 g_cpuHasConstReg, g_cpuFlushedConstReg;
typedef union {
float f;
u32 UL;
} FPRreg;
typedef struct {
FPRreg fpr[32]; // 32bit floating point registers
u32 fprc[32]; // 32bit floating point control registers
FPRreg ACC; // 32 bit accumulator
} fpuRegisters;
extern PCSX2_ALIGNED16_DECL(fpuRegisters fpuRegs);
typedef struct {
u32 PageMask,EntryHi;
u32 EntryLo0,EntryLo1;
u32 Mask, nMask;
u32 G;
u32 ASID;
u32 VPN2;
u32 PFN0;
u32 PFN1;
} tlbs;
extern PCSX2_ALIGNED16_DECL(tlbs tlb[48]);
#ifndef _PC_
#define _i64(x) (s64)x
#define _u64(x) (u64)x
#define _i32(x) (s32)x
#define _u32(x) (u32)x
#define _i16(x) (s16)x
#define _u16(x) (u16)x
#define _i8(x) (s8)x
#define _u8(x) (u8)x
/**** R3000A Instruction Macros ****/
#define _PC_ cpuRegs.pc // The next PC to be executed
#define _Funct_ ((cpuRegs.code ) & 0x3F) // The funct part of the instruction register
#define _Rd_ ((cpuRegs.code >> 11) & 0x1F) // The rd part of the instruction register
#define _Rt_ ((cpuRegs.code >> 16) & 0x1F) // The rt part of the instruction register
#define _Rs_ ((cpuRegs.code >> 21) & 0x1F) // The rs part of the instruction register
#define _Sa_ ((cpuRegs.code >> 6) & 0x1F) // The sa part of the instruction register
#define _Im_ ((u16)cpuRegs.code) // The immediate part of the instruction register
#define _Target_ (cpuRegs.code & 0x03ffffff) // The target part of the instruction register
#define _Imm_ ((s16)cpuRegs.code) // sign-extended immediate
#define _ImmU_ (cpuRegs.code&0xffff) // zero-extended immediate
//#define _JumpTarget_ ((_Target_ * 4) + (_PC_ & 0xf0000000)) // Calculates the target during a jump instruction
//#define _BranchTarget_ ((s16)_Im_ * 4 + _PC_) // Calculates the target during a branch instruction
#define _JumpTarget_ ((_Target_ << 2) + (_PC_ & 0xf0000000)) // Calculates the target during a jump instruction
#define _BranchTarget_ (((s32)(s16)_Im_ * 4) + _PC_) // Calculates the target during a branch instruction
#define _SetLink(x) cpuRegs.GPR.r[x].UD[0] = _PC_ + 4; // Sets the return address in the link register
#endif
int cpuInit();
void cpuReset();
void cpuShutdown();
void cpuException(u32 code, u32 bd);
void cpuTlbMissR(u32 addr, u32 bd);
void cpuTlbMissW(u32 addr, u32 bd);
void IntcpuBranchTest();
void cpuBranchTest();
void cpuTestHwInts();
void cpuTestINTCInts();
void cpuTestDMACInts();
void cpuTestTIMRInts();
void _cpuTestInterrupts();
void cpuExecuteBios();
void cpuRestartCPU();
u32 VirtualToPhysicalR(u32 addr);
u32 VirtualToPhysicalW(u32 addr);
void intDoBranch(u32 target);
void intSetBranch();
void intExecuteVU0Block();
void intExecuteVU1Block();
void JumpCheckSym(u32 addr, u32 pc);
void JumpCheckSymRet(u32 addr);
extern u32 g_EEFreezeRegs;
//exception code
#define EXC_CODE(x) ((x)<<2)
#define EXC_CODE_Int EXC_CODE(0)
#define EXC_CODE_Mod EXC_CODE(1) /* TLB Modification exception */
#define EXC_CODE_TLBL EXC_CODE(2) /* TLB Miss exception (load or instruction fetch) */
#define EXC_CODE_TLBS EXC_CODE(3) /* TLB Miss exception (store) */
#define EXC_CODE_AdEL EXC_CODE(4)
#define EXC_CODE_AdES EXC_CODE(5)
#define EXC_CODE_IBE EXC_CODE(6)
#define EXC_CODE_DBE EXC_CODE(7)
#define EXC_CODE_Sys EXC_CODE(8)
#define EXC_CODE_Bp EXC_CODE(9)
#define EXC_CODE_Ri EXC_CODE(10)
#define EXC_CODE_CpU EXC_CODE(11)
#define EXC_CODE_Ov EXC_CODE(12)
#define EXC_CODE_Tr EXC_CODE(13)
#define EXC_CODE_FPE EXC_CODE(15)
#define EXC_CODE_WATCH EXC_CODE(23)
#define EXC_CODE__MASK 0x0000007c
#define EXC_CODE__SHIFT 2
#define EXC_TLB_STORE 1
#define EXC_TLB_LOAD 0
//#define EE_PROFILING //EE Profiling enable
#ifdef EE_PROFILING //EE Profiling code
@@ -299,6 +299,6 @@ extern u64 profile_totalticks;
#define END_EE_PROFILE()
#define CLEAR_EE_PROFILE()
#endif
#endif /* __R5900_H__ */
#endif
#endif /* __R5900_H__ */

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Common.h"
#include "deci2.h"

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __DECI2_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Common.h"
#include "PsxCommon.h"

View File

@@ -1,5 +1,5 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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
@@ -13,7 +13,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __DECI2DBGP_H__

View File

@@ -1,20 +1,20 @@
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2003 Pcsx2 Team
*
/* Pcsx2 - Pc Ps2 Emulator
* Copyright (C) 2002-2008 Pcsx2 Team
*
* 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; either version 2 of the License, or
* (at your option) any later version.
*
*
* 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 for more details.
*
*
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "Common.h"
#include "deci2.h"

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