mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Another memstick ioctl, minor fixes
This commit is contained in:
parent
8e5fb74c12
commit
1b90a8b327
@ -261,7 +261,7 @@ void sceAudioOutput2OutputBlocking()
|
||||
int vol = PARAM(0);
|
||||
u32 dataPtr = PARAM(1);
|
||||
|
||||
ERROR_LOG(HLE,"UNIMPL sceAudioOutput2OutputBlocking(%i, %08x)", vol, dataPtr);
|
||||
WARN_LOG(HLE,"FAKE sceAudioOutput2OutputBlocking(%i, %08x)", vol, dataPtr);
|
||||
chans[0].running = true;
|
||||
chans[0].leftVolume = vol;
|
||||
chans[0].rightVolume = vol;
|
||||
|
@ -602,10 +602,27 @@ void sceIoDevctl() //(const char *name, int cmd, void *arg, size_t arglen, void
|
||||
}
|
||||
return;
|
||||
}
|
||||
case 0x02425823: // Check if valid
|
||||
if (Memory::IsValidAddress(outPtr))
|
||||
Memory::Write_U32(1, outPtr); // TODO: Make a headless mode for running tests!
|
||||
|
||||
case 0x02415823: // Set FAT as enabled
|
||||
if (Memory::IsValidAddress(argAddr) && argLen == 4) {
|
||||
MemoryStick_SetFatState((MemStickFatState)Memory::Read_U32(argAddr));
|
||||
RETURN(0);
|
||||
} else {
|
||||
ERROR_LOG(HLE, "Failed 0x02415823 fat");
|
||||
RETURN(-1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x02425823: // Check if FAT enabled
|
||||
if (Memory::IsValidAddress(outPtr) && outLen == 4) {
|
||||
Memory::Write_U32(MemoryStick_FatState(), outPtr);
|
||||
RETURN(0);
|
||||
} else {
|
||||
ERROR_LOG(HLE, "Failed 0x02425823 fat");
|
||||
RETURN(-1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x02425818: // Get memstick size etc
|
||||
// Pretend we have a 2GB memory stick.
|
||||
{
|
||||
|
@ -148,13 +148,13 @@ retry:
|
||||
break;
|
||||
}
|
||||
}
|
||||
// RETURN(0);
|
||||
//pop the thread that were released from waiting
|
||||
|
||||
// I don't think we should reschedule here
|
||||
//if (wokeThreads)
|
||||
// __KernelReSchedule("semaphore signalled");
|
||||
|
||||
RETURN(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -23,3 +23,8 @@ u64 MemoryStick_FreeSpace()
|
||||
{
|
||||
return 1ULL * 1024 * 1024 * 1024; // 1GB
|
||||
}
|
||||
|
||||
void MemoryStick_SetFatState(MemStickFatState state)
|
||||
{
|
||||
memStickFatState = state;
|
||||
}
|
||||
|
@ -17,5 +17,7 @@ enum MemStickFatState {
|
||||
MemStickState MemoryStick_State();
|
||||
MemStickFatState MemoryStick_FatState();
|
||||
|
||||
void MemoryStick_SetFatState(MemStickFatState state);
|
||||
|
||||
u64 MemoryStick_SectorSize();
|
||||
u64 MemoryStick_FreeSpace();
|
Loading…
Reference in New Issue
Block a user