mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-15 03:08:36 +12:00
Implemented sys_game_board_storage_read()
This commit is contained in:
parent
905496e926
commit
75efc79930
8 changed files with 52 additions and 4 deletions
|
@ -188,6 +188,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||||
Cell/lv2/sys_event.cpp
|
Cell/lv2/sys_event.cpp
|
||||||
Cell/lv2/sys_event_flag.cpp
|
Cell/lv2/sys_event_flag.cpp
|
||||||
Cell/lv2/sys_fs.cpp
|
Cell/lv2/sys_fs.cpp
|
||||||
|
Cell/lv2/sys_game.cpp
|
||||||
Cell/lv2/sys_gamepad.cpp
|
Cell/lv2/sys_gamepad.cpp
|
||||||
Cell/lv2/sys_gpio.cpp
|
Cell/lv2/sys_gpio.cpp
|
||||||
Cell/lv2/sys_hid.cpp
|
Cell/lv2/sys_hid.cpp
|
||||||
|
@ -339,7 +340,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||||
Cell/Modules/sceNpUtil.cpp
|
Cell/Modules/sceNpUtil.cpp
|
||||||
Cell/Modules/StaticHLE.cpp
|
Cell/Modules/StaticHLE.cpp
|
||||||
Cell/Modules/sys_crashdump.cpp
|
Cell/Modules/sys_crashdump.cpp
|
||||||
Cell/Modules/sys_game.cpp
|
Cell/Modules/sys_game_.cpp
|
||||||
Cell/Modules/sys_heap.cpp
|
Cell/Modules/sys_heap.cpp
|
||||||
Cell/Modules/sys_io_.cpp
|
Cell/Modules/sys_io_.cpp
|
||||||
Cell/Modules/sys_libc_.cpp
|
Cell/Modules/sys_libc_.cpp
|
||||||
|
|
|
@ -3280,6 +3280,7 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
|
||||||
{
|
{
|
||||||
std::unordered_map<std::string, u64> link_table
|
std::unordered_map<std::string, u64> link_table
|
||||||
{
|
{
|
||||||
|
{ "sys_game_board_storage_read", reinterpret_cast<u64>(ppu_execute_syscall) },
|
||||||
{ "__trap", reinterpret_cast<u64>(&ppu_trap) },
|
{ "__trap", reinterpret_cast<u64>(&ppu_trap) },
|
||||||
{ "__error", reinterpret_cast<u64>(&ppu_error) },
|
{ "__error", reinterpret_cast<u64>(&ppu_error) },
|
||||||
{ "__check", reinterpret_cast<u64>(&ppu_check) },
|
{ "__check", reinterpret_cast<u64>(&ppu_check) },
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "sys_cond.h"
|
#include "sys_cond.h"
|
||||||
#include "sys_event.h"
|
#include "sys_event.h"
|
||||||
#include "sys_event_flag.h"
|
#include "sys_event_flag.h"
|
||||||
|
#include "sys_game.h"
|
||||||
#include "sys_interrupt.h"
|
#include "sys_interrupt.h"
|
||||||
#include "sys_memory.h"
|
#include "sys_memory.h"
|
||||||
#include "sys_mmapper.h"
|
#include "sys_mmapper.h"
|
||||||
|
@ -451,7 +452,7 @@ const std::array<std::pair<ppu_intrp_func_t, std::string_view>, 1024> g_ppu_sysc
|
||||||
null_func,//BIND_SYSC(sys_...), //407 (0x197) PM
|
null_func,//BIND_SYSC(sys_...), //407 (0x197) PM
|
||||||
NULL_FUNC(sys_sm_get_tzpb), //408 (0x198) PM
|
NULL_FUNC(sys_sm_get_tzpb), //408 (0x198) PM
|
||||||
NULL_FUNC(sys_sm_get_fan_policy), //409 (0x199) PM
|
NULL_FUNC(sys_sm_get_fan_policy), //409 (0x199) PM
|
||||||
NULL_FUNC(sys_game_board_storage_read), //410 (0x19A)
|
BIND_SYSC(_sys_game_board_storage_read), //410 (0x19A)
|
||||||
NULL_FUNC(sys_game_board_storage_write), //411 (0x19B)
|
NULL_FUNC(sys_game_board_storage_write), //411 (0x19B)
|
||||||
NULL_FUNC(sys_game_get_rtc_status), //412 (0x19C)
|
NULL_FUNC(sys_game_get_rtc_status), //412 (0x19C)
|
||||||
null_func,//BIND_SYSC(sys_...), //413 (0x19D) ROOT
|
null_func,//BIND_SYSC(sys_...), //413 (0x19D) ROOT
|
||||||
|
|
34
rpcs3/Emu/Cell/lv2/sys_game.cpp
Normal file
34
rpcs3/Emu/Cell/lv2/sys_game.cpp
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#include "stdafx.h"
|
||||||
|
#include "Emu/Memory/vm_ptr.h"
|
||||||
|
#include "Emu/Cell/ErrorCodes.h"
|
||||||
|
|
||||||
|
#include "sys_game.h"
|
||||||
|
|
||||||
|
LOG_CHANNEL(sys_game);
|
||||||
|
|
||||||
|
error_code _sys_game_board_storage_read(vm::ptr<u8> buffer, u8 code)
|
||||||
|
{
|
||||||
|
sys_game.trace("sys_game_board_storage_read(buffer=*0x%x, code=0x%02x)", buffer, code);
|
||||||
|
|
||||||
|
if (!buffer)
|
||||||
|
{
|
||||||
|
return CELL_EFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (code)
|
||||||
|
{
|
||||||
|
case 0xF0:
|
||||||
|
{
|
||||||
|
constexpr u8 response[16] = { 0x01, 0xFC, 0x43, 0x50, 0xA7, 0x9B, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
|
||||||
|
memcpy(buffer.get_ptr(), response, 16);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
sys_game.error("sys_game_board_storage_read(): Unknown code 0x%02x", code);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return CELL_OK;
|
||||||
|
}
|
3
rpcs3/Emu/Cell/lv2/sys_game.h
Normal file
3
rpcs3/Emu/Cell/lv2/sys_game.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
error_code _sys_game_board_storage_read(vm::ptr<u8> data, u8 type);
|
|
@ -62,6 +62,7 @@
|
||||||
<ExcludedFromBuild>true</ExcludedFromBuild>
|
<ExcludedFromBuild>true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Emu\cache_utils.cpp" />
|
<ClCompile Include="Emu\cache_utils.cpp" />
|
||||||
|
<ClCompile Include="Emu\Cell\lv2\sys_game.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\cellMusicSelectionContext.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\cellMusicSelectionContext.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\libfs_utility_init.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\libfs_utility_init.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_crashdump.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sys_crashdump.cpp" />
|
||||||
|
@ -341,7 +342,7 @@
|
||||||
<ClCompile Include="Emu\Cell\Modules\sceNpUtil.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sceNpUtil.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sceNpPlus.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sceNpPlus.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sysPrxForUser.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sysPrxForUser.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_game.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sys_game_.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_heap.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sys_heap.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_io_.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sys_io_.cpp" />
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_libc.cpp" />
|
<ClCompile Include="Emu\Cell\Modules\sys_libc.cpp" />
|
||||||
|
@ -472,6 +473,7 @@
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Emu\cache_utils.hpp" />
|
<ClInclude Include="Emu\cache_utils.hpp" />
|
||||||
<ClInclude Include="Emu\Cell\lv2\sys_crypto_engine.h" />
|
<ClInclude Include="Emu\Cell\lv2\sys_crypto_engine.h" />
|
||||||
|
<ClInclude Include="Emu\Cell\lv2\sys_game.h" />
|
||||||
<ClInclude Include="Emu\Cell\Modules\cellCrossController.h" />
|
<ClInclude Include="Emu\Cell\Modules\cellCrossController.h" />
|
||||||
<ClInclude Include="Emu\Cell\Modules\cellMusicDecode.h" />
|
<ClInclude Include="Emu\Cell\Modules\cellMusicDecode.h" />
|
||||||
<ClInclude Include="Emu\Cell\Modules\cellRec.h" />
|
<ClInclude Include="Emu\Cell\Modules\cellRec.h" />
|
||||||
|
|
|
@ -642,7 +642,7 @@
|
||||||
<ClCompile Include="Emu\Cell\Modules\sceNpPlus.cpp">
|
<ClCompile Include="Emu\Cell\Modules\sceNpPlus.cpp">
|
||||||
<Filter>Emu\Cell\Modules</Filter>
|
<Filter>Emu\Cell\Modules</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_game.cpp">
|
<ClCompile Include="Emu\Cell\Modules\sys_game_.cpp">
|
||||||
<Filter>Emu\Cell\Modules</Filter>
|
<Filter>Emu\Cell\Modules</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="Emu\Cell\Modules\sys_heap.cpp">
|
<ClCompile Include="Emu\Cell\Modules\sys_heap.cpp">
|
||||||
|
@ -1093,6 +1093,9 @@
|
||||||
<ClCompile Include="..\Utilities\stack_trace.cpp">
|
<ClCompile Include="..\Utilities\stack_trace.cpp">
|
||||||
<Filter>Utilities</Filter>
|
<Filter>Utilities</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Emu\Cell\lv2\sys_game.cpp">
|
||||||
|
<Filter>Emu\Cell\lv2</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="Crypto\aes.h">
|
<ClInclude Include="Crypto\aes.h">
|
||||||
|
@ -2179,6 +2182,9 @@
|
||||||
<ClInclude Include="..\Utilities\stack_trace.h">
|
<ClInclude Include="..\Utilities\stack_trace.h">
|
||||||
<Filter>Utilities</Filter>
|
<Filter>Utilities</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Emu\Cell\lv2\sys_game.h">
|
||||||
|
<Filter>Emu\Cell\lv2</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl">
|
<None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue