summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice <maurice.henke@protonmail.com>2021-04-26 01:11:25 +0200
committerMaurice <maurice.henke@protonmail.com>2021-04-26 01:11:25 +0200
commitc8d8458c4b8dbbd06d6b9e0a2fda60b28dc1e29a (patch)
treedc3aa594ef7225bb2e9ebc870fe0855e859c4817
parentfbaa2b206e8829176d418c57564f6c3d1055a381 (diff)
Fixed ASM Macros to work with [un]signed numbersHEADmaster
-rw-r--r--GameCube/include/game_patch/game_patch.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/GameCube/include/game_patch/game_patch.h b/GameCube/include/game_patch/game_patch.h
index 34a81c9..9ac49dd 100644
--- a/GameCube/include/game_patch/game_patch.h
+++ b/GameCube/include/game_patch/game_patch.h
@@ -10,8 +10,8 @@
#include <cstdint>
// Instruction templates
-#define ASM_LOAD_IMMEDIATE( register, value ) ( 0x38000000 + ( register * 0x200000 ) ) | static_cast<int16_t>( value )
-#define ASM_COMPARE_WORD_IMMEDIATE( register, value ) ( 0x2C000000 + ( register * 0x10000 ) ) | static_cast<int16_t>( value )
+#define ASM_LOAD_IMMEDIATE( register, value ) ( 0x38000000 + ( register * 0x200000 ) ) | ( value & 0xFFFF )
+#define ASM_COMPARE_WORD_IMMEDIATE( register, value ) ( 0x2C000000 + ( register * 0x10000 ) ) | ( value & 0xFFFF )
namespace mod::game_patch
{