gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 3fb3b2046e9109af9c7842b70aeb1d2c52e413e3 parent e8c732dfe0caa9fa3d8f3651c68e5bef78712e29 Author: bbbbbr <bbbbbr@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:51:11 -0800 Merge pull request #746 from bbbbbr/emu_debug_example Example: EmuDebug: fix register addition getting treated as dereferencing pointer in bgb and emulicious Diffstat:
| M | gbdk-lib/examples/cross-platform/emu_debug/src/emu_debug.c | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gbdk-lib/examples/cross-platform/emu_debug/src/emu_debug.c b/gbdk-lib/examples/cross-platform/emu_debug/src/emu_debug.c @@ -125,13 +125,14 @@ int main(void) EMU_MESSAGE("All Registers: %ALLREGS%"); // Simple addition with a register - EMU_MESSAGE("Register A + 1: %(A+1)%"); + EMU_MESSAGE("Register A + 1: %A+1%"); // Note: %SCANLINE% is available in Emulicious (for SMS/GG/GB/GBC) but not BGB EMU_MESSAGE("Current Scanline: %SCANLINE%"); #if defined(NINTENDO) // Read the LY Register a couple times + // Note how the register value is obtained by using parenthesis to de-referenced its address. // (Current Y coordinate being rendered to the LCD) EMU_MESSAGE("LY Register (0xFF44): %($ff44)%"); EMU_MESSAGE("LY Register (0xFF44): %($ff44)%");
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.