diff options
author | german77 <juangerman-13@hotmail.com> | 2024-02-04 22:19:54 +0100 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2024-02-05 00:46:20 +0100 |
commit | 504abbd6e0ca8073e6a3e60776b2278bd0ffcaed (patch) | |
tree | 9f689eab1feb3d1a3b5de570f2fa107837449828 /src/core/memory/dmnt_cheat_vm.h | |
parent | Merge pull request #12892 from liamwhite/serialization-stuff (diff) | |
download | yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.tar yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.tar.gz yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.tar.bz2 yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.tar.lz yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.tar.xz yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.tar.zst yuzu-504abbd6e0ca8073e6a3e60776b2278bd0ffcaed.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/memory/dmnt_cheat_vm.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/core/memory/dmnt_cheat_vm.h b/src/core/memory/dmnt_cheat_vm.h index 641cb09c4..32797dcd7 100644 --- a/src/core/memory/dmnt_cheat_vm.h +++ b/src/core/memory/dmnt_cheat_vm.h @@ -42,12 +42,16 @@ enum class CheatVmOpcodeType : u32 { DoubleExtendedWidth = 0xF0, // Double-extended width opcodes. + PauseProcess = 0xFF0, + ResumeProcess = 0xFF1, DebugLog = 0xFFF, }; enum class MemoryAccessType : u32 { MainNso = 0, Heap = 1, + Alias = 2, + Aslr = 3, }; enum class ConditionalComparisonType : u32 { @@ -131,7 +135,9 @@ struct BeginConditionalOpcode { VmInt value{}; }; -struct EndConditionalOpcode {}; +struct EndConditionalOpcode { + bool is_else; +}; struct ControlLoopOpcode { bool start_loop{}; @@ -222,6 +228,10 @@ struct ReadWriteStaticRegisterOpcode { u32 idx{}; }; +struct PauseProcessOpcode {}; + +struct ResumeProcessOpcode {}; + struct DebugLogOpcode { u32 bit_width{}; u32 log_id{}; @@ -244,8 +254,8 @@ struct CheatVmOpcode { PerformArithmeticStaticOpcode, BeginKeypressConditionalOpcode, PerformArithmeticRegisterOpcode, StoreRegisterToAddressOpcode, BeginRegisterConditionalOpcode, SaveRestoreRegisterOpcode, - SaveRestoreRegisterMaskOpcode, ReadWriteStaticRegisterOpcode, DebugLogOpcode, - UnrecognizedInstruction> + SaveRestoreRegisterMaskOpcode, ReadWriteStaticRegisterOpcode, PauseProcessOpcode, + ResumeProcessOpcode, DebugLogOpcode, UnrecognizedInstruction> opcode{}; }; @@ -296,7 +306,7 @@ private: std::array<std::size_t, NumRegisters> loop_tops{}; bool DecodeNextOpcode(CheatVmOpcode& out); - void SkipConditionalBlock(); + void SkipConditionalBlock(bool is_if); void ResetState(); // For implementing the DebugLog opcode. |