mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-20 23:54:48 +00:00
Add vcmp ES condition code, uncached mirror of scratchpad
This commit is contained in:
parent
c61d10363a
commit
48bc1afe26
@ -81,8 +81,10 @@ void sceKernelSysClock2USec()
|
||||
Memory::ReadStruct(PARAM(0), &clock);
|
||||
DEBUG_LOG(HLE, "sceKernelSysClock2USec(clock = , lo = %08x, hi = %08x)", PARAM(1), PARAM(2));
|
||||
u64 time = clock.lo | ((u64)clock.hi << 32);
|
||||
Memory::Write_U32((u32)(time / 1000000), PARAM(1));
|
||||
Memory::Write_U32((u32)(time % 1000000), PARAM(2));
|
||||
if (Memory::IsValidAddress(PARAM(1)))
|
||||
Memory::Write_U32((u32)(time / 1000000), PARAM(1));
|
||||
if (Memory::IsValidAddress(PARAM(2)))
|
||||
Memory::Write_U32((u32)(time % 1000000), PARAM(2));
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
@ -90,8 +92,10 @@ void sceKernelSysClock2USecWide()
|
||||
{
|
||||
u64 clock = PARAM(0) | ((u64)PARAM(1) << 32);
|
||||
DEBUG_LOG(HLE, "sceKernelSysClock2USecWide(clock = %llu, lo = %08x, hi = %08x)", clock, PARAM(2), PARAM(3));
|
||||
Memory::Write_U32((u32)(clock / 1000000), PARAM(2));
|
||||
Memory::Write_U32((u32)(clock % 1000000), PARAM(3));
|
||||
if (Memory::IsValidAddress(PARAM(2)))
|
||||
Memory::Write_U32((u32)(clock / 1000000), PARAM(2));
|
||||
if (Memory::IsValidAddress(PARAM(3)))
|
||||
Memory::Write_U32((u32)(clock % 1000000), PARAM(3));
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -1052,6 +1052,7 @@ namespace MIPSInt
|
||||
case VC_GT: c = s[i] > t[i]; break;
|
||||
case VC_GE: c = s[i] >= t[i]; break;
|
||||
case VC_NZ: c = s[i] != 0; break;
|
||||
case VC_ES: c = (s[i] != s[i]) || (s[i] == std::numeric_limits<float>::infinity()); break; // Tekken Dark Resurrection
|
||||
default:
|
||||
_dbg_assert_msg_(CPU,0,"Unsupported vcmp condition code"); //, cond);
|
||||
return;
|
||||
|
@ -45,6 +45,7 @@ u8 *m_pScratchPad;
|
||||
u8 *m_pVRAM;
|
||||
|
||||
u8 *m_pPhysicalScratchPad;
|
||||
u8 *m_pUncachedScratchPad;
|
||||
// 64-bit: Pointers to high-mem mirrors
|
||||
// 32-bit: Same as above
|
||||
u8 *m_pPhysicalRAM;
|
||||
@ -59,6 +60,7 @@ u8 *m_pUncachedVRAM;
|
||||
static const MemoryView views[] =
|
||||
{
|
||||
{&m_pScratchPad, &m_pPhysicalScratchPad, 0x00010000, SCRATCHPAD_SIZE, 0},
|
||||
{NULL, &m_pUncachedScratchPad, 0x40010000, SCRATCHPAD_SIZE, MV_MIRROR_PREVIOUS},
|
||||
{&m_pVRAM, &m_pPhysicalVRAM, 0x04000000, 0x00800000, 0},
|
||||
{NULL, &m_pUncachedVRAM, 0x44000000, 0x00800000, MV_MIRROR_PREVIOUS},
|
||||
{&m_pRAM, &m_pPhysicalRAM, 0x08000000, RAM_SIZE, 0}, // only from 0x08800000 is it usable (last 24 megs)
|
||||
|
@ -48,9 +48,9 @@ u8 *GetPointer(const u32 address)
|
||||
{
|
||||
return m_pVRAM + (address & VRAM_MASK);
|
||||
}
|
||||
else if ((address & 0xFFFF0000) == 0x00010000)
|
||||
else if ((address & 0xBFFF0000) == 0x00010000)
|
||||
{
|
||||
return m_pScratchPad + (address & VRAM_MASK);
|
||||
return m_pScratchPad + (address & SCRATCHPAD_MASK);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -75,7 +75,7 @@ inline void ReadFromHardware(T &var, const u32 address)
|
||||
{
|
||||
var = *((const T*)&m_pVRAM[address & VRAM_MASK]);
|
||||
}
|
||||
else if ((address & 0xFFFF0000) == 0x00010000)
|
||||
else if ((address & 0xBFFF0000) == 0x00010000)
|
||||
{
|
||||
// Scratchpad
|
||||
var = *((const T*)&m_pScratchPad[address & SCRATCHPAD_MASK]);
|
||||
@ -104,7 +104,7 @@ inline void WriteToHardware(u32 address, const T data)
|
||||
{
|
||||
*(T*)&m_pVRAM[address & VRAM_MASK] = data;
|
||||
}
|
||||
else if ((address & 0xFFFF0000) == 0x00010000)
|
||||
else if ((address & 0xBFFF0000) == 0x00010000)
|
||||
{
|
||||
*(T*)&m_pScratchPad[address & SCRATCHPAD_MASK] = data;
|
||||
}
|
||||
@ -130,7 +130,7 @@ bool IsValidAddress(const u32 address)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((address & 0xFFFF0000) == 0x00010000)
|
||||
else if ((address & 0xBFFF0000) == 0x00010000)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ bool Load_PSP_ISO(const char *filename, std::string *error_string)
|
||||
{
|
||||
u8 head[4];
|
||||
pspFileSystem.ReadFile(fd, head, 4);
|
||||
if (memcmp(head, "~PSP", 4) == 0)
|
||||
if (memcmp(head, "~PSP", 4) == 0) // || memcmp(head + 1, "ELF", 3) == 0)
|
||||
{
|
||||
hasEncrypted = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user