Skip to content

Commit

Permalink
Fix ram size issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DiscoStarslayer committed Nov 13, 2023
1 parent f09ce69 commit ed5899f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pcsx2/IopMem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ void iopMemReset()
// at 0x0, 0x8000, and 0xa000:
for (int i=0; i<0x0080; i++)
{
psxMemWLUT[i + 0x0000] = (uptr)&iopMem->Main[(i & 0x1f) << 16];
psxMemWLUT[i + 0x0000] = (uptr)&iopMem->Main[(i & 0x7f) << 16];

// RLUTs, accessed through WLUT.
psxMemWLUT[i + 0x8000] = (uptr)&iopMem->Main[(i & 0x1f) << 16];
psxMemWLUT[i + 0x8000] = (uptr)&iopMem->Main[(i & 0x7f) << 16];
}

// A few single-page allocations for things we store in special locations.
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/IopMem.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static __fi const T* iopVirtMemR( u32 mem )
// Obtains a pointer to the IOP's physical mapping (bypasses the TLB)
static __fi u8* iopPhysMem( u32 addr )
{
return &iopMem->Main[addr & 0x1fffff];
return &iopMem->Main[addr & 0x7fffff];
}

#define psxSs8(mem) iopMem->Sif[(mem) & 0x00ff]
Expand Down
2 changes: 1 addition & 1 deletion pcsx2/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void memMapPhy()
// Main memory
vtlb_MapBlock(eeMem->Main, 0x00000000,Ps2MemSize::MainRam);//mirrored on first 256 mb ?
// High memory, uninstalled on the configuration we emulate
vtlb_MapBlock(eeMem->ExtraMemory, Ps2MemSize::ExtraRam, Ps2MemSize::ExtraRam);
vtlb_MapBlock(eeMem->ExtraMemory, 0x2000000, Ps2MemSize::ExtraRam);

// Various ROMs (all read-only)
vtlb_MapBlock(eeMem->ROM, 0x1fc00000, Ps2MemSize::Rom);
Expand Down

0 comments on commit ed5899f

Please sign in to comment.