Repository navigation
Mac: Atmosphère cheats in the host and the settings window - #736
Closed
joaquinsandoval2307 wants to merge 1 commit into
Closed
joaquinsandoval2307 wants to merge 1 commit into
joaquinsandoval2307 wants to merge 1 commit into
Conversation
…he settings window
- hle_cheat.c: an Atmosphère cheat VM (dmnt's opcodes, the format the switch-cheats-db collections use) for the file DM_CHEATS names. {Name} master codes
always run, the [Name] cheats DM_CHEATS_ON picks (their positions among the entries with code) about 60 times a second on a host thread. Guest pointers
are host pointers, read and written through vm_read_overwrite / vm_write so a stale pointer in a chain skips the tick instead of faulting. Key
conditions read player 1's held buttons (hle_hid.c dm_input_buttons).
- Regions as dmnt's MemoryAccessType (hle_svc.c dm_guest_region_base: main, heap, alias, address space), plus the host's own region 4: the newest NRO the
game loaded (loader.c nro_newest_loaded), for games whose code lives in an NRO (Super Mario 3D All-Stars' Super Mario Sunshine).
- The Mac app: the NSP script's --cheats / CHEATS picks the cheat file for the packed main build (a file, or a folder laid out as switch-cheats-db or
holding <build ID>.txt), pack_app.py --cheats puts it in the app, the settings window lists one toggle per cheat (Cheats section, kept as cheats.on),
and launcher.c hands the choice to the host.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What and why
Atmosphère cheats for Mac apps, as on a console running Atmosphère.
hle_cheat.c(new): a cheat VM.DM_CHEATSnames.{Name}master codes always run. The[Name]cheats thatDM_CHEATS_ONpicks run about 60 times a second on a host thread.vm_read_overwrite/vm_write, so a stale pointer in a chain skips that tick instead of faulting.hle_svc.cdm_guest_region_base).loader.cnro_newest_loaded).--cheats/CHEATSpicks the cheat file for the packedmainbuild: a file, or a folder laid out as switch-cheats-db or holding<build ID>.txt.pack_app.py --cheatsputs it in the app.cheats.on.launcher.chands the choice to the host.docs/settings.md(Cheats),docs/development.md(packing example),docs/env_switches.tsv(DM_CHEATS,DM_CHEATS_ON,DM_CHEATS_DEBUG).This came up in #733 as a separate proposal. If cheats do not belong in this repository, closing this PR is fine.
Checked
make -C dm/host/tests GAME=010015100B514000 runpasses.dm/tools/testspasses, includingtest_env_switches.pack_app.build_launcher).mainbuild:Docs
docs/settings.mdanddocs/env_switches.tsv🤖 Generated with Claude Code