mirror of
https://github.com/patchzyy/wiicompiled
synced 2026-10-22 22:19:43 -04:00
NTSC-U and NTSC-J support (#326)
* add ntsc-u and ntsc-j support Co-authored-by: DarthMDev <mgracer48@yahoo.com> Co-authored-by: rooklz <rookieb@muzo-works.com> * hash inc files and require project for shards * port remaining stale rr us hooks * drop map report generation * drop one-off region porters --------- Co-authored-by: DarthMDev <mgracer48@yahoo.com> Co-authored-by: rooklz <rookieb@muzo-works.com>
This commit is contained in:
@@ -55,8 +55,14 @@ function(mkw_bound_translated_compiles target)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# The region the translator built for; translated code and runtime/game bind addresses to it.
|
||||
if(NOT DEFINED MKW_TRANSLATED_GUEST_REGION)
|
||||
message(FATAL_ERROR "The translator shard manifest names no guest region; re-run emit-build-shards.")
|
||||
endif()
|
||||
|
||||
function(mkw_configure_translated_target target)
|
||||
mkw_configure_object_target(${target})
|
||||
target_compile_definitions(${target} PRIVATE MKW_TRANSLATED_GUEST_REGION=${MKW_TRANSLATED_GUEST_REGION})
|
||||
mkw_apply_translated_compile_options(${target})
|
||||
mkw_bound_translated_compiles(${target})
|
||||
endfunction()
|
||||
@@ -75,6 +81,7 @@ add_library(mkw_game_data OBJECT ${MKW_GAME_DATA_SOURCES})
|
||||
mkw_configure_object_target(mkw_game_data)
|
||||
target_compile_features(mkw_game_data PRIVATE cxx_std_20)
|
||||
target_compile_definitions(mkw_game_data PRIVATE
|
||||
MKW_TRANSLATED_GUEST_REGION=${MKW_TRANSLATED_GUEST_REGION}
|
||||
SDL_MAIN_HANDLED
|
||||
_DISABLE_STRING_ANNOTATION _DISABLE_VECTOR_ANNOTATION)
|
||||
if(MKW_SETUP_VERSION)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#include "guest_abi/guest_region.h"
|
||||
#include "guest_function_imports.h"
|
||||
|
||||
#if !defined(MKW_TRANSLATED_GUEST_REGION)
|
||||
#error "MKW_TRANSLATED_GUEST_REGION comes from the translator's shard manifest (emit-build-shards)"
|
||||
#endif
|
||||
|
||||
static_assert(MKW_TRANSLATED_GUEST_REGION >= 0 && MKW_TRANSLATED_GUEST_REGION < GuestRegion::kCount);
|
||||
|
||||
extern "C" const uint8_t kMkwGuestRegion = MKW_TRANSLATED_GUEST_REGION;
|
||||
|
||||
#define MKW_DEFINE_GUEST_FUNCTION_IMPORT(pal, symbol) \
|
||||
extern "C" void func_##symbol(CpuContext*); \
|
||||
extern "C" void (*const mkw_guest_function_##pal)(CpuContext*) = &func_##symbol; \
|
||||
static_assert(MKW_GADDR_CT(pal) == 0x##symbol##u, "guest_function_imports.inc disagrees with " \
|
||||
"guest_address_table.inc");
|
||||
|
||||
#if MKW_TRANSLATED_GUEST_REGION == 0
|
||||
#define MKW_GUEST_FUNCTION_IMPORT(pal, ntscU, ntscJ) MKW_DEFINE_GUEST_FUNCTION_IMPORT(pal, pal)
|
||||
#elif MKW_TRANSLATED_GUEST_REGION == 1
|
||||
#define MKW_GUEST_FUNCTION_IMPORT(pal, ntscU, ntscJ) MKW_DEFINE_GUEST_FUNCTION_IMPORT(pal, ntscU)
|
||||
#else
|
||||
#define MKW_GUEST_FUNCTION_IMPORT(pal, ntscU, ntscJ) MKW_DEFINE_GUEST_FUNCTION_IMPORT(pal, ntscJ)
|
||||
#endif
|
||||
#include "guest_function_imports.inc"
|
||||
#undef MKW_GUEST_FUNCTION_IMPORT
|
||||
@@ -157,14 +157,14 @@ public:
|
||||
#define MKW_DETAIL_CAT(a, b) a##b
|
||||
#define MKW_DETAIL_MAKE_UNIQUE(a, b) MKW_DETAIL_CAT(a, b)
|
||||
|
||||
// Three hand-written registration macros. Generated code never registers per function; every
|
||||
// translated function reaches the registry via the bulk BulkTranslatedFunctionRecord tables
|
||||
// in the translator's *_registration TUs.
|
||||
// Three hand-written registration macros, given the PAL address. Generated code never registers
|
||||
// per function; every translated function reaches the registry via the bulk
|
||||
// BulkTranslatedFunctionRecord tables in the translator's *_registration TUs.
|
||||
#define REGISTER_TRANSLATED_FUNCTION(address, fn) \
|
||||
static AbiTrampoline<decltype(fn)> MKW_DETAIL_MAKE_UNIQUE(_abi_trampoline_, __COUNTER__)(address, #fn, fn, FunctionKind::BaseTranslated, false, kPpcAllNonvolatileFprMask, 0, 0, nullptr, KnownTranslatedCpuCall<address>::kMustRemainDynamicallyDispatchable)
|
||||
static AbiTrampoline<decltype(fn)> MKW_DETAIL_MAKE_UNIQUE(_abi_trampoline_, __COUNTER__)(::GuestRegion::Translate(address), #fn, fn, FunctionKind::BaseTranslated, false, kPpcAllNonvolatileFprMask, 0, 0, nullptr, KnownTranslatedCpuCall<address>::kMustRemainDynamicallyDispatchable)
|
||||
|
||||
#define REGISTER_NATIVE_FUNCTION(address, fn) \
|
||||
static AbiTrampoline<decltype(fn)> MKW_DETAIL_MAKE_UNIQUE(_abi_native_trampoline_, __COUNTER__)(address, #fn, fn, FunctionKind::Native, false, kPpcAllNonvolatileFprMask, 0, 0, &AbiRawCpuThunk<&fn>::Invoke)
|
||||
static AbiTrampoline<decltype(fn)> MKW_DETAIL_MAKE_UNIQUE(_abi_native_trampoline_, __COUNTER__)(::GuestRegion::Translate(address), #fn, fn, FunctionKind::Native, false, kPpcAllNonvolatileFprMask, 0, 0, &AbiRawCpuThunk<&fn>::Invoke)
|
||||
|
||||
#define REGISTER_NATIVE_FUNCTION_AS(address, fn, pretty_name) \
|
||||
static AbiTrampoline<decltype(fn)> MKW_DETAIL_MAKE_UNIQUE(_abi_native_trampoline_named_, __COUNTER__)(address, pretty_name, fn, FunctionKind::Native, false, kPpcAllNonvolatileFprMask, 0, 0, &AbiRawCpuThunk<&fn>::Invoke)
|
||||
static AbiTrampoline<decltype(fn)> MKW_DETAIL_MAKE_UNIQUE(_abi_native_trampoline_named_, __COUNTER__)(::GuestRegion::Translate(address), pretty_name, fn, FunctionKind::Native, false, kPpcAllNonvolatileFprMask, 0, 0, &AbiRawCpuThunk<&fn>::Invoke)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
// Bump whenever guest_abi/, isa/ or ppc_isa_memory.h changes what translated code compiles against.
|
||||
#define MKW_GUEST_ABI_VERSION 1
|
||||
#define MKW_GUEST_ABI_VERSION 2
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "guest_abi/cpu_context.h"
|
||||
#include "guest_abi/exec_guard.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
#include "isa/ppc_isa_config.h"
|
||||
#include "isa/ppc_isa_cr.h"
|
||||
|
||||
@@ -24,7 +25,7 @@ uint32_t FilterScnRendererPathMaskOption(uint32_t pathMask) noexcept;
|
||||
// (used for the path mask filtering in ScnRenderer::createPath: depth of
|
||||
// field is always removed, bloom when the user disabled it)
|
||||
inline void ApplyRuntimeCallOptions(uint32_t target, CpuContext* ctx) {
|
||||
if (target == 0x8023BD38u) {
|
||||
if (::GuestRegion::Is<0x8023BD38u>(target)) {
|
||||
// ScnRenderer::createPath receives the post-processing path mask in r4.
|
||||
ctx->gpr[4] = FilterScnRendererPathMaskOption(ctx->gpr[4]);
|
||||
}
|
||||
@@ -242,13 +243,11 @@ private:
|
||||
std::array<uint32_t, 18> saved_;
|
||||
};
|
||||
|
||||
// Guest address of OSLoadContext, which models rfi-style context restoration
|
||||
// and intentionally replaces the full guest register file instead of returning
|
||||
// like a normal ABI call. It can never be guarded.
|
||||
inline constexpr uint32_t kOSLoadContextAddress = 0x801A1F58u;
|
||||
|
||||
// OSLoadContext models rfi-style context restoration and intentionally replaces
|
||||
// the full guest register file instead of returning like a normal ABI call. It
|
||||
// can never be guarded.
|
||||
inline bool ShouldPreserveNonvolatileGprsForRawCpuCall(const TranslatedFunctionInfo* info) noexcept {
|
||||
return info->kind == FunctionKind::Native && info->address != kOSLoadContextAddress;
|
||||
return info->kind == FunctionKind::Native && info->address != MKW_GADDR(801A1F58);
|
||||
}
|
||||
|
||||
inline uint32_t NonvolatileFprGuardMaskFor(const TranslatedFunctionInfo* info) noexcept {
|
||||
|
||||
+744
@@ -0,0 +1,744 @@
|
||||
// AUTO-GENERATED by tools/region/gen_guest_address_table.py - DO NOT EDIT.
|
||||
// PAL identity -> address in each region: MKW_GUEST_ADDRESS(PAL, NTSC-U, NTSC-J).
|
||||
// Sorted by PAL address; guest_abi/guest_region.h relies on that.
|
||||
MKW_GUEST_ADDRESS(80006348, 80006348, 80006348) // __init_hardware
|
||||
MKW_GUEST_ADDRESS(800077C8, 800077C8, 800077C8) // StrapScene::CheckInput
|
||||
MKW_GUEST_ADDRESS(8000A000, 80009FC0, 80009F5C)
|
||||
MKW_GUEST_ADDRESS(8000A400, 8000A3C0, 8000A35C)
|
||||
MKW_GUEST_ADDRESS(80015500, 800149A0, 80015424) // __write_console
|
||||
MKW_GUEST_ADDRESS(8002001C, 8001F4BC, 8001FF40)
|
||||
MKW_GUEST_ADDRESS(80044B30, 80044A90, 80044A50) // GXEnd
|
||||
MKW_GUEST_ADDRESS(80048C30, 80048B90, 80048B50) // GXEnd
|
||||
MKW_GUEST_ADDRESS(800847C0, 80084720, 800846E0) // nw4r::lyt::detail::DrawQuad
|
||||
MKW_GUEST_ADDRESS(80084D20, 80084C80, 80084C40) // nw4r::lyt::detail::DrawQuad
|
||||
MKW_GUEST_ADDRESS(800A35E0, 800A3540, 800A3500) // nw4r::snd::SoundPlayer::SetVolume
|
||||
MKW_GUEST_ADDRESS(800BD860, 800BD7C0, 800BD780) // thunk_0x800bc440
|
||||
MKW_GUEST_ADDRESS(80123F88, 80123EE8, 80123EA8) // AIRegisterDMACallback
|
||||
MKW_GUEST_ADDRESS(80123FCC, 80123F2C, 80123EEC) // AIInitDMA
|
||||
MKW_GUEST_ADDRESS(80124048, 80123FA8, 80123F68) // AIStartDMA
|
||||
MKW_GUEST_ADDRESS(8012405C, 80123FBC, 80123F7C) // AIGetDMABytesLeft
|
||||
MKW_GUEST_ADDRESS(8012406C, 80123FCC, 80123F8C) // AIGetDMAStartAddr
|
||||
MKW_GUEST_ADDRESS(80124084, 80123FE4, 80123FA4) // AIGetDMALength
|
||||
MKW_GUEST_ADDRESS(80124094, 80123FF4, 80123FB4) // AICheckInit
|
||||
MKW_GUEST_ADDRESS(8012409C, 80123FFC, 80123FBC) // AIGetDSPSampleRate
|
||||
MKW_GUEST_ADDRESS(801240B0, 80124010, 80123FD0) // AIInit
|
||||
MKW_GUEST_ADDRESS(80126948, 801268A8, 80126868) // __AXDSPInitCallback
|
||||
MKW_GUEST_ADDRESS(80126954, 801268B4, 80126874) // __AXDSPResumeCallback
|
||||
MKW_GUEST_ADDRESS(801269A8, 80126908, 801268C8) // __AXDSPRequestCallback
|
||||
MKW_GUEST_ADDRESS(801269B8, 80126918, 801268D8)
|
||||
MKW_GUEST_ADDRESS(801269BC, 8012691C, 801268DC) // __AXOutInitDSP
|
||||
MKW_GUEST_ADDRESS(8012B830, 8012B790, 8012B750) // AXFXReverbStdExpCallback
|
||||
MKW_GUEST_ADDRESS(8012E574, 8012E4D4, 8012E494) // PPCMfhid0
|
||||
MKW_GUEST_ADDRESS(8012E57C, 8012E4DC, 8012E49C) // PPCMthid0
|
||||
MKW_GUEST_ADDRESS(8012E594, 8012E4F4, 8012E4B4) // PPCMtdec
|
||||
MKW_GUEST_ADDRESS(8012E59C, 8012E4FC, 8012E4BC) // PPCSync
|
||||
MKW_GUEST_ADDRESS(8012E5A4, 8012E504, 8012E4C4) // PPCHalt
|
||||
MKW_GUEST_ADDRESS(8012E5B8, 8012E518, 8012E4D8) // PPCMtmmcr0
|
||||
MKW_GUEST_ADDRESS(8012E5C0, 8012E520, 8012E4E0) // PPCMtmmcr1
|
||||
MKW_GUEST_ADDRESS(8012E5C8, 8012E528, 8012E4E8) // PPCMtpmc1
|
||||
MKW_GUEST_ADDRESS(8012E5D0, 8012E530, 8012E4F0) // PPCMtpmc2
|
||||
MKW_GUEST_ADDRESS(8012E5D8, 8012E538, 8012E4F8) // PPCMtpmc3
|
||||
MKW_GUEST_ADDRESS(8012E5E0, 8012E540, 8012E500) // PPCMtpmc4
|
||||
MKW_GUEST_ADDRESS(8012E630, 8012E590, 8012E550) // PPCMfhid2
|
||||
MKW_GUEST_ADDRESS(8012E638, 8012E598, 8012E558) // PPCMthid2
|
||||
MKW_GUEST_ADDRESS(8012E640, 8012E5A0, 8012E560) // PPCMfwpar
|
||||
MKW_GUEST_ADDRESS(8012E64C, 8012E5AC, 8012E56C) // PPCMtwpar
|
||||
MKW_GUEST_ADDRESS(8012E654, 8012E5B4, 8012E574) // PPCDisableSpeculation
|
||||
MKW_GUEST_ADDRESS(8012E684, 8012E5E4, 8012E5A4) // PPCMthid4
|
||||
MKW_GUEST_ADDRESS(801301B4, 80130114, 801300D4) // GKI_delay
|
||||
MKW_GUEST_ADDRESS(8015BC80, 8015BBE0, 8015BBA0) // contentFastOpenNAND
|
||||
MKW_GUEST_ADDRESS(8015BCF8, 8015BC58, 8015BC18) // contentReadNAND
|
||||
MKW_GUEST_ADDRESS(8015D3FC, 8015D35C, 8015D31C) // DSPCheckMailToDSP
|
||||
MKW_GUEST_ADDRESS(8015D40C, 8015D36C, 8015D32C) // RVL::DSPCheckMailFromDSP
|
||||
MKW_GUEST_ADDRESS(8015D41C, 8015D37C, 8015D33C) // RVL::DSPReadMailFromDSP
|
||||
MKW_GUEST_ADDRESS(8015D430, 8015D390, 8015D350) // DSPSendMailToDSP
|
||||
MKW_GUEST_ADDRESS(8015D444, 8015D3A4, 8015D364) // DSPInit
|
||||
MKW_GUEST_ADDRESS(8015D504, 8015D464, 8015D424) // DSPCheckInit
|
||||
MKW_GUEST_ADDRESS(8015D50C, 8015D46C, 8015D42C) // DSPAddTask
|
||||
MKW_GUEST_ADDRESS(8015D57C, 8015D4DC, 8015D49C) // DSPAssertTask
|
||||
MKW_GUEST_ADDRESS(8015DC60, 8015DBC0, 8015DB80) // __DSP_boot_task
|
||||
MKW_GUEST_ADDRESS(8015DF1C, 8015DE7C, 8015DE3C) // __DVDFSInit
|
||||
MKW_GUEST_ADDRESS(8015E74C, 8015E6AC, 8015E66C) // DVD::ReadAsyncPrio
|
||||
MKW_GUEST_ADDRESS(8015E834, 8015E794, 8015E754) // DVDReadPrio
|
||||
MKW_GUEST_ADDRESS(8015EA1C, 8015E97C, 8015E93C) // DVD::Init
|
||||
MKW_GUEST_ADDRESS(801628CC, 8016282C, 801627EC) // DVD::ReadAbsAsyncPrio
|
||||
MKW_GUEST_ADDRESS(801643FC, 8016435C, 8016431C) // __DVDCheckDevice
|
||||
MKW_GUEST_ADDRESS(80164848, 801647A8, 80164768) // DVD::LowInit
|
||||
MKW_GUEST_ADDRESS(80164AAC, 80164A0C, 801649CC) // DVD::LowReadDiskID
|
||||
MKW_GUEST_ADDRESS(80165708, 80165668, 80165628) // DVD::LowUnencryptedRead
|
||||
MKW_GUEST_ADDRESS(80165A30, 80165990, 80165950) // DVD::LowInquiry
|
||||
MKW_GUEST_ADDRESS(80166330, 80166290, 80166250) // DVD::LowRead
|
||||
MKW_GUEST_ADDRESS(80166964, 801668C4, 80166884) // DVD::LowClearCoverInterrupt
|
||||
MKW_GUEST_ADDRESS(801671D0, 80167130, 801670F0) // ESP_InitLib
|
||||
MKW_GUEST_ADDRESS(80167224, 80167184, 80167144) // ESP_CloseLib
|
||||
MKW_GUEST_ADDRESS(80167904, 80167864, 80167824) // ESP_GetDataDir
|
||||
MKW_GUEST_ADDRESS(8016799C, 801678FC, 801678BC) // ESP_GetTitleId
|
||||
MKW_GUEST_ADDRESS(80167E78, 80167DD8, 80167D98) // SetExiInterruptMask
|
||||
MKW_GUEST_ADDRESS(80167F68, 80167EC8, 80167E88) // RVL::EXIImm
|
||||
MKW_GUEST_ADDRESS(80168288, 801681E8, 801681A8) // RVL::EXIDma
|
||||
MKW_GUEST_ADDRESS(80168380, 801682E0, 801682A0) // RVL::EXISync
|
||||
MKW_GUEST_ADDRESS(801689D0, 80168930, 801688F0) // RVL::EXISelect
|
||||
MKW_GUEST_ADDRESS(80168B00, 80168A60, 80168A20) // RVL::EXIDeselect
|
||||
MKW_GUEST_ADDRESS(80168FA0, 80168F00, 80168EC0) // EXIInit
|
||||
MKW_GUEST_ADDRESS(80169260, 801691C0, 80169180) // RVL::EXIUnlock
|
||||
MKW_GUEST_ADDRESS(80169BCC, 80169B2C, 80169AEC) // ISFS::OpenLib
|
||||
MKW_GUEST_ADDRESS(8016B49C, 8016B3FC, 8016B3BC) // __GX::DefaultTexRegionCallback
|
||||
MKW_GUEST_ADDRESS(8016B590, 8016B4F0, 8016B4B0) // __GX::DefaultTlutRegionCallback
|
||||
MKW_GUEST_ADDRESS(8016B5B4, 8016B514, 8016B4D4) // __GX::Shutdown
|
||||
MKW_GUEST_ADDRESS(8016B720, 8016B680, 8016B640) // __GX::InitRevisionBits
|
||||
MKW_GUEST_ADDRESS(8016B850, 8016B7B0, 8016B770) // GX::Init
|
||||
MKW_GUEST_ADDRESS(8016C668, 8016C5C8, 8016C588) // GX::CPInterruptHandler
|
||||
MKW_GUEST_ADDRESS(8016C94C, 8016C8AC, 8016C86C) // GX::SetCPUFifo
|
||||
MKW_GUEST_ADDRESS(8016CB2C, 8016CA8C, 8016CA4C) // GX::SetGPFifo
|
||||
MKW_GUEST_ADDRESS(8016CDBC, 8016CD1C, 8016CCDC) // __GX::SaveFifo
|
||||
MKW_GUEST_ADDRESS(8016CF10, 8016CE70, 8016CE30) // GX::GetCPUFifo
|
||||
MKW_GUEST_ADDRESS(8016D054, 8016CFB4, 8016CF74) // GX::SetBreakPtCallback
|
||||
MKW_GUEST_ADDRESS(8016D098, 8016CFF8, 8016CFB8) // GX::EnableBreakPt
|
||||
MKW_GUEST_ADDRESS(8016D138, 8016D098, 8016D058) // GX::DisableBreakPt
|
||||
MKW_GUEST_ADDRESS(8016D1FC, 8016D15C, 8016D11C) // __GX::CleanGPFifo
|
||||
MKW_GUEST_ADDRESS(8016D3A4, 8016D304, 8016D2C4) // GX::SetVtxDesc
|
||||
MKW_GUEST_ADDRESS(8016D3C0, 8016D320, 8016D2E0) // GX::SetVtxDesc_switch
|
||||
MKW_GUEST_ADDRESS(8016D3C4, 8016D324, 8016D2E4) // GX::SetVtxDesc_caseD_0
|
||||
MKW_GUEST_ADDRESS(8016D3D8, 8016D338, 8016D2F8) // GX::SetVtxDesc_caseD_1
|
||||
MKW_GUEST_ADDRESS(8016D3EC, 8016D34C, 8016D30C) // GX::SetVtxDesc_caseD_2
|
||||
MKW_GUEST_ADDRESS(8016D400, 8016D360, 8016D320) // GX::SetVtxDesc_caseD_3
|
||||
MKW_GUEST_ADDRESS(8016D414, 8016D374, 8016D334) // GX::SetVtxDesc_caseD_4
|
||||
MKW_GUEST_ADDRESS(8016D428, 8016D388, 8016D348) // GX::SetVtxDesc_caseD_5
|
||||
MKW_GUEST_ADDRESS(8016D43C, 8016D39C, 8016D35C) // GX::SetVtxDesc_caseD_6
|
||||
MKW_GUEST_ADDRESS(8016D450, 8016D3B0, 8016D370) // GX::SetVtxDesc_caseD_7
|
||||
MKW_GUEST_ADDRESS(8016D464, 8016D3C4, 8016D384) // GX::SetVtxDesc_caseD_8
|
||||
MKW_GUEST_ADDRESS(8016D478, 8016D3D8, 8016D398) // GX::SetVtxDesc_caseD_9
|
||||
MKW_GUEST_ADDRESS(8016D48C, 8016D3EC, 8016D3AC) // GX::SetVtxDesc_caseD_a
|
||||
MKW_GUEST_ADDRESS(8016D4C0, 8016D420, 8016D3E0) // GX::SetVtxDesc_caseD_19
|
||||
MKW_GUEST_ADDRESS(8016D4F4, 8016D454, 8016D414) // GX::SetVtxDesc_caseD_b
|
||||
MKW_GUEST_ADDRESS(8016D508, 8016D468, 8016D428) // GX::SetVtxDesc_caseD_c
|
||||
MKW_GUEST_ADDRESS(8016D51C, 8016D47C, 8016D43C) // GX::SetVtxDesc_caseD_d
|
||||
MKW_GUEST_ADDRESS(8016D530, 8016D490, 8016D450) // GX::SetVtxDesc_caseD_e
|
||||
MKW_GUEST_ADDRESS(8016D544, 8016D4A4, 8016D464) // GX::SetVtxDesc_caseD_f
|
||||
MKW_GUEST_ADDRESS(8016D558, 8016D4B8, 8016D478) // GX::SetVtxDesc_caseD_10
|
||||
MKW_GUEST_ADDRESS(8016D56C, 8016D4CC, 8016D48C) // GX::SetVtxDesc_caseD_11
|
||||
MKW_GUEST_ADDRESS(8016D580, 8016D4E0, 8016D4A0) // GX::SetVtxDesc_caseD_12
|
||||
MKW_GUEST_ADDRESS(8016D594, 8016D4F4, 8016D4B4) // GX::SetVtxDesc_caseD_13
|
||||
MKW_GUEST_ADDRESS(8016D5A8, 8016D508, 8016D4C8) // GX::SetVtxDesc_caseD_14
|
||||
MKW_GUEST_ADDRESS(8016D5B8, 8016D518, 8016D4D8) // GX::SetVtxDesc_caseD_15
|
||||
MKW_GUEST_ADDRESS(8016D608, 8016D568, 8016D528) // GX::SetVtxDescv
|
||||
MKW_GUEST_ADDRESS(8016D814, 8016D774, 8016D734) // __GX::SetVCD
|
||||
MKW_GUEST_ADDRESS(8016D8C4, 8016D824, 8016D7E4) // __GX::CalculateVLim
|
||||
MKW_GUEST_ADDRESS(8016D9F0, 8016D950, 8016D910) // GX::GetVtxDesc
|
||||
MKW_GUEST_ADDRESS(8016DA0C, 8016D96C, 8016D92C) // GX::GetVtxDesc_switch
|
||||
MKW_GUEST_ADDRESS(8016DA10, 8016D970, 8016D930) // GX::GetVtxDesc_caseD_0
|
||||
MKW_GUEST_ADDRESS(8016DA20, 8016D980, 8016D940) // GX::GetVtxDesc_caseD_1
|
||||
MKW_GUEST_ADDRESS(8016DA30, 8016D990, 8016D950) // GX::GetVtxDesc_caseD_2
|
||||
MKW_GUEST_ADDRESS(8016DA40, 8016D9A0, 8016D960) // GX::GetVtxDesc_caseD_3
|
||||
MKW_GUEST_ADDRESS(8016DA50, 8016D9B0, 8016D970) // GX::GetVtxDesc_caseD_4
|
||||
MKW_GUEST_ADDRESS(8016DA60, 8016D9C0, 8016D980) // GX::GetVtxDesc_caseD_5
|
||||
MKW_GUEST_ADDRESS(8016DA70, 8016D9D0, 8016D990) // GX::GetVtxDesc_caseD_6
|
||||
MKW_GUEST_ADDRESS(8016DA80, 8016D9E0, 8016D9A0) // GX::GetVtxDesc_caseD_7
|
||||
MKW_GUEST_ADDRESS(8016DA90, 8016D9F0, 8016D9B0) // GX::GetVtxDesc_caseD_8
|
||||
MKW_GUEST_ADDRESS(8016DAA0, 8016DA00, 8016D9C0) // GX::GetVtxDesc_caseD_9
|
||||
MKW_GUEST_ADDRESS(8016DAB0, 8016DA10, 8016D9D0) // GX::GetVtxDesc_caseD_a
|
||||
MKW_GUEST_ADDRESS(8016DAD4, 8016DA34, 8016D9F4) // GX::GetVtxDesc_caseD_19
|
||||
MKW_GUEST_ADDRESS(8016DAF8, 8016DA58, 8016DA18) // GX::GetVtxDesc_caseD_b
|
||||
MKW_GUEST_ADDRESS(8016DB08, 8016DA68, 8016DA28) // GX::GetVtxDesc_caseD_c
|
||||
MKW_GUEST_ADDRESS(8016DB18, 8016DA78, 8016DA38) // GX::GetVtxDesc_caseD_d
|
||||
MKW_GUEST_ADDRESS(8016DB28, 8016DA88, 8016DA48) // GX::GetVtxDesc_caseD_e
|
||||
MKW_GUEST_ADDRESS(8016DB38, 8016DA98, 8016DA58) // GX::GetVtxDesc_caseD_f
|
||||
MKW_GUEST_ADDRESS(8016DB48, 8016DAA8, 8016DA68) // GX::GetVtxDesc_caseD_10
|
||||
MKW_GUEST_ADDRESS(8016DB58, 8016DAB8, 8016DA78) // GX::GetVtxDesc_caseD_11
|
||||
MKW_GUEST_ADDRESS(8016DB68, 8016DAC8, 8016DA88) // GX::GetVtxDesc_caseD_12
|
||||
MKW_GUEST_ADDRESS(8016DB78, 8016DAD8, 8016DA98) // GX::GetVtxDesc_caseD_13
|
||||
MKW_GUEST_ADDRESS(8016DB88, 8016DAE8, 8016DAA8) // GX::GetVtxDesc_caseD_14
|
||||
MKW_GUEST_ADDRESS(8016DB98, 8016DAF8, 8016DAB8) // GX::GetVtxDesc_caseD_15
|
||||
MKW_GUEST_ADDRESS(8016DBA4, 8016DB04, 8016DAC4) // GX::GetVtxDescv
|
||||
MKW_GUEST_ADDRESS(8016DC34, 8016DB94, 8016DB54) // GX::ClearVtxDesc
|
||||
MKW_GUEST_ADDRESS(8016DC68, 8016DBC8, 8016DB88) // GX::SetVtxAttrFmt
|
||||
MKW_GUEST_ADDRESS(8016DC94, 8016DBF4, 8016DBB4) // GX::SetVtxAttrFmt_switch
|
||||
MKW_GUEST_ADDRESS(8016DC98, 8016DBF8, 8016DBB8) // GX::SetVtxAttrFmt_caseD_9
|
||||
MKW_GUEST_ADDRESS(8016DCB0, 8016DC10, 8016DBD0) // GX::SetVtxAttrFmt_caseD_19
|
||||
MKW_GUEST_ADDRESS(8016DCEC, 8016DC4C, 8016DC0C) // GX::SetVtxAttrFmt_caseD_b
|
||||
MKW_GUEST_ADDRESS(8016DD00, 8016DC60, 8016DC20) // GX::SetVtxAttrFmt_caseD_c
|
||||
MKW_GUEST_ADDRESS(8016DD14, 8016DC74, 8016DC34) // GX::SetVtxAttrFmt_caseD_d
|
||||
MKW_GUEST_ADDRESS(8016DD2C, 8016DC8C, 8016DC4C) // GX::SetVtxAttrFmt_caseD_e
|
||||
MKW_GUEST_ADDRESS(8016DD44, 8016DCA4, 8016DC64) // GX::SetVtxAttrFmt_caseD_f
|
||||
MKW_GUEST_ADDRESS(8016DD5C, 8016DCBC, 8016DC7C) // GX::SetVtxAttrFmt_caseD_10
|
||||
MKW_GUEST_ADDRESS(8016DD74, 8016DCD4, 8016DC94) // GX::SetVtxAttrFmt_caseD_11
|
||||
MKW_GUEST_ADDRESS(8016DD94, 8016DCF4, 8016DCB4) // GX::SetVtxAttrFmt_caseD_12
|
||||
MKW_GUEST_ADDRESS(8016DDAC, 8016DD0C, 8016DCCC) // GX::SetVtxAttrFmt_caseD_13
|
||||
MKW_GUEST_ADDRESS(8016DDC4, 8016DD24, 8016DCE4) // GX::SetVtxAttrFmt_caseD_14
|
||||
MKW_GUEST_ADDRESS(8016DDD8, 8016DD38, 8016DCF8) // GX::SetVtxAttrFmt_caseD_15
|
||||
MKW_GUEST_ADDRESS(8016DE08, 8016DD68, 8016DD28) // GX::SetVtxAttrFmtv
|
||||
MKW_GUEST_ADDRESS(8016DE48, 8016DDA8, 8016DD68) // GX::SetVtxAttrFmtv_switch
|
||||
MKW_GUEST_ADDRESS(8016DE4C, 8016DDAC, 8016DD6C) // GX::SetVtxAttrFmtv_caseD_9
|
||||
MKW_GUEST_ADDRESS(8016DE64, 8016DDC4, 8016DD84) // GX::SetVtxAttrFmtv_caseD_19
|
||||
MKW_GUEST_ADDRESS(8016DEA0, 8016DE00, 8016DDC0) // GX::SetVtxAttrFmtv_caseD_b
|
||||
MKW_GUEST_ADDRESS(8016DEB4, 8016DE14, 8016DDD4) // GX::SetVtxAttrFmtv_caseD_c
|
||||
MKW_GUEST_ADDRESS(8016DEC8, 8016DE28, 8016DDE8) // GX::SetVtxAttrFmtv_caseD_d
|
||||
MKW_GUEST_ADDRESS(8016DEE0, 8016DE40, 8016DE00) // GX::SetVtxAttrFmtv_caseD_e
|
||||
MKW_GUEST_ADDRESS(8016DEF8, 8016DE58, 8016DE18) // GX::SetVtxAttrFmtv_caseD_f
|
||||
MKW_GUEST_ADDRESS(8016DF10, 8016DE70, 8016DE30) // GX::SetVtxAttrFmtv_caseD_10
|
||||
MKW_GUEST_ADDRESS(8016DF28, 8016DE88, 8016DE48) // GX::SetVtxAttrFmtv_caseD_11
|
||||
MKW_GUEST_ADDRESS(8016DF48, 8016DEA8, 8016DE68) // GX::SetVtxAttrFmtv_caseD_12
|
||||
MKW_GUEST_ADDRESS(8016DF60, 8016DEC0, 8016DE80) // GX::SetVtxAttrFmtv_caseD_13
|
||||
MKW_GUEST_ADDRESS(8016DF78, 8016DED8, 8016DE98) // GX::SetVtxAttrFmtv_caseD_14
|
||||
MKW_GUEST_ADDRESS(8016DF8C, 8016DEEC, 8016DEAC) // GX::SetVtxAttrFmtv_caseD_15
|
||||
MKW_GUEST_ADDRESS(8016DFCC, 8016DF2C, 8016DEEC) // __GX::SetVAT
|
||||
MKW_GUEST_ADDRESS(8016E04C, 8016DFAC, 8016DF6C) // GX::GetVtxAttrFmt
|
||||
MKW_GUEST_ADDRESS(8016E078, 8016DFD8, 8016DF98) // GX::GetVtxAttrFmt_switch
|
||||
MKW_GUEST_ADDRESS(8016E07C, 8016DFDC, 8016DF9C) // GX::GetVtxAttrFmt_caseD_9
|
||||
MKW_GUEST_ADDRESS(8016E0A4, 8016E004, 8016DFC4) // GX::GetVtxAttrFmt_caseD_19
|
||||
MKW_GUEST_ADDRESS(8016E118, 8016E078, 8016E038) // GX::GetVtxAttrFmt_caseD_b
|
||||
MKW_GUEST_ADDRESS(8016E13C, 8016E09C, 8016E05C) // GX::GetVtxAttrFmt_caseD_c
|
||||
MKW_GUEST_ADDRESS(8016E160, 8016E0C0, 8016E080) // GX::GetVtxAttrFmt_caseD_d
|
||||
MKW_GUEST_ADDRESS(8016E188, 8016E0E8, 8016E0A8) // GX::GetVtxAttrFmt_caseD_e
|
||||
MKW_GUEST_ADDRESS(8016E1B0, 8016E110, 8016E0D0) // GX::GetVtxAttrFmt_caseD_f
|
||||
MKW_GUEST_ADDRESS(8016E1C4, 8016E124, 8016E0E4)
|
||||
MKW_GUEST_ADDRESS(8016E1D8, 8016E138, 8016E0F8) // GX::GetVtxAttrFmt_caseD_10
|
||||
MKW_GUEST_ADDRESS(8016E200, 8016E160, 8016E120) // GX::GetVtxAttrFmt_caseD_11
|
||||
MKW_GUEST_ADDRESS(8016E228, 8016E188, 8016E148) // GX::GetVtxAttrFmt_caseD_12
|
||||
MKW_GUEST_ADDRESS(8016E250, 8016E1B0, 8016E170) // GX::GetVtxAttrFmt_caseD_13
|
||||
MKW_GUEST_ADDRESS(8016E278, 8016E1D8, 8016E198) // GX::GetVtxAttrFmt_caseD_14
|
||||
MKW_GUEST_ADDRESS(8016E2A0, 8016E200, 8016E1C0) // GX::GetVtxAttrFmt_caseD_15
|
||||
MKW_GUEST_ADDRESS(8016E2B8, 8016E218, 8016E1D8) // GX::GetVtxAttrFmtv
|
||||
MKW_GUEST_ADDRESS(8016E32C, 8016E28C, 8016E24C) // GX::SetArray
|
||||
MKW_GUEST_ADDRESS(8016E37C, 8016E2DC, 8016E29C) // GX::SetTexCoordGen2
|
||||
MKW_GUEST_ADDRESS(8016E3A4, 8016E304, 8016E2C4) // GX::SetTexCoordGen2_switch
|
||||
MKW_GUEST_ADDRESS(8016E3A8, 8016E308, 8016E2C8) // GX::SetTexCoordGen2_caseD_0
|
||||
MKW_GUEST_ADDRESS(8016E3B4, 8016E314, 8016E2D4) // GX::SetTexCoordGen2_caseD_1
|
||||
MKW_GUEST_ADDRESS(8016E3C0, 8016E320, 8016E2E0) // GX::SetTexCoordGen2_caseD_2
|
||||
MKW_GUEST_ADDRESS(8016E3CC, 8016E32C, 8016E2EC) // GX::SetTexCoordGen2_caseD_3
|
||||
MKW_GUEST_ADDRESS(8016E3D8, 8016E338, 8016E2F8) // GX::SetTexCoordGen2_caseD_13
|
||||
MKW_GUEST_ADDRESS(8016E3E0, 8016E340, 8016E300) // GX::SetTexCoordGen2_caseD_14
|
||||
MKW_GUEST_ADDRESS(8016E3E8, 8016E348, 8016E308) // GX::SetTexCoordGen2_caseD_4
|
||||
MKW_GUEST_ADDRESS(8016E3F0, 8016E350, 8016E310) // GX::SetTexCoordGen2_caseD_5
|
||||
MKW_GUEST_ADDRESS(8016E3F8, 8016E358, 8016E318) // GX::SetTexCoordGen2_caseD_6
|
||||
MKW_GUEST_ADDRESS(8016E400, 8016E360, 8016E320) // GX::SetTexCoordGen2_caseD_7
|
||||
MKW_GUEST_ADDRESS(8016E408, 8016E368, 8016E328) // GX::SetTexCoordGen2_caseD_8
|
||||
MKW_GUEST_ADDRESS(8016E410, 8016E370, 8016E330) // GX::SetTexCoordGen2_caseD_9
|
||||
MKW_GUEST_ADDRESS(8016E418, 8016E378, 8016E338) // GX::SetTexCoordGen2_caseD_a
|
||||
MKW_GUEST_ADDRESS(8016E420, 8016E380, 8016E340) // GX::SetTexCoordGen2_caseD_b
|
||||
MKW_GUEST_ADDRESS(8016E424, 8016E384, 8016E344) // GX::SetTexCoordGen2_caseD_10
|
||||
MKW_GUEST_ADDRESS(8016E514, 8016E474, 8016E434) // GX::SetTexCoordGen2_switch
|
||||
MKW_GUEST_ADDRESS(8016E518, 8016E478, 8016E438) // GX::SetTexCoordGen2_caseD_0
|
||||
MKW_GUEST_ADDRESS(8016E528, 8016E488, 8016E448) // GX::SetTexCoordGen2_caseD_1
|
||||
MKW_GUEST_ADDRESS(8016E538, 8016E498, 8016E458) // GX::SetTexCoordGen2_caseD_2
|
||||
MKW_GUEST_ADDRESS(8016E548, 8016E4A8, 8016E468) // GX::SetTexCoordGen2_caseD_3
|
||||
MKW_GUEST_ADDRESS(8016E558, 8016E4B8, 8016E478) // GX::SetTexCoordGen2_caseD_4
|
||||
MKW_GUEST_ADDRESS(8016E568, 8016E4C8, 8016E488) // GX::SetTexCoordGen2_caseD_5
|
||||
MKW_GUEST_ADDRESS(8016E578, 8016E4D8, 8016E498) // GX::SetTexCoordGen2_caseD_6
|
||||
MKW_GUEST_ADDRESS(8016E588, 8016E4E8, 8016E4A8)
|
||||
MKW_GUEST_ADDRESS(8016E5A4, 8016E504, 8016E4C4) // GX::SetNumTexGens
|
||||
MKW_GUEST_ADDRESS(8016E654, 8016E5B4, 8016E574) // GX::Flush
|
||||
MKW_GUEST_ADDRESS(8016E6B0, 8016E610, 8016E5D0) // GX::ResetWriteGatherPipe
|
||||
MKW_GUEST_ADDRESS(8016E6E4, 8016E644, 8016E604) // __GX::Abort
|
||||
MKW_GUEST_ADDRESS(8016E848, 8016E7A8, 8016E768) // GX::AbortFrame
|
||||
MKW_GUEST_ADDRESS(8016E9FC, 8016E95C, 8016E91C) // GX::SetDrawSync
|
||||
MKW_GUEST_ADDRESS(8016EAB0, 8016EA10, 8016E9D0) // GX::DrawDone
|
||||
MKW_GUEST_ADDRESS(8016EB70, 8016EAD0, 8016EA90) // GX::PixModeSync
|
||||
MKW_GUEST_ADDRESS(8016EB94, 8016EAF4, 8016EAB4) // GX::PokeAlphaMode
|
||||
MKW_GUEST_ADDRESS(8016EBA4, 8016EB04, 8016EAC4) // GX::PokeAlphaUpdate
|
||||
MKW_GUEST_ADDRESS(8016EBBC, 8016EB1C, 8016EADC) // GX::PokeAlphaUpdate
|
||||
MKW_GUEST_ADDRESS(8016EBD0, 8016EB30, 8016EAF0) // GX::PokeBlendMode
|
||||
MKW_GUEST_ADDRESS(8016EC2C, 8016EB8C, 8016EB4C) // GX::PokeColorUpdate
|
||||
MKW_GUEST_ADDRESS(8016EC40, 8016EBA0, 8016EB60) // GX::PokeDstAlpha
|
||||
MKW_GUEST_ADDRESS(8016EC58, 8016EBB8, 8016EB78) // GX::PokeDither
|
||||
MKW_GUEST_ADDRESS(8016EC6C, 8016EBCC, 8016EB8C) // GX::PokeZMode
|
||||
MKW_GUEST_ADDRESS(8016ECCC, 8016EC2C, 8016EBEC) // GX::TokenInterruptHandler
|
||||
MKW_GUEST_ADDRESS(8016ED50, 8016ECB0, 8016EC70) // GX::SetDrawDoneCallback
|
||||
MKW_GUEST_ADDRESS(8016ED94, 8016ECF4, 8016ECB4) // GX::FinishInterruptHandler
|
||||
MKW_GUEST_ADDRESS(8016EE14, 8016ED74, 8016ED34) // __GX::PEInit
|
||||
MKW_GUEST_ADDRESS(8016EE78, 8016EDD8, 8016ED98) // __GX::SetDirtyState
|
||||
MKW_GUEST_ADDRESS(8016F0F0, 8016F050, 8016F010) // GX::Begin
|
||||
MKW_GUEST_ADDRESS(8016F23C, 8016F19C, 8016F15C) // __GX::SendFlushPrim
|
||||
MKW_GUEST_ADDRESS(8016F314, 8016F274, 8016F234) // GX::SetLineWidth
|
||||
MKW_GUEST_ADDRESS(8016F348, 8016F2A8, 8016F268) // GX::SetPointSize
|
||||
MKW_GUEST_ADDRESS(8016F37C, 8016F2DC, 8016F29C) // GX::EnableTexOffsets
|
||||
MKW_GUEST_ADDRESS(8016F3B8, 8016F318, 8016F2D8) // GX::SetCullMode
|
||||
MKW_GUEST_ADDRESS(8016F3E0, 8016F340, 8016F300) // GX::SetCoPlanar
|
||||
MKW_GUEST_ADDRESS(8016F414, 8016F374, 8016F334) // __GX::SetGenMode
|
||||
MKW_GUEST_ADDRESS(8016F438, 8016F398, 8016F358) // GX::SetDispCopySrc
|
||||
MKW_GUEST_ADDRESS(8016F478, 8016F3D8, 8016F398) // GX::SetTexCopySrc
|
||||
MKW_GUEST_ADDRESS(8016F4B8, 8016F418, 8016F3D8) // GX::SetDispCopyDst
|
||||
MKW_GUEST_ADDRESS(8016F4DC, 8016F43C, 8016F3FC) // GX::SetTexCopyDst
|
||||
MKW_GUEST_ADDRESS(8016F5F8, 8016F558, 8016F518) // GX::SetDispCopyFrame2Field
|
||||
MKW_GUEST_ADDRESS(8016F618, 8016F578, 8016F538) // GX::SetCopyClamp
|
||||
MKW_GUEST_ADDRESS(8016FA40, 8016F9A0, 8016F960) // GX::SetCopyFilter
|
||||
MKW_GUEST_ADDRESS(8016FC24, 8016FB84, 8016FB44) // GX::SetDispCopyGamma
|
||||
MKW_GUEST_ADDRESS(8016FC38, 8016FB98, 8016FB58) // GX::CopyDisp
|
||||
MKW_GUEST_ADDRESS(8016FD74, 8016FCD4, 8016FC94) // GX::CopyTex
|
||||
MKW_GUEST_ADDRESS(8016FECC, 8016FE2C, 8016FDEC) // GX::ClearBoundingBox
|
||||
MKW_GUEST_ADDRESS(80170320, 80170280, 80170240) // GX::LoadLightObjImm
|
||||
MKW_GUEST_ADDRESS(8017039C, 801702FC, 801702BC) // GX::SetChanAmbColor
|
||||
MKW_GUEST_ADDRESS(80170474, 801703D4, 80170394) // GX::SetChanMatColor
|
||||
MKW_GUEST_ADDRESS(8017054C, 801704AC, 8017046C) // GX::SetNumChans
|
||||
MKW_GUEST_ADDRESS(80170570, 801704D0, 80170490) // GX::SetChanCtrl
|
||||
MKW_GUEST_ADDRESS(801707F8, 80170758, 80170718) // GX::InitTexObj
|
||||
MKW_GUEST_ADDRESS(80170938, 80170898, 80170858) // GX::InitTexObj_switch
|
||||
MKW_GUEST_ADDRESS(8017093C, 8017089C, 8017085C) // GX::InitTexObj_caseD_0
|
||||
MKW_GUEST_ADDRESS(80170950, 801708B0, 80170870) // GX::InitTexObj_caseD_1
|
||||
MKW_GUEST_ADDRESS(80170964, 801708C4, 80170884) // GX::InitTexObj_caseD_3
|
||||
MKW_GUEST_ADDRESS(80170978, 801708D8, 80170898) // GX::InitTexObj_caseD_6
|
||||
MKW_GUEST_ADDRESS(8017098C, 801708EC, 801708AC) // GX::InitTexObj_caseD_e
|
||||
MKW_GUEST_ADDRESS(801709A0, 80170900, 801708C0) // GX::InitTexObj_caseD_7
|
||||
MKW_GUEST_ADDRESS(80170A04, 80170964, 80170924) // GX::InitTexObjCI
|
||||
MKW_GUEST_ADDRESS(80170A4C, 801709AC, 8017096C) // GX::InitTexObjLOD
|
||||
MKW_GUEST_ADDRESS(80170B50, 80170AB0, 80170A70) // GX::InitTexObjWrapMode
|
||||
MKW_GUEST_ADDRESS(80170B64, 80170AC4, 80170A84) // GX::InitTexObjTlut
|
||||
MKW_GUEST_ADDRESS(80170B6C, 80170ACC, 80170A8C) // GX::InitTexObjFilter
|
||||
MKW_GUEST_ADDRESS(80170B94, 80170AF4, 80170AB4) // GX::InitTexObjLODBias
|
||||
MKW_GUEST_ADDRESS(80170BE8, 80170B48, 80170B08) // GX::InitTexObjUserData
|
||||
MKW_GUEST_ADDRESS(80170BF8, 80170B58, 80170B18) // GX::GetTexObjAll
|
||||
MKW_GUEST_ADDRESS(80170CBC, 80170C1C, 80170BDC) // GX::GetTexObjLODAll
|
||||
MKW_GUEST_ADDRESS(80170DC8, 80170D28, 80170CE8) // GX::LoadTexObjPreLoaded
|
||||
MKW_GUEST_ADDRESS(80170F2C, 80170E8C, 80170E4C) // GX::LoadTexObj
|
||||
MKW_GUEST_ADDRESS(80170F80, 80170EE0, 80170EA0) // GX::InitTlutObj
|
||||
MKW_GUEST_ADDRESS(80170FA8, 80170F08, 80170EC8) // GX::LoadTlut
|
||||
MKW_GUEST_ADDRESS(80171110, 80171070, 80171030) // GX::InvalidateTexAll
|
||||
MKW_GUEST_ADDRESS(80171180, 801710E0, 801710A0) // GX::SetTexCoordScaleManually
|
||||
MKW_GUEST_ADDRESS(801711FC, 8017115C, 8017111C) // GX::SetTexCoordBias
|
||||
MKW_GUEST_ADDRESS(801712F0, 80171250, 80171210) // __GX::SetSUTexRegs
|
||||
MKW_GUEST_ADDRESS(80171458, 801713B8, 80171378) // __GX::SetTmemConfig
|
||||
MKW_GUEST_ADDRESS(801717AC, 8017170C, 801716CC) // GX::SetTevIndirect
|
||||
MKW_GUEST_ADDRESS(80171814, 80171774, 80171734) // GX::SetIndTexMtx
|
||||
MKW_GUEST_ADDRESS(80171968, 801718C8, 80171888) // GX::SetIndTexCoordScale
|
||||
MKW_GUEST_ADDRESS(80171A6C, 801719CC, 8017198C) // GX::SetIndTexOrder
|
||||
MKW_GUEST_ADDRESS(80171B38, 80171A98, 80171A58) // GX::SetNumIndStages
|
||||
MKW_GUEST_ADDRESS(80171B58, 80171AB8, 80171A78) // GX::SetTevDirect
|
||||
MKW_GUEST_ADDRESS(80171BA0, 80171B00, 80171AC0) // GX::SetTevIndWarp
|
||||
MKW_GUEST_ADDRESS(80171C28, 80171B88, 80171B48) // __GX::FlushTextureState
|
||||
MKW_GUEST_ADDRESS(80171C4C, 80171BAC, 80171B6C) // GX::SetTevOp
|
||||
MKW_GUEST_ADDRESS(80171CE0, 80171C40, 80171C00) // GX::SetTevColorIn
|
||||
MKW_GUEST_ADDRESS(80171D20, 80171C80, 80171C40) // GX::SetTevAlphaIn
|
||||
MKW_GUEST_ADDRESS(80171D60, 80171CC0, 80171C80) // GX::SetTevColorOp
|
||||
MKW_GUEST_ADDRESS(80171DB8, 80171D18, 80171CD8) // GX::SetTevAlphaOp
|
||||
MKW_GUEST_ADDRESS(80171E10, 80171D70, 80171D30) // GX::SetTevColor
|
||||
MKW_GUEST_ADDRESS(80171E70, 80171DD0, 80171D90) // GX::SetTevColorS10
|
||||
MKW_GUEST_ADDRESS(80171ED4, 80171E34, 80171DF4) // GX::SetTevKColor
|
||||
MKW_GUEST_ADDRESS(80171F30, 80171E90, 80171E50) // GX::SetTevKColorSel
|
||||
MKW_GUEST_ADDRESS(80171F80, 80171EE0, 80171EA0) // GX::SetTevKAlphaSel
|
||||
MKW_GUEST_ADDRESS(80171FD0, 80171F30, 80171EF0) // GX::SetTevSwapMode
|
||||
MKW_GUEST_ADDRESS(8017200C, 80171F6C, 80171F2C) // GX::SetTevSwapModeTable
|
||||
MKW_GUEST_ADDRESS(80172088, 80171FE8, 80171FA8) // GX::SetAlphaCompare
|
||||
MKW_GUEST_ADDRESS(801720C0, 80172020, 80171FE0) // GX::SetZTexture
|
||||
MKW_GUEST_ADDRESS(8017214C, 801720AC, 8017206C) // GX::SetTevOrder
|
||||
MKW_GUEST_ADDRESS(801722A8, 80172208, 801721C8) // GX::SetNumTevStages
|
||||
MKW_GUEST_ADDRESS(801722CC, 8017222C, 801721EC) // GX::SetFog
|
||||
MKW_GUEST_ADDRESS(801724F8, 80172458, 80172418) // GX::InitFogAdjTable
|
||||
MKW_GUEST_ADDRESS(8017277C, 801726DC, 8017269C) // GX::SetBlendMode
|
||||
MKW_GUEST_ADDRESS(801727CC, 8017272C, 801726EC) // GX::SetColorUpdate
|
||||
MKW_GUEST_ADDRESS(801727F8, 80172758, 80172718) // GX::SetAlphaUpdate
|
||||
MKW_GUEST_ADDRESS(80172824, 80172784, 80172744) // GX::SetZMode
|
||||
MKW_GUEST_ADDRESS(80172858, 801727B8, 80172778) // GX::SetZCompLoc
|
||||
MKW_GUEST_ADDRESS(80172888, 801727E8, 801727A8) // GX::SetPixelFmt
|
||||
MKW_GUEST_ADDRESS(80172930, 80172890, 80172850) // GX::SetDither
|
||||
MKW_GUEST_ADDRESS(8017295C, 801728BC, 8017287C) // GX::SetDstAlpha
|
||||
MKW_GUEST_ADDRESS(80172A30, 80172990, 80172950) // GX::DrawSphere
|
||||
MKW_GUEST_ADDRESS(80172E00, 80172D60, 80172D20) // GX::BeginDisplayList
|
||||
MKW_GUEST_ADDRESS(80172EB4, 80172E14, 80172DD4) // GX::EndDisplayList
|
||||
MKW_GUEST_ADDRESS(80172F64, 80172EC4, 80172E84) // GX::CallDisplayList
|
||||
MKW_GUEST_ADDRESS(80172FD8, 80172F38, 80172EF8) // __GX::SetProjection
|
||||
MKW_GUEST_ADDRESS(8017301C, 80172F7C, 80172F3C) // GX::SetProjection
|
||||
MKW_GUEST_ADDRESS(80173080, 80172FE0, 80172FA0) // GX::SetProjectionv
|
||||
MKW_GUEST_ADDRESS(801730CC, 8017302C, 80172FEC) // GX::GetProjectionv
|
||||
MKW_GUEST_ADDRESS(8017310C, 8017306C, 8017302C) // GX::LoadPosMtxImm
|
||||
MKW_GUEST_ADDRESS(8017315C, 801730BC, 8017307C) // GX::LoadPosMtxIndx
|
||||
MKW_GUEST_ADDRESS(80173188, 801730E8, 801730A8) // GX::LoadNrmMtxImm
|
||||
MKW_GUEST_ADDRESS(801731E0, 80173140, 80173100) // GX::LoadNrmMtxIndx3x3
|
||||
MKW_GUEST_ADDRESS(80173214, 80173174, 80173134) // GX::SetCurrentMtx
|
||||
MKW_GUEST_ADDRESS(80173234, 80173194, 80173154) // GX::LoadTexMtxImm
|
||||
MKW_GUEST_ADDRESS(801732E8, 80173248, 80173208) // __GX::SetViewport
|
||||
MKW_GUEST_ADDRESS(80173378, 801732D8, 80173298) // GX::SetViewportJitter
|
||||
MKW_GUEST_ADDRESS(801733B4, 80173314, 801732D4) // GX::SetViewport
|
||||
MKW_GUEST_ADDRESS(801733E0, 80173340, 80173300) // GX::GetViewportv
|
||||
MKW_GUEST_ADDRESS(80173400, 80173360, 80173320) // GX::SetZScaleOffset
|
||||
MKW_GUEST_ADDRESS(80173430, 80173390, 80173350) // GX::SetScissor
|
||||
MKW_GUEST_ADDRESS(801734E0, 80173440, 80173400) // GX::SetScissorBoxOffset
|
||||
MKW_GUEST_ADDRESS(8017351C, 8017347C, 8017343C) // GX::SetClipMode
|
||||
MKW_GUEST_ADDRESS(80173544, 801734A4, 80173464) // __GX::SetMatrixIndex
|
||||
MKW_GUEST_ADDRESS(801735CC, 8017352C, 801734EC) // GX::SetGPMetric
|
||||
MKW_GUEST_ADDRESS(801736F4, 80173654, 80173614) // GX::SetGPMetric_switch
|
||||
MKW_GUEST_ADDRESS(801736F8, 80173658, 80173618) // GX::SetGPMetric_caseD_0
|
||||
MKW_GUEST_ADDRESS(80173718, 80173678, 80173638) // GX::SetGPMetric_caseD_1
|
||||
MKW_GUEST_ADDRESS(80173738, 80173698, 80173658) // GX::SetGPMetric_caseD_2
|
||||
MKW_GUEST_ADDRESS(80173758, 801736B8, 80173678) // GX::SetGPMetric_caseD_3
|
||||
MKW_GUEST_ADDRESS(80173778, 801736D8, 80173698) // GX::SetGPMetric_caseD_4
|
||||
MKW_GUEST_ADDRESS(80173798, 801736F8, 801736B8) // GX::SetGPMetric_caseD_5
|
||||
MKW_GUEST_ADDRESS(801737B8, 80173718, 801736D8) // GX::SetGPMetric_caseD_6
|
||||
MKW_GUEST_ADDRESS(801737D8, 80173738, 801736F8) // GX::SetGPMetric_caseD_7
|
||||
MKW_GUEST_ADDRESS(801737F8, 80173758, 80173718) // GX::SetGPMetric_caseD_8
|
||||
MKW_GUEST_ADDRESS(80173818, 80173778, 80173738) // GX::SetGPMetric_caseD_9
|
||||
MKW_GUEST_ADDRESS(80173838, 80173798, 80173758) // GX::SetGPMetric_caseD_22
|
||||
MKW_GUEST_ADDRESS(80173858, 801737B8, 80173778) // GX::SetGPMetric_caseD_a
|
||||
MKW_GUEST_ADDRESS(80173878, 801737D8, 80173798) // GX::SetGPMetric_caseD_b
|
||||
MKW_GUEST_ADDRESS(80173894, 801737F4, 801737B4) // GX::SetGPMetric_caseD_c
|
||||
MKW_GUEST_ADDRESS(801738B0, 80173810, 801737D0) // GX::SetGPMetric_caseD_d
|
||||
MKW_GUEST_ADDRESS(801738CC, 8017382C, 801737EC) // GX::SetGPMetric_caseD_e
|
||||
MKW_GUEST_ADDRESS(801738E8, 80173848, 80173808) // GX::SetGPMetric_caseD_f
|
||||
MKW_GUEST_ADDRESS(80173904, 80173864, 80173824) // GX::SetGPMetric_caseD_10
|
||||
MKW_GUEST_ADDRESS(80173920, 80173880, 80173840) // GX::SetGPMetric_caseD_11
|
||||
MKW_GUEST_ADDRESS(8017393C, 8017389C, 8017385C) // GX::SetGPMetric_caseD_12
|
||||
MKW_GUEST_ADDRESS(80173958, 801738B8, 80173878) // GX::SetGPMetric_caseD_13
|
||||
MKW_GUEST_ADDRESS(80173974, 801738D4, 80173894) // GX::SetGPMetric_caseD_14
|
||||
MKW_GUEST_ADDRESS(80173990, 801738F0, 801738B0) // GX::SetGPMetric_caseD_15
|
||||
MKW_GUEST_ADDRESS(801739AC, 8017390C, 801738CC) // GX::SetGPMetric_caseD_16
|
||||
MKW_GUEST_ADDRESS(801739C8, 80173928, 801738E8) // GX::SetGPMetric_caseD_17
|
||||
MKW_GUEST_ADDRESS(801739E4, 80173944, 80173904) // GX::SetGPMetric_caseD_18
|
||||
MKW_GUEST_ADDRESS(80173A00, 80173960, 80173920) // GX::SetGPMetric_caseD_19
|
||||
MKW_GUEST_ADDRESS(80173A1C, 8017397C, 8017393C) // GX::SetGPMetric_caseD_1a
|
||||
MKW_GUEST_ADDRESS(80173A38, 80173998, 80173958) // GX::SetGPMetric_caseD_1b
|
||||
MKW_GUEST_ADDRESS(80173A54, 801739B4, 80173974) // GX::SetGPMetric_caseD_1c
|
||||
MKW_GUEST_ADDRESS(80173A70, 801739D0, 80173990) // GX::SetGPMetric_caseD_1d
|
||||
MKW_GUEST_ADDRESS(80173A8C, 801739EC, 801739AC) // GX::SetGPMetric_caseD_1e
|
||||
MKW_GUEST_ADDRESS(80173AA8, 80173A08, 801739C8) // GX::SetGPMetric_caseD_1f
|
||||
MKW_GUEST_ADDRESS(80173AC4, 80173A24, 801739E4) // GX::SetGPMetric_caseD_20
|
||||
MKW_GUEST_ADDRESS(80173AE0, 80173A40, 80173A00) // GX::SetGPMetric_caseD_21
|
||||
MKW_GUEST_ADDRESS(80173AF8, 80173A58, 80173A18) // GX::SetGPMetric_caseD_23
|
||||
MKW_GUEST_ADDRESS(80173B18, 80173A78, 80173A38) // GX::SetGPMetric_switch
|
||||
MKW_GUEST_ADDRESS(80173B1C, 80173A7C, 80173A3C) // GX::SetGPMetric_caseD_0
|
||||
MKW_GUEST_ADDRESS(80173B38, 80173A98, 80173A58) // GX::SetGPMetric_caseD_1
|
||||
MKW_GUEST_ADDRESS(80173B54, 80173AB4, 80173A74) // GX::SetGPMetric_caseD_2
|
||||
MKW_GUEST_ADDRESS(80173B70, 80173AD0, 80173A90) // GX::SetGPMetric_caseD_3
|
||||
MKW_GUEST_ADDRESS(80173B8C, 80173AEC, 80173AAC) // GX::SetGPMetric_caseD_8
|
||||
MKW_GUEST_ADDRESS(80173BA8, 80173B08, 80173AC8) // GX::SetGPMetric_caseD_15
|
||||
MKW_GUEST_ADDRESS(80173BC4, 80173B24, 80173AE4) // GX::SetGPMetric_caseD_4
|
||||
MKW_GUEST_ADDRESS(80173BE0, 80173B40, 80173B00) // GX::SetGPMetric_caseD_5
|
||||
MKW_GUEST_ADDRESS(80173BFC, 80173B5C, 80173B1C) // GX::SetGPMetric_caseD_6
|
||||
MKW_GUEST_ADDRESS(80173C18, 80173B78, 80173B38) // GX::SetGPMetric_caseD_7
|
||||
MKW_GUEST_ADDRESS(80173C34, 80173B94, 80173B54) // GX::SetGPMetric_caseD_9
|
||||
MKW_GUEST_ADDRESS(80173C64, 80173BC4, 80173B84) // GX::SetGPMetric_caseD_a
|
||||
MKW_GUEST_ADDRESS(80173C94, 80173BF4, 80173BB4) // GX::SetGPMetric_caseD_b
|
||||
MKW_GUEST_ADDRESS(80173CC4, 80173C24, 80173BE4) // GX::SetGPMetric_caseD_c
|
||||
MKW_GUEST_ADDRESS(80173CF4, 80173C54, 80173C14) // GX::SetGPMetric_caseD_d
|
||||
MKW_GUEST_ADDRESS(80173D24, 80173C84, 80173C44) // GX::SetGPMetric_caseD_e
|
||||
MKW_GUEST_ADDRESS(80173D54, 80173CB4, 80173C74) // GX::SetGPMetric_caseD_f
|
||||
MKW_GUEST_ADDRESS(80173D84, 80173CE4, 80173CA4) // GX::SetGPMetric_caseD_10
|
||||
MKW_GUEST_ADDRESS(80173DB0, 80173D10, 80173CD0) // GX::SetGPMetric_caseD_11
|
||||
MKW_GUEST_ADDRESS(80173DC0, 80173D20, 80173CE0) // GX::SetGPMetric_caseD_12
|
||||
MKW_GUEST_ADDRESS(80173DD0, 80173D30, 80173CF0) // GX::SetGPMetric_caseD_13
|
||||
MKW_GUEST_ADDRESS(80173DE0, 80173D40, 80173D00) // GX::SetGPMetric_caseD_14
|
||||
MKW_GUEST_ADDRESS(80173DEC, 80173D4C, 80173D0C) // GX::SetGPMetric_caseD_16
|
||||
MKW_GUEST_ADDRESS(80173DF8, 80173D58, 80173D18) // GX::ClearGPMetric
|
||||
MKW_GUEST_ADDRESS(80192F7C, 80192EDC, 80192E9C) // IPCInit
|
||||
MKW_GUEST_ADDRESS(80193010, 80192F70, 80192F30) // IPCReadReg
|
||||
MKW_GUEST_ADDRESS(80193020, 80192F80, 80192F40) // IPCWriteReg
|
||||
MKW_GUEST_ADDRESS(80193040, 80192FA0, 80192F60) // IPCSetBufferLo
|
||||
MKW_GUEST_ADDRESS(80193478, 801933D8, 80193398) // IPCCltInit
|
||||
MKW_GUEST_ADDRESS(801937E0, 80193740, 80193700) // IOS::OpenAsync
|
||||
MKW_GUEST_ADDRESS(801938F8, 80193858, 80193818) // IOS::Open
|
||||
MKW_GUEST_ADDRESS(801938FC, 8019385C, 8019381C)
|
||||
MKW_GUEST_ADDRESS(80193A18, 80193978, 80193938) // IOS::CloseAsync
|
||||
MKW_GUEST_ADDRESS(80193AD8, 80193A38, 801939F8) // IOS::Close
|
||||
MKW_GUEST_ADDRESS(80193B80, 80193AE0, 80193AA0) // IOS::ReadAsync
|
||||
MKW_GUEST_ADDRESS(80193C80, 80193BE0, 80193BA0) // IOS::Read
|
||||
MKW_GUEST_ADDRESS(80193D88, 80193CE8, 80193CA8) // IOS::WriteAsync
|
||||
MKW_GUEST_ADDRESS(80193E88, 80193DE8, 80193DA8) // IOS::Write
|
||||
MKW_GUEST_ADDRESS(80193F90, 80193EF0, 80193EB0) // IOS::SeekAsync
|
||||
MKW_GUEST_ADDRESS(80194070, 80193FD0, 80193F90) // IOS::Seek
|
||||
MKW_GUEST_ADDRESS(80194158, 801940B8, 80194078) // IOS::IoctlAsync
|
||||
MKW_GUEST_ADDRESS(80194290, 801941F0, 801941B0) // IOS::Ioctl
|
||||
MKW_GUEST_ADDRESS(801944FC, 8019445C, 8019441C) // IOS::IoctlvAsync
|
||||
MKW_GUEST_ADDRESS(801945E0, 80194540, 80194500) // IOS::Ioctlv
|
||||
MKW_GUEST_ADDRESS(801949B8, 80194918, 801948D8) // iosCreateHeap
|
||||
MKW_GUEST_ADDRESS(8019B43C, 8019B39C, 8019B35C) // NAND::Create
|
||||
MKW_GUEST_ADDRESS(8019B524, 8019B484, 8019B444) // NAND::Private::CreateAsync
|
||||
MKW_GUEST_ADDRESS(8019B59C, 8019B4FC, 8019B4BC) // NAND::Delete
|
||||
MKW_GUEST_ADDRESS(8019B6E4, 8019B644, 8019B604) // NAND::Private::DeleteAsync
|
||||
MKW_GUEST_ADDRESS(8019B7A4, 8019B704, 8019B6C4) // NAND::Read
|
||||
MKW_GUEST_ADDRESS(8019B80C, 8019B76C, 8019B72C) // NAND::ReadAsync
|
||||
MKW_GUEST_ADDRESS(8019B884, 8019B7E4, 8019B7A4) // NAND::Write
|
||||
MKW_GUEST_ADDRESS(8019B8EC, 8019B84C, 8019B80C) // NAND::WriteAsync
|
||||
MKW_GUEST_ADDRESS(8019B964, 8019B8C4, 8019B884) // NAND::Seek
|
||||
MKW_GUEST_ADDRESS(8019BA04, 8019B964, 8019B924) // NAND::SeekAsync
|
||||
MKW_GUEST_ADDRESS(8019BBE0, 8019BB40, 8019BB00) // NAND::CreateDir
|
||||
MKW_GUEST_ADDRESS(8019BCC8, 8019BC28, 8019BBE8) // NAND::Private::CreateDirAsync
|
||||
MKW_GUEST_ADDRESS(8019BEE8, 8019BE48, 8019BE08) // NAND::Move
|
||||
MKW_GUEST_ADDRESS(8019BF4C, 8019BEAC, 8019BE6C) // NAND::GetLength
|
||||
MKW_GUEST_ADDRESS(8019C048, 8019BFA8, 8019BF68) // NAND::GetLengthAsync
|
||||
MKW_GUEST_ADDRESS(8019C380, 8019C2E0, 8019C2A0) // NAND::GetStatus
|
||||
MKW_GUEST_ADDRESS(8019C448, 8019C3A8, 8019C368) // NAND::Private::GetStatusAsync
|
||||
MKW_GUEST_ADDRESS(8019C800, 8019C760, 8019C720) // NAND::Open
|
||||
MKW_GUEST_ADDRESS(8019C918, 8019C878, 8019C838) // NAND::OpenAsync
|
||||
MKW_GUEST_ADDRESS(8019C990, 8019C8F0, 8019C8B0) // NAND::Private::OpenAsync
|
||||
MKW_GUEST_ADDRESS(8019CA80, 8019C9E0, 8019C9A0) // NAND::Close
|
||||
MKW_GUEST_ADDRESS(8019CAEC, 8019CA4C, 8019CA0C) // NAND::CloseAsync
|
||||
MKW_GUEST_ADDRESS(8019CB74, 8019CAD4, 8019CA94) // NAND::SafeOpen
|
||||
MKW_GUEST_ADDRESS(8019CF28, 8019CE88, 8019CE48) // NAND::SafeClose
|
||||
MKW_GUEST_ADDRESS(8019D104, 8019D064, 8019D024) // NAND::Private::SafeOpenAsync
|
||||
MKW_GUEST_ADDRESS(8019D720, 8019D680, 8019D640) // NAND::SafeCloseAsync
|
||||
MKW_GUEST_ADDRESS(8019E18C, 8019E0EC, 8019E0AC) // NAND::Init
|
||||
MKW_GUEST_ADDRESS(8019E390, 8019E2F0, 8019E2B0) // NAND::GetCurrentDir
|
||||
MKW_GUEST_ADDRESS(8019E770, 8019E6D0, 8019E690) // NAND::GetType
|
||||
MKW_GUEST_ADDRESS(8019E7B4, 8019E714, 8019E6D4) // NAND::Private::GetTypeAsync
|
||||
MKW_GUEST_ADDRESS(8019EAD0, 8019EA30, 8019E9F0) // NAND::Check
|
||||
MKW_GUEST_ADDRESS(8019F33C, 8019F29C, 8019F25C) // OS::GetConsoleType
|
||||
MKW_GUEST_ADDRESS(801A00E0, 801A0040, 801A0000) // OS::ExceptionInit
|
||||
MKW_GUEST_ADDRESS(801A04A0, 801A0400, 801A03C0) // OS::__PSInit
|
||||
MKW_GUEST_ADDRESS(801A0620, 801A0580, 801A0540) // InsertAlarm
|
||||
MKW_GUEST_ADDRESS(801A0870, 801A07D0, 801A0790) // OS::SetAlarm
|
||||
MKW_GUEST_ADDRESS(801A08E0, 801A0840, 801A0800) // OS::SetPeriodicAlarm
|
||||
MKW_GUEST_ADDRESS(801A1138, 801A1098, 801A1058) // __AIClockInit
|
||||
MKW_GUEST_ADDRESS(801A1358, 801A12B8, 801A1278) // OS::__InitAudioSystem
|
||||
MKW_GUEST_ADDRESS(801A1520, 801A1480, 801A1440) // OS::__StopAudioSystem
|
||||
MKW_GUEST_ADDRESS(801A15EC, 801A154C, 801A150C) // DCEnable
|
||||
MKW_GUEST_ADDRESS(801A1600, 801A1560, 801A1520) // DCInvalidateRange
|
||||
MKW_GUEST_ADDRESS(801A162C, 801A158C, 801A154C) // DCFlushRange
|
||||
MKW_GUEST_ADDRESS(801A165C, 801A15BC, 801A157C) // DCStoreRange
|
||||
MKW_GUEST_ADDRESS(801A168C, 801A15EC, 801A15AC) // DCFlushRangeNoSync
|
||||
MKW_GUEST_ADDRESS(801A16B8, 801A1618, 801A15D8) // DCStoreRangeNoSync
|
||||
MKW_GUEST_ADDRESS(801A16E4, 801A1644, 801A1604) // DCZeroRange
|
||||
MKW_GUEST_ADDRESS(801A1710, 801A1670, 801A1630) // ICInvalidateRange
|
||||
MKW_GUEST_ADDRESS(801A1744, 801A16A4, 801A1664) // ICFlashInvalidate
|
||||
MKW_GUEST_ADDRESS(801A1754, 801A16B4, 801A1674) // ICEnable
|
||||
MKW_GUEST_ADDRESS(801A1768, 801A16C8, 801A1688) // __LCEnable
|
||||
MKW_GUEST_ADDRESS(801A1834, 801A1794, 801A1754) // LCEnable
|
||||
MKW_GUEST_ADDRESS(801A186C, 801A17CC, 801A178C) // LCDisable
|
||||
MKW_GUEST_ADDRESS(801A1894, 801A17F4, 801A17B4) // LCLoadBlocks
|
||||
MKW_GUEST_ADDRESS(801A18B8, 801A1818, 801A17D8) // LCStoreBlocks
|
||||
MKW_GUEST_ADDRESS(801A18DC, 801A183C, 801A17FC) // LCStoreData
|
||||
MKW_GUEST_ADDRESS(801A197C, 801A18DC, 801A189C) // LCQueueLength
|
||||
MKW_GUEST_ADDRESS(801A1988, 801A18E8, 801A18A8) // LCQueueWait
|
||||
MKW_GUEST_ADDRESS(801A1AE4, 801A1A44, 801A1A04) // OS::__CacheInit
|
||||
MKW_GUEST_ADDRESS(801A1E70, 801A1DD0, 801A1D90) // OS::SetCurrentContext
|
||||
MKW_GUEST_ADDRESS(801A1ED8, 801A1E38, 801A1DF8) // OS::SaveContext
|
||||
MKW_GUEST_ADDRESS(801A1F58, 801A1EB8, 801A1E78) // OS::LoadContext
|
||||
MKW_GUEST_ADDRESS(801A2098, 801A1FF8, 801A1FB8) // OS::ClearContext
|
||||
MKW_GUEST_ADDRESS(801A20BC, 801A201C, 801A1FDC) // OS::InitContext
|
||||
MKW_GUEST_ADDRESS(801A25D0, 801A2530, 801A24F0) // OS::Report
|
||||
MKW_GUEST_ADDRESS(801A2660, 801A25C0, 801A2580) // OS::Panic
|
||||
MKW_GUEST_ADDRESS(801A4EC4, 801A4E24, 801A4DE4) // OS::Fatal
|
||||
MKW_GUEST_ADDRESS(801A6000, 801A5F60, 801A5F20)
|
||||
MKW_GUEST_ADDRESS(801A65AC, 801A650C, 801A64CC) // OS::DisableInterrupts
|
||||
MKW_GUEST_ADDRESS(801A65C0, 801A6520, 801A64E0) // OS::EnableInterrupts
|
||||
MKW_GUEST_ADDRESS(801A65D4, 801A6534, 801A64F4) // OS::RestoreInterrupts
|
||||
MKW_GUEST_ADDRESS(801A65F8, 801A6558, 801A6518) // OS::__SetInterruptHandler
|
||||
MKW_GUEST_ADDRESS(801A661C, 801A657C, 801A653C) // OS::__InterruptInit
|
||||
MKW_GUEST_ADDRESS(801A66E0, 801A6640, 801A6600) // SetInterruptMask
|
||||
MKW_GUEST_ADDRESS(801A693C, 801A689C, 801A685C) // OS::__MaskInterrupts
|
||||
MKW_GUEST_ADDRESS(801A69BC, 801A691C, 801A68DC) // OS::__UnmaskInterrupts
|
||||
MKW_GUEST_ADDRESS(801A7000, 801A6F60, 801A6F20)
|
||||
MKW_GUEST_ADDRESS(801A72FC, 801A725C, 801A721C) // OS::InitMessageQueue
|
||||
MKW_GUEST_ADDRESS(801A735C, 801A72BC, 801A727C) // OS::SendMessage
|
||||
MKW_GUEST_ADDRESS(801A7424, 801A7384, 801A7344) // OS::ReceiveMessage
|
||||
MKW_GUEST_ADDRESS(801A7500, 801A7460, 801A7420) // OS::JamMessage
|
||||
MKW_GUEST_ADDRESS(801A7DFC, 801A7D5C, 801A7D1C) // OS::__InitMemoryProtection
|
||||
MKW_GUEST_ADDRESS(801A7EE4, 801A7E44, 801A7E04) // OS::LockMutex
|
||||
MKW_GUEST_ADDRESS(801A7FC0, 801A7F20, 801A7EE0) // OS::UnlockMutex
|
||||
MKW_GUEST_ADDRESS(801A8088, 801A7FE8, 801A7FA8) // OS::__UnlockAllMutex
|
||||
MKW_GUEST_ADDRESS(801A8A50, 801A89B0, 801A8970) // OS::GetResetCode
|
||||
MKW_GUEST_ADDRESS(801A8A80, 801A89E0, 801A89A0) // OS::ResetSystem
|
||||
MKW_GUEST_ADDRESS(801A961C, 801A957C, 801A953C) // OS::__ThreadInit
|
||||
MKW_GUEST_ADDRESS(801A98B0, 801A9810, 801A97D0) // OS::GetCurrentThread
|
||||
MKW_GUEST_ADDRESS(801A9C08, 801A9B68, 801A9B28) // SelectThread
|
||||
MKW_GUEST_ADDRESS(801A9E84, 801A9DE4, 801A9DA4) // OS::CreateThread
|
||||
MKW_GUEST_ADDRESS(801AA0F0, 801AA050, 801AA010) // RVL::OS::ExitThread
|
||||
MKW_GUEST_ADDRESS(801AA1D4, 801AA134, 801AA0F4) // OS::CancelThread
|
||||
MKW_GUEST_ADDRESS(801AA3AC, 801AA30C, 801AA2CC) // OS::JoinThread
|
||||
MKW_GUEST_ADDRESS(801AA4EC, 801AA44C, 801AA40C) // OS::DetachThread
|
||||
MKW_GUEST_ADDRESS(801AA58C, 801AA4EC, 801AA4AC) // OS::ResumeThread
|
||||
MKW_GUEST_ADDRESS(801AA6A8, 801AA608, 801AA5C8)
|
||||
MKW_GUEST_ADDRESS(801AA9B8, 801AA918, 801AA8D8) // OS::SleepThread
|
||||
MKW_GUEST_ADDRESS(801AAAA4, 801AAA04, 801AA9C4) // OS::WakeupThread
|
||||
MKW_GUEST_ADDRESS(801AACA8, 801AAC08, 801AABC8) // OS::SleepTicks
|
||||
MKW_GUEST_ADDRESS(801AAD5C, 801AACBC, 801AAC7C) // OS::GetTime
|
||||
MKW_GUEST_ADDRESS(801AAD7C, 801AACDC, 801AAC9C) // OS::__GetSystemTime
|
||||
MKW_GUEST_ADDRESS(801AADE0, 801AAD40, 801AAD00) // OS::__TimeToSystemTime
|
||||
MKW_GUEST_ADDRESS(801AB75C, 801AB6BC, 801AB67C) // OS::SetPowerCallback
|
||||
MKW_GUEST_ADDRESS(801AB848, 801AB7A8, 801AB768) // OS::__InitSTM
|
||||
MKW_GUEST_ADDRESS(801ABC0C, 801ABB6C, 801ABB2C) // OS::__DefaultPowerCallback
|
||||
MKW_GUEST_ADDRESS(801AD1D4, 801AD134, 801AD0F4) // OS::CheckInstall
|
||||
MKW_GUEST_ADDRESS(801AE4A0, 801AE400, 801AE3C0) // OS::IsTitleInstalled
|
||||
MKW_GUEST_ADDRESS(801AE58C, 801AE4EC, 801AE4AC) // exit
|
||||
MKW_GUEST_ADDRESS(801AF0DC, 801AF03C, 801AEFFC) // PAD::Reset
|
||||
MKW_GUEST_ADDRESS(801AF1E4, 801AF144, 801AF104) // PAD::Recalibrate
|
||||
MKW_GUEST_ADDRESS(801AF2F0, 801AF250, 801AF210) // PAD::Init
|
||||
MKW_GUEST_ADDRESS(801AF44C, 801AF3AC, 801AF36C) // PAD::Read
|
||||
MKW_GUEST_ADDRESS(801AF908, 801AF868, 801AF828) // PAD::ControlMotor
|
||||
MKW_GUEST_ADDRESS(801B0220, 801B0180, 801B0140) // SCCheckStatus
|
||||
MKW_GUEST_ADDRESS(801B1BE4, 801B1B44, 801B1B04) // SCGetAspectRatio
|
||||
MKW_GUEST_ADDRESS(801B1CAC, 801B1C0C, 801B1BCC) // SCGetEuRgb60Mode
|
||||
MKW_GUEST_ADDRESS(801B1ED0, 801B1E30, 801B1DF0)
|
||||
MKW_GUEST_ADDRESS(801B1EDC, 801B1E3C, 801B1DFC)
|
||||
MKW_GUEST_ADDRESS(801B1EE8, 801B1E48, 801B1E08)
|
||||
MKW_GUEST_ADDRESS(801B1EF4, 801B1E54, 801B1E14) // SCSetBtCmpDevInfoArray
|
||||
MKW_GUEST_ADDRESS(801B1F00, 801B1E60, 801B1E20) // SCGetBtDpdSensibility
|
||||
MKW_GUEST_ADDRESS(801B1F68, 801B1EC8, 801B1E88) // SCGetWpadMotorMode
|
||||
MKW_GUEST_ADDRESS(801B1FBC, 801B1F1C, 801B1EDC) // SCSetWpadMotorMode
|
||||
MKW_GUEST_ADDRESS(801B1FC4, 801B1F24, 801B1EE4) // SCGetWpadSensorBarPosition
|
||||
MKW_GUEST_ADDRESS(801B2018, 801B1F78, 801B1F38) // SCGetWpadSpeakerVolume
|
||||
MKW_GUEST_ADDRESS(801B206C, 801B1FCC, 801B1F8C) // SCSetWpadSpeakerVolume
|
||||
MKW_GUEST_ADDRESS(801B23A0, 801B2300, 801B22C0) // SCGetProductArea
|
||||
MKW_GUEST_ADDRESS(801B2424, 801B2384, 801B2344) // SCGetProductCode
|
||||
MKW_GUEST_ADDRESS(801B2460, 801B23C0, 801B2380) // SCGetProductSN
|
||||
MKW_GUEST_ADDRESS(801B24C8, 801B2428, 801B23E8) // SCGetProductGameRegion
|
||||
MKW_GUEST_ADDRESS(801B2DE0, 801B2D40, 801B2D00) // SIInit
|
||||
MKW_GUEST_ADDRESS(801B3ACC, 801B3A2C, 801B39EC) // SISetSamplingRate
|
||||
MKW_GUEST_ADDRESS(801B90F4, 801B9054, 801B9014) // VISetPreRetraceCallback
|
||||
MKW_GUEST_ADDRESS(801B9138, 801B9098, 801B9058) // VISetPostRetraceCallback
|
||||
MKW_GUEST_ADDRESS(801B9294, 801B91F4, 801B91B4) // __VIInit
|
||||
MKW_GUEST_ADDRESS(801B94A4, 801B9404, 801B93C4) // VIInit
|
||||
MKW_GUEST_ADDRESS(801B9934, 801B9894, 801B9854) // VIInit_caseD_0
|
||||
MKW_GUEST_ADDRESS(801B993C, 801B989C, 801B985C) // VIInit_caseD_1
|
||||
MKW_GUEST_ADDRESS(801B9944, 801B98A4, 801B9864) // VIInit_caseD_2
|
||||
MKW_GUEST_ADDRESS(801B99EC, 801B994C, 801B990C) // VIWaitForRetrace
|
||||
MKW_GUEST_ADDRESS(801B9F6C, 801B9ECC, 801B9E8C) // VIConfigure
|
||||
MKW_GUEST_ADDRESS(801BA9A4, 801BA904, 801BA8C4) // VIFlush
|
||||
MKW_GUEST_ADDRESS(801BAAB8, 801BAA18, 801BA9D8) // VISetNextFrameBuffer
|
||||
MKW_GUEST_ADDRESS(801BAB24, 801BAA84, 801BAA44) // VIGetNextFrameBuffer
|
||||
MKW_GUEST_ADDRESS(801BAB2C, 801BAA8C, 801BAA4C) // VISetBlack
|
||||
MKW_GUEST_ADDRESS(801BABA4, 801BAB04, 801BAAC4) // VIGetRetraceCount
|
||||
MKW_GUEST_ADDRESS(801BABAC, 801BAB0C, 801BAACC) // VIGetNextField
|
||||
MKW_GUEST_ADDRESS(801BAC48, 801BABA8, 801BAB68) // VIGetCurrentLine
|
||||
MKW_GUEST_ADDRESS(801BAD38, 801BAC98, 801BAC58) // VIGetDTVStatus
|
||||
MKW_GUEST_ADDRESS(801D8D30, 801D8C90, 801D8C50) // NHTTPStartup
|
||||
MKW_GUEST_ADDRESS(801D9E94, 801D9DF4, 801D9DB4) // NHTTPi_GetSystemInfoP
|
||||
MKW_GUEST_ADDRESS(8020FF9C, 8020FEFC, 8020FEBC) // EGG::AsyncDisplay::endRender
|
||||
MKW_GUEST_ADDRESS(80218C2C, 80218B8C, 80218B4C) // EGG::Decomp::decodeSZS
|
||||
MKW_GUEST_ADDRESS(80219FB4, 80219F14, 80219ED4) // EGG::Display::copyEFBtoXFB
|
||||
MKW_GUEST_ADDRESS(8021B344, 8021B2A4, 8021B264) // EGG::DrawGX::SetVtxState_switch
|
||||
MKW_GUEST_ADDRESS(8021B688, 8021B5E8, 8021B5A8)
|
||||
MKW_GUEST_ADDRESS(8022E2BC, 8022DF38, 8022E1DC) // EGG::LightTexture::SetupTevFinish
|
||||
MKW_GUEST_ADDRESS(8023BD38, 8023B9B4, 8023BC58) // EGG::ScnRenderer::CreatePath
|
||||
MKW_GUEST_ADDRESS(8023E53C, 8023E1B8, 8023E45C) // EGG::Screen::SetTVModeDefault
|
||||
MKW_GUEST_ADDRESS(80242D7C, 80241EC0, 80242C9C) // EGG::TaskThread::Run
|
||||
MKW_GUEST_ADDRESS(8024373C, 80242880, 8024365C) // EGG::Thread::Run
|
||||
MKW_GUEST_ADDRESS(80244DE0, 80244D40, 80244D00)
|
||||
MKW_GUEST_ADDRESS(80244EA0, 80244E00, 80244DC0)
|
||||
MKW_GUEST_ADDRESS(802574A0, 80257180, 80256E40)
|
||||
MKW_GUEST_ADDRESS(802574E0, 802571C0, 80256E80)
|
||||
MKW_GUEST_ADDRESS(80257520, 80257200, 80256EC0)
|
||||
MKW_GUEST_ADDRESS(80257540, 80257220, 80256EE0)
|
||||
MKW_GUEST_ADDRESS(8027F820, 8027B4E0, 8027F1C0)
|
||||
MKW_GUEST_ADDRESS(8029CEB0, 80298B70, 8029C850)
|
||||
MKW_GUEST_ADDRESS(8029CEF8, 80298BB8, 8029C898)
|
||||
MKW_GUEST_ADDRESS(802A3EE8, 8029FB80, 802A3888)
|
||||
MKW_GUEST_ADDRESS(802A3EF4, 8029FB8C, 802A3894)
|
||||
MKW_GUEST_ADDRESS(802A3F0C, 8029FBA4, 802A38AC)
|
||||
MKW_GUEST_ADDRESS(802F81A0, 802F3E20, 802F7B20)
|
||||
MKW_GUEST_ADDRESS(802F8200, 802F3E80, 802F7B80)
|
||||
MKW_GUEST_ADDRESS(80343230, 8033EEB0, 80342BB0)
|
||||
MKW_GUEST_ADDRESS(803434E0, 8033F160, 80342E60)
|
||||
MKW_GUEST_ADDRESS(80343740, 8033F3C0, 803430C0)
|
||||
MKW_GUEST_ADDRESS(803437C0, 8033F440, 80343140)
|
||||
MKW_GUEST_ADDRESS(80343DC0, 8033FA40, 80343740)
|
||||
MKW_GUEST_ADDRESS(80343DE4, 8033FA64, 80343764)
|
||||
MKW_GUEST_ADDRESS(80344090, 8033FD10, 80343A10)
|
||||
MKW_GUEST_ADDRESS(80344094, 8033FD14, 80343A14)
|
||||
MKW_GUEST_ADDRESS(80344098, 8033FD18, 80343A18)
|
||||
MKW_GUEST_ADDRESS(803440A4, 8033FD24, 80343A24)
|
||||
MKW_GUEST_ADDRESS(803440A8, 8033FD28, 80343A28)
|
||||
MKW_GUEST_ADDRESS(803440AC, 8033FD2C, 80343A2C)
|
||||
MKW_GUEST_ADDRESS(80344110, 8033FD90, 80343A90)
|
||||
MKW_GUEST_ADDRESS(80344710, 80340390, 80344090)
|
||||
MKW_GUEST_ADDRESS(80346D20, 803429A0, 803466A0)
|
||||
MKW_GUEST_ADDRESS(80347130, 80342DB0, 80346AB0)
|
||||
MKW_GUEST_ADDRESS(80347498, 80343118, 80346E18)
|
||||
MKW_GUEST_ADDRESS(803477B0, 80343430, 80347130)
|
||||
MKW_GUEST_ADDRESS(803478B0, 80343530, 80347230)
|
||||
MKW_GUEST_ADDRESS(80350864, 8034C4E4, 803501E4)
|
||||
MKW_GUEST_ADDRESS(80350866, 8034C4E6, 803501E6)
|
||||
MKW_GUEST_ADDRESS(80350872, 8034C4F2, 803501F2)
|
||||
MKW_GUEST_ADDRESS(8035087C, 8034C4FC, 803501FC)
|
||||
MKW_GUEST_ADDRESS(80350890, 8034C510, 80350210)
|
||||
MKW_GUEST_ADDRESS(80385800, 80381480, 80385180)
|
||||
MKW_GUEST_ADDRESS(80385802, 80381482, 80385182)
|
||||
MKW_GUEST_ADDRESS(80385804, 80381484, 80385184)
|
||||
MKW_GUEST_ADDRESS(80385920, 803815A0, 803852A0) // dev/fs_fd
|
||||
MKW_GUEST_ADDRESS(80385928, 803815A8, 803852A8)
|
||||
MKW_GUEST_ADDRESS(80385AA8, 80381728, 80385428)
|
||||
MKW_GUEST_ADDRESS(80385AE0, 80381760, 80385460)
|
||||
MKW_GUEST_ADDRESS(80386000, 80381C80, 80385980) // SystemManager
|
||||
MKW_GUEST_ADDRESS(80386298, 80381F18, 80385C18)
|
||||
MKW_GUEST_ADDRESS(80386448, 803820C8, 80385DC8)
|
||||
MKW_GUEST_ADDRESS(8038644C, 803820CC, 80385DCC)
|
||||
MKW_GUEST_ADDRESS(8038647C, 803820FC, 80385DFC)
|
||||
MKW_GUEST_ADDRESS(80386480, 80382100, 80385E00)
|
||||
MKW_GUEST_ADDRESS(80386524, 803821A4, 80385EA4)
|
||||
MKW_GUEST_ADDRESS(80386528, 803821A8, 80385EA8)
|
||||
MKW_GUEST_ADDRESS(80386608, 80382288, 80385F88)
|
||||
MKW_GUEST_ADDRESS(80386610, 80382290, 80385F90)
|
||||
MKW_GUEST_ADDRESS(80386614, 80382294, 80385F94)
|
||||
MKW_GUEST_ADDRESS(80386618, 80382298, 80385F98)
|
||||
MKW_GUEST_ADDRESS(8038661C, 8038229C, 80385F9C)
|
||||
MKW_GUEST_ADDRESS(80386620, 803822A0, 80385FA0)
|
||||
MKW_GUEST_ADDRESS(80386624, 803822A4, 80385FA4)
|
||||
MKW_GUEST_ADDRESS(80386664, 803822E4, 80385FE4)
|
||||
MKW_GUEST_ADDRESS(80386668, 803822E8, 80385FE8)
|
||||
MKW_GUEST_ADDRESS(80386670, 803822F0, 80385FF0)
|
||||
MKW_GUEST_ADDRESS(8038667C, 803822FC, 80385FFC)
|
||||
MKW_GUEST_ADDRESS(803866A0, 80382320, 80386020)
|
||||
MKW_GUEST_ADDRESS(803866A8, 80382328, 80386028)
|
||||
MKW_GUEST_ADDRESS(803866F0, 80382370, 80386070)
|
||||
MKW_GUEST_ADDRESS(80386720, 803823A0, 803860A0)
|
||||
MKW_GUEST_ADDRESS(80386724, 803823A4, 803860A4)
|
||||
MKW_GUEST_ADDRESS(80386725, 803823A5, 803860A5)
|
||||
MKW_GUEST_ADDRESS(80386770, 803823F0, 803860F0)
|
||||
MKW_GUEST_ADDRESS(80386774, 803823F4, 803860F4)
|
||||
MKW_GUEST_ADDRESS(8038677C, 803823FC, 803860FC)
|
||||
MKW_GUEST_ADDRESS(80386780, 80382400, 80386100)
|
||||
MKW_GUEST_ADDRESS(80386784, 80382404, 80386104)
|
||||
MKW_GUEST_ADDRESS(803867B0, 80382430, 80386130)
|
||||
MKW_GUEST_ADDRESS(803867B1, 80382431, 80386131)
|
||||
MKW_GUEST_ADDRESS(803867C0, 80382440, 80386140)
|
||||
MKW_GUEST_ADDRESS(803867C4, 80382444, 80386144)
|
||||
MKW_GUEST_ADDRESS(803867D0, 80382450, 80386150)
|
||||
MKW_GUEST_ADDRESS(803867D8, 80382458, 80386158)
|
||||
MKW_GUEST_ADDRESS(803867EC, 8038246C, 8038616C)
|
||||
MKW_GUEST_ADDRESS(803867F0, 80382470, 80386170)
|
||||
MKW_GUEST_ADDRESS(80386848, 803824C8, 803861C8)
|
||||
MKW_GUEST_ADDRESS(803868A0, 80382520, 80386220)
|
||||
MKW_GUEST_ADDRESS(803868F8, 80382578, 80386278)
|
||||
MKW_GUEST_ADDRESS(80386918, 80382598, 80386298)
|
||||
MKW_GUEST_ADDRESS(8038691C, 8038259C, 8038629C)
|
||||
MKW_GUEST_ADDRESS(80386920, 803825A0, 803862A0)
|
||||
MKW_GUEST_ADDRESS(80386934, 803825B4, 803862B4)
|
||||
MKW_GUEST_ADDRESS(80386938, 803825B8, 803862B8)
|
||||
MKW_GUEST_ADDRESS(8038693C, 803825BC, 803862BC)
|
||||
MKW_GUEST_ADDRESS(80386940, 803825C0, 803862C0)
|
||||
MKW_GUEST_ADDRESS(80386948, 803825C8, 803862C8)
|
||||
MKW_GUEST_ADDRESS(803869E0, 80382660, 80386360)
|
||||
MKW_GUEST_ADDRESS(80386B38, 803827B8, 803864B8)
|
||||
MKW_GUEST_ADDRESS(80386B44, 803827C4, 803864C4)
|
||||
MKW_GUEST_ADDRESS(80386BA0, 80382820, 80386520)
|
||||
MKW_GUEST_ADDRESS(80386BA8, 80382828, 80386528)
|
||||
MKW_GUEST_ADDRESS(80386BB4, 80382834, 80386534)
|
||||
MKW_GUEST_ADDRESS(80386BB8, 80382838, 80386538)
|
||||
MKW_GUEST_ADDRESS(80386BC0, 80382840, 80386540)
|
||||
MKW_GUEST_ADDRESS(80386BE4, 80382864, 80386564)
|
||||
MKW_GUEST_ADDRESS(80386F14, 80382B94, 80386894)
|
||||
MKW_GUEST_ADDRESS(80386F20, 80382BA0, 803868A0)
|
||||
MKW_GUEST_ADDRESS(80386F24, 80382BA4, 803868A4)
|
||||
MKW_GUEST_ADDRESS(80386F60, 80382BD8, 803868E0)
|
||||
MKW_GUEST_ADDRESS(80388588, 80384208, 80387F08)
|
||||
MKW_GUEST_ADDRESS(8038858C, 8038420C, 80387F0C)
|
||||
MKW_GUEST_ADDRESS(803886C8, 80384348, 80388048)
|
||||
MKW_GUEST_ADDRESS(80388B80, 80384800, 80388500)
|
||||
MKW_GUEST_ADDRESS(80388BA0, 80384820, 80388520)
|
||||
MKW_GUEST_ADDRESS(80388BC0, 80384840, 80388540)
|
||||
MKW_GUEST_ADDRESS(80388BE0, 80384860, 80388560)
|
||||
MKW_GUEST_ADDRESS(80388DD0, 80384A48, 80388750)
|
||||
MKW_GUEST_ADDRESS(80388DE0, 80384A58, 80388760)
|
||||
MKW_GUEST_ADDRESS(80388DF4, 80384A6C, 80388774)
|
||||
MKW_GUEST_ADDRESS(80529D68, 805258F4, 805296E8) // MovieManager::PrepareAsync
|
||||
MKW_GUEST_ADDRESS(80550CC0, 8054AD68, 80550640) // THP::PlayerOpen
|
||||
MKW_GUEST_ADDRESS(80550F48, 8054AFF0, 805508C8) // THP::PlayerClose
|
||||
MKW_GUEST_ADDRESS(80550F9C, 8054B044, 8055091C) // THP::PlayerCalcNeedMemory
|
||||
MKW_GUEST_ADDRESS(80551054, 8054B0FC, 805509D4) // THP::PlayerSetBuffer
|
||||
MKW_GUEST_ADDRESS(80551378, 8054B420, 80550CF8) // THP::PlayerPrepare
|
||||
MKW_GUEST_ADDRESS(80551658, 8054B700, 80550FD8) // THP::PlayerStop
|
||||
MKW_GUEST_ADDRESS(80551D38, 8054BDE0, 805516B8) // THP::PlayerGetVideoInfo
|
||||
MKW_GUEST_ADDRESS(805529A8, 8054CA50, 80552328) // THP::VideoDecoder
|
||||
MKW_GUEST_ADDRESS(80552A74, 8054CB1C, 805523F4) // THP::VideoDecoderOnMemory
|
||||
MKW_GUEST_ADDRESS(8055531C, 8054F2FC, 80554C9C) // RelProlog
|
||||
MKW_GUEST_ADDRESS(805653D0, 80561050, 80564D50)
|
||||
MKW_GUEST_ADDRESS(8088F400, 8088AFD0, 8088EA6C)
|
||||
MKW_GUEST_ADDRESS(8088F704, 8088B2D4, 8088ED70)
|
||||
MKW_GUEST_ADDRESS(8088FDB8, 8088B960, 8088F418)
|
||||
MKW_GUEST_ADDRESS(808B4C20, 808B0570, 808B3D80)
|
||||
MKW_GUEST_ADDRESS(809BEBA0, 809BA3E0, 809BDC00)
|
||||
MKW_GUEST_ADDRESS(809BEBA4, 809BA3E4, 809BDC04)
|
||||
MKW_GUEST_ADDRESS(809BEBA5, 809BA3E5, 809BDC05)
|
||||
MKW_GUEST_ADDRESS(809BEBA6, 809BA3E6, 809BDC06)
|
||||
MKW_GUEST_ADDRESS(809BEBA7, 809BA3E7, 809BDC07)
|
||||
MKW_GUEST_ADDRESS(809BECF0, 809BA530, 809BDD50)
|
||||
MKW_GUEST_ADDRESS(809C1830, 809BD070, 809C0890)
|
||||
MKW_GUEST_ADDRESS(809C183C, 809BD07C, 809C089C)
|
||||
MKW_GUEST_ADDRESS(809C2898, 809BDC58, 809C18F8)
|
||||
@@ -0,0 +1,137 @@
|
||||
#pragma once
|
||||
|
||||
// Guest addresses are named by their PAL (RMCP01) address. Which address that identity has
|
||||
// depends on the region the game was translated from, which runtime/game supplies at link
|
||||
// time, so one compiled runtime serves every region.
|
||||
//
|
||||
// MKW_GADDR(801A9E84) address of that identity in the running region
|
||||
// MKW_GADDR_CT(801A9E84) same, as a constant expression; translated code only
|
||||
//
|
||||
// A PAL address missing from guest_address_table.inc does not compile; regenerate the table
|
||||
// with tools/region/gen_guest_address_table.py.
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace GuestRegion {
|
||||
|
||||
enum class Id : uint8_t {
|
||||
Pal = 0,
|
||||
NtscU = 1,
|
||||
NtscJ = 2,
|
||||
};
|
||||
inline constexpr size_t kCount = 3;
|
||||
|
||||
struct Row {
|
||||
uint32_t address[kCount];
|
||||
|
||||
constexpr uint32_t In(Id region) const { return address[static_cast<size_t>(region)]; }
|
||||
};
|
||||
|
||||
inline constexpr Row kRows[] = {
|
||||
#define MKW_GUEST_ADDRESS(pal, ntscU, ntscJ) {{0x##pal##u, 0x##ntscU##u, 0x##ntscJ##u}},
|
||||
#include "guest_abi/guest_address_table.inc"
|
||||
#undef MKW_GUEST_ADDRESS
|
||||
};
|
||||
inline constexpr size_t kRowCount = sizeof(kRows) / sizeof(kRows[0]);
|
||||
|
||||
constexpr bool RowsAreSorted() {
|
||||
for (size_t i = 1; i < kRowCount; ++i) {
|
||||
if (kRows[i - 1].address[0] >= kRows[i].address[0]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
static_assert(RowsAreSorted(), "guest_address_table.inc must be sorted by PAL address without duplicates");
|
||||
|
||||
constexpr const Row* Find(uint32_t pal) {
|
||||
size_t lo = 0;
|
||||
size_t hi = kRowCount;
|
||||
while (lo < hi) {
|
||||
const size_t mid = lo + (hi - lo) / 2;
|
||||
if (kRows[mid].address[0] < pal) {
|
||||
lo = mid + 1;
|
||||
} else {
|
||||
hi = mid;
|
||||
}
|
||||
}
|
||||
return lo < kRowCount && kRows[lo].address[0] == pal ? &kRows[lo] : nullptr;
|
||||
}
|
||||
|
||||
constexpr const Row& RowOf(uint32_t pal) {
|
||||
return Find(pal) ? *Find(pal) : throw "PAL address missing from guest_abi/guest_address_table.inc";
|
||||
}
|
||||
|
||||
} // namespace GuestRegion
|
||||
|
||||
// Defined by runtime/game for the translated region.
|
||||
extern "C" const uint8_t kMkwGuestRegion;
|
||||
|
||||
namespace GuestRegion {
|
||||
|
||||
inline Id Current() noexcept { return static_cast<Id>(kMkwGuestRegion); }
|
||||
|
||||
template <uint32_t Pal>
|
||||
inline uint32_t Address() noexcept {
|
||||
constexpr Row row = RowOf(Pal);
|
||||
if constexpr (row.address[1] == Pal && row.address[2] == Pal) {
|
||||
return Pal;
|
||||
} else {
|
||||
return row.In(Current());
|
||||
}
|
||||
}
|
||||
|
||||
// Folds to false at compile time for a constant target that no region uses for Pal.
|
||||
template <uint32_t Pal>
|
||||
inline bool Is(uint32_t target) noexcept {
|
||||
constexpr Row row = RowOf(Pal);
|
||||
return (target == row.address[0] || target == row.address[1] || target == row.address[2]) &&
|
||||
target == row.In(Current());
|
||||
}
|
||||
|
||||
[[noreturn]] void FatalUnknownAddress(uint32_t pal) noexcept;
|
||||
|
||||
// For hand-written registrations, which name the PAL address.
|
||||
inline uint32_t Translate(uint32_t pal) noexcept {
|
||||
const Id region = Current();
|
||||
if (region == Id::Pal) {
|
||||
return pal;
|
||||
}
|
||||
const Row* row = Find(pal);
|
||||
if (!row) {
|
||||
FatalUnknownAddress(pal);
|
||||
}
|
||||
return row->In(region);
|
||||
}
|
||||
|
||||
struct Facts {
|
||||
const char* gameId;
|
||||
char letter;
|
||||
uint32_t gameCode;
|
||||
uint32_t viTvFormat;
|
||||
uint32_t mem1ArenaLo;
|
||||
// setting.txt defaults for a new NAND
|
||||
const char* area;
|
||||
const char* model;
|
||||
const char* productCode;
|
||||
const char* video;
|
||||
const char* gameRegion;
|
||||
};
|
||||
|
||||
inline constexpr Facts kFacts[kCount] = {
|
||||
{"RMCP01", 'P', 0x524D4350u, 1u, 0x80399180u, "EUR", "RVL-001(EUR)", "LEH", "PAL", "EU"},
|
||||
{"RMCE01", 'E', 0x524D4345u, 0u, 0x80394E00u, "USA", "RVL-001(USA)", "LU", "NTSC", "US"},
|
||||
{"RMCJ01", 'J', 0x524D434Au, 0u, 0x80398B00u, "JPN", "RVL-001(JPN)", "LJ", "NTSC", "JP"},
|
||||
};
|
||||
|
||||
inline const Facts& CurrentFacts() noexcept { return kFacts[static_cast<size_t>(Current())]; }
|
||||
|
||||
} // namespace GuestRegion
|
||||
|
||||
#define MKW_GADDR(pal) (::GuestRegion::Address<0x##pal##u>())
|
||||
|
||||
#if defined(MKW_TRANSLATED_GUEST_REGION)
|
||||
#define MKW_GADDR_CT(pal) \
|
||||
(::GuestRegion::RowOf(0x##pal##u).In(static_cast<::GuestRegion::Id>(MKW_TRANSLATED_GUEST_REGION)))
|
||||
#endif
|
||||
@@ -44,56 +44,62 @@ extern "C" void GX__SetBlendMode_8017277c(uint32_t t, uint32_t s, uint32_t d, ui
|
||||
extern "C" void GX__LoadPosMtxImm_8017310c(uint32_t ma, uint32_t id);
|
||||
extern "C" void GX__SetCurrentMtx_80173214(uint32_t id);
|
||||
|
||||
// Keyed by the translated region's addresses, so only translated code sees them;
|
||||
// runtime calls resolve through the registry.
|
||||
#if defined(MKW_TRANSLATED_GUEST_REGION)
|
||||
|
||||
#define MKW_KNOWN_TYPED_NATIVE(addr, fn, ...) \
|
||||
template <> struct KnownTypedNativeCpuCall<addr> { \
|
||||
template <> struct KnownTypedNativeCpuCall<MKW_GADDR_CT(addr)> { \
|
||||
static constexpr bool kAvailable = true; \
|
||||
static void Invoke(CpuContext* cpu) { (void)cpu; fn(__VA_ARGS__); } \
|
||||
}
|
||||
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016D3A4u, GX__SetVtxDesc_8016d3a4, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016DC34u, GX__ClearVtxDesc_8016dc34);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016DC68u, GX__SetVtxAttrFmt_8016dc68, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016E37Cu, GX__SetTexCoordGen2_8016e37c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016E5A4u, GX__SetNumTexGens_8016e5a4, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016EAB0u, GX__DrawDone_8016eab0);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016F0F0u, GX__Begin_8016f0f0, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016F314u, GX__SetLineWidth_8016f314, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016F348u, GX__SetPointSize_8016f348, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8016F3B8u, GX__SetCullMode_8016f3b8, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8017054Cu, GX__SetNumChans_8017054c, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80170570u, GX__SetChanCtrl_80170570, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8], cpu->gpr[9]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x801707F8u, GX__InitTexObj_801707f8, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8], cpu->gpr[9], cpu->gpr[10]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80170A4Cu, GX__InitTexObjLOD_80170a4c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], static_cast<float>(cpu->fpr[1].d), static_cast<float>(cpu->fpr[2].d), static_cast<float>(cpu->fpr[3].d), cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171110u, GX__InvalidateTexAll_80171110);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80170F2Cu, GX__LoadTexObj_80170f2c, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171B38u, GX__SetNumIndStages_80171b38, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171B58u, GX__SetTevDirect_80171b58, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171CE0u, GX__SetTevColorIn_80171ce0, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171D20u, GX__SetTevAlphaIn_80171d20, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171D60u, GX__SetTevColorOp_80171d60, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171DB8u, GX__SetTevAlphaOp_80171db8, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171E70u, GX__SetTevColorS10_80171e70, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171ED4u, GX__SetTevKColor_80171ed4, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171F30u, GX__SetTevKColorSel_80171f30, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171F80u, GX__SetTevKAlphaSel_80171f80, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80171FD0u, GX__SetTevSwapMode_80171fd0, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8017200Cu, GX__SetTevSwapModeTable_8017200c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8017214Cu, GX__SetTevOrder_8017214c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x801722A8u, GX__SetNumTevStages_801722a8, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8017277Cu, GX__SetBlendMode_8017277c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x8017310Cu, GX__LoadPosMtxImm_8017310c, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(0x80173214u, GX__SetCurrentMtx_80173214, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016D3A4, GX__SetVtxDesc_8016d3a4, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016DC34, GX__ClearVtxDesc_8016dc34);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016DC68, GX__SetVtxAttrFmt_8016dc68, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016E37C, GX__SetTexCoordGen2_8016e37c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016E5A4, GX__SetNumTexGens_8016e5a4, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016EAB0, GX__DrawDone_8016eab0);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016F0F0, GX__Begin_8016f0f0, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016F314, GX__SetLineWidth_8016f314, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016F348, GX__SetPointSize_8016f348, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8016F3B8, GX__SetCullMode_8016f3b8, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8017054C, GX__SetNumChans_8017054c, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80170570, GX__SetChanCtrl_80170570, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8], cpu->gpr[9]);
|
||||
MKW_KNOWN_TYPED_NATIVE(801707F8, GX__InitTexObj_801707f8, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8], cpu->gpr[9], cpu->gpr[10]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80170A4C, GX__InitTexObjLOD_80170a4c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], static_cast<float>(cpu->fpr[1].d), static_cast<float>(cpu->fpr[2].d), static_cast<float>(cpu->fpr[3].d), cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171110, GX__InvalidateTexAll_80171110);
|
||||
MKW_KNOWN_TYPED_NATIVE(80170F2C, GX__LoadTexObj_80170f2c, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171B38, GX__SetNumIndStages_80171b38, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171B58, GX__SetTevDirect_80171b58, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171CE0, GX__SetTevColorIn_80171ce0, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171D20, GX__SetTevAlphaIn_80171d20, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171D60, GX__SetTevColorOp_80171d60, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171DB8, GX__SetTevAlphaOp_80171db8, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7], cpu->gpr[8]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171E70, GX__SetTevColorS10_80171e70, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171ED4, GX__SetTevKColor_80171ed4, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171F30, GX__SetTevKColorSel_80171f30, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171F80, GX__SetTevKAlphaSel_80171f80, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80171FD0, GX__SetTevSwapMode_80171fd0, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8017200C, GX__SetTevSwapModeTable_8017200c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6], cpu->gpr[7]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8017214C, GX__SetTevOrder_8017214c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6]);
|
||||
MKW_KNOWN_TYPED_NATIVE(801722A8, GX__SetNumTevStages_801722a8, cpu->gpr[3]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8017277C, GX__SetBlendMode_8017277c, cpu->gpr[3], cpu->gpr[4], cpu->gpr[5], cpu->gpr[6]);
|
||||
MKW_KNOWN_TYPED_NATIVE(8017310C, GX__LoadPosMtxImm_8017310c, cpu->gpr[3], cpu->gpr[4]);
|
||||
MKW_KNOWN_TYPED_NATIVE(80173214, GX__SetCurrentMtx_80173214, cpu->gpr[3]);
|
||||
|
||||
#undef MKW_KNOWN_TYPED_NATIVE
|
||||
|
||||
#define MKW_KNOWN_NATIVE_CPU_CALL(addr, fn) \
|
||||
template <> struct KnownNativeCpuCall<addr> { \
|
||||
template <> struct KnownNativeCpuCall<MKW_GADDR_CT(addr)> { \
|
||||
static constexpr bool kAvailable = true; \
|
||||
static constexpr uint32_t kNonvolatileFprWriteMask = 0; \
|
||||
static constexpr void (*Entry)(CpuContext*) = &fn; \
|
||||
}
|
||||
|
||||
MKW_KNOWN_NATIVE_CPU_CALL(0x800847C0u, nw4r__lyt__detail__DrawQuad_800847c0);
|
||||
MKW_KNOWN_NATIVE_CPU_CALL(0x80084D20u, nw4r__lyt__detail__DrawQuad_80084d20);
|
||||
MKW_KNOWN_NATIVE_CPU_CALL(800847C0, nw4r__lyt__detail__DrawQuad_800847c0);
|
||||
MKW_KNOWN_NATIVE_CPU_CALL(80084D20, nw4r__lyt__detail__DrawQuad_80084d20);
|
||||
|
||||
#undef MKW_KNOWN_NATIVE_CPU_CALL
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
// Base translations the runtime calls directly, named by PAL identity. runtime/game binds each
|
||||
// to the translated region's symbol.
|
||||
// MKW_GUEST_FUNC(801A0620)(ctx);
|
||||
|
||||
#include "guest_abi/cpu_context.h"
|
||||
|
||||
#define MKW_GUEST_FUNC(pal) (*::mkw_guest_function_##pal)
|
||||
|
||||
#define MKW_GUEST_FUNCTION_IMPORT(pal, ntscU, ntscJ) extern "C" void (*const mkw_guest_function_##pal)(CpuContext*);
|
||||
#include "guest_function_imports.inc"
|
||||
#undef MKW_GUEST_FUNCTION_IMPORT
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// AUTO-GENERATED by tools/region/gen_guest_address_table.py - DO NOT EDIT.
|
||||
// Base translations the runtime calls directly: MKW_GUEST_FUNCTION_IMPORT(PAL, NTSC-U, NTSC-J).
|
||||
MKW_GUEST_FUNCTION_IMPORT(8012B830, 8012B790, 8012B750) // AXFXReverbStdExpCallback
|
||||
MKW_GUEST_FUNCTION_IMPORT(801A0620, 801A0580, 801A0540) // InsertAlarm
|
||||
MKW_GUEST_FUNCTION_IMPORT(801A1ED8, 801A1E38, 801A1DF8) // OS::SaveContext
|
||||
MKW_GUEST_FUNCTION_IMPORT(801A961C, 801A957C, 801A953C) // OS::__ThreadInit
|
||||
MKW_GUEST_FUNCTION_IMPORT(801AADE0, 801AAD40, 801AAD00) // OS::__TimeToSystemTime
|
||||
MKW_GUEST_FUNCTION_IMPORT(801D8D30, 801D8C90, 801D8C50) // NHTTPStartup
|
||||
MKW_GUEST_FUNCTION_IMPORT(801D9E94, 801D9DF4, 801D9DB4) // NHTTPi_GetSystemInfoP
|
||||
MKW_GUEST_FUNCTION_IMPORT(8055531C, 8054F2FC, 80554C9C) // RelProlog
|
||||
@@ -38,10 +38,12 @@ extern "C" void OS_HLE_EndDeferredGuestCallbacks();
|
||||
// renaming requires updating Translator.Cli/Program.cs, RuntimeNativeGuestEffectAnalyzer.cs,
|
||||
// TranslatedBuildShardEmitter.cs and RuntimeNativeFunctionAbiProvider.cs together.
|
||||
|
||||
// addr_hex is the PAL address (see guest_abi/guest_region.h). The translator reads arg_list as
|
||||
// the guest ABI, so the unused wrapper keeps it checked against the implementation.
|
||||
#define PPC_NATIVE_OVERRIDE(addr_hex, name, ret_type, arg_list, call_list) \
|
||||
extern "C" ret_type func_##addr_hex arg_list { return name call_list; } \
|
||||
[[maybe_unused]] static ret_type native_signature_##addr_hex arg_list { return name call_list; } \
|
||||
REGISTER_NATIVE_FUNCTION(0x##addr_hex, name)
|
||||
|
||||
#define PPC_NATIVE_OVERRIDE_VOID(addr_hex, name, arg_list, call_list) \
|
||||
extern "C" void func_##addr_hex arg_list { name call_list; } \
|
||||
[[maybe_unused]] static void native_signature_##addr_hex arg_list { name call_list; } \
|
||||
REGISTER_NATIVE_FUNCTION(0x##addr_hex, name)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "runtime_config.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
#include "nand_settings.h"
|
||||
#include "runtime_log.h"
|
||||
#include "system_bridge.h"
|
||||
@@ -184,7 +185,9 @@ inline std::filesystem::path DiscoverNandRootPath() {
|
||||
static const auto root = [] {
|
||||
const auto resolved = ResolveNandRootPath();
|
||||
std::string error;
|
||||
if (!RuntimeNandSettings::Ensure(resolved, error)) {
|
||||
const auto& facts = ::GuestRegion::CurrentFacts();
|
||||
if (!RuntimeNandSettings::Ensure(resolved, error,
|
||||
{facts.area, facts.model, facts.productCode, facts.video, facts.gameRegion})) {
|
||||
FailNandRoot(error.c_str(), RuntimeNandSettings::FilePath(resolved));
|
||||
}
|
||||
return resolved;
|
||||
|
||||
@@ -88,10 +88,20 @@ inline std::string GenerateSerial(std::time_t now) {
|
||||
return std::string(9 - digits.size(), '0') + digits;
|
||||
}
|
||||
|
||||
// This recompilation targets the European disc. These are Dolphin's PAL boot
|
||||
// defaults; an existing setting.txt always takes precedence, in every region.
|
||||
inline std::optional<std::array<uint8_t, 256>> EncodeNew(const std::string& serial) {
|
||||
const Settings identity{{"SERNO", serial}, {"CODE", "LEH"}, {"AREA", "EUR"}, {"GAME", "EU"}};
|
||||
// Console identity for a new setting.txt; Dolphin's boot defaults for the game's region.
|
||||
struct BootDefaults {
|
||||
std::string area = "EUR";
|
||||
std::string model = "RVL-001(EUR)";
|
||||
std::string code = "LEH";
|
||||
std::string video = "PAL";
|
||||
std::string game = "EU";
|
||||
};
|
||||
|
||||
// An existing setting.txt always takes precedence, in every region.
|
||||
inline std::optional<std::array<uint8_t, 256>> EncodeNew(
|
||||
const std::string& serial,
|
||||
const BootDefaults& defaults = BootDefaults{}) {
|
||||
const Settings identity{{"SERNO", serial}, {"CODE", defaults.code}, {"AREA", defaults.area}, {"GAME", defaults.game}};
|
||||
if (!HasIdentity(identity)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -102,9 +112,15 @@ inline std::optional<std::array<uint8_t, 256>> EncodeNew(const std::string& seri
|
||||
bytes[position++] = static_cast<uint8_t>(value) ^ static_cast<uint8_t>(key);
|
||||
key = (key << 1) | (key >> 31);
|
||||
};
|
||||
for (const std::string& line : {std::string("AREA=EUR\r\n"), std::string("MODEL=RVL-001(EUR)\r\n"),
|
||||
std::string("DVD=0\r\n"), std::string("MPCH=0x7FFE\r\n"), std::string("CODE=LEH\r\n"),
|
||||
"SERNO=" + serial + "\r\n", std::string("VIDEO=PAL\r\n"), std::string("GAME=EU\r\n")}) {
|
||||
for (const std::string& line : {
|
||||
"AREA=" + defaults.area + "\r\n",
|
||||
"MODEL=" + defaults.model + "\r\n",
|
||||
std::string("DVD=0\r\n"),
|
||||
std::string("MPCH=0x7FFE\r\n"),
|
||||
"CODE=" + defaults.code + "\r\n",
|
||||
"SERNO=" + serial + "\r\n",
|
||||
"VIDEO=" + defaults.video + "\r\n",
|
||||
"GAME=" + defaults.game + "\r\n"}) {
|
||||
for (;;) {
|
||||
if (position + line.size() > bytes.size()) {
|
||||
return std::nullopt;
|
||||
@@ -146,6 +162,7 @@ inline std::optional<std::filesystem::path> CreateScratchDirectory(
|
||||
// Never replace an existing file, including an unreadable or damaged one.
|
||||
// Publish a complete file atomically so simultaneous launches use one identity.
|
||||
inline bool Ensure(const std::filesystem::path& root, std::string& error,
|
||||
const BootDefaults& defaults,
|
||||
std::time_t now = std::time(nullptr)) {
|
||||
const auto path = FilePath(root);
|
||||
std::error_code ec;
|
||||
@@ -163,7 +180,7 @@ inline bool Ensure(const std::filesystem::path& root, std::string& error,
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto bytes = EncodeNew(GenerateSerial(now));
|
||||
const auto bytes = EncodeNew(GenerateSerial(now), defaults);
|
||||
if (!bytes) {
|
||||
error = "Cannot initialize NAND settings: invalid system clock";
|
||||
return false;
|
||||
|
||||
@@ -24,29 +24,29 @@ uint32_t g_lastEggWidth169 = 0;
|
||||
|
||||
// EGG::Screen's static canvas records (PAL). See gx_dynamic_aspect.h for the
|
||||
// record layout and the anamorphic presentation model.
|
||||
constexpr uint32_t kEggScreenRecord43 = 0x802A3EE8u;
|
||||
constexpr uint32_t kEggScreenRecord169 = 0x802A3EF4u;
|
||||
constexpr uint32_t kEggActiveScreenPtr = 0x80386F14u;
|
||||
const uint32_t kEggScreenRecord43 = MKW_GADDR(802A3EE8);
|
||||
const uint32_t kEggScreenRecord169 = MKW_GADDR(802A3EF4);
|
||||
const uint32_t kEggActiveScreenPtr = MKW_GADDR(80386F14);
|
||||
|
||||
constexpr uint32_t kEggScreenProjScaleX = 0x80386F20u;
|
||||
constexpr uint32_t kEggScreenProjScaleY = 0x80386F24u;
|
||||
const uint32_t kEggScreenProjScaleX = MKW_GADDR(80386F20);
|
||||
const uint32_t kEggScreenProjScaleY = MKW_GADDR(80386F24);
|
||||
|
||||
constexpr uint32_t kEggScreenAspectHandler = 0x8023E53Cu;
|
||||
const uint32_t kEggScreenAspectHandler = MKW_GADDR(8023E53C);
|
||||
|
||||
constexpr uint32_t kMkwUpdateAllScreens = 0x805653D0u;
|
||||
constexpr uint32_t kMkwGfxDrawList = 0x809C1830u;
|
||||
constexpr uint32_t kSystemManagerInstance = 0x80386000u;
|
||||
const uint32_t kMkwUpdateAllScreens = MKW_GADDR(805653D0);
|
||||
const uint32_t kMkwGfxDrawList = MKW_GADDR(809C1830);
|
||||
const uint32_t kSystemManagerInstance = MKW_GADDR(80386000);
|
||||
|
||||
// The draw list is an nw4r::ut::List: +0x00 head, +0x04 tail, +0x08 u16 count,
|
||||
// +0x0A u16 link offset, with next = *(node + linkOffset + 4) (List_GetNext,
|
||||
// 0x800AF180).
|
||||
constexpr uint32_t kMkwGfxDrawListLinkOffset = 0x0Au;
|
||||
|
||||
constexpr uint32_t kMkwGfxOffscreenList = 0x809C183Cu;
|
||||
const uint32_t kMkwGfxOffscreenList = MKW_GADDR(809C183C);
|
||||
constexpr uint32_t kMkwGfxOffscreenNodeScreenSlot = 0x10u;
|
||||
constexpr uint32_t kEggScreenVTableOffset = 0x38u;
|
||||
constexpr uint32_t kEggScreenVTable = 0x802A3F0Cu;
|
||||
constexpr uint32_t kMkwScreenVTable = 0x808B4C20u;
|
||||
const uint32_t kEggScreenVTable = MKW_GADDR(802A3F0C);
|
||||
const uint32_t kMkwScreenVTable = MKW_GADDR(808B4C20);
|
||||
constexpr uint32_t kEggScreenFlagsOffset = 0x34u;
|
||||
constexpr uint16_t kEggScreenFlagFramebufferCanvas = 0x0008u;
|
||||
constexpr uint16_t kEggScreenFlagKeepFrustumScale = 0x0040u;
|
||||
|
||||
@@ -46,10 +46,10 @@ std::atomic<uint32_t> g_viRetracePendingCount{0};
|
||||
namespace {
|
||||
constexpr uint32_t kOSCurrentContextAddr = 0x800000d4u;
|
||||
constexpr uint32_t kOSRunningContextAddr = 0x800000e4u; // OSGetCurrentThread reads this
|
||||
constexpr uint32_t kThreadQueueArrayAddr = 0x803477b0u;
|
||||
constexpr uint32_t kSchedulerPendingFlagAddr = 0x80386920u;
|
||||
constexpr uint32_t kSchedulerReschedCounterAddr = 0x8038691cu;
|
||||
constexpr uint32_t kSchedulerIdleFlagAddr = 0x80386918u;
|
||||
const uint32_t kThreadQueueArrayAddr = MKW_GADDR(803477b0);
|
||||
const uint32_t kSchedulerPendingFlagAddr = MKW_GADDR(80386920);
|
||||
const uint32_t kSchedulerReschedCounterAddr = MKW_GADDR(8038691c);
|
||||
const uint32_t kSchedulerIdleFlagAddr = MKW_GADDR(80386918);
|
||||
|
||||
// OSThread structure offsets
|
||||
constexpr uint32_t kThreadStateOffset = 0x2C8u;
|
||||
@@ -584,7 +584,7 @@ void GuestFiberManager::FiberProc(void* param)
|
||||
CpuContextScope scope(cpu);
|
||||
|
||||
int startDeferAttempts = 0;
|
||||
while (entryPoint == 0x8024373c) { // EGG::Thread::start
|
||||
while (entryPoint == MKW_GADDR(8024373c)) { // EGG::Thread::start
|
||||
uint32_t vtable = 0;
|
||||
uint32_t startFn = 0;
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#include "guest_abi/guest_region.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace GuestRegion {
|
||||
|
||||
void FatalUnknownAddress(uint32_t pal) noexcept {
|
||||
std::fprintf(stderr, "Guest region: PAL address 0x%08X has no %s address in guest_address_table.inc\n",
|
||||
pal, CurrentFacts().gameId);
|
||||
std::fflush(stderr);
|
||||
std::abort();
|
||||
}
|
||||
|
||||
} // namespace GuestRegion
|
||||
@@ -21,10 +21,10 @@ namespace {
|
||||
constexpr uint32_t kDefaultSampleRate = 32000u;
|
||||
constexpr uint32_t kAudioChannels = 2u;
|
||||
constexpr uint32_t kBytesPerSample = 2u;
|
||||
constexpr uint32_t kAIInitializedAddr = 0x80386448u;
|
||||
constexpr uint32_t kAICallbackBusyAddr = 0x8038644Cu;
|
||||
constexpr uint32_t kAICallbackStackSwitchAddr = 0x8038647Cu;
|
||||
constexpr uint32_t kAIDmaCallbackAddr = 0x80386480u;
|
||||
const uint32_t kAIInitializedAddr = MKW_GADDR(80386448);
|
||||
const uint32_t kAICallbackBusyAddr = MKW_GADDR(8038644C);
|
||||
const uint32_t kAICallbackStackSwitchAddr = MKW_GADDR(8038647C);
|
||||
const uint32_t kAIDmaCallbackAddr = MKW_GADDR(80386480);
|
||||
|
||||
// Max completed 3 ms DMA blocks delivered per tick. Draining several at once catches up
|
||||
// backlog from a long frame without letting a large stall spiral into an unbounded loop.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "hle_stubs.h"
|
||||
#include "memory.h"
|
||||
#include "ppc_runtime.h"
|
||||
#include "guest_function_imports.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
@@ -10,8 +11,6 @@
|
||||
#include <cstring>
|
||||
|
||||
|
||||
extern "C" void func_8012B830(CpuContext* ctx);
|
||||
|
||||
#if defined(__clang__)
|
||||
// PowerPC uses discrete fmuls/fadds; a fused multiply-add would change sample rounding.
|
||||
#pragma clang fp contract(off)
|
||||
@@ -24,8 +23,8 @@ constexpr uint32_t kSamplesPerFrame = 96;
|
||||
constexpr uint32_t kChannels = 3;
|
||||
|
||||
// .sdata2 constants the guest function loads through r2.
|
||||
constexpr uint32_t kOneConstantAddr = 0x80388588u; // 1.0f
|
||||
constexpr uint32_t kScaleConstantAddr = 0x8038858Cu; // 0.6f send pre-scale
|
||||
const uint32_t kOneConstantAddr = MKW_GADDR(80388588); // 1.0f
|
||||
const uint32_t kScaleConstantAddr = MKW_GADDR(8038858C); // 0.6f send pre-scale
|
||||
|
||||
// AXFX_REVERBSTD_EXP field offsets (byte offsets into the struct in r4).
|
||||
constexpr uint32_t kFieldPreDelayCoef = 0x18;
|
||||
@@ -346,7 +345,7 @@ extern "C" void AXFXReverbStdExpCallback_8012b830(CpuContext* ctx) {
|
||||
try {
|
||||
flags = Memory::Read32(stateAddr + ReverbStd::kFieldFlags);
|
||||
} catch (const Memory::AccessViolation&) {
|
||||
func_8012B830(ctx);
|
||||
MKW_GUEST_FUNC(8012B830)(ctx);
|
||||
return;
|
||||
}
|
||||
if (flags != 0) {
|
||||
@@ -364,7 +363,7 @@ extern "C" void AXFXReverbStdExpCallback_8012b830(CpuContext* ctx) {
|
||||
built = false;
|
||||
}
|
||||
if (!built) {
|
||||
func_8012B830(ctx);
|
||||
MKW_GUEST_FUNC(8012B830)(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// Hot accessors stay header-inline because the shipped build links runtime shards without LTO.
|
||||
|
||||
#include "isa/big_endian.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
#include "memory.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -31,21 +32,21 @@ constexpr uint32_t kMailReset = kTaskMailToDsp | 0x0002u;
|
||||
constexpr size_t kResamplingCoefficientCount = 0x800;
|
||||
constexpr uint32_t kMailContinue = kTaskMailToDsp | 0x0003u;
|
||||
constexpr uint32_t kAxSamplesPerFrame = 96u;
|
||||
constexpr uint32_t kAxDspTaskAddr = 0x802F81A0u;
|
||||
constexpr uint32_t kDspInitializedAddr = 0x80386608u;
|
||||
constexpr uint32_t kDspAssertPendingAddr = 0x80386610u;
|
||||
constexpr uint32_t kDspAssertTaskAddr = 0x80386614u;
|
||||
constexpr uint32_t kDspCurrentTaskAddr = 0x8038661Cu;
|
||||
constexpr uint32_t kDspFirstTaskAddr = 0x80386620u;
|
||||
constexpr uint32_t kDspRunningTaskAddr = 0x80386624u;
|
||||
constexpr uint32_t kAxIramMmemAddr = 0x8027F820u;
|
||||
constexpr uint32_t kAxDramMmemAddr = 0x802F8200u;
|
||||
const uint32_t kAxDspTaskAddr = MKW_GADDR(802F81A0);
|
||||
const uint32_t kDspInitializedAddr = MKW_GADDR(80386608);
|
||||
const uint32_t kDspAssertPendingAddr = MKW_GADDR(80386610);
|
||||
const uint32_t kDspAssertTaskAddr = MKW_GADDR(80386614);
|
||||
const uint32_t kDspCurrentTaskAddr = MKW_GADDR(8038661C);
|
||||
const uint32_t kDspFirstTaskAddr = MKW_GADDR(80386620);
|
||||
const uint32_t kDspRunningTaskAddr = MKW_GADDR(80386624);
|
||||
const uint32_t kAxIramMmemAddr = MKW_GADDR(8027F820);
|
||||
const uint32_t kAxDramMmemAddr = MKW_GADDR(802F8200);
|
||||
constexpr uint32_t kAxDramLength = 64u;
|
||||
constexpr uint32_t kAxDramDspAddr = 3282u;
|
||||
constexpr uint32_t kAxInitCallback = 0x80126948u;
|
||||
constexpr uint32_t kAxResumeCallback = 0x80126954u;
|
||||
constexpr uint32_t kAxDoneCallback = 0x801269A8u;
|
||||
constexpr uint32_t kAxRequestCallback = 0x801269B8u;
|
||||
const uint32_t kAxInitCallback = MKW_GADDR(80126948);
|
||||
const uint32_t kAxResumeCallback = MKW_GADDR(80126954);
|
||||
const uint32_t kAxDoneCallback = MKW_GADDR(801269A8);
|
||||
const uint32_t kAxRequestCallback = MKW_GADDR(801269B8);
|
||||
|
||||
extern uint32_t g_axTaskPtr;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void MarkDspInitialized() {
|
||||
void ResetDspTaskGlobals() {
|
||||
Memory::TryWrite32(kDspAssertPendingAddr, 0);
|
||||
Memory::TryWrite32(kDspAssertTaskAddr, 0);
|
||||
Memory::TryWrite32(0x80386618u, 0);
|
||||
Memory::TryWrite32(MKW_GADDR(80386618), 0);
|
||||
Memory::TryWrite32(kDspCurrentTaskAddr, 0);
|
||||
Memory::TryWrite32(kDspFirstTaskAddr, 0);
|
||||
Memory::TryWrite32(kDspRunningTaskAddr, 0);
|
||||
|
||||
@@ -1475,19 +1475,15 @@ void InitForAXOut(CpuContext* ctx) {
|
||||
Memory::Write32(g_axTaskPtr + 0x2cu, kAxResumeCallback);
|
||||
Memory::Write32(g_axTaskPtr + 0x30u, kAxDoneCallback);
|
||||
Memory::Write32(g_axTaskPtr + 0x34u, kAxRequestCallback);
|
||||
if (ctx) {
|
||||
const uint32_t r13 = ctx->gpr[13];
|
||||
Memory::Write32(g_axTaskPtr + 0x10u, Memory::Read16(r13 - 0x73fcu));
|
||||
Memory::Write16(g_axTaskPtr + 0x24u, Memory::Read16(r13 - 0x7400u));
|
||||
Memory::Write16(g_axTaskPtr + 0x26u, Memory::Read16(r13 - 0x73feu));
|
||||
}
|
||||
// __AXOutInitDSP's ucode length and DSP init/resume vectors, then its two flags.
|
||||
(void)ctx;
|
||||
Memory::Write32(g_axTaskPtr + 0x10u, Memory::Read16(MKW_GADDR(80385804)));
|
||||
Memory::Write16(g_axTaskPtr + 0x24u, Memory::Read16(MKW_GADDR(80385800)));
|
||||
Memory::Write16(g_axTaskPtr + 0x26u, Memory::Read16(MKW_GADDR(80385802)));
|
||||
Instance().ConfigureFromTask(g_axTaskPtr);
|
||||
LinkSingleDspTask(g_axTaskPtr);
|
||||
if (ctx) {
|
||||
const uint32_t r13 = ctx->gpr[13];
|
||||
Memory::Write32(r13 - 0x66d8u, 1);
|
||||
Memory::Write32(r13 - 0x66dcu, 0);
|
||||
}
|
||||
Memory::Write32(MKW_GADDR(80386528), 1);
|
||||
Memory::Write32(MKW_GADDR(80386524), 0);
|
||||
}
|
||||
|
||||
void Stop() {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <cctype>
|
||||
|
||||
static constexpr uint32_t MKW_TITLE_ID_HI = 0x00010004;
|
||||
static constexpr uint32_t MKW_TITLE_ID_LO = 0x524D4350; // "RMCP" fallback
|
||||
|
||||
static bool IsValidEspTitleCode(uint32_t code) {
|
||||
for (int shift = 24; shift >= 0; shift -= 8) {
|
||||
@@ -32,7 +31,7 @@ static uint32_t CurrentTitleIdLo() {
|
||||
}
|
||||
}
|
||||
|
||||
return MKW_TITLE_ID_LO;
|
||||
return ::GuestRegion::CurrentFacts().gameCode;
|
||||
}
|
||||
|
||||
// The guest asked for its title ID or data directory through a pointer we cannot
|
||||
|
||||
@@ -22,8 +22,8 @@ static void EGG__DrawGX__SetVtxState_HLE(uint32_t state) {
|
||||
case 0:
|
||||
setFmt(GX_VA_POS, GX_POS_XYZ, GX_S16, 0xE);
|
||||
setFmt(GX_VA_NRM, GX_NRM_XYZ, GX_S16, 0xE);
|
||||
setArray(GX_VA_POS, 0x802574a0u, 6);
|
||||
setArray(GX_VA_NRM, 0x802574e0u, 6);
|
||||
setArray(GX_VA_POS, MKW_GADDR(802574a0), 6);
|
||||
setArray(GX_VA_NRM, MKW_GADDR(802574e0), 6);
|
||||
setDesc(GX_VA_POS, GX_INDEX8);
|
||||
setDesc(GX_VA_NRM, GX_INDEX8);
|
||||
break;
|
||||
@@ -45,22 +45,22 @@ static void EGG__DrawGX__SetVtxState_HLE(uint32_t state) {
|
||||
if (state == 7) setDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
setFmt(GX_VA_POS, GX_POS_XY, GX_S16, 0xE); setFmt(GX_VA_NRM, GX_NRM_XYZ, GX_S16, 0xE);
|
||||
if (state == 7) setFmt(GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
setArray(GX_VA_POS, 0x80257520u, 4); setArray(GX_VA_NRM, 0x80388b80u, 6);
|
||||
setArray(GX_VA_POS, MKW_GADDR(80257520), 4); setArray(GX_VA_NRM, MKW_GADDR(80388b80), 6);
|
||||
break;
|
||||
case 9:
|
||||
setDesc(GX_VA_POS, GX_INDEX8); setDesc(GX_VA_NRM, GX_INDEX8); setDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
setFmt(GX_VA_POS, GX_POS_XYZ, GX_S16, 0xE); setFmt(GX_VA_NRM, GX_NRM_XYZ, GX_S16, 0xE);
|
||||
setFmt(GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
setArray(GX_VA_POS, 0x80257540u, 6); setArray(GX_VA_NRM, 0x80388ba0u, 6);
|
||||
setArray(GX_VA_POS, MKW_GADDR(80257540), 6); setArray(GX_VA_NRM, MKW_GADDR(80388ba0), 6);
|
||||
break;
|
||||
case 10: case 11: case 12: case 13: {
|
||||
const bool useAltPos = (state == 11 || state == 13);
|
||||
const bool useTex = (state == 10 || state == 11);
|
||||
setDesc(GX_VA_POS, GX_INDEX8);
|
||||
if (useTex) setDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
const uint32_t posBase = useAltPos ? 0x80388be0u : 0x80388bc0u;
|
||||
const uint32_t posBase = useAltPos ? MKW_GADDR(80388be0) : MKW_GADDR(80388bc0);
|
||||
setArray(GX_VA_POS, posBase, 2);
|
||||
if (useTex) setArray(GX_VA_TEX0, 0x80388be0u, 2);
|
||||
if (useTex) setArray(GX_VA_TEX0, MKW_GADDR(80388be0), 2);
|
||||
setFmt(GX_VA_POS, GX_POS_XY, GX_U8, 0);
|
||||
if (useTex) setFmt(GX_VA_TEX0, GX_TEX_ST, GX_U8, 0);
|
||||
break;
|
||||
@@ -88,9 +88,13 @@ extern "C" void EGG__LightTexture__SetupTevFinish_HLE_8022e2bc(CpuContext* ctx)
|
||||
++remainder;
|
||||
}
|
||||
|
||||
const uint32_t kFogOriginDefault = MKW_GADDR(80388DD0);
|
||||
const uint32_t kFogOriginMode2 = MKW_GADDR(80388DF4);
|
||||
const uint32_t kFogSpan = MKW_GADDR(80388DE0);
|
||||
const uint32_t mode = Memory::Read32(self + 0x44);
|
||||
const float origin = Memory::ReadFloat32(ctx->gpr[2] + ((mode == 2) ? -25004 : -25040));
|
||||
const float span = Memory::ReadFloat32(ctx->gpr[2] + -25024);
|
||||
const float origin =
|
||||
Memory::ReadFloat32((mode == 2) ? kFogOriginMode2 : kFogOriginDefault);
|
||||
const float span = Memory::ReadFloat32(kFogSpan);
|
||||
const float end = static_cast<float>(origin + span);
|
||||
const float lower = static_cast<float>(origin - span);
|
||||
|
||||
@@ -117,8 +121,8 @@ PPC_NATIVE_OVERRIDE_VOID(8022e2bc, EGG__LightTexture__SetupTevFinish_HLE_8022e2b
|
||||
// ============================================================================
|
||||
|
||||
extern "C" void EGG__AsyncDisplay__endRender_HLE_8020ff9c(CpuContext* ctx) {
|
||||
uint32_t p = ctx->gpr[3]; ctx->gpr[3] = p; ctx->lr = 0x8020FF9C;
|
||||
InvokeIndirectCpu(0x80219FB4u, ctx);
|
||||
InvokeIndirectCpu(0x8016ED50u, ctx);
|
||||
uint32_t p = ctx->gpr[3]; ctx->gpr[3] = p; ctx->lr = MKW_GADDR(8020FF9C);
|
||||
InvokeIndirectCpu(MKW_GADDR(80219FB4), ctx);
|
||||
InvokeIndirectCpu(MKW_GADDR(8016ED50), ctx);
|
||||
}
|
||||
PPC_NATIVE_OVERRIDE_VOID(8020FF9C, EGG__AsyncDisplay__endRender_HLE_8020ff9c, (CpuContext* ctx), (ctx));
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace {
|
||||
// index sees the literal PPC_NATIVE_OVERRIDE_VOID invocation. Hiding it inside
|
||||
// this macro would leave the index unable to associate an address with the stub.
|
||||
#define GX_FATAL_STUB(addr, sym) \
|
||||
extern "C" void gx_stub_##addr(CpuContext* ctx) { (void)ctx; HaltGX(0x##addr, sym); }
|
||||
extern "C" void gx_stub_##addr(CpuContext* ctx) { (void)ctx; HaltGX(MKW_GADDR(addr), sym); }
|
||||
|
||||
GX_FATAL_STUB(8016b49c, "__GX__DefaultTexRegionCallback_8016b49c") PPC_NATIVE_OVERRIDE_VOID(8016b49c, gx_stub_8016b49c, (CpuContext* ctx), (ctx));
|
||||
GX_FATAL_STUB(8016b590, "__GX__DefaultTlutRegionCallback_8016b590") PPC_NATIVE_OVERRIDE_VOID(8016b590, gx_stub_8016b590, (CpuContext* ctx), (ctx));
|
||||
|
||||
@@ -25,8 +25,8 @@ extern "C" GXFifoObj* GXInit(void* base, u32 size);
|
||||
extern "C" uint32_t GX__Init_8016b850(uint32_t fifoBase, uint32_t fifoSize)
|
||||
{
|
||||
GX_SYNC_INLINE();
|
||||
constexpr uint32_t kFifoObjAddr = 0x80343740u;
|
||||
constexpr uint32_t kGXDataAddr = 0x803437C0u;
|
||||
const uint32_t kFifoObjAddr = MKW_GADDR(80343740);
|
||||
const uint32_t kGXDataAddr = MKW_GADDR(803437C0);
|
||||
constexpr uint32_t kGXDataSize = 0x600u;
|
||||
|
||||
GXInit(GuestToHostPtr(fifoBase, fifoSize), fifoSize);
|
||||
@@ -78,7 +78,6 @@ extern "C" uint32_t GX__Init_8016b850(uint32_t fifoBase, uint32_t fifoSize)
|
||||
} catch (...) {}
|
||||
|
||||
__GX__SetTmemConfig_80171458(2);
|
||||
|
||||
RT_LOGF(RT_TAG_GX, "GX initialized, FIFO at 0x%08X (base=0x%08X size=0x%08X)\n",
|
||||
kFifoObjAddr, fifoBase, fifoSize);
|
||||
|
||||
@@ -108,14 +107,14 @@ extern "C" void __GX__FifoInit_8016d180()
|
||||
{
|
||||
constexpr uint32_t kCpInterruptId = 0x11u;
|
||||
constexpr uint32_t kCpInterruptMask = 0x4000u;
|
||||
constexpr uint32_t kCpInterruptHandlerAddr = 0x8016c668u;
|
||||
constexpr uint32_t kGxCurrentThreadPtrAddr = 0x803867c4u;
|
||||
constexpr uint32_t kGxThreadQueueAddr = 0x803867c0u;
|
||||
constexpr uint32_t kCpuFifoObjAddr = 0x80343de4u;
|
||||
constexpr uint32_t kGpFifoObjAddr = 0x80343dc0u;
|
||||
const uint32_t kCpInterruptHandlerAddr = MKW_GADDR(8016c668);
|
||||
const uint32_t kGxCurrentThreadPtrAddr = MKW_GADDR(803867c4);
|
||||
const uint32_t kGxThreadQueueAddr = MKW_GADDR(803867c0);
|
||||
const uint32_t kCpuFifoObjAddr = MKW_GADDR(80343de4);
|
||||
const uint32_t kGpFifoObjAddr = MKW_GADDR(80343dc0);
|
||||
constexpr size_t kFifoObjSize = 0x24u;
|
||||
constexpr uint32_t kFifoWrapFlagAddr = 0x803867b0u;
|
||||
constexpr uint32_t kFifoWrapFlag2Addr = 0x803867b1u;
|
||||
const uint32_t kFifoWrapFlagAddr = MKW_GADDR(803867b0);
|
||||
const uint32_t kFifoWrapFlag2Addr = MKW_GADDR(803867b1);
|
||||
|
||||
__OSSetInterruptHandler_801a65f8_hle(kCpInterruptId, kCpInterruptHandlerAddr);
|
||||
__OSUnmaskInterrupts_801a69bc_hle(kCpInterruptMask);
|
||||
@@ -143,9 +142,9 @@ extern "C" void __GX__PEInit_8016ee14()
|
||||
constexpr uint32_t kPeFinishInterruptId = 0x13u;
|
||||
constexpr uint32_t kPeTokenInterruptMask = 0x1000u;
|
||||
constexpr uint32_t kPeFinishInterruptMask = 0x2000u;
|
||||
constexpr uint32_t kPeTokenHandlerAddr = 0x8016eccc;
|
||||
constexpr uint32_t kPeFinishHandlerAddr = 0x8016ed94;
|
||||
constexpr uint32_t kPeThreadQueueAddr = 0x803867d0u;
|
||||
const uint32_t kPeTokenHandlerAddr = MKW_GADDR(8016eccc);
|
||||
const uint32_t kPeFinishHandlerAddr = MKW_GADDR(8016ed94);
|
||||
const uint32_t kPeThreadQueueAddr = MKW_GADDR(803867d0);
|
||||
|
||||
__OSSetInterruptHandler_801a65f8_hle(kPeTokenInterruptId, kPeTokenHandlerAddr);
|
||||
__OSSetInterruptHandler_801a65f8_hle(kPeFinishInterruptId, kPeFinishHandlerAddr);
|
||||
@@ -181,20 +180,20 @@ extern "C" void GX__BeginDisplayList_80172e00(uint32_t la, uint32_t s) {
|
||||
uint32_t gd = Memory::Read32(kGXDataPtrAddr);
|
||||
if (!gd) return;
|
||||
if (Memory::Read32(gd + 0x5FCu)) GX__SetDirtyState_8016ee78();
|
||||
if (Memory::Read8(gd + 0x5F9u)) std::memcpy(Memory::GetPointer(0x80344110, 0x600), Memory::GetPointer(gd, 0x600), 0x600);
|
||||
Memory::Write32(0x80344094, la + s - 4u);
|
||||
Memory::Write32(0x803440AC, 0);
|
||||
Memory::Write32(0x80344090, la);
|
||||
Memory::Write32(0x80344098, s);
|
||||
Memory::Write32(0x803440A4, la);
|
||||
Memory::Write32(0x803440A8, la);
|
||||
if (Memory::Read8(gd + 0x5F9u)) std::memcpy(Memory::GetPointer(MKW_GADDR(80344110), 0x600), Memory::GetPointer(gd, 0x600), 0x600);
|
||||
Memory::Write32(MKW_GADDR(80344094), la + s - 4u);
|
||||
Memory::Write32(MKW_GADDR(803440AC), 0);
|
||||
Memory::Write32(MKW_GADDR(80344090), la);
|
||||
Memory::Write32(MKW_GADDR(80344098), s);
|
||||
Memory::Write32(MKW_GADDR(803440A4), la);
|
||||
Memory::Write32(MKW_GADDR(803440A8), la);
|
||||
Memory::Write8(gd + 0x5F8u, 1u);
|
||||
// Mirror the guest fifo-object fields the FIFO write path consumes so
|
||||
// HleFifoWrite never has to read them back out of guest memory.
|
||||
BeginDisplayListRecording(la, s);
|
||||
GXFlush();
|
||||
GX__GetCPUFifo_8016cf10(0x80344710);
|
||||
GX__SetCPUFifo_8016c94c(0x80344090);
|
||||
GX__GetCPUFifo_8016cf10(MKW_GADDR(80344710));
|
||||
GX__SetCPUFifo_8016c94c(MKW_GADDR(80344090));
|
||||
} catch (...) {}
|
||||
}
|
||||
PPC_NATIVE_OVERRIDE_VOID(80172e00, GX__BeginDisplayList_80172e00, (uint32_t la, uint32_t s), (la, s));
|
||||
@@ -209,9 +208,9 @@ static void EndDisplayListInline() {
|
||||
extern "C" uint32_t GX__EndDisplayList_80172eb4() {
|
||||
try {
|
||||
GXFlush();
|
||||
GX__GetCPUFifo_8016cf10(0x80344090);
|
||||
GX__GetCPUFifo_8016cf10(MKW_GADDR(80344090));
|
||||
const uint8_t wrapped = Memory::Read8(kDlFifoAddr + kDlWrapFlagOffset);
|
||||
GX__SetCPUFifo_8016c94c(0x80344710);
|
||||
GX__SetCPUFifo_8016c94c(MKW_GADDR(80344710));
|
||||
|
||||
const uint32_t gd = Memory::Read32(kGXDataPtrAddr);
|
||||
if (gd) {
|
||||
@@ -219,7 +218,7 @@ extern "C" uint32_t GX__EndDisplayList_80172eb4() {
|
||||
const int32_t interruptLevel = OS__DisableInterrupts_801a65ac();
|
||||
const uint32_t savedWord8 = Memory::Read32(gd + 0x08u);
|
||||
std::memcpy(Memory::GetPointer(gd, 0x600),
|
||||
Memory::GetPointer(0x80344110, 0x600),
|
||||
Memory::GetPointer(MKW_GADDR(80344110), 0x600),
|
||||
0x600);
|
||||
Memory::Write32(gd + 0x08u, savedWord8);
|
||||
OS__RestoreInterrupts_801a65d4(interruptLevel);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "hle_stubs.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
#include "memory.h"
|
||||
#include "gx_guest_write.h"
|
||||
#include "ppc_runtime.h"
|
||||
@@ -55,13 +56,13 @@ bool is_offscreen() noexcept;
|
||||
}
|
||||
|
||||
// --- Constants ---
|
||||
constexpr uint32_t kGXDataPtrAddr = 0x803886C8;
|
||||
constexpr uint32_t kDlFifoAddr = 0x80344090;
|
||||
constexpr uint32_t kDlWritePtrAddr = 0x803440A4;
|
||||
constexpr uint32_t kDlCountAddr = 0x803440AC;
|
||||
const uint32_t kGXDataPtrAddr = MKW_GADDR(803886C8);
|
||||
const uint32_t kDlFifoAddr = MKW_GADDR(80344090);
|
||||
const uint32_t kDlWritePtrAddr = MKW_GADDR(803440A4);
|
||||
const uint32_t kDlCountAddr = MKW_GADDR(803440AC);
|
||||
constexpr uint32_t kDlWrapFlagOffset = 0x20;
|
||||
constexpr uint32_t kMaxTluts = 20;
|
||||
constexpr uint32_t kGxDrawDoneFlagAddr = 0x803867d8;
|
||||
const uint32_t kGxDrawDoneFlagAddr = MKW_GADDR(803867d8);
|
||||
|
||||
// --- External Declarations ---
|
||||
extern "C" void GXInitTexObjTlut(GXTexObj* obj, u32 tlut);
|
||||
|
||||
@@ -2,17 +2,15 @@
|
||||
|
||||
#include "abi_bridge.h"
|
||||
#include "ppc_runtime.h"
|
||||
#include "guest_function_imports.h"
|
||||
|
||||
namespace NetworkHle {
|
||||
|
||||
extern "C" void func_801D8D30(CpuContext* ctx);
|
||||
extern "C" void func_801D9E94(CpuContext* ctx);
|
||||
|
||||
static uint32_t GetNHttpSystemInfo(CpuContext* ctx, uint32_t& savedR3, uint32_t& savedR4, uint32_t& savedR5) {
|
||||
savedR3 = ctx->gpr[3];
|
||||
savedR4 = ctx->gpr[4];
|
||||
savedR5 = ctx->gpr[5];
|
||||
func_801D9E94(ctx);
|
||||
MKW_GUEST_FUNC(801D9E94)(ctx);
|
||||
const uint32_t systemInfo = ctx->gpr[3];
|
||||
ctx->gpr[3] = savedR3;
|
||||
ctx->gpr[4] = savedR4;
|
||||
@@ -47,7 +45,7 @@ extern "C" void NHTTPStartup_Reentrant_HLE_801d8d30(CpuContext* ctx) {
|
||||
ctx->gpr[3] = savedR3;
|
||||
ctx->gpr[4] = savedR4;
|
||||
ctx->gpr[5] = savedR5;
|
||||
func_801D8D30(ctx);
|
||||
MKW_GUEST_FUNC(801D8D30)(ctx);
|
||||
|
||||
const int32_t result = static_cast<int32_t>(ctx->gpr[3]);
|
||||
if (result < 0) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "network_internal.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
|
||||
#include "fiber_manager.h"
|
||||
#include "hle/net/network.h"
|
||||
@@ -627,7 +628,7 @@ static bool InitializeDeferredSyncRoute(DeferredNetworkRoute& route, uint32_t wa
|
||||
// early scheduler setup. Capture its identity before yielding so a late
|
||||
// resolver result cannot wake a stale/reused stack queue after cancellation.
|
||||
constexpr uint32_t kOSRunningContextAddr = 0x800000E4u;
|
||||
constexpr uint32_t kDefaultThreadContextAddr = 0x80347498u;
|
||||
const uint32_t kDefaultThreadContextAddr = MKW_GADDR(80347498);
|
||||
uint32_t expectedThread = Memory::Read32(kOSRunningContextAddr);
|
||||
if (expectedThread == 0) {
|
||||
expectedThread = kDefaultThreadContextAddr;
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "hle/net/network.h"
|
||||
#include "guest_small_data.h"
|
||||
#include "os_internal.h"
|
||||
|
||||
extern "C" void func_801AADE0(CpuContext* ctx);
|
||||
extern "C" void func_801A0620(CpuContext* ctx);
|
||||
#include "guest_function_imports.h"
|
||||
|
||||
// ============================================================================
|
||||
// Alarm queue helpers
|
||||
@@ -100,7 +98,7 @@ void SanitizeAlarmQueue(CpuContext* cpu)
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32_t queueBase = cpu->gpr[13] - kAlarmQueueOffsetFromR13;
|
||||
const uint32_t queueBase = kAlarmQueueAddr;
|
||||
try {
|
||||
const uint32_t head = ::Memory::Read32(queueBase);
|
||||
const uint32_t tail = ::Memory::Read32(queueBase + 4u);
|
||||
@@ -169,7 +167,7 @@ bool ProcessAlarmQueue(CpuContext* cpu, int maxToProcess)
|
||||
{
|
||||
AlarmProcessScope alarmProcessScope;
|
||||
SanitizeAlarmQueue(cpu);
|
||||
const uint32_t queueBase = cpu->gpr[13] - kAlarmQueueOffsetFromR13;
|
||||
const uint32_t queueBase = kAlarmQueueAddr;
|
||||
|
||||
try {
|
||||
for (int i = 0; i < maxToProcess; ++i) {
|
||||
@@ -209,7 +207,7 @@ bool ProcessAlarmQueue(CpuContext* cpu, int maxToProcess)
|
||||
cpu->gpr[5] = 0;
|
||||
cpu->gpr[6] = 0;
|
||||
cpu->gpr[7] = handler;
|
||||
func_801A0620(cpu);
|
||||
MKW_GUEST_FUNC(801A0620)(cpu);
|
||||
}
|
||||
|
||||
if (handler != 0) {
|
||||
@@ -309,7 +307,7 @@ extern "C" void OSSetAlarm_HLE_801a0870(CpuContext* ctx)
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32_t queueBase = cpu->gpr[13] - kAlarmQueueOffsetFromR13;
|
||||
const uint32_t queueBase = kAlarmQueueAddr;
|
||||
try {
|
||||
const uint32_t head = ::Memory::Read32(queueBase);
|
||||
if (head == 0) {
|
||||
@@ -427,7 +425,7 @@ extern "C" void OS__SetPeriodicAlarm_801a08e0(CpuContext* ctx)
|
||||
|
||||
cpu->gpr[3] = startHi;
|
||||
cpu->gpr[4] = startLo;
|
||||
func_801AADE0(cpu);
|
||||
MKW_GUEST_FUNC(801AADE0)(cpu);
|
||||
Memory::Write32(alarm + 0x20u, cpu->gpr[3]);
|
||||
Memory::Write32(alarm + 0x24u, cpu->gpr[4]);
|
||||
|
||||
@@ -435,7 +433,7 @@ extern "C" void OS__SetPeriodicAlarm_801a08e0(CpuContext* ctx)
|
||||
cpu->gpr[5] = 0;
|
||||
cpu->gpr[6] = 0;
|
||||
cpu->gpr[7] = handler;
|
||||
func_801A0620(cpu);
|
||||
MKW_GUEST_FUNC(801A0620)(cpu);
|
||||
|
||||
cpu->gpr[3] = static_cast<uint32_t>(OS__RestoreInterrupts_801a65d4(level));
|
||||
}
|
||||
@@ -464,7 +462,7 @@ extern "C" uint32_t RFLiIsWorking_HLE_800bd860()
|
||||
DecrementSchedulerDisableCount();
|
||||
|
||||
// Now return the actual "working" status
|
||||
constexpr uint32_t kRflManagerPtrAddr = 0x80386298u;
|
||||
const uint32_t kRflManagerPtrAddr = MKW_GADDR(80386298);
|
||||
constexpr uint32_t kWorkingFlagOffset = 0x1b34u;
|
||||
|
||||
try {
|
||||
|
||||
@@ -17,19 +17,17 @@
|
||||
#include "recomp_mod_loader.h"
|
||||
#include "runtime_log.h"
|
||||
#include "system_bridge.h"
|
||||
|
||||
extern "C" void func_801A961C(CpuContext* ctx);
|
||||
extern "C" void func_8055531C(CpuContext* ctx);
|
||||
#include "guest_function_imports.h"
|
||||
|
||||
extern "C" void OSInitAlarm_RecompModLateInit_801a961c(CpuContext* ctx) {
|
||||
func_801A961C(ctx);
|
||||
MKW_GUEST_FUNC(801A961C)(ctx);
|
||||
}
|
||||
|
||||
REGISTER_NATIVE_FUNCTION_AS(0x801A961C, OSInitAlarm_RecompModLateInit_801a961c, "OSInitAlarm_RecompModLateInit_801a961c");
|
||||
|
||||
extern "C" void StaticRProlog_RecompModInit_8055531c(CpuContext* ctx) {
|
||||
RecompMod::RunMemoryInitializers();
|
||||
func_8055531C(ctx);
|
||||
MKW_GUEST_FUNC(8055531C)(ctx);
|
||||
RecompMod::RunPostRelInitializers();
|
||||
}
|
||||
|
||||
@@ -107,13 +105,14 @@ extern "C" void HLE_SISetSamplingRate_801b3acc(uint32_t msec)
|
||||
|
||||
// Video Interface (VI) - TV output.
|
||||
|
||||
// VIGetTvFormat (0x801bacd8): CRITICAL, must return 1 (VI_PAL) not 0, or PAL builds
|
||||
// misbehave/panic.
|
||||
// VIGetTvFormat (0x801bacd8): CRITICAL, must report the game's own TV format or it
|
||||
// misbehaves/panics.
|
||||
extern "C" uint32_t HLE_VIGetTvFormat_801bacd8()
|
||||
{
|
||||
// VI_NTSC = 0, VI_PAL = 1, VI_MPAL = 2
|
||||
RT_LOG(RT_TAG_OS) << "HLE_VIGetTvFormat_801bacd8 called: returning VI_PAL (1)" << std::endl;
|
||||
return 1;
|
||||
RT_LOG(RT_TAG_OS) << "HLE_VIGetTvFormat_801bacd8 called: returning " << ::GuestRegion::CurrentFacts().viTvFormat
|
||||
<< std::endl;
|
||||
return ::GuestRegion::CurrentFacts().viTvFormat;
|
||||
}
|
||||
|
||||
REGISTER_NATIVE_FUNCTION(0x801B2DE0, SIInit_801b2de0);
|
||||
@@ -176,22 +175,18 @@ extern "C" uint32_t __OSInitSTM_HLE_801ab848(CpuContext* ctx)
|
||||
|
||||
RT_LOG(RT_TAG_OS) << "__OSInitSTM_HLE_801ab848 called: initializing STM state" << std::endl;
|
||||
|
||||
// R13 (SDA2) holds the base for small data variables
|
||||
const uint32_t r13 = cpu->gpr[13];
|
||||
if (r13 == 0) {
|
||||
RT_LOG(RT_TAG_OS) << "__OSInitSTM: Warning - R13 is 0, cannot write state." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
// STM_Initialized, /dev/stm/immediate and /dev/stm/eventhook.
|
||||
const uint32_t kStmInitializedAddr = MKW_GADDR(80386934);
|
||||
const uint32_t kStmImmediateHandleAddr = MKW_GADDR(80386938);
|
||||
const uint32_t kStmEventHookHandleAddr = MKW_GADDR(8038693C);
|
||||
|
||||
// Offsets from disassembly: r13-0x62cc=STM_Initialized, r13-0x62c8=/dev/stm/immediate,
|
||||
// r13-0x62c4=/dev/stm/eventhook.
|
||||
try {
|
||||
// Mark STM as initialized
|
||||
::Memory::Write32(r13 - 0x62ccu, 1);
|
||||
::Memory::Write32(kStmInitializedAddr, 1);
|
||||
|
||||
// Fake non-zero handles so callers' zero-checks pass.
|
||||
::Memory::Write32(r13 - 0x62c8u, 0x00535401); // "ST\x01"
|
||||
::Memory::Write32(r13 - 0x62c4u, 0x00535402); // "ST\x02"
|
||||
::Memory::Write32(kStmImmediateHandleAddr, 0x00535401); // "ST\x01"
|
||||
::Memory::Write32(kStmEventHookHandleAddr, 0x00535402); // "ST\x02"
|
||||
|
||||
// Default Power/Reset callback pointers are left unset; safe since we never fire
|
||||
// the STM hardware interrupt that would invoke them.
|
||||
|
||||
@@ -24,7 +24,7 @@ extern std::atomic<bool> g_interrupts_enabled;
|
||||
// observable state, not just bookkeeping.
|
||||
extern std::atomic<uint32_t> g_interrupt_mask;
|
||||
|
||||
constexpr uint32_t kInterruptHandlerTablePtrAddr = 0x803868f8u;
|
||||
const uint32_t kInterruptHandlerTablePtrAddr = MKW_GADDR(803868f8);
|
||||
constexpr uint32_t kInterruptHandlerTableAddr = 0x80003040u;
|
||||
constexpr size_t kInterruptHandlerTableBytes = 0x80u;
|
||||
constexpr uint32_t kInterruptMaskLoAddr = 0x800000c4u;
|
||||
@@ -36,17 +36,17 @@ constexpr uint32_t kThreadListHeadAddr = 0x800000dcu; // First thread in thre
|
||||
constexpr uint32_t kThreadListTailAddr = 0x800000e0u; // Last added thread (tail of thread list)
|
||||
constexpr uint32_t kOSRunningContextAddr = 0x800000e4u; // Currently running thread context
|
||||
|
||||
constexpr uint32_t kDefaultThreadContextAddr = 0x80347498u;
|
||||
constexpr uint32_t kIdleThreadContextAddr = 0x803478b0u;
|
||||
constexpr uint32_t kThreadQueueArrayAddr = 0x803477b0u;
|
||||
const uint32_t kDefaultThreadContextAddr = MKW_GADDR(80347498);
|
||||
const uint32_t kIdleThreadContextAddr = MKW_GADDR(803478b0);
|
||||
const uint32_t kThreadQueueArrayAddr = MKW_GADDR(803477b0);
|
||||
constexpr size_t kThreadQueueArrayBytes = 0x100u;
|
||||
constexpr uint32_t kSwitchThreadCallbackPtrAddr = 0x80385ae0u;
|
||||
constexpr uint32_t kSchedulerReschedCounterAddr = 0x8038691cu;
|
||||
constexpr uint32_t kSchedulerPendingFlagAddr = 0x80386920u;
|
||||
const uint32_t kSwitchThreadCallbackPtrAddr = MKW_GADDR(80385ae0);
|
||||
const uint32_t kSchedulerReschedCounterAddr = MKW_GADDR(8038691c);
|
||||
const uint32_t kSchedulerPendingFlagAddr = MKW_GADDR(80386920);
|
||||
// RVL OS uses this as the OSDisableScheduler/OSEnableScheduler nesting count.
|
||||
// SelectThread exits early while the count is non-zero.
|
||||
constexpr uint32_t kSchedulerIdleFlagAddr = 0x80386918u;
|
||||
constexpr uint32_t kAlarmQueueOffsetFromR13 = 0x6360u;
|
||||
const uint32_t kSchedulerIdleFlagAddr = MKW_GADDR(80386918);
|
||||
const uint32_t kAlarmQueueAddr = MKW_GADDR(803868A0);
|
||||
|
||||
constexpr uint32_t kThreadStateOffset = 0x2C8u;
|
||||
constexpr uint32_t kThreadAttrOffset = 0x2CAu;
|
||||
|
||||
@@ -391,14 +391,12 @@ extern "C" uint32_t OSSetPowerCallback_801ab75c(CpuContext* ctx)
|
||||
if (!cpu) return 0;
|
||||
|
||||
const uint32_t newCallback = cpu->gpr[3];
|
||||
const uint32_t r13 = cpu->gpr[13];
|
||||
|
||||
// Assembly defines the default callback address as (0x801b0000 - 0x43f4)
|
||||
constexpr uint32_t kDefaultCallbackAddr = 0x801b0000u - 0x43f4u; // 0x801abc0c
|
||||
|
||||
// Offsets from R13 (SDA2)
|
||||
const uint32_t kCallbackPtrAddr = r13 - 0x62b8u;
|
||||
const uint32_t kHandlerActiveAddr = r13 - 0x62c0u;
|
||||
// The SDK's default power callback, the registered callback pointer and the
|
||||
// "event handler registered" flag.
|
||||
const uint32_t kDefaultCallbackAddr = MKW_GADDR(801ABC0C);
|
||||
const uint32_t kCallbackPtrAddr = MKW_GADDR(80386948);
|
||||
const uint32_t kHandlerActiveAddr = MKW_GADDR(80386940);
|
||||
|
||||
RT_LOG(RT_TAG_OS) << "OSSetPowerCallback_801ab75c called: newCB=0x"
|
||||
<< std::hex << newCallback << std::dec << std::endl;
|
||||
@@ -489,12 +487,13 @@ extern "C" int32_t IPCCltInit_80193478(CpuContext* ctx)
|
||||
RT_LOG(RT_TAG_OS) << "IPCCltInit_80193478 called: calling IPCInit for buffer setup" << std::endl;
|
||||
|
||||
// Sets 0x803867EC/F0/E8 (IPC buffer lo/hi + init flag) from __OSGetIPCBufferLo/Hi.
|
||||
InvokeIndirectCpu(0x80192F7Cu, ctx);
|
||||
InvokeIndirectCpu(MKW_GADDR(80192F7C), ctx);
|
||||
|
||||
// Advance the buffer lo pointer by 0x1000 (iosHeap size), matching real IPCCltInit.
|
||||
uint32_t bufferLo = Memory::Read32(ctx->gpr[13] + -25620); // 0x803867EC at r13-0x6414
|
||||
const uint32_t kIpcBufferLoGlobal = MKW_GADDR(803867EC);
|
||||
uint32_t bufferLo = Memory::Read32(kIpcBufferLoGlobal);
|
||||
uint32_t newBufLo = bufferLo + 0x1000; // Advance by 4KB for iosHeap
|
||||
Memory::Write32(ctx->gpr[13] + -25620, newBufLo);
|
||||
Memory::Write32(kIpcBufferLoGlobal, newBufLo);
|
||||
|
||||
RT_LOG(RT_TAG_OS) << "IPCCltInit: IPC buffer lo advanced from 0x" << std::hex << bufferLo
|
||||
<< " to 0x" << newBufLo << std::dec << std::endl;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "fiber_manager.h"
|
||||
#include "runtime_log.h"
|
||||
#include "os_internal.h"
|
||||
#include "guest_function_imports.h"
|
||||
|
||||
namespace {
|
||||
void LinkMutexToThread(uint32_t threadPtr, uint32_t mutexPtr)
|
||||
@@ -119,7 +120,6 @@ static void TryInvokeSwitchCallback(uint32_t oldCtx, uint32_t newCtx, CpuContext
|
||||
|
||||
// Forward declare for SelectThread to use
|
||||
extern "C" void OS__SetCurrentContext_801a1e70(uint32_t contextAddr);
|
||||
extern "C" void func_801A1ED8(CpuContext* ctx);
|
||||
|
||||
// ============================================================================
|
||||
// SelectThread HLE - Thread Scheduler (Fiber-Aware)
|
||||
@@ -200,7 +200,7 @@ extern "C" void SelectThread_801a9c08(CpuContext* ctx)
|
||||
const uint16_t modeFlags = ::Memory::Read16(runningContext + 0x1A2u);
|
||||
if ((modeFlags & 0x0002u) == 0) {
|
||||
cpu->gpr[3] = runningContext;
|
||||
func_801A1ED8(cpu);
|
||||
MKW_GUEST_FUNC(801A1ED8)(cpu);
|
||||
if (cpu->gpr[3] != 0) {
|
||||
cpu->gpr[3] = 0;
|
||||
return;
|
||||
|
||||
@@ -73,13 +73,7 @@ int32_t ComputeThreadEffectivePriority(uint32_t threadPtr)
|
||||
|
||||
bool IsThpVideoDecoderEntry(uint32_t entryFunc)
|
||||
{
|
||||
switch (entryFunc) {
|
||||
case 0x805529A8u:
|
||||
case 0x80552A74u:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return entryFunc == MKW_GADDR(805529A8) || entryFunc == MKW_GADDR(80552A74);
|
||||
}
|
||||
|
||||
void InsertThreadIntoQueueByPriority(uint32_t queuePtr, uint32_t threadPtr, int32_t priority)
|
||||
@@ -216,7 +210,7 @@ void UnlockAllThreadMutexes(CpuContext* cpu, uint32_t threadPtr)
|
||||
}
|
||||
CpuContextScope scope(cpu);
|
||||
cpu->gpr[3] = threadPtr;
|
||||
InvokeIndirectCpu(0x801A8088u, cpu); // __OSUnlockAllMutex
|
||||
InvokeIndirectCpu(MKW_GADDR(801A8088), cpu); // __OSUnlockAllMutex
|
||||
}
|
||||
|
||||
// Shared tail of OSExitThread/OSCancelThread: clears context, delists if detached, marks
|
||||
@@ -311,7 +305,7 @@ extern "C" void OSCreateThread_HLE_801a9e84(CpuContext* ctx)
|
||||
cpu->gpr[3] = threadPtr;
|
||||
cpu->gpr[4] = entryFunc;
|
||||
cpu->gpr[5] = alignedStack - 8;
|
||||
InvokeIndirectCpu(0x801A20BCu, cpu); // OSInitContext
|
||||
InvokeIndirectCpu(MKW_GADDR(801A20BC), cpu); // OSInitContext
|
||||
}
|
||||
|
||||
if (IsThpVideoDecoderEntry(entryFunc)) {
|
||||
@@ -325,7 +319,7 @@ extern "C" void OSCreateThread_HLE_801a9e84(CpuContext* ctx)
|
||||
|
||||
}
|
||||
|
||||
::Memory::Write32(threadPtr + 0x84u, 0x801AA0F0u); // LR = OSExitThread
|
||||
::Memory::Write32(threadPtr + 0x84u, MKW_GADDR(801AA0F0)); // LR = OSExitThread
|
||||
::Memory::Write32(threadPtr + 0x0Cu, entryArg); // r3 = argument
|
||||
|
||||
// Stack info
|
||||
@@ -341,8 +335,8 @@ extern "C" void OSCreateThread_HLE_801a9e84(CpuContext* ctx)
|
||||
// Match the original OSCreateThread slow-path initialization that runs
|
||||
// once scheduler globals are live. THP worker threads depend on these
|
||||
// queue/list blocks being fully zeroed.
|
||||
constexpr uint32_t kSchedulerInitFlagAddr = 0x80347130u;
|
||||
constexpr uint32_t kThreadAttrSourceAddr = 0x80385AA8u;
|
||||
const uint32_t kSchedulerInitFlagAddr = MKW_GADDR(80347130);
|
||||
const uint32_t kThreadAttrSourceAddr = MKW_GADDR(80385AA8);
|
||||
if (Memory::Contains(kSchedulerInitFlagAddr, 4) &&
|
||||
::Memory::Read32(kSchedulerInitFlagAddr) != 0) {
|
||||
uint32_t srr1 = ::Memory::Read32(threadPtr + 0x19Cu);
|
||||
|
||||
@@ -74,7 +74,7 @@ PPC_NATIVE_OVERRIDE(801B1CAC, SCGetEuRgb60Mode_HLE, uint32_t, (), ());
|
||||
|
||||
extern "C" uint32_t SCGetProductArea_HLE()
|
||||
{
|
||||
return LookupProductRegion(0x8029CEB0u, 5, 13,
|
||||
return LookupProductRegion(MKW_GADDR(8029CEB0), 5, 13,
|
||||
RuntimeConsoleIdentity::Current().area);
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ PPC_NATIVE_OVERRIDE(801B23A0, SCGetProductArea_HLE, uint32_t, (), ());
|
||||
|
||||
extern "C" uint32_t SCGetProductCode_HLE()
|
||||
{
|
||||
// Original PAL SC storage for the six-byte CODE value.
|
||||
constexpr uint32_t kProductCodeAddress = 0x803869E0u;
|
||||
// Original SC storage for the six-byte CODE value.
|
||||
const uint32_t kProductCodeAddress = MKW_GADDR(803869E0);
|
||||
const std::string& productCode = RuntimeConsoleIdentity::Current().productCode;
|
||||
const size_t size = productCode.size() + 1;
|
||||
if (!Memory::Contains(kProductCodeAddress, size)) {
|
||||
@@ -108,7 +108,7 @@ PPC_NATIVE_OVERRIDE(801B2460, SCGetProductSN_HLE, uint32_t, (uint32_t serialAddr
|
||||
|
||||
extern "C" uint32_t SCGetProductGameRegion_HLE()
|
||||
{
|
||||
return LookupProductRegion(0x8029CEF8u, 4, 4,
|
||||
return LookupProductRegion(MKW_GADDR(8029CEF8), 4, 4,
|
||||
RuntimeConsoleIdentity::Current().gameRegion);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "hle_stubs.h"
|
||||
#include "hle_stubs.h"
|
||||
#include "isa/big_endian.h"
|
||||
#include "hle/dvd_contract.h"
|
||||
#include "hle/runtime_parse_helpers.h"
|
||||
@@ -44,7 +44,7 @@ static fs::path g_dvdRoot;
|
||||
static std::once_flag g_dvdRootOnce;
|
||||
|
||||
static uint32_t CurrentDiscGameCode() {
|
||||
return RuntimeHle::CurrentGameCode(0x524D4350u); // RMCP
|
||||
return RuntimeHle::CurrentGameCode(::GuestRegion::CurrentFacts().gameCode);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -162,6 +162,21 @@ static const fs::path& GetDvdRoot() {
|
||||
if (!IsDvdDataRoot(path)) {
|
||||
FailDvdRoot("Configured DVD root is not an extracted DATA directory", path);
|
||||
}
|
||||
std::error_code ec;
|
||||
const auto bootBin = path / "sys" / "boot.bin";
|
||||
if (fs::is_regular_file(bootBin, ec)) {
|
||||
std::ifstream file(bootBin, std::ios::binary);
|
||||
char id[7] = {};
|
||||
if (!file.read(id, 6)) {
|
||||
FailDvdRoot("Configured DVD root has an unreadable or truncated sys/boot.bin", bootBin);
|
||||
}
|
||||
if (std::memcmp(id, "RMC", 3) == 0 && id[3] != ::GuestRegion::CurrentFacts().letter) {
|
||||
FailDvd("dvd_region_mismatch", "DVD region mismatch",
|
||||
std::string("Configured DVD root has disc ID '") + id +
|
||||
"', but this build was compiled for region " + ::GuestRegion::CurrentFacts().gameId +
|
||||
".\nThe extracted game assets must match the region of the compiled executable.");
|
||||
}
|
||||
}
|
||||
g_dvdRoot = path;
|
||||
});
|
||||
|
||||
@@ -749,7 +764,7 @@ extern "C" const char* DVDResolveHostPathForTest(const char* dvdPath)
|
||||
|
||||
static void InitDvdWaitingQueues()
|
||||
{
|
||||
constexpr uint32_t kQueueBase = 0x80343230;
|
||||
const uint32_t kQueueBase = MKW_GADDR(80343230);
|
||||
for (uint32_t i = 0; i < 4; ++i) {
|
||||
const uint32_t queue = kQueueBase + (i * 8);
|
||||
Memory::Write32(queue + 0, queue);
|
||||
@@ -763,12 +778,12 @@ static void CompleteDvdCancelState()
|
||||
|
||||
// These are the SDK DVD globals used by DVDCancelAll/__DVDPrepareReset.
|
||||
// The actual drive work is HLE'd, so complete pending cancel/reset waits.
|
||||
Memory::Write32(0x80386664, 0); // Canceling
|
||||
Memory::Write32(0x80386668, 0); // ResumeFromHere
|
||||
Memory::Write32(0x80386670, 0); // PausingFlag
|
||||
Memory::Write32(0x8038667C, 1); // CancelAllSync complete
|
||||
Memory::Write32(0x803866A8, 1); // PrepareReset complete
|
||||
Memory::Write32(0x803866F0, 0); // executing command block
|
||||
Memory::Write32(MKW_GADDR(80386664), 0); // Canceling
|
||||
Memory::Write32(MKW_GADDR(80386668), 0); // ResumeFromHere
|
||||
Memory::Write32(MKW_GADDR(80386670), 0); // PausingFlag
|
||||
Memory::Write32(MKW_GADDR(8038667C), 1); // CancelAllSync complete
|
||||
Memory::Write32(MKW_GADDR(803866A8), 1); // PrepareReset complete
|
||||
Memory::Write32(MKW_GADDR(803866F0), 0); // executing command block
|
||||
}
|
||||
|
||||
// 0x8015EA1C -> DVDInit
|
||||
@@ -785,14 +800,14 @@ extern "C" void DVDInit_8015EA1C()
|
||||
|
||||
// 1. Initialize Global Flags (Emulate OS state)
|
||||
// These addresses are standard OS globals for DVD context
|
||||
Memory::Write8(0x80386724, 1); // Contexts initialized
|
||||
Memory::Write8(0x80386725, 1); // LowInit called
|
||||
Memory::Write32(0x80386720, 0); // Current context index
|
||||
Memory::Write8(0x803866a0, 1); // DVDInit called flag
|
||||
Memory::Write8(MKW_GADDR(80386724), 1); // Contexts initialized
|
||||
Memory::Write8(MKW_GADDR(80386725), 1); // LowInit called
|
||||
Memory::Write32(MKW_GADDR(80386720), 0); // Current context index
|
||||
Memory::Write8(MKW_GADDR(803866a0), 1); // DVDInit called flag
|
||||
CompleteDvdCancelState();
|
||||
|
||||
// 2. Initialize DVD Context structures (prevent crashes in callbacks)
|
||||
constexpr uint32_t kContextBase = 0x803434e0;
|
||||
const uint32_t kContextBase = MKW_GADDR(803434e0);
|
||||
constexpr uint32_t kMagicValue = 0xFEEBDAED;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
uint32_t ctx = kContextBase + i * 0x20;
|
||||
@@ -840,7 +855,7 @@ extern "C" void DVDInit_8015EA1C()
|
||||
BuildAndPublishRuntimeFst();
|
||||
|
||||
// Initialize the translated DVD filesystem so it can use the published FST.
|
||||
constexpr uint32_t kDvdFsInitAddress = 0x8015DF1C;
|
||||
const uint32_t kDvdFsInitAddress = MKW_GADDR(8015DF1C);
|
||||
if (TranslatedFunctionRegistry::FindByAddressPtr(kDvdFsInitAddress)) {
|
||||
InvokeIndirectCpu(kDvdFsInitAddress, &GetPersistentCpuContext());
|
||||
}
|
||||
|
||||
@@ -83,10 +83,10 @@ extern "C" int32_t NANDInit_HLE(void) {
|
||||
ISFS_OpenLib_Initialize(&GetPersistentCpuContext());
|
||||
|
||||
// NANDHomeDir is at 0x80346D20 (from ESP_GetDataDir output)
|
||||
WriteGuestNandPath(0x80346D20, CurrentNandDataDir());
|
||||
WriteGuestNandPath(MKW_GADDR(80346D20), CurrentNandDataDir());
|
||||
|
||||
// Mark NAND as initialized (0x80386848 = 2)
|
||||
Memory::Write32(0x80386848, 2);
|
||||
Memory::Write32(MKW_GADDR(80386848), 2);
|
||||
|
||||
return NAND_RESULT_OK;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void CloseFd(int32_t fd) {
|
||||
// ============================================================================
|
||||
|
||||
uint32_t CurrentMkwTitleIdLo() {
|
||||
return RuntimeHle::CurrentGameCode(kNandTitleIdLo);
|
||||
return RuntimeHle::CurrentGameCode(NandTitleIdLo());
|
||||
}
|
||||
|
||||
std::string CurrentNandDataDir() {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
// Mario Kart Wii Title ID
|
||||
namespace {
|
||||
constexpr uint32_t kNandTitleIdHi = 0x00010004;
|
||||
constexpr uint32_t kNandTitleIdLo = 0x524D4350; // "RMCP" fallback
|
||||
inline uint32_t NandTitleIdLo() { return ::GuestRegion::CurrentFacts().gameCode; }
|
||||
} // anonymous namespace
|
||||
|
||||
// ============================================================================
|
||||
|
||||
@@ -187,7 +187,7 @@ static int32_t HandleDolphinIoctlv(uint32_t cmd, uint32_t numIn, uint32_t numOut
|
||||
return ISFS_EINVAL;
|
||||
}
|
||||
char productCode[8] = {};
|
||||
uint32_t discId = Memory::Contains(0x80000000u, 4u) ? Memory::Read32(0x80000000u) : kNandTitleIdLo;
|
||||
uint32_t discId = Memory::Contains(0x80000000u, 4u) ? Memory::Read32(0x80000000u) : NandTitleIdLo();
|
||||
productCode[0] = static_cast<char>((discId >> 24) & 0xffu);
|
||||
productCode[1] = static_cast<char>((discId >> 16) & 0xffu);
|
||||
productCode[2] = static_cast<char>((discId >> 8) & 0xffu);
|
||||
@@ -841,15 +841,16 @@ static bool g_isfsInitialized = false;
|
||||
// load-bearing and must not be "tidied". Names come from the RVL IPC/ISFS
|
||||
// sources; only the naming changed here, never a value.
|
||||
namespace {
|
||||
constexpr uint32_t kIsfsFdSda1Offset = 29408u; // __ISFS_fd
|
||||
constexpr uint32_t kIsfsPathSda1Offset = 29400u; // __ISFS_path ("/dev/fs")
|
||||
constexpr uint32_t kIpcBufferLoSda1Offset = 25620u; // IPC buffer window, low
|
||||
constexpr uint32_t kIpcBufferHiSda1Offset = 25616u; // IPC buffer window, high
|
||||
constexpr uint32_t kIpcArenaLoSda1Offset = 25732u; // __IPCArenaLo
|
||||
constexpr uint32_t kIpcArenaHiSda1Offset = 25728u; // __IPCArenaHi
|
||||
constexpr uint32_t kIsfsHeapHandleSda1Offset = 25724u; // ISFS heap handle
|
||||
constexpr uint32_t kIsfsHeapBaseSda1Offset = 25740u; // ISFS heap base address
|
||||
constexpr uint32_t kIsfsHeapInitializedSda1Offset = 25744u; // ISFS heap created flag
|
||||
// The ISFS client's small-data globals.
|
||||
const uint32_t kIsfsFdGlobal = MKW_GADDR(80385920); // __ISFS_fd
|
||||
const uint32_t kIsfsPathGlobal = MKW_GADDR(80385928); // __ISFS_path ("/dev/fs")
|
||||
const uint32_t kIpcBufferLoGlobal = MKW_GADDR(803867EC); // IPC buffer window, low
|
||||
const uint32_t kIpcBufferHiGlobal = MKW_GADDR(803867F0); // IPC buffer window, high
|
||||
const uint32_t kIpcArenaLoGlobal = MKW_GADDR(8038677C); // __IPCArenaLo
|
||||
const uint32_t kIpcArenaHiGlobal = MKW_GADDR(80386780); // __IPCArenaHi
|
||||
const uint32_t kIsfsHeapHandleGlobal = MKW_GADDR(80386784); // ISFS heap handle
|
||||
const uint32_t kIsfsHeapBaseGlobal = MKW_GADDR(80386774); // ISFS heap base address
|
||||
const uint32_t kIsfsHeapInitializedGlobal = MKW_GADDR(80386770); // ISFS heap created flag
|
||||
} // namespace
|
||||
|
||||
static void WriteGuestString(uint32_t address, const char* value) {
|
||||
@@ -879,51 +880,36 @@ int32_t ISFS_OpenLib_Initialize(CpuContext* ctx) {
|
||||
return ISFS_OK;
|
||||
}
|
||||
|
||||
const uint32_t r13 = ctx->gpr[13];
|
||||
if (r13 == 0) {
|
||||
return ISFS_OK;
|
||||
}
|
||||
WriteGuestString(kIsfsPathGlobal, "/dev/fs");
|
||||
|
||||
const uint32_t isfsFdGlobal = r13 - kIsfsFdSda1Offset;
|
||||
const uint32_t isfsPathGlobal = r13 - kIsfsPathSda1Offset;
|
||||
const uint32_t ipcBufferLoGlobal = r13 - kIpcBufferLoSda1Offset;
|
||||
const uint32_t ipcBufferHiGlobal = r13 - kIpcBufferHiSda1Offset;
|
||||
const uint32_t ipcArenaLoGlobal = r13 - kIpcArenaLoSda1Offset;
|
||||
const uint32_t ipcArenaHiGlobal = r13 - kIpcArenaHiSda1Offset;
|
||||
const uint32_t isfsHeapGlobal = r13 - kIsfsHeapHandleSda1Offset;
|
||||
const uint32_t isfsHeapBaseGlobal = r13 - kIsfsHeapBaseSda1Offset;
|
||||
const uint32_t isfsHeapInitializedGlobal = r13 - kIsfsHeapInitializedSda1Offset;
|
||||
|
||||
WriteGuestString(isfsPathGlobal, "/dev/fs");
|
||||
|
||||
if (Memory::Contains(isfsFdGlobal, 4)) {
|
||||
Memory::Write32(isfsFdGlobal, static_cast<uint32_t>(ISFS_DEV_FD));
|
||||
if (Memory::Contains(kIsfsFdGlobal, 4)) {
|
||||
Memory::Write32(kIsfsFdGlobal, static_cast<uint32_t>(ISFS_DEV_FD));
|
||||
}
|
||||
|
||||
// The heap bring-up below reads and writes all seven IPC globals, so it only
|
||||
// runs when every one of them is inside guest memory.
|
||||
for (const uint32_t global : {ipcBufferLoGlobal, ipcBufferHiGlobal, ipcArenaLoGlobal,
|
||||
ipcArenaHiGlobal, isfsHeapGlobal, isfsHeapBaseGlobal,
|
||||
isfsHeapInitializedGlobal}) {
|
||||
for (const uint32_t global : {kIpcBufferLoGlobal, kIpcBufferHiGlobal, kIpcArenaLoGlobal,
|
||||
kIpcArenaHiGlobal, kIsfsHeapHandleGlobal, kIsfsHeapBaseGlobal,
|
||||
kIsfsHeapInitializedGlobal}) {
|
||||
if (!Memory::Contains(global, 4)) {
|
||||
return ISFS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ipcLo = Memory::Read32(ipcBufferLoGlobal);
|
||||
uint32_t ipcHi = Memory::Read32(ipcBufferHiGlobal);
|
||||
uint32_t ipcLo = Memory::Read32(kIpcBufferLoGlobal);
|
||||
uint32_t ipcHi = Memory::Read32(kIpcBufferHiGlobal);
|
||||
if (ipcLo == 0 || ipcHi == 0 || ipcLo >= ipcHi) {
|
||||
return ISFS_OK;
|
||||
}
|
||||
|
||||
if (Memory::Read32(isfsHeapInitializedGlobal) == 0) {
|
||||
Memory::Write32(ipcArenaLoGlobal, ipcLo);
|
||||
Memory::Write32(ipcArenaHiGlobal, ipcHi);
|
||||
if (Memory::Read32(kIsfsHeapInitializedGlobal) == 0) {
|
||||
Memory::Write32(kIpcArenaLoGlobal, ipcLo);
|
||||
Memory::Write32(kIpcArenaHiGlobal, ipcHi);
|
||||
|
||||
const uint32_t heapBase = (ipcLo + 31u) & ~31u;
|
||||
const uint32_t heapSize = 5440u;
|
||||
if (heapBase + heapSize <= ipcHi) {
|
||||
Memory::Write32(isfsHeapBaseGlobal, heapBase);
|
||||
Memory::Write32(kIsfsHeapBaseGlobal, heapBase);
|
||||
|
||||
const uint32_t savedR3 = ctx->gpr[3];
|
||||
const uint32_t savedR4 = ctx->gpr[4];
|
||||
@@ -932,21 +918,21 @@ int32_t ISFS_OpenLib_Initialize(CpuContext* ctx) {
|
||||
|
||||
ctx->gpr[3] = heapBase;
|
||||
ctx->gpr[4] = heapSize;
|
||||
ctx->lr = 0x80169BCCu;
|
||||
InvokeDirectCpu<0x801949B8u>(ctx);
|
||||
ctx->lr = MKW_GADDR(80169BCC);
|
||||
InvokeIndirectCpu(MKW_GADDR(801949B8), ctx);
|
||||
const uint32_t heapHandle = ctx->gpr[3];
|
||||
|
||||
ctx->gpr[3] = heapBase + heapSize;
|
||||
ctx->lr = 0x80169BCCu;
|
||||
InvokeDirectCpu<0x80193040u>(ctx);
|
||||
ctx->lr = MKW_GADDR(80169BCC);
|
||||
InvokeIndirectCpu(MKW_GADDR(80193040), ctx);
|
||||
|
||||
ctx->gpr[3] = savedR3;
|
||||
ctx->gpr[4] = savedR4;
|
||||
ctx->gpr[5] = savedR5;
|
||||
ctx->lr = savedLr;
|
||||
|
||||
Memory::Write32(isfsHeapGlobal, heapHandle);
|
||||
Memory::Write32(isfsHeapInitializedGlobal, 1u);
|
||||
Memory::Write32(kIsfsHeapHandleGlobal, heapHandle);
|
||||
Memory::Write32(kIsfsHeapInitializedGlobal, 1u);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "hle/storage/riivolution.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
|
||||
#include "hle/riivolution_contract.h"
|
||||
#include "hle/runtime_parse_helpers.h"
|
||||
@@ -46,11 +47,9 @@ std::optional<std::string> RiivoReadFile(const fs::path& path) {
|
||||
return buffer.str();
|
||||
}
|
||||
|
||||
// Six-character game ID ("RMCP01") from guest low memory, with the same RMCP
|
||||
// fallback the rest of the storage HLE uses for boots that have not written
|
||||
// the disc header yet.
|
||||
// Six-character game ID from guest low memory, falling back to the translated game's.
|
||||
std::string RiivoGameId() {
|
||||
const uint32_t code = RuntimeHle::CurrentGameCode(0x524D4350u); // "RMCP"
|
||||
const uint32_t code = RuntimeHle::CurrentGameCode(::GuestRegion::CurrentFacts().gameCode);
|
||||
std::string id(6, '\0');
|
||||
id[0] = static_cast<char>((code >> 24) & 0xffu);
|
||||
id[1] = static_cast<char>((code >> 16) & 0xffu);
|
||||
|
||||
@@ -20,7 +20,7 @@ constexpr uint32_t kJobSize = 0x18u;
|
||||
|
||||
bool ShouldRetryThpPrepareAfterClose(uint32_t callback, uint32_t arg, uint32_t result)
|
||||
{
|
||||
if (callback != 0x80529D68u || result != 0) {
|
||||
if (callback != MKW_GADDR(80529D68) || result != 0) {
|
||||
return false;
|
||||
}
|
||||
if (arg == 0 || !Memory::Contains(arg + 0xACu, 4)) {
|
||||
@@ -30,11 +30,11 @@ bool ShouldRetryThpPrepareAfterClose(uint32_t callback, uint32_t arg, uint32_t r
|
||||
if (state != 0) {
|
||||
return false;
|
||||
}
|
||||
if (!Memory::Contains(0x809BECF0u, 4) || !Memory::Contains(0x809BEBA0u, 4)) {
|
||||
if (!Memory::Contains(MKW_GADDR(809BECF0), 4) || !Memory::Contains(MKW_GADDR(809BEBA0), 4)) {
|
||||
return false;
|
||||
}
|
||||
const uint32_t thpInit = Memory::Read32(0x809BECF0u);
|
||||
const uint32_t thpOpen = Memory::Read32(0x809BEBA0u);
|
||||
const uint32_t thpInit = Memory::Read32(MKW_GADDR(809BECF0));
|
||||
const uint32_t thpOpen = Memory::Read32(MKW_GADDR(809BEBA0));
|
||||
return thpInit != 0 && thpOpen != 0;
|
||||
}
|
||||
|
||||
@@ -52,23 +52,23 @@ uint32_t RunMovieManagerPrepareAsync(uint32_t manager, CpuContext* cpu)
|
||||
CpuContextScope scope(cpu);
|
||||
cpu->gpr[3] = manager + 0x28u;
|
||||
cpu->gpr[4] = 0;
|
||||
InvokeIndirectCpu(0x80550CC0u, cpu);
|
||||
InvokeIndirectCpu(MKW_GADDR(80550CC0), cpu);
|
||||
return cpu->gpr[3];
|
||||
};
|
||||
|
||||
uint32_t openResult = callThpPlayerOpen();
|
||||
if (openResult == 0 && ShouldRetryThpPrepareAfterClose(0x80529D68u, manager, 0)) {
|
||||
if (openResult == 0 && ShouldRetryThpPrepareAfterClose(MKW_GADDR(80529D68), manager, 0)) {
|
||||
{
|
||||
CpuContextScope scope(cpu);
|
||||
InvokeIndirectCpu(0x80551658u, cpu); // THP__PlayerStop
|
||||
InvokeIndirectCpu(0x80550F48u, cpu); // THP__PlayerClose
|
||||
InvokeIndirectCpu(MKW_GADDR(80551658), cpu); // THP__PlayerStop
|
||||
InvokeIndirectCpu(MKW_GADDR(80550F48), cpu); // THP__PlayerClose
|
||||
}
|
||||
if (Memory::Contains(0x809BEBA0u, 8) && Memory::Read32(0x809BEBA0u) != 0) {
|
||||
Memory::Write32(0x809BEBA0u, 0);
|
||||
Memory::Write8(0x809BEBA4u, 0);
|
||||
Memory::Write8(0x809BEBA5u, 0);
|
||||
Memory::Write8(0x809BEBA6u, 0);
|
||||
Memory::Write8(0x809BEBA7u, 0);
|
||||
if (Memory::Contains(MKW_GADDR(809BEBA0), 8) && Memory::Read32(MKW_GADDR(809BEBA0)) != 0) {
|
||||
Memory::Write32(MKW_GADDR(809BEBA0), 0);
|
||||
Memory::Write8(MKW_GADDR(809BEBA4), 0);
|
||||
Memory::Write8(MKW_GADDR(809BEBA5), 0);
|
||||
Memory::Write8(MKW_GADDR(809BEBA6), 0);
|
||||
Memory::Write8(MKW_GADDR(809BEBA7), 0);
|
||||
}
|
||||
openResult = callThpPlayerOpen();
|
||||
}
|
||||
@@ -81,8 +81,8 @@ uint32_t RunMovieManagerPrepareAsync(uint32_t manager, CpuContext* cpu)
|
||||
{
|
||||
CpuContextScope scope(cpu);
|
||||
cpu->gpr[3] = manager + 0x10u;
|
||||
InvokeIndirectCpu(0x80551D38u, cpu); // THP__PlayerGetVideoInfo
|
||||
InvokeIndirectCpu(0x80550F9Cu, cpu); // THP__PlayerCalcNeedMemory
|
||||
InvokeIndirectCpu(MKW_GADDR(80551D38), cpu); // THP__PlayerGetVideoInfo
|
||||
InvokeIndirectCpu(MKW_GADDR(80550F9C), cpu); // THP__PlayerCalcNeedMemory
|
||||
}
|
||||
const uint32_t needMemory = cpu->gpr[3];
|
||||
Memory::Write32(manager + 0x20u, needMemory);
|
||||
@@ -92,18 +92,18 @@ uint32_t RunMovieManagerPrepareAsync(uint32_t manager, CpuContext* cpu)
|
||||
{
|
||||
CpuContextScope scope(cpu);
|
||||
cpu->gpr[3] = setBufferArg;
|
||||
InvokeIndirectCpu(0x80551054u, cpu); // THP__PlayerSetBuffer
|
||||
InvokeIndirectCpu(MKW_GADDR(80551054), cpu); // THP__PlayerSetBuffer
|
||||
}
|
||||
|
||||
const uint32_t mode = Memory::Read32(manager + 0xA8u);
|
||||
const uint32_t audioSystem = Memory::Read32(0x8088FDB8u + (mode << 2));
|
||||
const uint32_t audioSystem = Memory::Read32(MKW_GADDR(8088FDB8) + (mode << 2));
|
||||
uint32_t prepareResult = 0;
|
||||
{
|
||||
CpuContextScope scope(cpu);
|
||||
cpu->gpr[3] = Memory::Read32(manager + 0x24u);
|
||||
cpu->gpr[4] = audioSystem;
|
||||
cpu->gpr[5] = 0;
|
||||
InvokeIndirectCpu(0x80551378u, cpu); // THP__PlayerPrepare
|
||||
InvokeIndirectCpu(MKW_GADDR(80551378), cpu); // THP__PlayerPrepare
|
||||
prepareResult = cpu->gpr[3];
|
||||
}
|
||||
if (prepareResult != 0) {
|
||||
@@ -162,7 +162,7 @@ extern "C" void TaskThread_run_HLE_80242d7c(CpuContext* ctx) {
|
||||
cpu->gpr[3] = taskThread + kTaskMessageQueueOffset;
|
||||
cpu->gpr[4] = outMsgPtr;
|
||||
cpu->gpr[5] = 1; // OS_MESSAGE_BLOCK
|
||||
InvokeIndirectCpu(0x801A7424u, cpu); // OSReceiveMessage
|
||||
InvokeIndirectCpu(MKW_GADDR(801A7424), cpu); // OSReceiveMessage
|
||||
}
|
||||
|
||||
const uint32_t job = Memory::Read32(outMsgPtr);
|
||||
@@ -176,7 +176,7 @@ extern "C" void TaskThread_run_HLE_80242d7c(CpuContext* ctx) {
|
||||
|
||||
if (callback != 0) {
|
||||
CpuContextScope scope(cpu);
|
||||
if (callback == 0x80529D68u) {
|
||||
if (callback == MKW_GADDR(80529D68)) {
|
||||
RunMovieManagerPrepareAsync(arg, cpu);
|
||||
} else {
|
||||
cpu->gpr[3] = arg;
|
||||
@@ -198,7 +198,7 @@ extern "C" void TaskThread_run_HLE_80242d7c(CpuContext* ctx) {
|
||||
cpu->gpr[3] = doneQueue;
|
||||
cpu->gpr[4] = token;
|
||||
cpu->gpr[5] = 0; // OS_MESSAGE_NOBLOCK
|
||||
InvokeIndirectCpu(0x801A735Cu, cpu); // OSSendMessage
|
||||
InvokeIndirectCpu(MKW_GADDR(801A735C), cpu); // OSSendMessage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -133,22 +133,22 @@ ViState g_vi;
|
||||
|
||||
|
||||
// Guest-side state addresses used by the SDK's VI globals.
|
||||
constexpr uint32_t kViInitializedFlagAddr = 0x80386b38;
|
||||
constexpr uint32_t kViTvFormatAddr = 0x80386ba8;
|
||||
constexpr uint32_t kViRenderWidthAddr = 0x80350864;
|
||||
constexpr uint32_t kViRenderHeightAddr = 0x80350866;
|
||||
constexpr uint32_t kViXfbWidthAddr = 0x80350872;
|
||||
constexpr uint32_t kViXfbHeightAddr = 0x8035087c;
|
||||
constexpr uint32_t kViRetraceCountAddr = 0x80386be4; // matches VIWaitForRetrace/handler
|
||||
constexpr uint32_t kViTimingGuardAddr = 0x80386b44;
|
||||
constexpr uint32_t kViPreRetraceCallback = 0x80386bb8;
|
||||
constexpr uint32_t kViPostRetraceCallback = 0x80386bb4;
|
||||
constexpr uint32_t kViNextFrameBufferAddr = 0x80386ba0;
|
||||
constexpr uint32_t kViNextFrameBufferHwAddr = 0x80350890;
|
||||
constexpr uint32_t kViRetraceQueueAddr = 0x80386bc0; // Thread queue for VIWaitForRetrace
|
||||
const uint32_t kViInitializedFlagAddr = MKW_GADDR(80386b38);
|
||||
const uint32_t kViTvFormatAddr = MKW_GADDR(80386ba8);
|
||||
const uint32_t kViRenderWidthAddr = MKW_GADDR(80350864);
|
||||
const uint32_t kViRenderHeightAddr = MKW_GADDR(80350866);
|
||||
const uint32_t kViXfbWidthAddr = MKW_GADDR(80350872);
|
||||
const uint32_t kViXfbHeightAddr = MKW_GADDR(8035087c);
|
||||
const uint32_t kViRetraceCountAddr = MKW_GADDR(80386be4); // matches VIWaitForRetrace/handler
|
||||
const uint32_t kViTimingGuardAddr = MKW_GADDR(80386b44);
|
||||
const uint32_t kViPreRetraceCallback = MKW_GADDR(80386bb8);
|
||||
const uint32_t kViPostRetraceCallback = MKW_GADDR(80386bb4);
|
||||
const uint32_t kViNextFrameBufferAddr = MKW_GADDR(80386ba0);
|
||||
const uint32_t kViNextFrameBufferHwAddr = MKW_GADDR(80350890);
|
||||
const uint32_t kViRetraceQueueAddr = MKW_GADDR(80386bc0); // Thread queue for VIWaitForRetrace
|
||||
|
||||
// EGG::BaseSystem::sSystem pointer - must be non-null before post-retrace callback is valid
|
||||
constexpr uint32_t kEggSSystemAddr = 0x80386F60;
|
||||
const uint32_t kEggSSystemAddr = MKW_GADDR(80386F60);
|
||||
|
||||
std::chrono::microseconds IntervalForFormat(uint32_t tvFormat) {
|
||||
// NTSC-ish defaults to 60 Hz; PAL uses 50 Hz.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "music_attenuation.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
@@ -28,7 +29,7 @@
|
||||
namespace MusicAttenuation {
|
||||
namespace {
|
||||
|
||||
constexpr uint32_t kSoundManagerPointer = 0x809C2898u;
|
||||
const uint32_t kSoundManagerPointer = MKW_GADDR(809C2898);
|
||||
constexpr uint32_t kArchivePlayerOffset = 0x5BCu;
|
||||
constexpr uint32_t kSoundPlayersOffset = 0x34u;
|
||||
constexpr uint32_t kSoundPlayerVolumeOffset = 0x2Cu;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "recomp_mod_loader.h"
|
||||
#include "guest_abi/guest_region.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
@@ -198,8 +199,8 @@ bool IsKnownBaseRelLoaderWrite(const ExecutableRange& range) {
|
||||
|
||||
// The game copies and relocates REL sections before executing them. Those
|
||||
// writes are normal loading/linking, not runtime code patches.
|
||||
return (cpu->lr >= 0x8000A000u && cpu->lr < 0x8000A400u) ||
|
||||
(cpu->lr >= 0x801A6000u && cpu->lr < 0x801A7000u);
|
||||
return (cpu->lr >= MKW_GADDR(8000A000) && cpu->lr < MKW_GADDR(8000A400)) ||
|
||||
(cpu->lr >= MKW_GADDR(801A6000) && cpu->lr < MKW_GADDR(801A7000));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -334,8 +334,8 @@ void SystemBridge::Initialize() {
|
||||
// These set up vtables and other critical infrastructure
|
||||
RT_LOG(RT_TAG_RUNTIME) << "Running static constructors for main DOL..." << std::endl;
|
||||
|
||||
const uint32_t dolCtorStart = 0x80244DE0;
|
||||
const uint32_t dolCtorEnd = 0x80244EA0;
|
||||
const uint32_t dolCtorStart = MKW_GADDR(80244DE0);
|
||||
const uint32_t dolCtorEnd = MKW_GADDR(80244EA0);
|
||||
|
||||
int dolCount = 0;
|
||||
for (uint32_t addr = dolCtorStart; addr < dolCtorEnd; addr += 4) {
|
||||
@@ -374,8 +374,8 @@ void SystemBridge::Initialize() {
|
||||
RT_LOG(RT_TAG_RUNTIME) << "Running static constructors for StaticR.rel..." << std::endl;
|
||||
|
||||
// Define range for StaticR.rel .ctors
|
||||
const uint32_t ctorStart = 0x8088f400;
|
||||
const uint32_t ctorEnd = 0x8088f704;
|
||||
const uint32_t ctorStart = MKW_GADDR(8088f400);
|
||||
const uint32_t ctorEnd = MKW_GADDR(8088f704);
|
||||
|
||||
int count = 0;
|
||||
for (uint32_t addr = ctorStart; addr < ctorEnd; addr += 4) {
|
||||
@@ -484,7 +484,7 @@ void SystemBridge::SeedLowMemDefaults(const Memory::Config& config) {
|
||||
};
|
||||
|
||||
std::vector<SeedEntry> entries;
|
||||
constexpr uint32_t kMem1ArenaLoDefault = 0x80399180u;
|
||||
const uint32_t kMem1ArenaLoDefault = ::GuestRegion::CurrentFacts().mem1ArenaLo;
|
||||
uint32_t mem1ArenaHiDefault = 0x817f0520u;
|
||||
constexpr uint32_t kBusClockHz =
|
||||
static_cast<uint32_t>(TimeBaseContract::kBusClockHz);
|
||||
@@ -508,10 +508,10 @@ void SystemBridge::SeedLowMemDefaults(const Memory::Config& config) {
|
||||
// Retro Rewind reads the region byte directly from here while building its
|
||||
// Retro-WFC payload URL, and OSGetAppGamename reads the app code mirrors
|
||||
// at 0x80003180/0x80003194 while building NAS auth fields.
|
||||
entries.push_back({0x80000000u, 0x524D4350u, "Disc game code"}); // RMCP
|
||||
entries.push_back({0x80000000u, ::GuestRegion::CurrentFacts().gameCode, "Disc game code"});
|
||||
entries.push_back({0x80000004u, 0x30310100u, "Disc maker/id"}); // 01 + disc 1
|
||||
entries.push_back({0x80003180u, 0x524D4350u, "OS app game code"}); // RMCP
|
||||
entries.push_back({0x80003194u, 0x524D4350u, "OS app gamename"}); // RMCP
|
||||
entries.push_back({0x80003180u, ::GuestRegion::CurrentFacts().gameCode, "OS app game code"});
|
||||
entries.push_back({0x80003194u, ::GuestRegion::CurrentFacts().gameCode, "OS app gamename"});
|
||||
if (RuntimeProduct::IsRetroRewind()) {
|
||||
entries.push_back({0x800017D8u, 0x00000001u, "Retro Rewind recomp runtime marker", true});
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ int main() {
|
||||
Require(settings && RuntimeNandSettings::HasIdentity(*settings));
|
||||
Require(settings->at("SERNO") == "987654321" && settings->at("CODE") == "LU");
|
||||
Require(settings->at("AREA") == "USA" && settings->at("GAME") == "US");
|
||||
Require(Ensure(root, error, 1800000123), "Existing imported NAND must work");
|
||||
Require(Ensure(root, error, {}, 1800000123), "Existing imported NAND must work");
|
||||
std::array<uint8_t, 256> after{};
|
||||
{
|
||||
std::ifstream input(path, std::ios::binary);
|
||||
@@ -112,11 +112,11 @@ int main() {
|
||||
std::filesystem::resize_file(path, 128);
|
||||
Require(!RuntimeNandSettings::Read(root));
|
||||
const auto damaged = ReadBytes(path);
|
||||
Require(!Ensure(root, error, 1800000123), "Do not replace a truncated identity");
|
||||
Require(!Ensure(root, error, {}, 1800000123), "Do not replace a truncated identity");
|
||||
Require(ReadBytes(path) == damaged, "Damaged file must remain untouched");
|
||||
|
||||
const auto fresh = root / "fresh";
|
||||
Require(Ensure(fresh, error, 1800000123), "Missing setting.txt must initialize");
|
||||
Require(Ensure(fresh, error, {}, 1800000123), "Missing setting.txt must initialize");
|
||||
const auto generated = Read(fresh);
|
||||
Require(generated && HasIdentity(*generated), "Generated file must be readable");
|
||||
Require(generated->at("SERNO") == "800000123", "Persist Dolphin-generated serial");
|
||||
@@ -127,13 +127,23 @@ int main() {
|
||||
"Complete Dolphin boot settings");
|
||||
const auto firstBoot = ReadBytes(FilePath(fresh));
|
||||
Require(firstBoot.size() == 256 && firstBoot.back() == 0, "Dolphin buffer size and raw zero padding");
|
||||
Require(Ensure(fresh, error, 1900000999), "Second boot");
|
||||
Require(Ensure(fresh, error, {}, 1900000999), "Second boot");
|
||||
Require(ReadBytes(FilePath(fresh)) == firstBoot, "Second boot must not change any bytes");
|
||||
|
||||
const auto freshNtsc = root / "fresh-ntsc";
|
||||
const BootDefaults ntscDefaults{"USA", "RVL-001(USA)", "LU", "NTSC", "US"};
|
||||
Require(Ensure(freshNtsc, error, ntscDefaults, 1800000123), "Regional setting.txt must initialize");
|
||||
const auto generatedNtsc = Read(freshNtsc);
|
||||
Require(generatedNtsc && HasIdentity(*generatedNtsc), "Generated NTSC file must be readable");
|
||||
Require(generatedNtsc->at("CODE") == "LU" && generatedNtsc->at("AREA") == "USA" &&
|
||||
generatedNtsc->at("GAME") == "US", "NTSC first-boot fields");
|
||||
Require(generatedNtsc->at("MODEL") == "RVL-001(USA)" && generatedNtsc->at("VIDEO") == "NTSC",
|
||||
"Complete NTSC boot settings");
|
||||
|
||||
const auto blocked = root / "blocked";
|
||||
{ std::ofstream output(blocked); output << "file obstructing NAND directory"; }
|
||||
Require(!Ensure(blocked, error, 1800000123), "Write failure must not return an ephemeral identity");
|
||||
Require(!Ensure(root / "bad-clock", error, -1), "Clock failure must not initialize");
|
||||
Require(!Ensure(blocked, error, {}, 1800000123), "Write failure must not return an ephemeral identity");
|
||||
Require(!Ensure(root / "bad-clock", error, {}, -1), "Clock failure must not initialize");
|
||||
|
||||
const auto concurrent = root / "concurrent";
|
||||
std::array<bool, 16> results{};
|
||||
@@ -141,14 +151,14 @@ int main() {
|
||||
for (size_t i = 0; i < results.size(); ++i) {
|
||||
workers.emplace_back([&, i] {
|
||||
std::string detail;
|
||||
results[i] = Ensure(concurrent, detail, 1800000001 + i);
|
||||
results[i] = Ensure(concurrent, detail, {}, 1800000001 + i);
|
||||
});
|
||||
}
|
||||
for (auto& worker : workers) worker.join();
|
||||
for (const bool result : results) Require(result, "Concurrent boot must read the persisted winner");
|
||||
const auto winner = ReadBytes(FilePath(concurrent));
|
||||
Require(Read(concurrent) && HasIdentity(*Read(concurrent)), "Concurrent boot must persist valid settings");
|
||||
Require(Ensure(concurrent, error, 1900000999), "Boot after concurrent initialization");
|
||||
Require(Ensure(concurrent, error, {}, 1900000999), "Boot after concurrent initialization");
|
||||
Require(ReadBytes(FilePath(concurrent)) == winner, "Concurrent winner must remain stable");
|
||||
|
||||
// Independently decode as Nintendo does: stop at the first encoded NUL.
|
||||
|
||||
Reference in New Issue
Block a user