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

Diff of /trunk/pcsx2/IopMem.h

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

revision 62 by william, Tue Sep 7 11:08:22 2010 UTC revision 273 by william, Fri Nov 12 01:10:22 2010 UTC
# Line 17  Line 17 
17    
18  #include "MemoryTypes.h"  #include "MemoryTypes.h"
19    
 extern u8 *psxM;  
 extern u8 *psxP;  
 extern u8 *psxH;  
 extern u8 *psxS;  
20  extern uptr *psxMemWLUT;  extern uptr *psxMemWLUT;
21  extern const uptr *psxMemRLUT;  extern const uptr *psxMemRLUT;
22    
# Line 51  static __fi const T* iopVirtMemR( u32 me Line 47  static __fi const T* iopVirtMemR( u32 me
47  // Obtains a pointer to the IOP's physical mapping (bypasses the TLB)  // Obtains a pointer to the IOP's physical mapping (bypasses the TLB)
48  static __fi u8* iopPhysMem( u32 addr )  static __fi u8* iopPhysMem( u32 addr )
49  {  {
50          return &psxM[addr & 0x1fffff];          return &iopMem->Main[addr & 0x1fffff];
51  }  }
52    
53  #define psxSs8(mem)             psxS[(mem) & 0x00ff]  #define psxSs8(mem)             iopMem->Sif[(mem) & 0x00ff]
54  #define psxSs16(mem)    (*(s16*)&psxS[(mem) & 0x00ff])  #define psxSs16(mem)    (*(s16*)&iopMem->Sif[(mem) & 0x00ff])
55  #define psxSs32(mem)    (*(s32*)&psxS[(mem) & 0x00ff])  #define psxSs32(mem)    (*(s32*)&iopMem->Sif[(mem) & 0x00ff])
56  #define psxSu8(mem)             (*(u8*) &psxS[(mem) & 0x00ff])  #define psxSu8(mem)             (*(u8*) &iopMem->Sif[(mem) & 0x00ff])
57  #define psxSu16(mem)    (*(u16*)&psxS[(mem) & 0x00ff])  #define psxSu16(mem)    (*(u16*)&iopMem->Sif[(mem) & 0x00ff])
58  #define psxSu32(mem)    (*(u32*)&psxS[(mem) & 0x00ff])  #define psxSu32(mem)    (*(u32*)&iopMem->Sif[(mem) & 0x00ff])
59    
60  #define psxPs8(mem)             psxP[(mem) & 0xffff]  #define psxPs8(mem)             iopMem->P[(mem) & 0xffff]
61  #define psxPs16(mem)    (*(s16*)&psxP[(mem) & 0xffff])  #define psxPs16(mem)    (*(s16*)&iopMem->P[(mem) & 0xffff])
62  #define psxPs32(mem)    (*(s32*)&psxP[(mem) & 0xffff])  #define psxPs32(mem)    (*(s32*)&iopMem->P[(mem) & 0xffff])
63  #define psxPu8(mem)             (*(u8*) &psxP[(mem) & 0xffff])  #define psxPu8(mem)             (*(u8*) &iopMem->P[(mem) & 0xffff])
64  #define psxPu16(mem)    (*(u16*)&psxP[(mem) & 0xffff])  #define psxPu16(mem)    (*(u16*)&iopMem->P[(mem) & 0xffff])
65  #define psxPu32(mem)    (*(u32*)&psxP[(mem) & 0xffff])  #define psxPu32(mem)    (*(u32*)&iopMem->P[(mem) & 0xffff])
66    
67  #define psxHs8(mem)             psxH[(mem) & 0xffff]  #define psxHs8(mem)             iopHw[(mem) & 0xffff]
68  #define psxHs16(mem)    (*(s16*)&psxH[(mem) & 0xffff])  #define psxHs16(mem)    (*(s16*)&iopHw[(mem) & 0xffff])
69  #define psxHs32(mem)    (*(s32*)&psxH[(mem) & 0xffff])  #define psxHs32(mem)    (*(s32*)&iopHw[(mem) & 0xffff])
70  #define psxHu8(mem)             (*(u8*) &psxH[(mem) & 0xffff])  #define psxHu8(mem)             (*(u8*) &iopHw[(mem) & 0xffff])
71  #define psxHu16(mem)    (*(u16*)&psxH[(mem) & 0xffff])  #define psxHu16(mem)    (*(u16*)&iopHw[(mem) & 0xffff])
72  #define psxHu32(mem)    (*(u32*)&psxH[(mem) & 0xffff])  #define psxHu32(mem)    (*(u32*)&iopHw[(mem) & 0xffff])
73    
74  extern void psxMemAlloc();  extern void psxMemAlloc();
75  extern void psxMemReset();  extern void psxMemReset();

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

  ViewVC Help
Powered by ViewVC 1.1.22