diff --git a/3rdparty/w32pthreads/pthreads_2008.vcproj b/3rdparty/w32pthreads/pthreads_2008.vcproj index d9266cce24..fb59af6ad7 100644 --- a/3rdparty/w32pthreads/pthreads_2008.vcproj +++ b/3rdparty/w32pthreads/pthreads_2008.vcproj @@ -18,6 +18,7 @@ - - @@ -165,6 +161,10 @@ /> + + - + + @@ -82,7 +83,8 @@ - + + diff --git a/common/build/Utilities/utilities.vcproj b/common/build/Utilities/utilities.vcproj index 0512074340..783eb0245c 100644 --- a/common/build/Utilities/utilities.vcproj +++ b/common/build/Utilities/utilities.vcproj @@ -39,8 +39,7 @@ /> + + @@ -380,6 +379,10 @@ RelativePath="..\..\include\Utilities\General.h" > + + @@ -437,12 +440,6 @@ > - - diff --git a/pcsx2/HashMap.h b/common/include/Utilities/HashMap.h similarity index 100% rename from pcsx2/HashMap.h rename to common/include/Utilities/HashMap.h diff --git a/common/include/Utilities/lnx_memzero.h b/common/include/Utilities/lnx_memzero.h index b8d4f45320..3bbeb18dd0 100644 --- a/common/include/Utilities/lnx_memzero.h +++ b/common/include/Utilities/lnx_memzero.h @@ -59,7 +59,7 @@ template< u16 data, typename T > static __forceinline void memset16_obj( T& obj ) { if( (sizeof(T) & 0x3) != 0 ) - _memset_16_unaligned( &obj, data, sizeof( T ) ); + _memset16_unaligned( &obj, data, sizeof( T ) ); else memset32_obj( obj ); } diff --git a/common/src/Utilities/AlignedMalloc.cpp b/common/src/Utilities/AlignedMalloc.cpp index 582df46413..8227fedfd0 100644 --- a/common/src/Utilities/AlignedMalloc.cpp +++ b/common/src/Utilities/AlignedMalloc.cpp @@ -66,3 +66,18 @@ __forceinline void pcsx2_aligned_free(void* pmem) AlignedMallocHeader* header = (AlignedMallocHeader*)((uptr)pmem - headsize); free( header->baseptr ); } + +// ---------------------------------------------------------------------------- +// And for lack of a better home ... + + +// Special unaligned memset used when all other optimized memsets fail (it's called from +// memzero_obj and stuff). +void _memset16_unaligned( void* dest, u16 data, size_t size ) +{ + jASSUME( (size & 0x1) == 0 ); + + u16* dst = (u16*)dest; + for(int i=size; i; --i, ++dst ) + *dst = data; +} \ No newline at end of file diff --git a/common/src/Utilities/Exceptions.cpp b/common/src/Utilities/Exceptions.cpp index 31bf031675..0a1b6b819a 100644 --- a/common/src/Utilities/Exceptions.cpp +++ b/common/src/Utilities/Exceptions.cpp @@ -25,11 +25,45 @@ wxString GetTranslation( const char* msg ) return wxGetTranslation( wxString::FromAscii(msg).c_str() ); } +// ------------------------------------------------------------------------ +// Force DevAssert to *not* inline for devel/debug builds (allows using breakpoints to trap +// assertions), and force it to inline for release builds (optimizes it out completely since +// IsDevBuild is false). Since Devel builds typically aren't enabled with Global Optimization/ +// LTCG, this currently isn't even necessary. But might as well, in case we decide at a later +// date to re-enable LTCG for devel. +// +#ifdef PCSX2_DEVBUILD +# define DEVASSERT_INLINE __noinline +#else +# define DEVASSERT_INLINE __forceinline +#endif + +////////////////////////////////////////////////////////////////////////////////////////// +// Assertion tool for Devel builds, intended for sanity checking and/or bounds checking +// variables in areas which are not performance critical. +// +// How it works: This function throws an exception of type Exception::AssertionFailure if +// the assertion conditional is false. Typically for the end-user, this exception is handled +// by the general handler, which (should eventually) create some state dumps and other +// information for troubleshooting purposes. +// +// From a debugging environment, you can trap your DevAssert by either breakpointing the +// exception throw below, or by adding either Exception::AssertionFailure or +// Exception::LogicError to your First-Chance Exception catch list (Visual Studio, under +// the Debug->Exceptions menu/dialog). +// +DEVASSERT_INLINE void DevAssert( bool condition, const char* msg ) +{ + if( IsDevBuild && !condition ) + { + throw Exception::LogicError( msg ); + } +} + ////////////////////////////////////////////////////////////////////////////////////////// // namespace Exception { - // ------------------------------------------------------------------------ BaseException::~BaseException() throw() {} void BaseException::InitBaseEx( const wxString& msg_eng, const wxString& msg_xlt ) diff --git a/pcsx2/HashTools.cpp b/common/src/Utilities/HashTools.cpp similarity index 100% rename from pcsx2/HashTools.cpp rename to common/src/Utilities/HashTools.cpp diff --git a/common/vsprops/CodeGen_Debug.vsprops b/common/vsprops/CodeGen_Debug.vsprops index 0d0f045ea6..7e895af737 100644 --- a/common/vsprops/CodeGen_Debug.vsprops +++ b/common/vsprops/CodeGen_Debug.vsprops @@ -7,7 +7,7 @@ diff --git a/common/vsprops/CommonLibrary.vsprops b/common/vsprops/CommonLibrary.vsprops index b0981d2f7e..956e5c8f8e 100644 --- a/common/vsprops/CommonLibrary.vsprops +++ b/common/vsprops/CommonLibrary.vsprops @@ -8,7 +8,7 @@ > . - */ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 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 PCSX2. + * If not, see . + */ #include "PrecompiledHeader.h" #include "IopCommon.h" diff --git a/pcsx2/Elfheader.cpp b/pcsx2/Elfheader.cpp index 03e4269b7a..42a3a940a5 100644 --- a/pcsx2/Elfheader.cpp +++ b/pcsx2/Elfheader.cpp @@ -17,6 +17,7 @@ #include "Common.h" #include "CDVD/IsoFSdrv.h" +#include "DebugTools/Debug.h" using namespace std; @@ -608,3 +609,79 @@ void loadElfFile(const wxString& filename) return; } +// return value: +// 0 - Invalid or unknown disc. +// 1 - PS1 CD +// 2 - PS2 CD +int GetPS2ElfName( wxString& name ) +{ + int f; + char buffer[g_MaxPath];//if a file is longer...it should be shorter :D + char *pos; + TocEntry tocEntry; + + IsoFS_init(); + + // check if the file exists + if (IsoFS_findFile("SYSTEM.CNF;1", &tocEntry) != TRUE){ + Console::Status("GetElfName: SYSTEM.CNF not found; invalid cd image or no disc present."); + return 0;//could not find; not a PS/PS2 cdvd + } + + f=IsoFS_open("SYSTEM.CNF;1", 1); + IsoFS_read(f, buffer, g_MaxPath); + IsoFS_close(f); + + buffer[tocEntry.fileSize]='\0'; + + pos=strstr(buffer, "BOOT2"); + if (pos==NULL){ + pos=strstr(buffer, "BOOT"); + if (pos==NULL) { + Console::Error("PCSX2 Boot Error: This is not a Playstation or PS2 game!"); + return 0; + } + return 1; + } + pos+=strlen("BOOT2"); + while (pos && *pos && pos<&buffer[g_MaxPath] + && (*pos<'A' || (*pos>'Z' && *pos<'a') || *pos>'z')) + pos++; + if (!pos || *pos==0) + return 0; + + // the filename is everything up to the first CR/LF/tab.. ? + // Or up to any whitespace? (I'm opting for first CRLF/tab, although the old code + // apparently stopped on spaces too) --air + name = wxStringTokenizer( wxString::FromAscii( pos ) ).GetNextToken(); + +#ifdef PCSX2_DEVBUILD + FILE *fp; + int i; + + fp = fopen("System.map", "r"); + if( fp == NULL ) return 2; + + u32 addr; + + Console::WriteLn("Loading System.map..."); + while (!feof(fp)) { + fseek(fp, 8, SEEK_CUR); + buffer[0] = '0'; buffer[1] = 'x'; + for (i=2; i<10; i++) buffer[i] = fgetc(fp); buffer[i] = 0; + addr = strtoul(buffer, (char**)NULL, 0); + fseek(fp, 3, SEEK_CUR); + for (i=0; i mem; -}; - -// runs the GS -// (this should really be part of the AppGui) -void RunGSState( gzLoadingState& f ) -{ - u32 newfield; - list< GSStatePacket > packets; - - while( !f.Finished() ) - { - int type, size; - f.Freeze( type ); - - if( type != GSRUN_VSYNC ) f.Freeze( size ); - - packets.push_back(GSStatePacket()); - GSStatePacket& p = packets.back(); - - p.type = type; - - if( type != GSRUN_VSYNC ) { - p.mem.resize(size*16); - f.FreezeMem( &p.mem[0], size*16 ); - } - } - - list::iterator it = packets.begin(); - g_SaveGSStream = 3; - - // first extract the data - while(1) { - - switch(it->type) { - case GSRUN_TRANS1: - GSgifTransfer1((u32*)&it->mem[0], 0); - break; - case GSRUN_TRANS2: - GSgifTransfer2((u32*)&it->mem[0], it->mem.size()/16); - break; - case GSRUN_TRANS3: - GSgifTransfer3((u32*)&it->mem[0], it->mem.size()/16); - break; - case GSRUN_VSYNC: - // flip - newfield = (*(u32*)(PS2MEM_GS+0x1000)&0x2000) ? 0 : 0x2000; - *(u32*)(PS2MEM_GS+0x1000) = (*(u32*)(PS2MEM_GS+0x1000) & ~(1<<13)) | newfield; - - GSvsync(newfield); - - // fixme : Process pending app messages here. - //SysUpdate(); - - if( g_SaveGSStream != 3 ) - return; - break; - - jNO_DEFAULT - } - - ++it; - if( it == packets.end() ) - it = packets.begin(); - } -} - -#endif - -//#undef GIFchain diff --git a/pcsx2/GS.h b/pcsx2/GS.h index 28eb8d9fa7..a1ac413bc4 100644 --- a/pcsx2/GS.h +++ b/pcsx2/GS.h @@ -351,5 +351,7 @@ extern gzSavingState* g_fGSSave; #endif +extern void SaveGSState(const wxString& file); +extern void LoadGSState(const wxString& file); extern void RunGSState(gzLoadingState& f); diff --git a/pcsx2/GSState.cpp b/pcsx2/GSState.cpp new file mode 100644 index 0000000000..9b8d7bfa48 --- /dev/null +++ b/pcsx2/GSState.cpp @@ -0,0 +1,152 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 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 PCSX2. + * If not, see . + */ + +#include "PrecompiledHeader.h" + +#include "GS.h" + + +void SaveGSState(const wxString& file) +{ + if( g_SaveGSStream ) return; + + Console::WriteLn( "Saving GS State..." ); + Console::WriteLn( wxsFormat( L"\t%s", file.c_str() ) ); + + g_fGSSave = new gzSavingState( file ); + + g_SaveGSStream = 1; + g_nLeftGSFrames = 2; + + g_fGSSave->Freeze( g_nLeftGSFrames ); +} + +void LoadGSState(const wxString& file) +{ + int ret; + gzLoadingState* f; + + Console::Status( "Loading GS State..." ); + + try + { + f = new gzLoadingState( file ); + } + catch( Exception::FileNotFound& ) + { + // file not found? try prefixing with sstates folder: + if( !Path::IsRelative( file ) ) + { + //f = new gzLoadingState( Path::Combine( g_Conf->Folders.Savestates, file ) ); + + // If this load attempt fails, then let the exception bubble up to + // the caller to deal with... + } + } + + // Always set gsIrq callback -- GS States are always exclusionary of MTGS mode + GSirqCallback( gsIrq ); + + ret = GSopen(&pDsp, "PCSX2", 0); + if (ret != 0) + { + delete f; + throw Exception::PluginOpenError( PluginId_GS ); + } + + ret = PADopen((void *)&pDsp); + + f->Freeze(g_nLeftGSFrames); + f->gsFreeze(); + + f->FreezePlugin( "GS", gsSafeFreeze ); + + RunGSState( *f ); + + delete( f ); + + g_plugins->Close( PluginId_GS ); + g_plugins->Close( PluginId_PAD ); +} + +struct GSStatePacket +{ + u32 type; + std::vector mem; +}; + +// runs the GS +// (this should really be part of the AppGui) +void RunGSState( gzLoadingState& f ) +{ + u32 newfield; + std::list< GSStatePacket > packets; + + while( !f.Finished() ) + { + int type, size; + f.Freeze( type ); + + if( type != GSRUN_VSYNC ) f.Freeze( size ); + + packets.push_back(GSStatePacket()); + GSStatePacket& p = packets.back(); + + p.type = type; + + if( type != GSRUN_VSYNC ) { + p.mem.resize(size*16); + f.FreezeMem( &p.mem[0], size*16 ); + } + } + + std::list::iterator it = packets.begin(); + g_SaveGSStream = 3; + + // first extract the data + while(1) { + + switch(it->type) { + case GSRUN_TRANS1: + GSgifTransfer1((u32*)&it->mem[0], 0); + break; + case GSRUN_TRANS2: + GSgifTransfer2((u32*)&it->mem[0], it->mem.size()/16); + break; + case GSRUN_TRANS3: + GSgifTransfer3((u32*)&it->mem[0], it->mem.size()/16); + break; + case GSRUN_VSYNC: + // flip + newfield = (*(u32*)(PS2MEM_GS+0x1000)&0x2000) ? 0 : 0x2000; + *(u32*)(PS2MEM_GS+0x1000) = (*(u32*)(PS2MEM_GS+0x1000) & ~(1<<13)) | newfield; + + GSvsync(newfield); + + // fixme : Process pending app messages here. + //SysUpdate(); + + if( g_SaveGSStream != 3 ) + return; + break; + + jNO_DEFAULT + } + + ++it; + if( it == packets.end() ) + it = packets.begin(); + } +} diff --git a/pcsx2/Gif.h b/pcsx2/Gif.h index 08e0b37147..8d067b393e 100644 --- a/pcsx2/Gif.h +++ b/pcsx2/Gif.h @@ -1,220 +1,220 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2009 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 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 PCSX2. - * If not, see . - */ - -#ifndef __GIF_H__ -#define __GIF_H__ - -#define gifsplit 0x10000 -enum gifstate_t -{ - GIF_STATE_READY = 0, - GIF_STATE_STALL = 1, - GIF_STATE_DONE = 2, - GIF_STATE_EMPTY = 0x10 -}; - - -extern void gsInterrupt(); -int _GIFchain(); -void GIFdma(); -void dmaGIF(); -void mfifoGIFtransfer(int qwc); -void gifMFIFOInterrupt(); - -// Under construction; use with caution. -union tGIF_CTRL -{ - struct - { - u32 RST : 1; - u32 reserved1 : 2; - u32 PSE : 1; - u32 reserved2 : 28; - }; - u32 _u32; - - tGIF_CTRL( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_MODE -{ - struct - { - u32 M3R : 1; - u32 reserved1 : 1; - u32 IMT : 1; - u32 reserved2 : 29; - }; - u32 _u32; - - tGIF_MODE( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_STAT -{ - struct - { - u32 M3R : 1; - u32 M3P : 1; - u32 IMT : 1; - u32 PSE : 1; - u32 reserved1 : 1; - u32 IP3 : 1; - u32 P3Q : 1; - u32 P2Q : 1; - u32 P1Q : 1; - u32 OPH : 1; - u32 APATH : 2; - u32 DIR : 1; - u32 reserved2 : 11; - u32 FQC : 5; - u32 reserved3 : 3; - }; - u32 _u32; - - tGIF_STAT( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_TAG0 -{ - struct - { - u32 NLOOP : 15; - u32 EOP : 1; - u32 TAG : 16; - }; - u32 _u32; - - tGIF_TAG0( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_TAG1 -{ - struct - { - u32 TAG : 14; - u32 PRE : 1; - u32 PRIM : 11; - u32 FLG : 2; - u32 NREG : 4; - }; - u32 _u32; - - tGIF_TAG1( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_CNT -{ - struct - { - u32 LOOPCNT : 15; - u32 reserved1 : 1; - u32 REGCNT : 4; - u32 VUADDR : 2; - u32 reserved2 : 10; - - }; - u32 _u32; - - tGIF_CNT( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_P3CNT -{ - struct - { - u32 P3CNT : 15; - u32 reserved1 : 17; - }; - u32 _u32; - - tGIF_P3CNT( u32 val ) : _u32( val ) - { - } -}; - -union tGIF_P3TAG -{ - struct - { - u32 LOOPCNT : 15; - u32 EOP : 1; - u32 reserved1 : 16; - }; - u32 _u32; - - tGIF_P3TAG( u32 val ) : _u32( val ) - { - } -}; - -struct GIFregisters -{ - // To do: Pad to the correct positions and hook up. - tGIF_CTRL ctrl; - u32 padding[3]; - tGIF_MODE mode; - u32 padding1[3]; - tGIF_STAT stat; - u32 padding2[7]; - - tGIF_TAG0 tag0; - u32 padding3[3]; - tGIF_TAG1 tag1; - u32 padding4[3]; - u32 tag2; - u32 padding5[3]; - u32 tag3; - u32 padding6[3]; - - tGIF_CNT cnt; - u32 padding7[3]; - tGIF_P3CNT p3cnt; - u32 padding8[3]; - tGIF_P3TAG p3tag; - u32 padding9[3]; -}; - -#define gifRegs ((GIFregisters*)(PS2MEM_HW+0x3000)) - -// Quick function to see if everythings in the write position. -/*static void checkGifRegs() -{ - Console::WriteLn("psHu32(GIF_CTRL) == 0x%x; gifRegs->ctrl == 0x%x", params &psHu32(GIF_CTRL),&gifRegs->ctrl); - Console::WriteLn("psHu32(GIF_MODE) == 0x%x; gifRegs->mode == 0x%x", params &psHu32(GIF_MODE),&gifRegs->mode); - Console::WriteLn("psHu32(GIF_STAT) == 0x%x; gifRegs->stat == 0x%x", params &psHu32(GIF_STAT),&gifRegs->stat); - Console::WriteLn("psHu32(GIF_TAG0) == 0x%x; gifRegs->tag0 == 0x%x", params &psHu32(GIF_TAG0),&gifRegs->tag0); - Console::WriteLn("psHu32(GIF_TAG1) == 0x%x; gifRegs->tag1 == 0x%x", params &psHu32(GIF_TAG1),&gifRegs->tag1); - Console::WriteLn("psHu32(GIF_TAG2) == 0x%x; gifRegs->tag2 == 0x%x", params &psHu32(GIF_TAG2),&gifRegs->tag2); - Console::WriteLn("psHu32(GIF_TAG3) == 0x%x; gifRegs->tag3 == 0x%x", params &psHu32(GIF_TAG3),&gifRegs->tag3); - Console::WriteLn("psHu32(GIF_CNT) == 0x%x; gifRegs->cnt == 0x%x", params &psHu32(GIF_CNT),&gifRegs->cnt); - Console::WriteLn("psHu32(GIF_P3CNT) == 0x%x; gifRegs->p3cnt == 0x%x", params &psHu32(GIF_P3CNT),&gifRegs->p3cnt); - Console::WriteLn("psHu32(GIF_P3TAG) == 0x%x; gifRegs->p3tag == 0x%x", params &psHu32(GIF_P3TAG),&gifRegs->p3tag); - -}*/ - +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 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 PCSX2. + * If not, see . + */ + +#ifndef __GIF_H__ +#define __GIF_H__ + +#define gifsplit 0x10000 +enum gifstate_t +{ + GIF_STATE_READY = 0, + GIF_STATE_STALL = 1, + GIF_STATE_DONE = 2, + GIF_STATE_EMPTY = 0x10 +}; + + +extern void gsInterrupt(); +int _GIFchain(); +void GIFdma(); +void dmaGIF(); +void mfifoGIFtransfer(int qwc); +void gifMFIFOInterrupt(); + +// Under construction; use with caution. +union tGIF_CTRL +{ + struct + { + u32 RST : 1; + u32 reserved1 : 2; + u32 PSE : 1; + u32 reserved2 : 28; + }; + u32 _u32; + + tGIF_CTRL( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_MODE +{ + struct + { + u32 M3R : 1; + u32 reserved1 : 1; + u32 IMT : 1; + u32 reserved2 : 29; + }; + u32 _u32; + + tGIF_MODE( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_STAT +{ + struct + { + u32 M3R : 1; + u32 M3P : 1; + u32 IMT : 1; + u32 PSE : 1; + u32 reserved1 : 1; + u32 IP3 : 1; + u32 P3Q : 1; + u32 P2Q : 1; + u32 P1Q : 1; + u32 OPH : 1; + u32 APATH : 2; + u32 DIR : 1; + u32 reserved2 : 11; + u32 FQC : 5; + u32 reserved3 : 3; + }; + u32 _u32; + + tGIF_STAT( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_TAG0 +{ + struct + { + u32 NLOOP : 15; + u32 EOP : 1; + u32 TAG : 16; + }; + u32 _u32; + + tGIF_TAG0( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_TAG1 +{ + struct + { + u32 TAG : 14; + u32 PRE : 1; + u32 PRIM : 11; + u32 FLG : 2; + u32 NREG : 4; + }; + u32 _u32; + + tGIF_TAG1( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_CNT +{ + struct + { + u32 LOOPCNT : 15; + u32 reserved1 : 1; + u32 REGCNT : 4; + u32 VUADDR : 2; + u32 reserved2 : 10; + + }; + u32 _u32; + + tGIF_CNT( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_P3CNT +{ + struct + { + u32 P3CNT : 15; + u32 reserved1 : 17; + }; + u32 _u32; + + tGIF_P3CNT( u32 val ) : _u32( val ) + { + } +}; + +union tGIF_P3TAG +{ + struct + { + u32 LOOPCNT : 15; + u32 EOP : 1; + u32 reserved1 : 16; + }; + u32 _u32; + + tGIF_P3TAG( u32 val ) : _u32( val ) + { + } +}; + +struct GIFregisters +{ + // To do: Pad to the correct positions and hook up. + tGIF_CTRL ctrl; + u32 padding[3]; + tGIF_MODE mode; + u32 padding1[3]; + tGIF_STAT stat; + u32 padding2[7]; + + tGIF_TAG0 tag0; + u32 padding3[3]; + tGIF_TAG1 tag1; + u32 padding4[3]; + u32 tag2; + u32 padding5[3]; + u32 tag3; + u32 padding6[3]; + + tGIF_CNT cnt; + u32 padding7[3]; + tGIF_P3CNT p3cnt; + u32 padding8[3]; + tGIF_P3TAG p3tag; + u32 padding9[3]; +}; + +#define gifRegs ((GIFregisters*)(PS2MEM_HW+0x3000)) + +// Quick function to see if everythings in the write position. +/*static void checkGifRegs() +{ + Console::WriteLn("psHu32(GIF_CTRL) == 0x%x; gifRegs->ctrl == 0x%x", params &psHu32(GIF_CTRL),&gifRegs->ctrl); + Console::WriteLn("psHu32(GIF_MODE) == 0x%x; gifRegs->mode == 0x%x", params &psHu32(GIF_MODE),&gifRegs->mode); + Console::WriteLn("psHu32(GIF_STAT) == 0x%x; gifRegs->stat == 0x%x", params &psHu32(GIF_STAT),&gifRegs->stat); + Console::WriteLn("psHu32(GIF_TAG0) == 0x%x; gifRegs->tag0 == 0x%x", params &psHu32(GIF_TAG0),&gifRegs->tag0); + Console::WriteLn("psHu32(GIF_TAG1) == 0x%x; gifRegs->tag1 == 0x%x", params &psHu32(GIF_TAG1),&gifRegs->tag1); + Console::WriteLn("psHu32(GIF_TAG2) == 0x%x; gifRegs->tag2 == 0x%x", params &psHu32(GIF_TAG2),&gifRegs->tag2); + Console::WriteLn("psHu32(GIF_TAG3) == 0x%x; gifRegs->tag3 == 0x%x", params &psHu32(GIF_TAG3),&gifRegs->tag3); + Console::WriteLn("psHu32(GIF_CNT) == 0x%x; gifRegs->cnt == 0x%x", params &psHu32(GIF_CNT),&gifRegs->cnt); + Console::WriteLn("psHu32(GIF_P3CNT) == 0x%x; gifRegs->p3cnt == 0x%x", params &psHu32(GIF_P3CNT),&gifRegs->p3cnt); + Console::WriteLn("psHu32(GIF_P3TAG) == 0x%x; gifRegs->p3tag == 0x%x", params &psHu32(GIF_P3TAG),&gifRegs->p3tag); + +}*/ + #endif \ No newline at end of file diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 081efc2f47..0a192f3482 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -164,10 +164,9 @@ - - - - + + + @@ -209,8 +208,6 @@ - - @@ -271,7 +268,8 @@ - + + @@ -370,7 +368,6 @@ - diff --git a/pcsx2/Misc.cpp b/pcsx2/Misc.cpp deleted file mode 100644 index 5ac43cea86..0000000000 --- a/pcsx2/Misc.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2009 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 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 PCSX2. - * If not, see . - */ - -#include "PrecompiledHeader.h" - -#ifdef _WIN32 -#include "RDebug/deci2.h" -#else -#include -#endif - -#include -#include - -#include "IopCommon.h" -#include "HostGui.h" - -#include "CDVD/IsoFSdrv.h" -#include "VUmicro.h" -#include "VU.h" -#include "iCore.h" -//#include "sVU_zerorec.h" -#include "BaseblockEx.h" // included for devbuild block dumping (which may or may not work anymore?) - -#include "GS.h" -#include "COP0.h" -#include "Cache.h" - -#include "AppConfig.h" - -using namespace std; -using namespace R5900; - -struct KeyModifiers keymodifiers = {false, false, false, false}; - -extern wxString strgametitle; - - -// ------------------------------------------------------------------------ -// Force DevAssert to *not* inline for devel/debug builds (allows using breakpoints to trap -// assertions), and force it to inline for release builds (optimizes it out completely since -// IsDevBuild is false). Since Devel builds typically aren't enabled with Global Optimization/ -// LTCG, this currently isn't even necessary. But might as well, in case we decide at a later -// date to re-enable LTCG for devel. -// -#ifdef PCSX2_DEVBUILD -# define DEVASSERT_INLINE __noinline -#else -# define DEVASSERT_INLINE __forceinline -#endif - -////////////////////////////////////////////////////////////////////////////////////////// -// Assertion tool for Devel builds, intended for sanity checking and/or bounds checking -// variables in areas which are not performance critical. -// -// How it works: This function throws an exception of type Exception::AssertionFailure if -// the assertion conditional is false. Typically for the end-user, this exception is handled -// by the general handler, which (should eventually) create some state dumps and other -// information for troubleshooting purposes. -// -// From a debugging environment, you can trap your DevAssert by either breakpointing the -// exception throw below, or by adding either Exception::AssertionFailure or -// Exception::LogicError to your First-Chance Exception catch list (Visual Studio, under -// the Debug->Exceptions menu/dialog). -// -DEVASSERT_INLINE void DevAssert( bool condition, const char* msg ) -{ - if( IsDevBuild && !condition ) - { - throw Exception::LogicError( msg ); - } -} - -// return value: -// 0 - Invalid or unknown disc. -// 1 - PS1 CD -// 2 - PS2 CD -int GetPS2ElfName( wxString& name ) -{ - int f; - char buffer[g_MaxPath];//if a file is longer...it should be shorter :D - char *pos; - TocEntry tocEntry; - - IsoFS_init(); - - // check if the file exists - if (IsoFS_findFile("SYSTEM.CNF;1", &tocEntry) != TRUE){ - Console::Status("GetElfName: SYSTEM.CNF not found; invalid cd image or no disc present."); - return 0;//could not find; not a PS/PS2 cdvd - } - - f=IsoFS_open("SYSTEM.CNF;1", 1); - IsoFS_read(f, buffer, g_MaxPath); - IsoFS_close(f); - - buffer[tocEntry.fileSize]='\0'; - - pos=strstr(buffer, "BOOT2"); - if (pos==NULL){ - pos=strstr(buffer, "BOOT"); - if (pos==NULL) { - Console::Error("PCSX2 Boot Error: This is not a Playstation or PS2 game!"); - return 0; - } - return 1; - } - pos+=strlen("BOOT2"); - while (pos && *pos && pos<&buffer[g_MaxPath] - && (*pos<'A' || (*pos>'Z' && *pos<'a') || *pos>'z')) - pos++; - if (!pos || *pos==0) - return 0; - - // the filename is everything up to the first CR/LF/tab.. ? - // Or up to any whitespace? (I'm opting for first CRLF/tab, although the old code - // apparently stopped on spaces too) --air - name = wxStringTokenizer( wxString::FromAscii( pos ) ).GetNextToken(); - -#ifdef PCSX2_DEVBUILD - FILE *fp; - int i; - - fp = fopen("System.map", "r"); - if( fp == NULL ) return 2; - - u32 addr; - - Console::WriteLn("Loading System.map..."); - while (!feof(fp)) { - fseek(fp, 8, SEEK_CUR); - buffer[0] = '0'; buffer[1] = 'x'; - for (i=2; i<10; i++) buffer[i] = fgetc(fp); buffer[i] = 0; - addr = strtoul(buffer, (char**)NULL, 0); - fseek(fp, 3, SEEK_CUR); - for (i=0; iFreeze( g_nLeftGSFrames ); -} - -void LoadGSState(const wxString& file) -{ - int ret; - gzLoadingState* f; - - Console::Status( "Loading GS State..." ); - - try - { - f = new gzLoadingState( file ); - } - catch( Exception::FileNotFound& ) - { - // file not found? try prefixing with sstates folder: - if( !Path::IsRelative( file ) ) - { - f = new gzLoadingState( Path::Combine( g_Conf->Folders.Savestates, file ) ); - - // If this load attempt fails, then let the exception bubble up to - // the caller to deal with... - } - } - - // Always set gsIrq callback -- GS States are always exclusionary of MTGS mode - GSirqCallback( gsIrq ); - - ret = GSopen(&pDsp, "PCSX2", 0); - if (ret != 0) - { - delete f; - throw Exception::PluginOpenError( PluginId_GS ); - } - - ret = PADopen((void *)&pDsp); - - f->Freeze(g_nLeftGSFrames); - f->gsFreeze(); - - f->FreezePlugin( "GS", gsSafeFreeze ); - - RunGSState( *f ); - - delete( f ); - - g_plugins->Close( PluginId_GS ); - g_plugins->Close( PluginId_PAD ); -} - -#endif - -char* mystrlwr( char* string ) -{ - assert( string != NULL ); - while ( 0 != ( *string++ = (char)tolower( *string ) ) ); - return string; -} - -void _memset16_unaligned( void* dest, u16 data, size_t size ) -{ - jASSUME( (size & 0x1) == 0 ); - - u16* dst = (u16*)dest; - for(int i=size; i; --i, ++dst ) - *dst = data; -} diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h deleted file mode 100644 index 9ea1bde7e0..0000000000 --- a/pcsx2/Misc.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Pcsx2 - Pc Ps2 Emulator - * Copyright (C) 2002-2009 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 - */ - -#pragma once - -struct KeyModifiers -{ - bool control; - bool alt; - bool shift; - bool capslock; -}; -extern struct KeyModifiers keymodifiers; - -// Per ChickenLiver, this is being used to pass the GS plugins window handle to the Pad plugins. -// So a rename to pDisplay is in the works, but it will not, in fact, be removed. -extern uptr pDsp; //Used in GS, MTGS, Plugins, Misc - -extern int GetPS2ElfName( wxString& dest ); // Used in Misc, System, Linux, CDVD - -// Not sure what header these should go in. Probably not this one. -void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR); -extern u32 g_sseVUMXCSR, g_sseMXCSR; - -void SaveGSState(const wxString& file); -void LoadGSState(const wxString& file); - diff --git a/pcsx2/NakedAsm.h b/pcsx2/NakedAsm.h index b56a37c0e7..8a6b391135 100644 --- a/pcsx2/NakedAsm.h +++ b/pcsx2/NakedAsm.h @@ -1,61 +1,61 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2009 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 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 PCSX2. - * If not, see . - */ - - // Externs for various routines that are defined in assembly files on Linux. -#ifndef NAKED_ASM_H -#define NAKED_ASM_H - -#include "IPU/coroutine.h" - -// Common to Windows and Linux -extern "C" -{ - // acoroutine.S - void so_call(coroutine_t coro); - void so_resume(void); - void so_exit(void); - - void recRecompile( u32 startpc ); - - // aR3000A.S - void iopRecRecompile(u32 startpc); -} - -#ifdef __LINUX__ - -PCSX2_ALIGNED16( u8 _xmm_backup[16*2] ); -PCSX2_ALIGNED16( u8 _mmx_backup[8*4] ); - -extern "C" -{ - // aVUzerorec.S - void* SuperVUGetProgram(u32 startpc, int vuindex); - void SuperVUCleanupProgram(u32 startpc, int vuindex); - void svudispfn(); - - // aR3000A.S - void iopJITCompile(); - void iopJITCompileInBlock(); - void iopDispatcherReg(); - - // aR5900-32.S - void JITCompile(); - void JITCompileInBlock(); - void DispatcherReg(); - void DispatcherEvent(); -} -#endif - -#endif +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 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 PCSX2. + * If not, see . + */ + + // Externs for various routines that are defined in assembly files on Linux. +#ifndef NAKED_ASM_H +#define NAKED_ASM_H + +#include "IPU/coroutine.h" + +// Common to Windows and Linux +extern "C" +{ + // acoroutine.S + void so_call(coroutine_t coro); + void so_resume(void); + void so_exit(void); + + void recRecompile( u32 startpc ); + + // aR3000A.S + void iopRecRecompile(u32 startpc); +} + +#ifdef __LINUX__ + +PCSX2_ALIGNED16( u8 _xmm_backup[16*2] ); +PCSX2_ALIGNED16( u8 _mmx_backup[8*4] ); + +extern "C" +{ + // aVUzerorec.S + void* SuperVUGetProgram(u32 startpc, int vuindex); + void SuperVUCleanupProgram(u32 startpc, int vuindex); + void svudispfn(); + + // aR3000A.S + void iopJITCompile(); + void iopJITCompileInBlock(); + void iopDispatcherReg(); + + // aR5900-32.S + void JITCompile(); + void JITCompileInBlock(); + void DispatcherReg(); + void DispatcherEvent(); +} +#endif + +#endif diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 66d3d5d396..9cc0040d2a 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -1,185 +1,185 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2009 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 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 PCSX2. - * If not, see . - */ - -#include "PrecompiledHeader.h" -#include "IniInterface.h" -#include "Config.h" -#include "GS.h" - -#include - -// all speedhacks are disabled by default -Pcsx2Config::SpeedhackOptions::SpeedhackOptions() : - bitset( 0 ) -, EECycleRate( 0 ) -, VUCycleSteal( 0 ) -{ -} - -void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini ) -{ - SpeedhackOptions defaults; - IniScopedGroup path( ini, L"Speedhacks" ); - - IniBitfield( EECycleRate ); - IniBitfield( VUCycleSteal ); - IniBitBool( IopCycleRate_X2 ); - IniBitBool( IntcStat ); - IniBitBool( BIFC0 ); - IniBitBool( vuFlagHack ); - IniBitBool( vuMinMax ); -} - -void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini ) -{ - ProfilerOptions defaults; - IniScopedGroup path( ini, L"Profiler" ); - - IniBitBool( Enabled ); - IniBitBool( RecBlocks_EE ); - IniBitBool( RecBlocks_IOP ); - IniBitBool( RecBlocks_VU0 ); - IniBitBool( RecBlocks_VU1 ); -} - -void Pcsx2Config::RecompilerOptions::LoadSave( IniInterface& ini ) -{ - RecompilerOptions defaults; - IniScopedGroup path( ini, L"Recompiler" ); - - IniBitBool( EnableEE ); - IniBitBool( EnableIOP ); - IniBitBool( EnableVU0 ); - IniBitBool( EnableVU1 ); -} - -Pcsx2Config::CpuOptions::CpuOptions() : - bitset( 0 ) -, sseMXCSR( DEFAULT_sseMXCSR ) -, sseVUMXCSR( DEFAULT_sseVUMXCSR ) -{ - vuOverflow = true; - fpuOverflow = true; -} - -void Pcsx2Config::CpuOptions::LoadSave( IniInterface& ini ) -{ - CpuOptions defaults; - IniScopedGroup path( ini, L"CPU" ); - - IniEntry( sseMXCSR ); - IniEntry( sseVUMXCSR ); - - IniBitBool( vuOverflow ); - IniBitBool( vuExtraOverflow ); - IniBitBool( vuSignOverflow ); - IniBitBool( vuUnderflow ); - - IniBitBool( fpuOverflow ); - IniBitBool( fpuExtraOverflow ); - IniBitBool( fpuFullMode ); - - Recompiler.LoadSave( ini ); -} - -Pcsx2Config::VideoOptions::VideoOptions() : - EnableFrameLimiting( false ) -, EnableFrameSkipping( false ) -, DefaultRegionMode( Region_NTSC ) -, FpsTurbo( 60*4 ) -, FpsLimit( 60 ) -, FpsSkip( 55 ) -, ConsecutiveFrames( 2 ) -, ConsecutiveSkip( 1 ) -{ -} - -void Pcsx2Config::VideoOptions::LoadSave( IniInterface& ini ) -{ - VideoOptions defaults; - IniScopedGroup path( ini, L"Video" ); - - IniEntry( EnableFrameLimiting ); - IniEntry( EnableFrameSkipping ); - - static const wxChar * const ntsc_pal_str[2] = { L"ntsc", L"pal" }; - ini.EnumEntry( L"DefaultRegionMode", DefaultRegionMode, ntsc_pal_str, defaults.DefaultRegionMode ); - - IniEntry( FpsTurbo ); - IniEntry( FpsLimit ); - IniEntry( FpsSkip ); - IniEntry( ConsecutiveFrames ); - IniEntry( ConsecutiveSkip ); -} - -void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini ) -{ - GamefixOptions defaults; - IniScopedGroup path( ini, L"Gamefixes" ); - - IniBitBool( VuAddSubHack ); - IniBitBool( VuClipFlagHack ); - IniBitBool( FpuCompareHack ); - IniBitBool( FpuMulHack ); - IniBitBool( DMAExeHack ); - IniBitBool( XgKickHack ); - IniBitBool( MpegHack ); -} - -Pcsx2Config::Pcsx2Config() : - bitset( 0 ) -{ -} - -void Pcsx2Config::LoadSave( IniInterface& ini ) -{ - Pcsx2Config defaults; - IniScopedGroup path( ini, L"EmuCore" ); - - IniBitBool( CdvdVerboseReads ); - IniBitBool( CdvdDumpBlocks ); - IniBitBool( EnablePatches ); - - IniBitBool( McdEnableEjection ); - - // Process various sub-components: - - Speedhacks.LoadSave( ini ); - Cpu.LoadSave( ini ); - Video.LoadSave( ini ); - Gamefixes.LoadSave( ini ); - Profiler.LoadSave( ini ); - - ini.Flush(); -} - -void Pcsx2Config::Load( const wxString& srcfile ) -{ - //m_IsLoaded = true; - - // Note: Extra parenthesis resolves "I think this is a function" issues with C++. - wxFileConfig cfg( srcfile ); - IniLoader loader( (IniLoader( cfg )) ); - LoadSave( loader ); -} - -void Pcsx2Config::Save( const wxString& dstfile ) -{ - //if( !m_IsLoaded ) return; - - wxFileConfig cfg( dstfile ); - IniSaver saver( (IniSaver( cfg )) ); - LoadSave( saver ); -} +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 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 PCSX2. + * If not, see . + */ + +#include "PrecompiledHeader.h" +#include "IniInterface.h" +#include "Config.h" +#include "GS.h" + +#include + +// all speedhacks are disabled by default +Pcsx2Config::SpeedhackOptions::SpeedhackOptions() : + bitset( 0 ) +, EECycleRate( 0 ) +, VUCycleSteal( 0 ) +{ +} + +void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini ) +{ + SpeedhackOptions defaults; + IniScopedGroup path( ini, L"Speedhacks" ); + + IniBitfield( EECycleRate ); + IniBitfield( VUCycleSteal ); + IniBitBool( IopCycleRate_X2 ); + IniBitBool( IntcStat ); + IniBitBool( BIFC0 ); + IniBitBool( vuFlagHack ); + IniBitBool( vuMinMax ); +} + +void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini ) +{ + ProfilerOptions defaults; + IniScopedGroup path( ini, L"Profiler" ); + + IniBitBool( Enabled ); + IniBitBool( RecBlocks_EE ); + IniBitBool( RecBlocks_IOP ); + IniBitBool( RecBlocks_VU0 ); + IniBitBool( RecBlocks_VU1 ); +} + +void Pcsx2Config::RecompilerOptions::LoadSave( IniInterface& ini ) +{ + RecompilerOptions defaults; + IniScopedGroup path( ini, L"Recompiler" ); + + IniBitBool( EnableEE ); + IniBitBool( EnableIOP ); + IniBitBool( EnableVU0 ); + IniBitBool( EnableVU1 ); +} + +Pcsx2Config::CpuOptions::CpuOptions() : + bitset( 0 ) +, sseMXCSR( DEFAULT_sseMXCSR ) +, sseVUMXCSR( DEFAULT_sseVUMXCSR ) +{ + vuOverflow = true; + fpuOverflow = true; +} + +void Pcsx2Config::CpuOptions::LoadSave( IniInterface& ini ) +{ + CpuOptions defaults; + IniScopedGroup path( ini, L"CPU" ); + + IniEntry( sseMXCSR ); + IniEntry( sseVUMXCSR ); + + IniBitBool( vuOverflow ); + IniBitBool( vuExtraOverflow ); + IniBitBool( vuSignOverflow ); + IniBitBool( vuUnderflow ); + + IniBitBool( fpuOverflow ); + IniBitBool( fpuExtraOverflow ); + IniBitBool( fpuFullMode ); + + Recompiler.LoadSave( ini ); +} + +Pcsx2Config::VideoOptions::VideoOptions() : + EnableFrameLimiting( false ) +, EnableFrameSkipping( false ) +, DefaultRegionMode( Region_NTSC ) +, FpsTurbo( 60*4 ) +, FpsLimit( 60 ) +, FpsSkip( 55 ) +, ConsecutiveFrames( 2 ) +, ConsecutiveSkip( 1 ) +{ +} + +void Pcsx2Config::VideoOptions::LoadSave( IniInterface& ini ) +{ + VideoOptions defaults; + IniScopedGroup path( ini, L"Video" ); + + IniEntry( EnableFrameLimiting ); + IniEntry( EnableFrameSkipping ); + + static const wxChar * const ntsc_pal_str[2] = { L"ntsc", L"pal" }; + ini.EnumEntry( L"DefaultRegionMode", DefaultRegionMode, ntsc_pal_str, defaults.DefaultRegionMode ); + + IniEntry( FpsTurbo ); + IniEntry( FpsLimit ); + IniEntry( FpsSkip ); + IniEntry( ConsecutiveFrames ); + IniEntry( ConsecutiveSkip ); +} + +void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini ) +{ + GamefixOptions defaults; + IniScopedGroup path( ini, L"Gamefixes" ); + + IniBitBool( VuAddSubHack ); + IniBitBool( VuClipFlagHack ); + IniBitBool( FpuCompareHack ); + IniBitBool( FpuMulHack ); + IniBitBool( DMAExeHack ); + IniBitBool( XgKickHack ); + IniBitBool( MpegHack ); +} + +Pcsx2Config::Pcsx2Config() : + bitset( 0 ) +{ +} + +void Pcsx2Config::LoadSave( IniInterface& ini ) +{ + Pcsx2Config defaults; + IniScopedGroup path( ini, L"EmuCore" ); + + IniBitBool( CdvdVerboseReads ); + IniBitBool( CdvdDumpBlocks ); + IniBitBool( EnablePatches ); + + IniBitBool( McdEnableEjection ); + + // Process various sub-components: + + Speedhacks.LoadSave( ini ); + Cpu.LoadSave( ini ); + Video.LoadSave( ini ); + Gamefixes.LoadSave( ini ); + Profiler.LoadSave( ini ); + + ini.Flush(); +} + +void Pcsx2Config::Load( const wxString& srcfile ) +{ + //m_IsLoaded = true; + + // Note: Extra parenthesis resolves "I think this is a function" issues with C++. + wxFileConfig cfg( srcfile ); + IniLoader loader( (IniLoader( cfg )) ); + LoadSave( loader ); +} + +void Pcsx2Config::Save( const wxString& dstfile ) +{ + //if( !m_IsLoaded ) return; + + wxFileConfig cfg( dstfile ); + IniSaver saver( (IniSaver( cfg )) ); + LoadSave( saver ); +} diff --git a/pcsx2/Plugins.h b/pcsx2/Plugins.h index e6a570a15b..800a831952 100644 --- a/pcsx2/Plugins.h +++ b/pcsx2/Plugins.h @@ -238,3 +238,6 @@ extern PluginManager* PluginManager_Create( const wxChar* (&folders)[PluginId_Co extern PluginManagerBase& GetPluginManager(); +// Per ChickenLiver, this is being used to pass the GS plugins window handle to the Pad plugins. +// So a rename to pDisplay is in the works, but it will not, in fact, be removed. +extern uptr pDsp; \ No newline at end of file diff --git a/pcsx2/System.h b/pcsx2/System.h index e1221288fb..7301bffbef 100644 --- a/pcsx2/System.h +++ b/pcsx2/System.h @@ -17,7 +17,6 @@ #include "Utilities/SafeArray.h" #include "Utilities/Threading.h" // to use threading stuff, include the Threading namespace in your file. -#include "Misc.h" #include "CDVD/CDVDaccess.h" static const int PCSX2_VersionHi = 0; diff --git a/pcsx2/Tags.h b/pcsx2/Tags.h index ba0f268e4e..22100263c9 100644 --- a/pcsx2/Tags.h +++ b/pcsx2/Tags.h @@ -1,237 +1,237 @@ -/* PCSX2 - PS2 Emulator for PCs - * Copyright (C) 2002-2009 PCSX2 Dev Team - * - * PCSX2 is free software: you can redistribute it and/or modify it under the terms - * of the GNU Lesser General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * PCSX2 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 PCSX2. - * If not, see . - */ - -// This is meant to be a collection of generic functions dealing with tags. -// I kept seeing the same code over and over with different structure names -// and the same members, and figured it'd be a good spot to use templates... - -// Actually, looks like I didn't need templates after all... :) - -enum mfd_type -{ - NO_MFD, - MFD_RESERVED, - MFD_VIF1, - MFD_GIF -}; - -enum sts_type -{ - NO_STS, - STS_SIF0, - STS_fromSPR, - STS_fromIPU -}; - -enum std_type -{ - NO_STD, - STD_VIF1, - STD_GIF, - STD_SIF1 -}; - -enum d_ctrl_flags -{ - CTRL_DMAE = 0x1, // 0/1 - disables/enables all DMAs - CTRL_RELE = 0x2, // 0/1 - cycle stealing off/on - CTRL_MFD = 0xC, // Memory FIFO drain channel (mfd_type) - CTRL_STS = 0x30, // Stall Control source channel (sts type) - CTRL_STD = 0xC0, // Stall Controll drain channel (std_type) - CTRL_RCYC = 0x100 // Release cycle (8/16/32/64/128/256) - // When cycle stealing is on, the release cycle sets the period to release - // the bus to EE. -}; - -enum pce_values -{ - PCE_NOTHING = 0, - PCE_RESERVED, - PCE_DISABLED, - PCE_ENABLED -}; - -enum tag_id -{ - TAG_CNTS = 0, - TAG_REFE = 0, // Transfer Packet According to ADDR field, clear STR, and end - TAG_CNT, // Transfer QWC following the tag. - TAG_NEXT, // Transfer QWC following tag. TADR = ADDR - TAG_REF, // Transfer QWC from ADDR field - TAG_REFS, // Transfer QWC from ADDR field (Stall Control) - TAG_CALL, // Transfer QWC following the tag, save succeeding tag - TAG_RET, // Transfer QWC following the tag, load next tag - TAG_END // Transfer QWC following the tag -}; - -enum chcr_flags -{ - CHCR_DIR = 0x1, // Direction: 0 - to memory, 1 - from memory. VIF1 & SIF2 only. - CHCR_MOD1 = 0x4, - CHCR_MOD2 = 0x8, - CHCR_MOD = 0xC, // MOD1 & MOD2; Holds which of the Transfer modes above is used. - CHCR_ASP1 = 0x10, - CHCR_ASP2 = 0x20, - CHCR_ASP = 0x30, // ASP1 & ASP2; Address stack pointer. 0, 1, or 2 addresses. - CHCR_TTE = 0x40, // Tag Transfer Enable. 0 - Diable / 1 - Enable. - CHCR_TIE = 0x80, // Tag Interrupt Enable. 0 - Diable / 1 - Enable. - CHCR_STR = 0x100 // Start. 0 while stopping DMA, 1 while it's running. -}; - -enum TransferMode -{ - NORMAL_MODE = 0, - CHAIN_MODE, - INTERLEAVE_MODE, - UNDEFINED_MODE -}; - -namespace Tag -{ - // Transfer functions, - static __forceinline void UpperTransfer(DMACh *tag, u32* ptag) - { - // Transfer upper part of tag to CHCR bits 31-15 - tag->chcr._u32 = (tag->chcr._u32 & 0xFFFF) | ((*ptag) & 0xFFFF0000); - } - - static __forceinline void LowerTransfer(DMACh *tag, u32* ptag) - { - //QWC set to lower 16bits of the tag - tag->qwc = (u16)ptag[0]; - } - - static __forceinline bool Transfer(const char *s, DMACh *tag, u32* ptag) - { - if (ptag == NULL) // Is ptag empty? - { - Console::Error("%s BUSERR", s); - UpperTransfer(tag, ptag); - - // Set BEIS (BUSERR) in DMAC_STAT register - psHu32(DMAC_STAT) |= DMAC_STAT_BEIS; - return false; - } - else - { - UpperTransfer(tag, ptag); - LowerTransfer(tag, ptag); - return true; - } - } - - /*// Not sure if I'll need this one. - static __forceinline bool SafeTransfer(const char *s, DMACh *tag, u32* ptag) - { - if (ptag == NULL) // Is ptag empty? - { - Console::Error("%s BUSERR", s); - - // Set BEIS (BUSERR) in DMAC_STAT register - psHu32(DMAC_STAT) |= DMAC_STAT_BEIS; - return false; - } - else - { - UpperTransfer(tag, ptag); - LowerTransfer(tag, ptag); - return true; - } - }*/ - - static __forceinline void UnsafeTransfer(DMACh *tag, u32* ptag) - { - UpperTransfer(tag, ptag); - LowerTransfer(tag, ptag); - } - - // Untested - static __forceinline u16 QWC(u32 *tag) - { - return (tag[0] & 0xffff); - } - - // Untested - static __forceinline pce_values PCE(u32 *tag) - { - return (pce_values)((tag[0] >> 22) & 0x3); - } - - static __forceinline tag_id Id(u32* tag) - { - return (tag_id)((tag[0] >> 28) & 0x7); - } - - static __forceinline tag_id Id(u32 tag) - { - return (tag_id)((tag >> 28) & 0x7); - } - - static __forceinline bool IRQ(u32 *tag) - { - return !!(tag[0] >> 31); - } - - static __forceinline bool IRQ(u32 tag) - { - return !!(tag >> 31); - } -} - -// Print information about a chcr tag. -static __forceinline void PrintCHCR(const char* s, DMACh *tag) -{ - u8 num_addr = tag->chcr.ASP; - u32 mode = tag->chcr.MOD; - - Console::Write("%s chcr %s mem: ", s, (tag->chcr.DIR) ? "from" : "to"); - - if (mode == NORMAL_MODE) - Console::Write(" normal mode; "); - else if (mode == CHAIN_MODE) - Console::Write(" chain mode; "); - else if (mode == INTERLEAVE_MODE) - Console::Write(" interleave mode; "); - else - Console::Write(" ?? mode; "); - - if (num_addr != 0) Console::Write("ASP = %d;", num_addr); - if (tag->chcr.TTE) Console::Write("TTE;"); - if (tag->chcr.TIE) Console::Write("TIE;"); - if (tag->chcr.STR) Console::Write(" (DMA started)."); else Console::Write(" (DMA stopped)."); - Console::WriteLn(""); -} - -namespace D_CTRL -{ - static __forceinline bool DMAE() { return !!(psHu32(DMAC_CTRL) & CTRL_DMAE); } - static __forceinline bool RELE() { return !!(psHu32(DMAC_CTRL) & CTRL_RELE); } - static __forceinline mfd_type MFD() - { - return (mfd_type)((psHu32(DMAC_CTRL) & CTRL_MFD) >> 2); - } - static __forceinline sts_type STS() - { - return (sts_type)((psHu32(DMAC_CTRL) & CTRL_STS) >> 4); - } - static __forceinline std_type STD() - { - return (std_type)((psHu32(DMAC_CTRL) & CTRL_STD) >> 6); - } - static __forceinline int RCYC() - { - return ((((psHu32(DMAC_CTRL) & CTRL_RCYC) >> 3) + 1) * 8); - } -} +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 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 PCSX2. + * If not, see . + */ + +// This is meant to be a collection of generic functions dealing with tags. +// I kept seeing the same code over and over with different structure names +// and the same members, and figured it'd be a good spot to use templates... + +// Actually, looks like I didn't need templates after all... :) + +enum mfd_type +{ + NO_MFD, + MFD_RESERVED, + MFD_VIF1, + MFD_GIF +}; + +enum sts_type +{ + NO_STS, + STS_SIF0, + STS_fromSPR, + STS_fromIPU +}; + +enum std_type +{ + NO_STD, + STD_VIF1, + STD_GIF, + STD_SIF1 +}; + +enum d_ctrl_flags +{ + CTRL_DMAE = 0x1, // 0/1 - disables/enables all DMAs + CTRL_RELE = 0x2, // 0/1 - cycle stealing off/on + CTRL_MFD = 0xC, // Memory FIFO drain channel (mfd_type) + CTRL_STS = 0x30, // Stall Control source channel (sts type) + CTRL_STD = 0xC0, // Stall Controll drain channel (std_type) + CTRL_RCYC = 0x100 // Release cycle (8/16/32/64/128/256) + // When cycle stealing is on, the release cycle sets the period to release + // the bus to EE. +}; + +enum pce_values +{ + PCE_NOTHING = 0, + PCE_RESERVED, + PCE_DISABLED, + PCE_ENABLED +}; + +enum tag_id +{ + TAG_CNTS = 0, + TAG_REFE = 0, // Transfer Packet According to ADDR field, clear STR, and end + TAG_CNT, // Transfer QWC following the tag. + TAG_NEXT, // Transfer QWC following tag. TADR = ADDR + TAG_REF, // Transfer QWC from ADDR field + TAG_REFS, // Transfer QWC from ADDR field (Stall Control) + TAG_CALL, // Transfer QWC following the tag, save succeeding tag + TAG_RET, // Transfer QWC following the tag, load next tag + TAG_END // Transfer QWC following the tag +}; + +enum chcr_flags +{ + CHCR_DIR = 0x1, // Direction: 0 - to memory, 1 - from memory. VIF1 & SIF2 only. + CHCR_MOD1 = 0x4, + CHCR_MOD2 = 0x8, + CHCR_MOD = 0xC, // MOD1 & MOD2; Holds which of the Transfer modes above is used. + CHCR_ASP1 = 0x10, + CHCR_ASP2 = 0x20, + CHCR_ASP = 0x30, // ASP1 & ASP2; Address stack pointer. 0, 1, or 2 addresses. + CHCR_TTE = 0x40, // Tag Transfer Enable. 0 - Diable / 1 - Enable. + CHCR_TIE = 0x80, // Tag Interrupt Enable. 0 - Diable / 1 - Enable. + CHCR_STR = 0x100 // Start. 0 while stopping DMA, 1 while it's running. +}; + +enum TransferMode +{ + NORMAL_MODE = 0, + CHAIN_MODE, + INTERLEAVE_MODE, + UNDEFINED_MODE +}; + +namespace Tag +{ + // Transfer functions, + static __forceinline void UpperTransfer(DMACh *tag, u32* ptag) + { + // Transfer upper part of tag to CHCR bits 31-15 + tag->chcr._u32 = (tag->chcr._u32 & 0xFFFF) | ((*ptag) & 0xFFFF0000); + } + + static __forceinline void LowerTransfer(DMACh *tag, u32* ptag) + { + //QWC set to lower 16bits of the tag + tag->qwc = (u16)ptag[0]; + } + + static __forceinline bool Transfer(const char *s, DMACh *tag, u32* ptag) + { + if (ptag == NULL) // Is ptag empty? + { + Console::Error("%s BUSERR", s); + UpperTransfer(tag, ptag); + + // Set BEIS (BUSERR) in DMAC_STAT register + psHu32(DMAC_STAT) |= DMAC_STAT_BEIS; + return false; + } + else + { + UpperTransfer(tag, ptag); + LowerTransfer(tag, ptag); + return true; + } + } + + /*// Not sure if I'll need this one. + static __forceinline bool SafeTransfer(const char *s, DMACh *tag, u32* ptag) + { + if (ptag == NULL) // Is ptag empty? + { + Console::Error("%s BUSERR", s); + + // Set BEIS (BUSERR) in DMAC_STAT register + psHu32(DMAC_STAT) |= DMAC_STAT_BEIS; + return false; + } + else + { + UpperTransfer(tag, ptag); + LowerTransfer(tag, ptag); + return true; + } + }*/ + + static __forceinline void UnsafeTransfer(DMACh *tag, u32* ptag) + { + UpperTransfer(tag, ptag); + LowerTransfer(tag, ptag); + } + + // Untested + static __forceinline u16 QWC(u32 *tag) + { + return (tag[0] & 0xffff); + } + + // Untested + static __forceinline pce_values PCE(u32 *tag) + { + return (pce_values)((tag[0] >> 22) & 0x3); + } + + static __forceinline tag_id Id(u32* tag) + { + return (tag_id)((tag[0] >> 28) & 0x7); + } + + static __forceinline tag_id Id(u32 tag) + { + return (tag_id)((tag >> 28) & 0x7); + } + + static __forceinline bool IRQ(u32 *tag) + { + return !!(tag[0] >> 31); + } + + static __forceinline bool IRQ(u32 tag) + { + return !!(tag >> 31); + } +} + +// Print information about a chcr tag. +static __forceinline void PrintCHCR(const char* s, DMACh *tag) +{ + u8 num_addr = tag->chcr.ASP; + u32 mode = tag->chcr.MOD; + + Console::Write("%s chcr %s mem: ", s, (tag->chcr.DIR) ? "from" : "to"); + + if (mode == NORMAL_MODE) + Console::Write(" normal mode; "); + else if (mode == CHAIN_MODE) + Console::Write(" chain mode; "); + else if (mode == INTERLEAVE_MODE) + Console::Write(" interleave mode; "); + else + Console::Write(" ?? mode; "); + + if (num_addr != 0) Console::Write("ASP = %d;", num_addr); + if (tag->chcr.TTE) Console::Write("TTE;"); + if (tag->chcr.TIE) Console::Write("TIE;"); + if (tag->chcr.STR) Console::Write(" (DMA started)."); else Console::Write(" (DMA stopped)."); + Console::WriteLn(""); +} + +namespace D_CTRL +{ + static __forceinline bool DMAE() { return !!(psHu32(DMAC_CTRL) & CTRL_DMAE); } + static __forceinline bool RELE() { return !!(psHu32(DMAC_CTRL) & CTRL_RELE); } + static __forceinline mfd_type MFD() + { + return (mfd_type)((psHu32(DMAC_CTRL) & CTRL_MFD) >> 2); + } + static __forceinline sts_type STS() + { + return (sts_type)((psHu32(DMAC_CTRL) & CTRL_STS) >> 4); + } + static __forceinline std_type STD() + { + return (std_type)((psHu32(DMAC_CTRL) & CTRL_STD) >> 6); + } + static __forceinline int RCYC() + { + return ((((psHu32(DMAC_CTRL) & CTRL_RCYC) >> 3) + 1) * 8); + } +} diff --git a/pcsx2/gui/App.h b/pcsx2/gui/App.h index 41f32117f9..0b99523804 100644 --- a/pcsx2/gui/App.h +++ b/pcsx2/gui/App.h @@ -351,5 +351,3 @@ extern void OpenPlugins(); extern wxRect wxGetDisplayArea(); extern bool pxIsValidWindowPosition( const wxWindow& window, const wxPoint& windowPos ); - -extern void ProcessFKeys(int fkey, struct KeyModifiers *keymod); \ No newline at end of file diff --git a/pcsx2/gui/main.cpp b/pcsx2/gui/AppMain.cpp similarity index 99% rename from pcsx2/gui/main.cpp rename to pcsx2/gui/AppMain.cpp index a989c9b0d7..aff9e25bd6 100644 --- a/pcsx2/gui/main.cpp +++ b/pcsx2/gui/AppMain.cpp @@ -21,6 +21,7 @@ #include "Dialogs/ModalPopups.h" #include "Utilities/ScopedPtr.h" +#include "Utilities/HashMap.h" #include #include @@ -197,8 +198,6 @@ sptr AppEmuThread::ExecuteTask() wxFrame* Pcsx2App::GetMainWindow() const { return m_MainFrame; } -#include "HashMap.h" - void Pcsx2App::OpenWizardConsole() { if( !IsDebugBuild ) return; diff --git a/pcsx2/gui/Dialogs/AboutBoxDialog.cpp b/pcsx2/gui/Dialogs/AboutBoxDialog.cpp index 397df251ee..4001c9527d 100644 --- a/pcsx2/gui/Dialogs/AboutBoxDialog.cpp +++ b/pcsx2/gui/Dialogs/AboutBoxDialog.cpp @@ -14,7 +14,6 @@ */ #include "PrecompiledHeader.h" -#include "Misc.h" #include "App.h" #include "Dialogs/ModalPopups.h" #include "wxHelpers.h" diff --git a/pcsx2/gui/Dialogs/ConfigurationDialog.cpp b/pcsx2/gui/Dialogs/ConfigurationDialog.cpp index a722ff13d3..3421880418 100644 --- a/pcsx2/gui/Dialogs/ConfigurationDialog.cpp +++ b/pcsx2/gui/Dialogs/ConfigurationDialog.cpp @@ -14,7 +14,6 @@ */ #include "PrecompiledHeader.h" -#include "Misc.h" #include "System.h" #include "App.h" diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 3eca7af042..af2d2b3a04 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -16,7 +16,6 @@ #include "PrecompiledHeader.h" #include "ConfigurationPanels.h" -#include "Misc.h" #include "System.h" using namespace wxHelpers; diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index 3406d2f126..667bb89342 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -20,6 +20,7 @@ - - - - - - - - - - - - - - - - @@ -306,10 +275,6 @@ RelativePath="..\..\Patch.h" > - - @@ -342,14 +307,6 @@ RelativePath="..\..\PrecompiledHeader.h" > - - - - @@ -494,102 +451,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -632,1244 +493,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1886,6 +523,14 @@ RelativePath="..\..\SaveState.cpp" > + + + + @@ -1933,6 +578,26 @@ + + + + + + + + + + @@ -1949,6 +614,10 @@ RelativePath="..\..\SaveState.h" > + + @@ -1957,6 +626,26 @@ + + + + + + + + + + @@ -1986,9 +675,1249 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2026,10 +1959,6 @@ RelativePath="..\..\gui\IniInterface.cpp" > - - @@ -2579,6 +2508,10 @@ RelativePath="..\..\gui\App.h" > + + @@ -2648,31 +2581,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - diff --git a/pcsx2/x86/iMisc.cpp b/pcsx2/x86/iMisc.cpp index da3823a800..b671784ac2 100644 --- a/pcsx2/x86/iMisc.cpp +++ b/pcsx2/x86/iMisc.cpp @@ -50,3 +50,4 @@ void SetCPUState(u32 sseMXCSR, u32 sseVUMXCSR) #endif //g_sseVUMXCSR = g_sseMXCSR|0x6000; } + diff --git a/plugins/CDVDiso/src/Windows/CDVDiso_vs2008.vcproj b/plugins/CDVDiso/src/Windows/CDVDiso_vs2008.vcproj index 74ee561068..067955e827 100644 --- a/plugins/CDVDiso/src/Windows/CDVDiso_vs2008.vcproj +++ b/plugins/CDVDiso/src/Windows/CDVDiso_vs2008.vcproj @@ -17,6 +17,7 @@