From 448c1f5c7009f143a6f6f1885d880f6b70cd9527 Mon Sep 17 00:00:00 2001 From: brian218 <17809637+brian218@users.noreply.github.com> Date: Sat, 8 Oct 2022 00:42:18 +0800 Subject: [PATCH] Update sys_game_board_storage_read() --- rpcs3/Emu/Cell/lv2/sys_game.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_game.cpp b/rpcs3/Emu/Cell/lv2/sys_game.cpp index b68aac56676a..bfc0838f6b05 100644 --- a/rpcs3/Emu/Cell/lv2/sys_game.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_game.cpp @@ -18,26 +18,12 @@ error_code _sys_game_board_storage_read(vm::ptr buffer, u8 code) be_t psid[2] = { +g_cfg.sys.console_psid_high, +g_cfg.sys.console_psid_low }; u8* psid_bytes = reinterpret_cast(psid); - - switch (code) - { - case 0xC0: - case 0xF0: + u8 response[16] = { 0x01, 0xFC, 0x43, 0x50, 0xA7, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; + for (int i = 0; i < 16; i++) { - u8 response[16] = { 0x01, 0xFC, 0x43, 0x50, 0xA7, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; - for (int i = 0; i < 16; i++) - { - response[i] ^= psid_bytes[i]; - } - memcpy(buffer.get_ptr(), response, 16); - break; - } - default: - { - sys_game.error("sys_game_board_storage_read(): Unknown code 0x%02x", code); - break; - } + response[i] ^= psid_bytes[i]; } + memcpy(buffer.get_ptr(), response, 16); return CELL_OK; }