UnleashedRecomp/UnleashedRecompLib/config/SWA.toml
Skyth (Asilkan) c0897dd507
Options menu, achievements, and installer wizard. (#19)
* Implemented guest-to-host function pointers (WIP)

Co-Authored-By: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>

* function: support more types for function pointers

* Initial options menu implementation.

* Improve options menu visuals.

* Draw fade on borders, center tabs better.

* Adjust line sizes, fix tab text centering.

* Adjust padding & text sizes.

* Fix bar dark gradient effect.

* api: ported BlueBlur headers and misc. research

* Fix config name padding not getting scaled at different resolutions.

* config: use string_view, added method to get value pointer

* config: use std::map for reverse enum template

* Draw config options manually instead of looping through them.

* config: implemented name and enum localisation

* config_detail: move implementation to cpp, relocate sources

* Implemented accessing options menu via pause and title screen

* config: replace MSAA with AntiAliasing enum

* options_menu: implemented info panel and text marquee (see TODOs)

* Draw selection triangles.

* Supersample fonts to 2K.

* Implement options menu navigation.

* Fix duplicate triangles when selecting options.

* Draw scroll bar.

* Adjust scroll bar padding.

* Further scroll bar padding adjustments.

* Draw outer container as an outline.

* Improve marquee text scrolling.

* CTitleMenu: fix options menu re-entering on A press whilst visible

* Make procedural grid pattern more accurate.

* Add enum & bool editing.

* Update English localisation

* Fix input state mapping.

* options_menu: hide menu on Y hold

* CHudPause: fix crash when opening options menu from village/lab

* Implement float slider.

* options_menu: round res scale description resolution

* options_menu: use config callbacks after setting items

* api: fix GameObject layout

* camera_patches: implemented camera X/Y invert

* options_menu: fix buffered A press selecting first option upon entry

* config_locale: update description for Battle Music

* config: added Allow Background Input option

* options_menu: move ATOC option below Anti-Aliasing

* options_menu: only draw header/footer fade in stages

* Handle real-time modifications of some video config values.

* Converge increments only when holding the left/right button.

* Add sound effects to options menu.

* Change some sounds used in options menu.

* Give the final decide sound to bool toggling.

* Add option select animation.

* options_menu: only play slider sound between min/max range

* Apply category select animation.

* config: rename Controls category to Input

* Implement intro transition animation for options menu.

* audio_patches: implemented music volume

* Implement FPS slider.

* Prevent ImGui from displaying OS cursor.

* Fade container brackets during intro transition.

* player_patches: added penalty to Unleash Cancel

* config_locale: update English localisation

* player_patches: ensure Unleash gauge penalty doesn't dip into negatives

* options_menu: fix being unable to press A at least once after opening the menu

* CTitleMenu: added open/close sounds to the options menu

* audio_patches: implemented Music and SE volume

* api: update research

* Implemented music volume attenuation for Windows 10+

* api: fix score offset

* Add an interval between consecutive playbacks of the slider sound effect in fastIncrement mode

* config: implemented enum descriptions

* options_menu: fit thumbnail rect to grid, remove menu hide input

* options_menu: fix description wrap width

* camera_patches: fix FOV at narrow aspect ratios

mobile gaming is back on the menu

* options_menu: implemented greyed out options and localisation

* options_menu: allow providing reasons for greyed out options

* audio_patches: check if Windows version is supported

* Update PowerRecomp submodule

* api: more research

* options_menu: forget selected item upon opening

* options_menu: restrict XButtonHoming to title and world map

* window: always hide mouse cursor

The options menu doesn't accept mouse input, so there's not really any point to showing the cursor at all.

* Animate category tab background  from the center.

* Fix clip rect in info panel not getting popped at all times.

* Expose texture loader in "video.h".

* config: use final names and descriptions, label options to be moved to exports

* options_menu: implemented Voice Language (and some misc. clean-up)

* Move Voice Language patch to resident_patches

* config: added Aspect Ratio option (to be implemented)

* options_menu: implemented Subtitles

* Remove triple buffering from options menu, turn it to an enum.

* window: hide mouse cursor on controller input for windowed mode

* window: show window dimensions on title bar when resizing window

* api: update research

* Accept functions directly in GuestToHostFunction & add memory range asserts.

* Add guest_stack_var, improve shared_ptr implementation.

* Handle float/double arguments properly in GuestToHostFunction.

* CHudPause_patches: allocate options strings on stack

* api: update research

* guest_stack_var: allow creation without constructing underlying type

* memory: make assertions lenient towards nullptr

* api: include guest_stack_var in SWA.inl

* audio_patches: don't worry about it

* Implemented achievement overlay (WIP)

* Implemented achievements menu (WIP)

* Clean-up, improved animation and layouts

* options_menu: fix naming convention

* achievements_overlay: implemented queue and hermite interpolation

* achievements_menu: implemented animations and improved navigation

* achievements_menu: improve animation accuracy

* achievements_menu: added timestamps

* achievement_data: added checksum and format verification

* achievement_menu: improved outro animation

* achievement_menu: added total unlocked achievements

* achievement_menu: update sprite animation

* Update resources submodule

* Add installer wizard.

* Skip drawing scanlines when height is 0.

* Tweak install screen to better match the original

* Added arrow circle to installer's header

* Move icon header generation to resources submodule

* Added missing animations and tweaked other ones for installer

* Improve detection for DLC only mode. Add template for message prompts.

* Add language picker.

* window: update icon resources

* Added file_to_c

* Fixes to conversion.

* Implemented message window

* achievement_menu: use selection cursor texture

* Update embedded resources

* Implemented message window

* Merge branch 'bin2c' into options-menu

* Update embedded resources

* Framework for max width for buttons.

* Update embedded resources

* Use textures for pause menu containers

* audio_patches: check if Windows major version is >=10

Just in case.

* installer_wizard: use integer outline for button text

* Added arrow circle spinning animation during installation screen

* achievement_menu: fix timestamp and scroll bar padding

* achievement_overlay: fix achievement name padding

* installer_wizard: fix arrow circle spinning animation misaligning

* Add Scale and Origin to ImGui shaders. Change text to be squashed.

* message_window: implemented mouse input

* installer_wizard: implemented message windows

* achievement_menu: start marquee before timestamp margin

* Fix message box flow.

* message_window: use pause container texture

* Add extra condition for starting the installer.

* message_window: only accept mouse click if option is selected

* Implemented safer way to check if the game is loaded

* Add queued update when using files pickers.

* installer_wizard: implement localisation

* installer_wizard: use enum for localisation

* message_window: fix visibility persisting after window closes

* Fix arrow circle animation and added pulse animation

* Come back check space.

* Implement ZSTD compression in file_to_c.

* Add fade-in/out to installation icons and sleep after hitting 100%

* Implement ImGui font atlas caching.

* Controller navigation.

* Implemented button guide

* CTitleStateMenu: fix start button opening old options menu

* Update resources submodule

* imgui_snapshot: check if game is loaded before accessing XDBF

* message_window: added button guide

* options_menu: increase button guide side margins

* video: disable imgui.ini creation

* Use IM_DELETE for deleting the existing font atlas.

* Remove redundant FlushViewport call.

* Fix ImGui callbacks leaking memory.

* Replace unique_ptr reference arguments with raw pointers.

* Specialize description for resolution scale by reference.

---------

Co-authored-by: Hyper <34012267+hyperbx@users.noreply.github.com>
Co-authored-by: PTKay <jp_moura99@outlook.com>
Co-authored-by: Dario <dariosamo@gmail.com>
2024-12-06 18:52:06 +03:00

544 lines
13 KiB
TOML

[main]
file_path = "../private/default.xex"
out_directory_path = "../ppc"
switch_table_file_path = "SWA_switch_tables.toml"
skip_lr = true
skip_msr = true
ctr_as_local = true
xer_as_local = true
reserved_as_local = true
cr_as_local = true
non_argument_as_local = true
non_volatile_as_local = true
restgprlr_14_address = 0x831B0B40
savegprlr_14_address = 0x831B0AF0
restfpr_14_address = 0x831B144C
savefpr_14_address = 0x831B1400
restvmx_14_address = 0x831B36E8
savevmx_14_address = 0x831B3450
restvmx_64_address = 0x831B377C
savevmx_64_address = 0x831B34E4
longjmp_address = 0x831B6790
setjmp_address = 0x831B6AB0
# These functions do not exist in .pdata and do
# not analyze properly due to having jump tables
functions = [
{ address = 0x824E7EF0, size = 0x98 },
{ address = 0x824E7F28, size = 0x60 },
{ address = 0x82C980E8, size = 0x110 },
{ address = 0x82CF7080, size = 0x80 },
{ address = 0x82D9AC08, size = 0x78 },
{ address = 0x82E86770, size = 0x98 },
{ address = 0x82E97E50, size = 0x84 },
{ address = 0x82EE2D08, size = 0x154 },
{ address = 0x82EF5C38, size = 0x64 },
{ address = 0x82EF5D78, size = 0x3F8 },
{ address = 0x82F08730, size = 0x2B0 },
{ address = 0x82F098C0, size = 0x19C },
{ address = 0x82F13980, size = 0xF4 },
{ address = 0x82F1D668, size = 0x1E8 },
{ address = 0x82F22908, size = 0x20C },
{ address = 0x82F25FD8, size = 0x240 },
{ address = 0x82F852A0, size = 0xCC },
{ address = 0x830DADA0, size = 0x150 },
{ address = 0x831487D0, size = 0xD4 },
{ address = 0x831530C8, size = 0x258 },
{ address = 0x831539E0, size = 0xD0 },
{ address = 0x83168940, size = 0x100 },
{ address = 0x83168A48, size = 0x11C },
{ address = 0x83168B70, size = 0x128 },
{ address = 0x83168F18, size = 0x254 },
{ address = 0x8316C678, size = 0x78 },
{ address = 0x8317CD30, size = 0x50 },
{ address = 0x83180700, size = 0x74 },
{ address = 0x8319ED58, size = 0x98 },
{ address = 0x82455E70, size = 0x84 },
{ address = 0x82456DC8, size = 0xD4 },
{ address = 0x826ABB70, size = 0x70 },
{ address = 0x82893088, size = 0x45C },
{ address = 0x82C49540, size = 0x114 },
{ address = 0x82DE35D8, size = 0x68 },
{ address = 0x82DE3640, size = 0x64 },
{ address = 0x82DE36A8, size = 0x5C },
{ address = 0x82DE3708, size = 0x198 },
{ address = 0x82DE38A0, size = 0x16C },
{ address = 0x830B7DD0, size = 0x74 },
{ address = 0x831B0BA0, size = 0xA0 },
{ address = 0x8305D168, size = 0x278 }
]
invalid_instructions = [
{ data = 0x00000000, size = 4 }, # Padding
{ data = 0x831B1C90, size = 8 }, # C++ Frame Handler
{ data = 0x8324B3BC, size = 8 }, # C Specific Frame Handler
{ data = 0x831C8B50, size = 8 },
{ data = 0x00485645, size = 44 } # End of .text
]
[[midasm_hook]]
name = "IndexBufferLengthMidAsmHook"
address = 0x82E26244
registers = ["r3"]
[[midasm_hook]]
name = "SetShadowResolutionMidAsmHook"
address = 0x82BAD87C
registers = ["r11"]
[[midasm_hook]]
name = "CameraAspectRatioMidAsmHook"
address = 0x82468E84
registers = ["r31"]
jump_address_on_true = 0x82468E88
jump_address_on_false = 0x82468EE0
[[midasm_hook]]
name = "CameraBoostAspectRatioMidAsmHook"
address = 0x8246BDA0
registers = ["r31", "f0", "f10", "f12"]
jump_address_on_true = 0x8246BDAC
[[midasm_hook]]
name = "CSDAspectRatioMidAsmHook"
address = 0x830C0A28
registers = ["f1", "f2"]
[[midasm_hook]]
name = "ResetScoreOnRestartMidAsmHook"
address = 0x82304374
# Disable hint volumes
[[midasm_hook]]
name = "DisableHintsMidAsmHook"
address = 0x827A2504
jump_address_on_true = 0x827A251C
# Disable hint rings
[[midasm_hook]]
name = "DisableHintsMidAsmHook"
address = 0x827A2E34
jump_address_on_true = 0x827A2E4C
# Disable navigation volumes
[[midasm_hook]]
name = "DisableControlTutorialMidAsmHook"
address = 0x827AA5EC
jump_address_on_true = 0x827AA604
# Disable Werehog button prompts
[[midasm_hook]]
name = "DisableEvilControlTutorialMidAsmHook"
address = 0x823A4FF0
registers = ["r4", "r5"]
return_on_false = true
[[midasm_hook]]
name = "SetXButtonHomingMidAsmHook"
address = 0x8237AC88
registers = ["r30"]
# Down force HFR fix
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x8234AB94
registers = ["f1"]
# 2D spline HFR fix
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x82345468
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x8234547C
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823454B0
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x82345534
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823455EC
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x8234564C
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823457A8
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823458A0
registers = ["f1"]
# Lever/door/panchinko pad acceleration fix
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x82418350
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x824178A0
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x82419408
registers = ["f1"]
# 3D camera HFR fixes
[[midasm_hook]]
name = "CameraDeltaTimeFixMidAsmHook"
address = 0x8247DD38 # Slope
registers = ["f0", "f31"]
jump_address = 0x8247DD3C
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247DD48 # Slope
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247DDFC # Dash path binormal
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247E280 # Target front offset
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247E300 # Target
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247E3C8 # Target
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247E4A0 # Target up positive
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247E4E8 # Target up negative
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247E9FC # Position
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247EA84 # Position up negative
registers = ["f0"]
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247EA50 # Position up positive
registers = ["f0"]
[[midasm_hook]]
name = "CameraDeltaTimeFixMidAsmHook"
address = 0x8247ED30 # Distance offset 1
registers = ["f0", "f12"]
jump_address = 0x8247ED34
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247ED40 # Distance offset 1
registers = ["f0"]
[[midasm_hook]]
name = "CameraDeltaTimeFixMidAsmHook"
address = 0x8247ED54 # Distance offset 2
registers = ["f13"]
jump_address = 0x8247ED58
[[midasm_hook]]
name = "CameraLerpFixMidAsmHook"
address = 0x8247ED64 # Distance offset 2
registers = ["f13"]
[[midasm_hook]]
name = "CameraTargetSideOffsetLerpFixMidAsmHook"
address = 0x8247F12C # Target side offset
registers = ["v13", "v62"]
# 2D camera HFR fixes
[[midasm_hook]]
name = "Camera2DLerpFixMidAsmHook"
address = 0x824761AC # Player velocity
registers = ["f0", "f28"]
jump_address = 0x824761B0
[[midasm_hook]]
name = "Camera2DLerpFixMidAsmHook"
address = 0x824762AC # Player position
registers = ["f0", "f28"]
jump_address = 0x824762B0
[[midasm_hook]]
name = "Camera2DLerpFixMidAsmHook"
address = 0x8247645C # Spherical position
registers = ["f0", "f28"]
jump_address = 0x82476460
[[midasm_hook]]
name = "Camera2DLerpFixMidAsmHook"
address = 0x82476514 # Target up offset
registers = ["f0", "f28"]
jump_address = 0x82476518
[[midasm_hook]]
name = "Camera2DLerpFixMidAsmHook"
address = 0x824768A0 # Spherical position
registers = ["f0", "f28"]
jump_address = 0x824768A4
[[midasm_hook]]
name = "Camera2DLerpFixMidAsmHook"
address = 0x824768C8 # Spherical position
registers = ["f0", "f28"]
jump_address = 0x824768CC
[[midasm_hook]]
name = "CameraDeltaTimeFixMidAsmHook"
address = 0x82476768 # Slope
registers = ["f1", "f30"]
jump_address = 0x8247676C
[[midasm_hook]]
name = "Camera2DSlopeLerpFixMidAsmHook"
address = 0x82476778 # Slope
registers = ["f1", "f28"]
[[midasm_hook]]
name = "GetStageIDMidAsmHook"
address = 0x82528198
registers = ["r5"]
[[midasm_hook]]
name = "PostUnleashMidAsmHook"
address = 0x823C6788
registers = ["r30"]
[[midasm_hook]]
name = "MovieRendererMidAsmHook"
address = 0x82AE3200
registers = ["r3"]
[[midasm_hook]]
name = "WerehogBattleMusicMidAsmHook"
address = 0x82B47278
registers = ["r11"]
[[midasm_hook]]
name = "WerehogBattleMusicMidAsmHook"
address = 0x82B47728
registers = ["r11"]
[[midasm_hook]]
name = "MotionBlurMidAsmHook"
address = 0x82BA99D0
jump_address_on_false = 0x82BAA544
# Bloom glare resolution fix
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BA3E9C
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BA3EF4
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BA3F4C
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BA3F9C
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BA4000
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BA4064
registers = ["r4", "f1", "f2"]
# Light shaft resolution fix
[[midasm_hook]]
name = "PostProcessResolutionFix"
address = 0x82BB0EE0
registers = ["r4", "f1", "f2"]
[[midasm_hook]]
name = "LightShaftAspectRatioFix"
address = 0x82BB1314
registers = ["f28", "f0"]
[[midasm_hook]]
name = "ParticleTestIndexBufferMidAsmHook"
address = 0x827D20A0
registers = ["r30"]
jump_address_on_true = 0x827D20EC
[[midasm_hook]]
name = "ParticleTestDrawIndexedPrimitiveMidAsmHook"
address = 0x827D25AC
registers = ["r7"]
[[midasm_hook]]
name = "LoadingScreenSpeedFixMidAsmHook"
address = 0x824DAB60
registers = ["r4"]
[[midasm_hook]]
name = "MotionBlurPrevInvViewProjectionMidAsmHook"
address = 0x82BA9E7C
registers = ["r10"]
[[midasm_hook]]
name = "GetDatabaseDataMidAsmHook"
address = 0x82E38688 # Model
registers = ["r1", "r31"]
[[midasm_hook]]
name = "GetDatabaseDataMidAsmHook"
address = 0x82E39650 # Terrain Model
registers = ["r1", "r31"]
[[midasm_hook]]
name = "GetDatabaseDataMidAsmHook"
address = 0x827D614C # Particle Material Binary
registers = ["r1", "r29"]
[[midasm_hook]]
name = "GetDatabaseDataMidAsmHook"
address = 0x827D6018 # Particle Material XML
registers = ["r1", "r30"]
# Removes the storage device prompt on new game
[[midasm_hook]]
name = "StorageDevicePromptMidAsmHook"
address = 0x822C53CC
jump_address = 0x822C53F8
# World Map Pause Menu
[[midasm_hook]]
name = "CHudPauseAddOptionsItemMidAsmHook"
address = 0x824AF140
registers = ["r31"]
# Village Pause Menu
[[midasm_hook]]
name = "CHudPauseAddOptionsItemMidAsmHook"
address = 0x824AF5BC
registers = ["r31"]
# Stage Pause Menu
[[midasm_hook]]
name = "CHudPauseAddOptionsItemMidAsmHook"
address = 0x824AF988
registers = ["r31"]
# Hub Pause Menu
[[midasm_hook]]
name = "CHudPauseAddOptionsItemMidAsmHook"
address = 0x824AFB20
registers = ["r31"]
# Misc Pause Menu
[[midasm_hook]]
name = "CHudPauseAddOptionsItemMidAsmHook"
address = 0x824AFCC8
registers = ["r31"]
# World Map Pause Menu
[[midasm_hook]]
name = "CHudPauseItemCountMidAsmHook"
address = 0x824B02F8
registers = ["r3", "r11"]
return_on_true = true
# Village Pause Menu
[[midasm_hook]]
name = "CHudPauseVillageItemCountMidAsmHook"
address = 0x824B04AC
registers = ["r31", "r10"]
# Stage Pause Menu
[[midasm_hook]]
name = "CHudPauseItemCountMidAsmHook"
address = 0x824B061C
registers = ["r3", "r11"]
return_on_true = true
# Hub Pause Menu
[[midasm_hook]]
name = "CHudPauseItemCountMidAsmHook"
address = 0x824B07C4
registers = ["r3", "r10"]
return_on_true = true
# Misc Pause Menu Index Wrap-around
[[midasm_hook]]
name = "CHudPauseItemCountMidAsmHook"
address = 0x824B08A8
registers = ["r3", "r11"]
return_on_true = true
# Misc Pause Menu Index Comparison
[[midasm_hook]]
name = "CHudPauseMiscItemCountMidAsmHook"
address = 0x824B08B0
registers = ["r11"]
jump_address_on_true = 0x824B08C0
# Misc Pause Menu Inject Options Behaviour
[[midasm_hook]]
name = "CHudPauseMiscInjectOptionsMidAsmHook"
address = 0x824B08C0
registers = ["r3"]
return_on_true = true
[[midasm_hook]]
name = "ToggleSubtitlesMidAsmHook"
address = 0x82B9BB74
registers = ["r27"]
[[midasm_hook]]
name = "AchievementManagerUnlockMidAsmHook"
address = 0x82BCFF28
registers = ["r31"]