Recover matching status
This commit is contained in:
parent
1acc0961d4
commit
30c462a8ef
4 changed files with 12 additions and 26 deletions
|
|
@ -57,8 +57,8 @@ u32 OSUncachedToCached(void *ucaddr);
|
|||
|
||||
#define OSDiffTick(tick1, tick0) ((s32)(tick1) - (s32)(tick0))
|
||||
|
||||
#define OSRoundUp32B(x) (((u32)(x) + 0x1F) & ~(0x1F))
|
||||
#define OSRoundDown32B(x) (((u32)(x)) & ~(0x1F))
|
||||
#define OSRoundUp32B(x) (((size_t)(x) + 0x1F) & ~(0x1F))
|
||||
#define OSRoundDown32B(x) (((size_t)(x)) & ~(0x1F))
|
||||
|
||||
#define OSRoundUp(x, align) (((x) + (align)-1) & (-(align)))
|
||||
#define OSRoundUpPtr(x, align) ((void*)((((u32)(x)) + (align)-1) & (~((align)-1))))
|
||||
|
|
|
|||
|
|
@ -197,8 +197,8 @@ static inline void GWRumbleSet(s32 value)
|
|||
{
|
||||
GWGameStat.rumble = value;
|
||||
if (value == 0) {
|
||||
// TODO: get rumble working
|
||||
// HuPadRumbleAllStop();
|
||||
// TODO PC: get rumble working
|
||||
HuPadRumbleAllStop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -350,16 +350,16 @@ void *OSInitAlloc(void *arenaStart, void *arenaEnd, int maxHeaps)
|
|||
}
|
||||
__OSCurrHeap = -1;
|
||||
arenaStart = (void *)((uintptr_t)((char *)HeapArray + arraySize));
|
||||
arenaStart = (void *)(((uintptr_t)arenaStart + 0x1F) & 0xFFFFFFFFFFFFFFE0);
|
||||
arenaStart = (void *)(((uintptr_t)arenaStart + 0x1F) & ~0x1F);
|
||||
ArenaStart = arenaStart;
|
||||
ArenaEnd = (void *)((uintptr_t)arenaEnd & 0xFFFFFFFFFFFFFFE0);
|
||||
ArenaEnd = (void *)((uintptr_t)arenaEnd & ~0x1F);
|
||||
ASSERTMSG1(0x2A4, ((uintptr_t)ArenaEnd - (uintptr_t)ArenaStart) >= 0x40U, "OSInitAlloc(): too small range.");
|
||||
return arenaStart;
|
||||
}
|
||||
|
||||
uintptr_t OSCreateHeap(void *start, void *end)
|
||||
{
|
||||
uintptr_t heap;
|
||||
s32 heap;
|
||||
struct HeapDesc *hd;
|
||||
struct Cell *cell;
|
||||
|
||||
|
|
|
|||
|
|
@ -144,13 +144,8 @@ static void InitMem()
|
|||
uintptr_t *fb1;
|
||||
uintptr_t *fb2;
|
||||
u32 i;
|
||||
#ifdef TARGET_PC
|
||||
DemoFrameBuffer1 = (void *)arena_lo;
|
||||
DemoFrameBuffer2 = (void *)((uintptr_t)DemoFrameBuffer1 + fb_size);
|
||||
#else
|
||||
DemoFrameBuffer1 = (void *)OSRoundUp32B((u32)arena_lo);
|
||||
DemoFrameBuffer2 = (void *)OSRoundUp32B((u32)DemoFrameBuffer1 + fb_size);
|
||||
#endif
|
||||
DemoFrameBuffer1 = (void *)OSRoundUp32B((uintptr_t)arena_lo);
|
||||
DemoFrameBuffer2 = (void *)OSRoundUp32B((uintptr_t)DemoFrameBuffer1 + fb_size);
|
||||
DemoCurrentBuffer = DemoFrameBuffer2;
|
||||
#if VERSION_PAL
|
||||
fb1 = DemoFrameBuffer1;
|
||||
|
|
@ -161,26 +156,17 @@ static void InitMem()
|
|||
DCStoreRangeNoSync(DemoFrameBuffer1, fb_size);
|
||||
DCStoreRangeNoSync(DemoFrameBuffer2, fb_size);
|
||||
#endif
|
||||
#ifdef TARGET_PC
|
||||
arena_lo = (void *)((uintptr_t)DemoFrameBuffer2 + fb_size);
|
||||
#else
|
||||
arena_lo = (void *)OSRoundUp32B((u32)DemoFrameBuffer2 + fb_size);
|
||||
#endif
|
||||
arena_lo = (void *)OSRoundUp32B((uintptr_t)DemoFrameBuffer2 + fb_size);
|
||||
OSSetArenaLo(arena_lo);
|
||||
if(OSGetConsoleType() == OS_CONSOLE_DEVHW1 && OSGetPhysicalMemSize() != 0x400000 && OSGetConsoleSimulatedMemSize() < 0x1800000) {
|
||||
LoadMemInfo();
|
||||
} else {
|
||||
#ifdef TARGET_PC
|
||||
arena_lo = OSGetArenaLo();
|
||||
arena_hi = OSGetArenaHi();
|
||||
#else
|
||||
arena_lo = (void *)OSRoundUp32B((u32)arena_lo);
|
||||
arena_hi = (void *)OSRoundDown32B((u32)arena_hi);
|
||||
#endif
|
||||
arena_lo = OSInitAlloc(arena_lo, arena_hi, 1);
|
||||
OSSetArenaLo(arena_lo);
|
||||
arena_lo = (void *)arena_lo;
|
||||
arena_hi = (void *)arena_hi;
|
||||
arena_lo = (void *)OSRoundUp32B((uintptr_t)arena_lo);
|
||||
arena_hi = (void *)OSRoundDown32B((uintptr_t)arena_hi);
|
||||
OSSetCurrentHeap(currentHeapHandle = OSCreateHeap(arena_lo, arena_hi));
|
||||
arena_lo = arena_hi;
|
||||
OSSetArenaLo(arena_lo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue