From 375cdbe8c53d80d1101204c6e0dc3947068462ba Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 15 Nov 2025 14:47:36 +0100 Subject: [PATCH] debug: Added stub for future debug features --- src/debug.s | 10 ++++++++++ src/defs.s | 11 ++++++++++- src/update.s | 1 + src/wram.s | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/debug.s b/src/debug.s index e69de29..18668a3 100644 --- a/src/debug.s +++ b/src/debug.s @@ -0,0 +1,10 @@ + + ; updates debug code + ; when in debug mode the + ; user can slow step through tile + ; updates +debug_update: + ld a, [debug_flags] + and a, DEBUG_F_ENABLE + ret z + ret diff --git a/src/defs.s b/src/defs.s index e271de2..78aa15b 100644 --- a/src/defs.s +++ b/src/defs.s @@ -129,4 +129,13 @@ ; gameplay control flags .se 1 - + + ; debug control flags +.se 1 + ; if debug mode is enabled + ; tile updates are paused until + ; a button is pressed + ; this allows the debugger + ; to slow step through the map + ; update routines +.de DEBUG_F_ENABLE, 1 diff --git a/src/update.s b/src/update.s index d411928..6252ae2 100644 --- a/src/update.s +++ b/src/update.s @@ -19,6 +19,7 @@ update_game: call ui_update + call debug_update ; TODO: update map routine diff --git a/src/wram.s b/src/wram.s index 4ecf2be..d6ac19b 100644 --- a/src/wram.s +++ b/src/wram.s @@ -43,6 +43,9 @@ demo_inputs: .adv 2 ; gameplay control flags game_flags: .adv 1 + ; debug control flags +debug_flags: .adv 1 + scroll_timer: .adv 1 ; dummy oam -- 2.30.2