/[pcsx2_0.9.7]/trunk/pcsx2/System.h
ViewVC logotype

Diff of /trunk/pcsx2/System.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 31 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 15  Line 15 
15    
16  #pragma once  #pragma once
17    
18    #include "SysForwardDefs.h"
19    
20  #include "Utilities/SafeArray.h"  #include "Utilities/SafeArray.h"
21  #include "Utilities/Threading.h"                // to use threading stuff, include the Threading namespace in your file.  #include "Utilities/Threading.h"                // to use threading stuff, include the Threading namespace in your file.
22  #include "CDVD/CDVDaccess.h"  #include "CDVD/CDVDaccess.h"
23    
 static const int PCSX2_VersionHi        = 0;  
 static const int PCSX2_VersionMid       = 9;  
 static const int PCSX2_VersionLo        = 7;  
   
 class SysCoreThread;  
 class CpuInitializerSet;  
   
24  typedef SafeArray<u8> VmStateBuffer;  typedef SafeArray<u8> VmStateBuffer;
25    class BaseVUmicroCPU;
26    
27  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
28  //  SysCoreAllocations class  //  SysAllocVM
29  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
30  class SysCoreAllocations  class SysAllocVM
31  {  {
32    public:
33            SysAllocVM();
34            virtual ~SysAllocVM() throw();
35    
36  protected:  protected:
37          ScopedPtr<CpuInitializerSet> CpuProviders;          void CleanupMess() throw();
38    };
39    
40          bool m_RecSuccessEE:1;  // --------------------------------------------------------------------------------------
41          bool m_RecSuccessIOP:1;  //  SysCpuProviderPack
42    // --------------------------------------------------------------------------------------
43    class SysCpuProviderPack
44    {
45    protected:
46            ScopedPtr<BaseException> m_RecExceptionEE;
47            ScopedPtr<BaseException> m_RecExceptionIOP;
48    
49  public:  public:
50          SysCoreAllocations();          ScopedPtr<CpuInitializerSet> CpuProviders;
         virtual ~SysCoreAllocations() throw();  
51    
52          void SelectCpuProviders() const;          SysCpuProviderPack();
53            virtual ~SysCpuProviderPack() throw();
54    
55            void ApplyConfig() const;
56            BaseVUmicroCPU* getVUprovider(int whichProvider, int vuIndex) const;
57    
58          bool HadSomeFailures( const Pcsx2Config::RecompilerOptions& recOpts ) const;          bool HadSomeFailures( const Pcsx2Config::RecompilerOptions& recOpts ) const;
59    
60          bool IsRecAvailable_EE() const          { return m_RecSuccessEE; }          bool IsRecAvailable_EE() const          { return !m_RecExceptionEE; }
61          bool IsRecAvailable_IOP() const         { return m_RecSuccessIOP; }          bool IsRecAvailable_IOP() const         { return !m_RecExceptionIOP; }
62    
63            BaseException* GetException_EE() const  { return m_RecExceptionEE; }
64            BaseException* GetException_IOP() const { return m_RecExceptionIOP; }
65    
66          bool IsRecAvailable_MicroVU0() const;          bool IsRecAvailable_MicroVU0() const;
67          bool IsRecAvailable_MicroVU1() const;          bool IsRecAvailable_MicroVU1() const;
68            BaseException* GetException_MicroVU0() const;
69            BaseException* GetException_MicroVU1() const;
70    
71          bool IsRecAvailable_SuperVU0() const;          bool IsRecAvailable_SuperVU0() const;
72          bool IsRecAvailable_SuperVU1() const;          bool IsRecAvailable_SuperVU1() const;
73            BaseException* GetException_SuperVU0() const;
74            BaseException* GetException_SuperVU1() const;
75    
76  protected:  protected:
77          void CleanupMess() throw();          void CleanupMess() throw();
78  };  };
79    
80  // GetSysCoreAlloc - this function is not implemented by PCSX2 core -- it must be  // GetCpuProviders - this function is not implemented by PCSX2 core -- it must be
81  // implemented by the provisioning interface.  // implemented by the provisioning interface.
82  extern SysCoreAllocations& GetSysCoreAlloc();  extern SysCpuProviderPack& GetCpuProviders();
83    
84  extern void SysLogMachineCaps();                                // Detects cpu type and fills cpuInfo structs.  extern void SysLogMachineCaps();                                // Detects cpu type and fills cpuInfo structs.
85  extern void SysClearExecutionCache();   // clears recompiled execution caches!  extern void SysClearExecutionCache();   // clears recompiled execution caches!
86    
   
87  extern u8 *SysMmapEx(uptr base, u32 size, uptr bounds, const char *caller="Unnamed");  extern u8 *SysMmapEx(uptr base, u32 size, uptr bounds, const char *caller="Unnamed");
88  extern void vSyncDebugStuff( uint frame );  extern void vSyncDebugStuff( uint frame );
89  extern void NTFS_CompressFile( const wxString& file, bool compressStatus=true );  extern void NTFS_CompressFile( const wxString& file, bool compressStatus=true );
90    
91    extern wxString SysGetDiscID();
92    
93  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------
94  //  PCSX2_SEH - Defines existence of "built in" Structured Exception Handling support.  //  PCSX2_SEH - Defines existence of "built in" Structured Exception Handling support.
95  // --------------------------------------------------------------------------------------  // --------------------------------------------------------------------------------------

Legend:
Removed from v.31  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22