From a44f17b9a15cf1a572d5e8056a69c368265729f2 Mon Sep 17 00:00:00 2001 From: Andrew Martinek Date: Sun, 6 Oct 2019 23:00:27 -0400 Subject: Fixed a few macros that were giving weird code. Updated tcgdisasm --- src/macros/code.asm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/macros/code.asm') diff --git a/src/macros/code.asm b/src/macros/code.asm index 55f4b63..8f2bd0d 100644 --- a/src/macros/code.asm +++ b/src/macros/code.asm @@ -26,6 +26,24 @@ else endc ENDM +; runs SetEventFlagValue with the next value as the flag, c as the new value +set_flag_value: MACRO + call SetStackFlagValue + db \1 +ENDM + +; runs ZeroOutEventFlag with the next value as the flag +zero_out_flag: MACRO + call ZeroStackFlagValue + db \1 +ENDM + +; runs GetEventFlagValue with the next value as the flag. returns value in a +get_flag_value: MACRO + call GetStackFlagValue + db \1 +ENDM + ; the rst $38 handler is a single ret instruction ; probably used for testing purposes during development debug_ret EQUS "rst $38" -- cgit v1.2.3 From 299f013b8b14184b9f06da3b89ba87ce2ba9e0f3 Mon Sep 17 00:00:00 2001 From: Andrew Martinek Date: Sun, 13 Oct 2019 19:39:13 -0400 Subject: More scripts, start to figure out mapscripts --- src/macros/code.asm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/macros/code.asm') diff --git a/src/macros/code.asm b/src/macros/code.asm index 8f2bd0d..3441ec3 100644 --- a/src/macros/code.asm +++ b/src/macros/code.asm @@ -47,3 +47,9 @@ ENDM ; the rst $38 handler is a single ret instruction ; probably used for testing purposes during development debug_ret EQUS "rst $38" + +; Returns to the pointer in bc instead of where the stack was. +retbc: MACRO + push bc + ret +ENDM -- cgit v1.2.3 From adc5a467eeccb0e44f4fcd2ed14d2b185ca1c14c Mon Sep 17 00:00:00 2001 From: Andrew Martinek Date: Tue, 29 Oct 2019 16:35:04 -0400 Subject: Finished extracting Challenge Hall scripts --- src/macros/code.asm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/macros/code.asm') diff --git a/src/macros/code.asm b/src/macros/code.asm index 3441ec3..8921a04 100644 --- a/src/macros/code.asm +++ b/src/macros/code.asm @@ -33,11 +33,23 @@ set_flag_value: MACRO ENDM ; runs ZeroOutEventFlag with the next value as the flag -zero_out_flag: MACRO +zero_flag_value: MACRO call ZeroStackFlagValue db \1 ENDM +; a second version of the above with no real differences +zero_flag_value2: MACRO + call ZeroStackFlagValue2 + db \1 +ENDM + +; runs MaxOutEventFlag with the next value as the flag +max_flag_value: MACRO + call MaxStackFlagValue + db \1 +ENDM + ; runs GetEventFlagValue with the next value as the flag. returns value in a get_flag_value: MACRO call GetStackFlagValue -- cgit v1.2.3