mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Merge branch 'master' of github.com:hrydgard/ppsspp
This commit is contained in:
commit
8e3148587a
@ -116,12 +116,25 @@ PSPFileInfo MetaFileSystem::GetFileInfo(std::string filename)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Not sure where this should live. Seems a bit wrong putting it in common
|
||||
bool stringEndsWith (std::string const &fullString, std::string const &ending)
|
||||
{
|
||||
if (fullString.length() >= ending.length()) {
|
||||
return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<PSPFileInfo> MetaFileSystem::GetDirListing(std::string path)
|
||||
{
|
||||
std::string of;
|
||||
if (path.find(':') == std::string::npos)
|
||||
{
|
||||
path = currentDirectory + "/" + path;
|
||||
if (!stringEndsWith(currentDirectory, "/"))
|
||||
{
|
||||
path = currentDirectory + "/" + path;
|
||||
}
|
||||
DEBUG_LOG(HLE,"GetFileInfo: Expanded path to %s", path.c_str());
|
||||
}
|
||||
IFileSystem *system;
|
||||
|
@ -98,8 +98,8 @@ const HLEFunction sceRtc[] =
|
||||
{
|
||||
{0xC41C2853, sceRtcGetTickResolution, "sceRtcGetTickResolution"},
|
||||
{0x3f7ad767, sceRtcGetCurrentTick, "sceRtcGetCurrentTick"},
|
||||
{0x011F03C1, 0, "sceRtcGetAccumulativeTime"},
|
||||
{0x029CA3B3, 0, "sceRtcGetAccumlativeTime"},
|
||||
{0x011F03C1, sceRtcGetCurrentTick, "sceRtcGetAccumulativeTime"},
|
||||
{0x029CA3B3, sceRtcGetCurrentTick, "sceRtcGetAccumlativeTime"},
|
||||
{0x4cfa57b0, 0, "sceRtcGetCurrentClock"},
|
||||
{0xE7C27D1B, sceRtcGetCurrentClockLocalTime, "sceRtcGetCurrentClockLocalTime"},
|
||||
{0x34885E0D, 0, "sceRtcConvertUtcToLocalTime"},
|
||||
|
@ -259,6 +259,13 @@ void sceDisplayWaitVblankStartCB()
|
||||
__KernelCheckCallbacks();
|
||||
}
|
||||
|
||||
void sceDisplayWaitVblankStartMultiCB()
|
||||
{
|
||||
DEBUG_LOG(HLE,"sceDisplayWaitVblankStartMultiCB()");
|
||||
__KernelWaitCurThread(WAITTYPE_VBLANK, 0, 0, 0, true);
|
||||
__KernelCheckCallbacks();
|
||||
}
|
||||
|
||||
void sceDisplayGetVcount()
|
||||
{
|
||||
// Too spammy
|
||||
@ -297,7 +304,7 @@ const HLEFunction sceDisplay[] =
|
||||
{0x984C27E7,sceDisplayWaitVblankStart, "sceDisplayWaitVblankStart"},
|
||||
{0x8EB9EC49,sceDisplayWaitVblankCB, "sceDisplayWaitVblankCB"},
|
||||
{0x46F186C3,sceDisplayWaitVblankStartCB, "sceDisplayWaitVblankStartCB"},
|
||||
{0x77ed8b3a,0,"sceDisplayWaitVblankStartMultiCB"},
|
||||
{0x77ed8b3a,sceDisplayWaitVblankStartMultiCB,"sceDisplayWaitVblankStartMultiCB"},
|
||||
|
||||
{0xdba6c4c4,&WrapF_V<sceDisplayGetFramePerSec>,"sceDisplayGetFramePerSec"},
|
||||
{0x773dd3a3,sceDisplayGetCurrentHcount,"sceDisplayGetCurrentHcount"},
|
||||
|
@ -1288,8 +1288,8 @@ u32 __KernelCreateCallback(const char *name, u32 entrypoint, u32 commonArg)
|
||||
SceUID id = kernelObjects.Create(cb);
|
||||
|
||||
cb->nc.size = sizeof(NativeCallback);
|
||||
strcpy(cb->nc.name, name);
|
||||
|
||||
strncpy(cb->nc.name, name, 32);
|
||||
|
||||
cb->nc.entrypoint = entrypoint;
|
||||
cb->nc.threadId = __KernelGetCurThread();
|
||||
cb->nc.commonArgument = commonArg;
|
||||
|
@ -31,6 +31,7 @@
|
||||
u8 umdActivated = 1;
|
||||
u32 umdStatus = 0;
|
||||
u32 umdErrorStat = 0;
|
||||
static int driveCBId= -1;
|
||||
|
||||
|
||||
#define PSP_UMD_TYPE_GAME 0x10
|
||||
@ -46,6 +47,7 @@ void __UmdInit() {
|
||||
umdActivated = 1;
|
||||
umdStatus = 0;
|
||||
umdErrorStat = 0;
|
||||
driveCBId = -1;
|
||||
}
|
||||
|
||||
u8 __KernelUmdGetState()
|
||||
@ -120,12 +122,21 @@ u32 sceUmdDeactivate(u32 unknown, const char *name)
|
||||
u32 sceUmdRegisterUMDCallBack(u32 cbId)
|
||||
{
|
||||
DEBUG_LOG(HLE,"0=sceUmdRegisterUMDCallback(id=%i)",PARAM(0));
|
||||
if (driveCBId == -1)
|
||||
{
|
||||
driveCBId = cbId;
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(HLE," 0=sceUmdRegisterUMDCallback(id=%i) callback overwrite attempt",PARAM(0));
|
||||
}
|
||||
return __KernelRegisterCallback(THREAD_CALLBACK_UMD, cbId);
|
||||
}
|
||||
|
||||
u32 sceUmdUnRegisterUMDCallBack(u32 cbId)
|
||||
{
|
||||
DEBUG_LOG(HLE,"0=sceUmdUnRegisterUMDCallBack(id=%i)",PARAM(0));
|
||||
driveCBId = -1;
|
||||
return __KernelUnregisterCallback(THREAD_CALLBACK_UMD, cbId);
|
||||
}
|
||||
|
||||
@ -147,25 +158,37 @@ u32 sceUmdGetDriveStat()
|
||||
void sceUmdWaitDriveStat()
|
||||
{
|
||||
u32 stat = PARAM(0);
|
||||
ERROR_LOG(HLE,"UNIMPL 0=sceUmdWaitDriveStat(stat = %08x)", stat);
|
||||
//if ((stat & __KernelUmdGetState()) != stat)
|
||||
// __KernelWaitCurThread(WAITTYPE_UMD, 0, stat, 0, 0); //__KernelWaitCurThread(WAITTYPE_UMD, 0);
|
||||
DEBUG_LOG(HLE,"HACK 0=sceUmdWaitDriveStat(stat = %08x)", stat);
|
||||
if ((stat & __KernelUmdGetState()) != stat)
|
||||
__KernelWaitCurThread(WAITTYPE_UMD, 0, stat, 0, 0); //__KernelWaitCurThread(WAITTYPE_UMD, 0);
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
void sceUmdWaitDriveStatWithTimer()
|
||||
{
|
||||
u32 stat = PARAM(0);
|
||||
ERROR_LOG(HLE,"UNIMPL 0=sceUmdWaitDriveStatWithTimer(stat = %08x)", stat);
|
||||
//__KernelWaitCurThread(WAITTYPE_UMD, 0);
|
||||
u32 timeout = PARAM(1);
|
||||
DEBUG_LOG(HLE,"HACK 0=sceUmdWaitDriveStatWithTimer(stat = %08x)", stat);
|
||||
if ((stat & __KernelUmdGetState()) != stat)
|
||||
__KernelWaitCurThread(WAITTYPE_UMD, 0, stat, 0, 0); //__KernelWaitCurThread(WAITTYPE_UMD, 0);
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
void sceUmdWaitDriveStatCB()
|
||||
{
|
||||
u32 stat = PARAM(0);
|
||||
ERROR_LOG(HLE,"UNIMPL 0=sceUmdWaitDriveStatCB(stat = %08x)", stat);
|
||||
//__KernelWaitCurThread(WAITTYPE_UMD, 0);
|
||||
DEBUG_LOG(HLE,"HACK 0=sceUmdWaitDriveStatCB(stat = %08x)", stat);
|
||||
// Immediately notify
|
||||
RETURN(0);
|
||||
if (driveCBId != -1)
|
||||
{
|
||||
__KernelNotifyCallbackType(THREAD_CALLBACK_UMD, driveCBId, __KernelUmdGetState()&stat);
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(HLE, "HACK 0=sceUmdWaitDriveStatCB(stat = %08x) attempting to call unset callback", stat);
|
||||
}
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ void sceUtilitySavedataInitStart()
|
||||
{
|
||||
SceUtilitySavedataParam *param = (SceUtilitySavedataParam*)Memory::GetPointer(PARAM(0));
|
||||
|
||||
DEBUG_LOG(HLE,"sceUtilitySavedataInitStart(%08x)", PARAM(0));
|
||||
DEBUG_LOG(HLE,"sceUtilitySavedataInitStart(%08x)", PARAM(0));
|
||||
DEBUG_LOG(HLE,"Mode: %i", param->mode);
|
||||
if (param->mode == 0) //load
|
||||
{
|
||||
@ -210,9 +210,11 @@ void sceUtilitySavedataInitStart()
|
||||
|
||||
__UtilityInitStart();
|
||||
|
||||
|
||||
// Returning 0 here breaks Bust a Move Deluxe! But should be the right thing to do...
|
||||
// At least Cohort Chess expects this to return 0 or it locks up..
|
||||
// The fix is probably to fully implement sceUtility so that it actually works.
|
||||
// RETURN(0);
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
void sceUtilitySavedataShutdownStart()
|
||||
|
@ -1 +1 @@
|
||||
NDK_MODULE_PATH=..:../native/ext $NDK/ndk-build -j 3
|
||||
NDK_MODULE_PATH=..:../native/ext $NDK/ndk-build -j3 TARGET_PLATFORM=android-9 $*
|
||||
|
@ -68,7 +68,7 @@ LOCAL_SRC_FILES := \
|
||||
$(SRC)/Common/ThunkARM.cpp \
|
||||
$(SRC)/Common/Misc.cpp \
|
||||
$(SRC)/GPU/Math3D.cpp \
|
||||
$(SRC)/GPU/GpuState.cpp \
|
||||
$(SRC)/GPU/GPUState.cpp \
|
||||
$(SRC)/GPU/GLES/Framebuffer.cpp \
|
||||
$(SRC)/GPU/GLES/DisplayListInterpreter.cpp \
|
||||
$(SRC)/GPU/GLES/TextureCache.cpp \
|
||||
@ -89,7 +89,7 @@ LOCAL_SRC_FILES := \
|
||||
$(SRC)/Core/Loaders.cpp \
|
||||
$(SRC)/Core/PSPLoaders.cpp \
|
||||
$(SRC)/Core/MemMap.cpp \
|
||||
$(SRC)/Core/MemmapFunctions.cpp \
|
||||
$(SRC)/Core/MemMapFunctions.cpp \
|
||||
$(SRC)/Core/System.cpp \
|
||||
$(SRC)/Core/PSPMixer.cpp \
|
||||
$(SRC)/Core/Debugger/Breakpoints.cpp \
|
||||
|
Loading…
Reference in New Issue
Block a user