mirror of https://github.com/PCSX2/pcsx2.git
some of the files i committed had old data; reverted a few files, and fixed others to include the data i was missing.
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@7 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
4b69e809e5
commit
dabe75ff69
|
@ -5,15 +5,15 @@
|
|||
* 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>
|
||||
|
@ -31,9 +31,7 @@ extern u8 psxhblankgate;
|
|||
int hblankend = 0;
|
||||
Counter counters[6];
|
||||
u32 nextCounter, nextsCounter;
|
||||
static void (*s_prevExecuteVU0Block)() = NULL;
|
||||
static void (*s_prevExecuteVU1Block)() = NULL;
|
||||
|
||||
LARGE_INTEGER lfreq;
|
||||
|
||||
// its so it doesnt keep triggering an interrupt once its reached its target
|
||||
|
@ -128,9 +126,7 @@ void rcntInit() {
|
|||
rcntSet();
|
||||
|
||||
assert(Cpu != NULL && Cpu->ExecuteVU1Block != NULL );
|
||||
s_prevExecuteVU0Block = Cpu->ExecuteVU0Block;
|
||||
s_prevExecuteVU1Block = Cpu->ExecuteVU1Block;
|
||||
|
||||
}
|
||||
|
||||
// debug code, used for stats
|
||||
|
@ -166,7 +162,6 @@ u64 GetCPUTicks()
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
void UpdateVSyncRate() {
|
||||
if (Config.PsxType & 1) {
|
||||
SysPrintf("PAL\n");
|
||||
|
@ -250,11 +245,8 @@ void VSync()
|
|||
// swap the vsync field
|
||||
u32 newfield = (*(u32*)(PS2MEM_GS+0x1000)&0x2000) ? 0 : 0x2000;
|
||||
*(u32*)(PS2MEM_GS+0x1000) = (*(u32*)(PS2MEM_GS+0x1000) & ~(1<<13)) | newfield;
|
||||
|
||||
|
||||
iFrame++;
|
||||
|
||||
|
||||
// wait until GS stops
|
||||
if( CHECK_MULTIGS ) {
|
||||
GSRingBufSimplePacket(GS_RINGTYPE_VSYNC, newfield, 0, 0);
|
||||
|
@ -310,10 +302,7 @@ void VSync()
|
|||
if( CHECK_MULTIGS ) GSRingBufSimplePacket(GS_RINGTYPE_FRAMESKIP, 1, 0, 0);
|
||||
else GSsetFrameSkip(1);
|
||||
if( CHECK_FRAMELIMIT == PCSX2_FRAMELIMIT_VUSKIP )
|
||||
{
|
||||
Cpu->ExecuteVU1Block = DummyExecuteVU1Block;
|
||||
//Cpu->ExecuteVU0Block = NULL;
|
||||
}
|
||||
bOkayToSkip = noSkipFrames;
|
||||
bKeepSkipping = yesSkipFrames;
|
||||
}
|
||||
|
@ -322,11 +311,8 @@ void VSync()
|
|||
{
|
||||
if (bKeepSkipping <= 1) {
|
||||
//first set VU1 to enabled THEN unfreeze GS regs
|
||||
if( CHECK_FRAMELIMIT == PCSX2_FRAMELIMIT_VUSKIP )
|
||||
{
|
||||
if( CHECK_FRAMELIMIT == PCSX2_FRAMELIMIT_VUSKIP )
|
||||
Cpu->ExecuteVU1Block = s_prevExecuteVU1Block;
|
||||
//Cpu->ExecuteVU0Block = s_prevExecuteVU0Block;
|
||||
}
|
||||
if( CHECK_MULTIGS ) GSRingBufSimplePacket(GS_RINGTYPE_FRAMESKIP, 0, 0, 0);
|
||||
else GSsetFrameSkip(0);
|
||||
bOkayToSkip--;
|
||||
|
@ -627,11 +613,15 @@ void rcntWmode(int index, u32 value)
|
|||
}
|
||||
//if(change != 0) SysPrintf("Weee\n");
|
||||
//counters[index].sCycleT = cpuRegs.cycle - ((cpuRegs.cycle - counters[index].sCycleT) % counters[index].rate);
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if(!(value & 0x80)) SysPrintf("Stopping\n");
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
SysPrintf("Counter %d not running c%x s%x c%x\n", index, counters[index].count, counters[index].sCycleT, cpuRegs.cycle);
|
||||
if(value & 0x80) SysPrintf("Starting %d, v%x\n", index, value);
|
||||
#endif
|
||||
counters[index].sCycleT = cpuRegs.cycle;
|
||||
}
|
||||
//if((value & 0x80) && !(counters[index].mode & 0x80)) rcntUpd(index); //Counter wasnt started, so set the start cycle
|
||||
|
|
33
pcsx2/Misc.c
33
pcsx2/Misc.c
|
@ -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
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -40,6 +40,8 @@
|
|||
|
||||
#include "Cache.h"
|
||||
|
||||
#include "Paths.h"
|
||||
|
||||
u32 dwSaveVersion = 0x7a300010;
|
||||
u32 dwCurSaveStateVer = 0;
|
||||
extern u32 s_iLastCOP0Cycle;
|
||||
|
@ -434,6 +436,7 @@ int Load(char *ExePath) {
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
FILE *emuLog;
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
|
@ -579,8 +582,8 @@ int SaveState(char *file) {
|
|||
SysPrintf("Saving GS\n");
|
||||
if( CHECK_MULTIGS ) {
|
||||
// have to call in thread, otherwise weird stuff will start happening
|
||||
uptr uf = (uptr)f;
|
||||
GSRingBufSimplePacket(GS_RINGTYPE_SAVE, (int)(uf&0xffffffff), (int)(uf>>32), 0);
|
||||
u64 uf = (uptr)f;
|
||||
GSRingBufSimplePacket(GS_RINGTYPE_SAVE, (u32)(uf&0xffffffff), (u32)(uf>>32), 0);
|
||||
gsWaitGS();
|
||||
}
|
||||
else {
|
||||
|
@ -711,8 +714,8 @@ int LoadState(char *file) {
|
|||
SysPrintf("Loading GS\n");
|
||||
if( CHECK_MULTIGS ) {
|
||||
// have to call in thread, otherwise weird stuff will start happening
|
||||
uptr uf = (uptr)f;
|
||||
GSRingBufSimplePacket(GS_RINGTYPE_LOAD, (int)(uf&0xffffffff), (int)(uf>>32), 0);
|
||||
u64 uf = (uptr)f;
|
||||
GSRingBufSimplePacket(GS_RINGTYPE_LOAD, (u32)(uf&0xffffffff), (u32)(uf>>32), 0);
|
||||
gsWaitGS();
|
||||
}
|
||||
else {
|
||||
|
@ -755,7 +758,7 @@ int SaveGSState(char *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
extern long pDsp;
|
||||
extern HWND pDsp;
|
||||
int LoadGSState(char *file)
|
||||
{
|
||||
int ret;
|
||||
|
@ -766,7 +769,7 @@ int LoadGSState(char *file)
|
|||
f = gzopen(file, "rb");
|
||||
if (f == NULL) {
|
||||
|
||||
sprintf(strfile, "sstates/%s", file);
|
||||
sprintf(strfile, SSTATES_DIR "/%s", file);
|
||||
// try prefixing with sstates
|
||||
f = gzopen(strfile, "rb");
|
||||
if( f == NULL ) {
|
||||
|
@ -892,7 +895,7 @@ void ProcessFKeys(int fkey, int shift)
|
|||
assert(fkey >= 1 && fkey <= 12 );
|
||||
switch(fkey) {
|
||||
case 1:
|
||||
sprintf(Text, "sstates/%8.8X.%3.3d", ElfCRC, StatesC);
|
||||
sprintf(Text, SSTATES_DIR "/%8.8X.%3.3d", ElfCRC, StatesC);
|
||||
ret = SaveState(Text);
|
||||
break;
|
||||
case 2:
|
||||
|
@ -902,12 +905,12 @@ void ProcessFKeys(int fkey, int shift)
|
|||
StatesC = (StatesC+1)%NUM_STATES;
|
||||
SysPrintf("*PCSX2*: Selected State %ld\n", StatesC);
|
||||
if( GSchangeSaveState != NULL ) {
|
||||
sprintf(Text, "sstates/%8.8X.%3.3d", ElfCRC, StatesC);
|
||||
sprintf(Text, SSTATES_DIR "/%8.8X.%3.3d", ElfCRC, StatesC);
|
||||
GSchangeSaveState(StatesC, Text);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
sprintf (Text, "sstates/%8.8X.%3.3d", ElfCRC, StatesC);
|
||||
sprintf (Text, SSTATES_DIR "/%8.8X.%3.3d", ElfCRC, StatesC);
|
||||
ret = LoadState(Text);
|
||||
break;
|
||||
|
||||
|
@ -994,10 +997,10 @@ void ProcessFKeys(int fkey, int shift)
|
|||
tok = strtok(NULL, " ");
|
||||
if( tok != NULL ) strcat(name, tok);
|
||||
|
||||
sprintf(Text, "sstates/%s.%d.gs", name, StatesC);
|
||||
sprintf(Text, SSTATES_DIR "/%s.%d.gs", name, StatesC);
|
||||
}
|
||||
else
|
||||
sprintf(Text, "sstates/%8.8X.%d.gs", ElfCRC, StatesC);
|
||||
sprintf(Text, SSTATES_DIR "/%8.8X.%d.gs", ElfCRC, StatesC);
|
||||
|
||||
SaveGSState(Text);
|
||||
}
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2004 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 <windows.h>
|
||||
|
@ -112,6 +112,7 @@ BOOL CALLBACK CpuDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
// ShowWindow(GetDlgItem(hW, IDC_CPU_VU1REC), SW_HIDE);
|
||||
//#endif
|
||||
|
||||
|
||||
CheckDlgButton(hW, IDC_CPU_GSMULTI, !!CHECK_MULTIGS);
|
||||
CheckDlgButton(hW, IDC_CPU_MULTI, !!CHECK_DUALCORE);
|
||||
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
#define WINVER 0x0500
|
||||
|
@ -49,6 +49,8 @@
|
|||
|
||||
#include "cheats/cheats.h"
|
||||
|
||||
#include "../Paths.h"
|
||||
|
||||
#define COMPILEDATE __DATE__
|
||||
|
||||
static int efile;
|
||||
|
@ -1367,8 +1369,8 @@ void ChangeLanguage(char *lang) {
|
|||
static int sinit=0;
|
||||
|
||||
int SysInit() {
|
||||
CreateDirectory("memcards", NULL);
|
||||
CreateDirectory("sstates", NULL);
|
||||
CreateDirectory(MEMCARDS_DIR, NULL);
|
||||
CreateDirectory(SSTATES_DIR, NULL);
|
||||
#ifdef EMU_LOG
|
||||
CreateDirectory("logs", NULL);
|
||||
|
||||
|
@ -1380,7 +1382,7 @@ int SysInit() {
|
|||
#endif
|
||||
|
||||
if( emuLog != NULL )
|
||||
setvbuf(emuLog, NULL, _IONBF, 0);
|
||||
emuLog = fopen(LOGS_DIR "\\emuLog.txt","w");
|
||||
|
||||
#endif
|
||||
if (cpuInit() == -1) return -1;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
// recompiler reworked to add dynamic linking Jan06
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
// recompiler reworked to add dynamic linking zerofrog(@gmail.com) Jan06
|
||||
|
|
Loading…
Reference in New Issue