Compare commits

...

3 Commits

Author SHA1 Message Date
georgemoralis 4ab2f0398c reduced more logging and a savedata case 2024-06-10 19:35:53 +03:00
georgemoralis fa225b60fc changed some spamming to trace 2024-06-10 18:56:10 +03:00
georgemoralis e576bc99ba special case for sceKernelWrite (stdin,stdout,stderr) 2024-06-10 18:46:06 +03:00
4 changed files with 14 additions and 3 deletions

View File

@ -93,6 +93,14 @@ size_t PS4_SYSV_ABI sceKernelWrite(int d, void* buf, size_t nbytes) {
if (buf == nullptr) { if (buf == nullptr) {
return SCE_KERNEL_ERROR_EFAULT; return SCE_KERNEL_ERROR_EFAULT;
} }
if (d <= 2) { // stdin,stdout,stderr
char* str = strdup((const char*)buf);
if (str[nbytes - 1] == '\n')
str[nbytes - 1] = 0;
LOG_INFO(Tty, "{}", str);
free(str);
return nbytes;
}
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance(); auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
auto* file = h->GetFile(d); auto* file = h->GetFile(d);
if (file == nullptr) { if (file == nullptr) {

View File

@ -526,7 +526,7 @@ int PS4_SYSV_ABI scePthreadMutexLock(ScePthreadMutex* mutex) {
int result = pthread_mutex_lock(&(*mutex)->pth_mutex); int result = pthread_mutex_lock(&(*mutex)->pth_mutex);
if (result != 0) { if (result != 0) {
LOG_INFO(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); LOG_TRACE(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result);
} }
switch (result) { switch (result) {
case 0: case 0:
@ -549,7 +549,7 @@ int PS4_SYSV_ABI scePthreadMutexUnlock(ScePthreadMutex* mutex) {
int result = pthread_mutex_unlock(&(*mutex)->pth_mutex); int result = pthread_mutex_unlock(&(*mutex)->pth_mutex);
if (result != 0) { if (result != 0) {
LOG_INFO(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); LOG_TRACE(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result);
} }
switch (result) { switch (result) {
case 0: case 0:
@ -1133,7 +1133,7 @@ int PS4_SYSV_ABI scePthreadMutexTrylock(ScePthreadMutex* mutex) {
int result = pthread_mutex_trylock(&(*mutex)->pth_mutex); int result = pthread_mutex_trylock(&(*mutex)->pth_mutex);
if (result != 0) { if (result != 0) {
LOG_INFO(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result); LOG_TRACE(Kernel_Pthread, "name={}, result={}", (*mutex)->name, result);
} }
switch (result) { switch (result) {
case 0: case 0:

View File

@ -352,6 +352,7 @@ s32 saveDataMount(u32 user_id, std::string dir_name, u32 mount_mode,
strncpy(mount_result->mount_point.data, g_mount_point.c_str(), 16); strncpy(mount_result->mount_point.data, g_mount_point.c_str(), 16);
} break; } break;
case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR: case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR:
case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDONLY:
case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR | case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR |
ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON:
case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_DESTRUCT_OFF | case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_DESTRUCT_OFF |

View File

@ -102,6 +102,8 @@ void Emulator::Run(const std::filesystem::path& file) {
found = true; found = true;
LOG_INFO(Loader, "Loading {}", entry.path().string().c_str()); LOG_INFO(Loader, "Loading {}", entry.path().string().c_str());
linker->LoadModule(entry.path()); linker->LoadModule(entry.path());
} else {
LOG_ERROR(Loader, "Skipped loading module {}", entry.path().string().c_str());
} }
} }
} }