Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
host/mods: load emulator mod folders (1/2): RomFS, cheats, exefs patches #2149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
host/mods: load emulator mod folders (1/2): RomFS, cheats, exefs patches #2149
Changes from all commits
83bc59cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Mods made for Switch emulators load from a mods folder: RomFS files switched while the game runs, cheat files of every mod as one list, .pchtxt / .ips patches as a module loads (DM_MODS, the Mac window's Mods menu). dm/host/hle_mods.c reads DM_MODS (default <DM_ROOT>/mods), one folder per mod in the layouts mods ship in (romfs/, exefs/, cheats/ directly, or under atmosphere/contents/<title ID>/), ordered and switched by order.txt. A folder of mods is a pack; two of a pack that replace the same RomFS file are alternatives. - romfs/ folders join the RomFS overlay, and the Mods menu (or DM_CTL "mod-on" / "mod-off") changes the list while the game runs (dm_fs_overlay_set). A <name>.dm-delete marker hides a game file or directory, and those of the mods after it. A name that differs from the game's only in case is taken, with a warning in the log, where it silently did nothing before. - Every cheats/<build ID>.txt of the running build is loaded, the cheats folder's own first, then each mod's by priority: a cheat an earlier file has with the same name and code is left out, the same name with other code is a second entry ("Name #2"), a mod's cheats are listed under its name, and <build>.enabled / <build>.values stay one file each, in the cheats folder. CHEAT_MAX is 512, for all files together. - exefs/*.pchtxt and <build ID>.ips are written into the module whose build ID they name while it is still writable (loader.c map_image), a file whole or not at all. A file is refused with a [RED] line when a patch replaces a word the rewriter moved (<name>.changed.tsv) or writes an instruction the rewriter would have had to replace; applying those before the rewriter runs is the next change. Mac-tested on 0400486024DEC000 only: two RomFS mods from the menu, synthetic patches and cheat files. Code modules of a mod (ExLaunch, Skyline) are not loaded, and no exefs patch is applied on iOS. Rebased on main at 034e91a: only the game note's Found on this game list conflicted (both kept); symptom index regenerated. Main's rewriter now also rounds odd-sized sub/add sp, #imm frames (c081686), so the host refuses a patch that writes sub / add sp, sp, #imm by an amount that is not a multiple of 16 too (t_mods: five new cases). Checked again: host build, make -C dm/host/tests run (t_mods, t_cheats, t_fs, t_hid), test_docs, test_env_switches, test_architecture, lint tests. Front-ends: new: mods are folders in DM_MODS (default <DM_ROOT>/mods), ordered and turned off by order.txt there; the host reads it at the start Front-ends: interface: every <build ID>.txt of the running build is loaded, from the cheats folder and each enabled mod's cheats/, as one list; a cheat's section may be a mod's nameUh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check failure on line 888 in dm/host/front_mac.m
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.