diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index 7d57efb8fb..b7be83d8f3 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -273,7 +273,7 @@ u32 ISOFileSystem::OpenFile(std::string filename, FileAccess access) { u32 sectorStart = 0xFFFFFFFF, readSize = 0xFFFFFFFF; parseLBN(filename, §orStart, &readSize); - INFO_LOG(FILESYS, "Got a raw sector read %s, sector %08x, size %08x", filename.c_str(), sectorStart, readSize); + INFO_LOG(FILESYS, "Got a raw sector open: %s, sector %08x, size %08x", filename.c_str(), sectorStart, readSize); u32 newHandle = hAlloc->GetNewHandle(); entry.seekPos = 0; entry.file = 0; diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 2beb1ede04..46d1e21197 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -256,11 +256,11 @@ void sceIoGetstat() { const char *filename = Memory::GetCharPointer(PARAM(0)); u32 addr = PARAM(1); - DEBUG_LOG(HLE,"sceIoGetstat(%s, %08x)",filename,addr); SceIoStat *stat = (SceIoStat*)Memory::GetPointer(addr); PSPFileInfo info = pspFileSystem.GetFileInfo(filename); __IoGetStat(stat, info); + DEBUG_LOG(HLE,"sceIoGetstat(%s, %08x) : sector = %08x",filename,addr,info.startSector); RETURN(0); } diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 168e51b139..879996780c 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -825,8 +825,11 @@ u32 sceKernelStartThread() //now copy argument to stack for (int i = 0; i < (int)argSize; i++) - Memory::Write_U8(Memory::Read_U8(argBlockPtr + i), sp + i); + Memory::Write_U8(argBlockPtr ? Memory::Read_U8(argBlockPtr + i) : 0, sp + i); + if (!argBlockPtr && argSize > 0) { + WARN_LOG(HLE,"sceKernelStartThread : had NULL arg"); + } return 0; } else diff --git a/Core/HLE/sceUmd.cpp b/Core/HLE/sceUmd.cpp index 06b802279f..635a226da2 100644 --- a/Core/HLE/sceUmd.cpp +++ b/Core/HLE/sceUmd.cpp @@ -83,10 +83,9 @@ void sceUmdActivate() { u32 unknown = PARAM(0); const char *name = Memory::GetCharPointer(PARAM(1)); - u32 retVal = 1; + u32 retVal = 0; __KernelUmdActivate(); DEBUG_LOG(HLE,"%i=sceUmdActivate(%08x, %s)", retVal, unknown, name); - //__KernelUMDActivate(); RETURN(retVal); } diff --git a/Core/HLE/sceUtility.cpp b/Core/HLE/sceUtility.cpp index 31dc0580a5..956e1e4e8f 100644 --- a/Core/HLE/sceUtility.cpp +++ b/Core/HLE/sceUtility.cpp @@ -379,9 +379,15 @@ void sceUtilityGetSystemParamInt() RETURN(0); } +u32 sceUtilityLoadNetModule(u32 module) +{ + DEBUG_LOG(HLE,"FAKE: sceUtilityLoadNetModule(%i)", module); + return 0; +} + const HLEFunction sceUtility[] = { - {0x1579a159, 0, "sceUtilityLoadNetModule"}, + {0x1579a159, &WrapU_U, "sceUtilityLoadNetModule"}, {0xf88155f6, 0, "sceUtilityNetconfShutdownStart"}, {0x4db1e739, 0, "sceUtilityNetconfInitStart"}, {0x91e70e35, 0, "sceUtilityNetconfUpdate"}, diff --git a/Core/MIPS/MIPS.cpp b/Core/MIPS/MIPS.cpp index 48ec684729..67171894d1 100644 --- a/Core/MIPS/MIPS.cpp +++ b/Core/MIPS/MIPS.cpp @@ -126,7 +126,7 @@ void MIPSState::RunLoopUntil(u64 globalTicks) #ifdef _DEBUG while (CoreTiming::downcount >= 0 && coreState == CORE_RUNNING) #else - while (CoreTiming::downcount >= 0) + while (CoreTiming::downcount >= 0 && mipsr4k.pc) #endif { // int cycles = 0; diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index f666f7e776..fb3df6beb9 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -302,22 +302,30 @@ namespace MIPSInt } + void Int_RType3(u32 op) { int rt = _RT; int rs = _RS; int rd = _RD; + static bool has_warned = false; switch (op & 63) { case 10: if (R(rt) == 0) R(rd) = R(rs); break; //movz case 11: if (R(rt) != 0) R(rd) = R(rs); break; //movn case 32: - ERROR_LOG(HLE,"WARNING : exception-causing add at %08x", PC); + if (!has_warned) { + ERROR_LOG(HLE,"WARNING : exception-causing add at %08x", PC); + has_warned = true; + } R(rd) = R(rs) + R(rt); break; //add case 33: R(rd) = R(rs) + R(rt); break; //addu case 34: - ERROR_LOG(HLE,"WARNING : exception-causing sub at %08x", PC); + if (!has_warned) { + ERROR_LOG(HLE,"WARNING : exception-causing sub at %08x", PC); + has_warned = true; + } R(rd) = R(rs) - R(rt); break; //sub case 35: R(rd) = R(rs) - R(rt); break; //subu case 36: R(rd) = R(rs) & R(rt); break; //and