git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit ff0e55bd3b4de4d41a9484bf65631117af2ffc88
parent 230971708aee76983fe7fea5037dda816c32515b
Author: Toxa <untoxa@mail.ru>
Date:   Wed,  4 Feb 2026 19:23:36 +0300

GB/SMS/GG: remove obsolete EMU_profiler_message() support which caused problems when building with --debug and have no sense anymore

Diffstat:
Mgbdk-lib/examples/cross-platform/emu_debug/src/emu_debug.c14--------------
Mgbdk-lib/include/gbdk/emu_debug.h21+--------------------
Mgbdk-lib/libc/targets/sm83/ap/Makefile2+-
Mgbdk-lib/libc/targets/sm83/duck/Makefile2+-
Dgbdk-lib/libc/targets/sm83/emu_debug.s20--------------------
Mgbdk-lib/libc/targets/sm83/gb/Makefile2+-
6 files changed, 4 insertions(+), 57 deletions(-)

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 @@ -140,20 +140,6 @@ int main(void) EMU_MESSAGE("Is LY Register > Line 67: %($ff44)>67%Yes;No;"); #endif - - #if defined(NINTENDO) - // Print some profile info using a built-in function. - EMU_MESSAGE("The following lines contain: PROFILE,(SP+$0),(SP+$1),A,TOTALCLKS,ROMBANK,WRAMBANK"); - - EMU_profiler_message(); - - // It's equivalent to: - EMU_MESSAGE("PROFILE,%(SP+$0)%,%(SP+$1)%,%A%,%TOTALCLKS%,%ROMBANK%,%WRAMBANK%"); - - #elif defined(SEGA) - EMU_MESSAGE("PROFILE,%(SP+$0)%,%(SP+$1)%,%A%,%TOTALCLKS%,%ROMBANK%,%WRAMBANK%"); - #endif - int16_t var_s16 = -1234; uint16_t var_u16 = 31002; uint16_t var_u16h = 0xA50Fu; diff --git a/gbdk-lib/include/gbdk/emu_debug.h b/gbdk-lib/include/gbdk/emu_debug.h @@ -18,7 +18,7 @@ #include <types.h> -#if defined(__TARGET_gb) || defined(__TARGET_ap) || defined(__TARGET_sms) || defined(__TARGET_gg) +#if defined(__TARGET_gb) || defined(__TARGET_duck) || defined(__TARGET_ap) || defined(__TARGET_sms) || defined(__TARGET_gg) /** Macro to display a message in the emulator debug message window @@ -127,19 +127,6 @@ __endasm #define EMU_TEXT(MSG) EMU_MESSAGE(MSG) #define BGB_TEXT(MSG) EMU_TEXT(MSG) -#if defined(NINTENDO) -/** Display preset debug information in the Emulator debug messages window. - - This function is equivalent to: - \code{.c} - EMU_MESSAGE("PROFILE,%(SP+$0)%,%(SP+$1)%,%A%,%TOTALCLKS%,%ROMBANK%,%WRAMBANK%"); - \endcode - -*/ -void EMU_profiler_message(void); -#define BGB_profiler_message EMU_profiler_message() -#endif // NINTENDO - /** Print the string and arguments given by format to the emulator debug message window @param format The format string as per printf @@ -184,17 +171,11 @@ void EMU_printf(const char *format, ...) PRESERVES_REGS(a, b, c); */ void EMU_fmtbuf(const unsigned char * format, void * data) PRESERVES_REGS(a, b, c); -#if defined(__SDCC) && defined(NINTENDO) -static void __EMU_PROFILER_INIT__(void) NAKED { __asm__(".globl _EMU_profiler_message"); } -#endif - /** The Emulator will break into debugger when encounters this line */ #define EMU_BREAKPOINT __asm__("ld b, b"); #define BGB_BREAKPOINT EMU_BREAKPOINT -#elif defined(__TARGET_duck) - #error Not implemented yet #else #error Unrecognized port #endif diff --git a/gbdk-lib/libc/targets/sm83/ap/Makefile b/gbdk-lib/libc/targets/sm83/ap/Makefile @@ -20,7 +20,7 @@ ASSRC = cgb.s cgb_palettes.s cgb_compat.s \ set_data.s set_prop.s set_spr.s set_wi_t.s set_xy_t.s \ set_1bit_data.s \ sgb.s font.s font_color.s delay.s \ - emu_debug.s emu_debug_printf.s \ + emu_debug_printf.s \ nowait.s far_ptr.s \ lcd.s joy.s tim.s tim_nested.s tim_common.s \ crash_handler.s \ diff --git a/gbdk-lib/libc/targets/sm83/duck/Makefile b/gbdk-lib/libc/targets/sm83/duck/Makefile @@ -21,7 +21,7 @@ ASSRC = cgb.s cgb_palettes.s cgb_compat.s \ set_data.s set_prop.s set_spr.s set_wi_t.s set_xy_t.s \ set_1bit_data.s \ sgb.s font.s font_color.s delay.s \ - emu_debug.s emu_debug_printf.s \ + emu_debug_printf.s \ nowait.s far_ptr.s \ lcd.s joy.s tim.s tim.s tim_nested.s tim_common.s \ crash_handler.s \ diff --git a/gbdk-lib/libc/targets/sm83/emu_debug.s b/gbdk-lib/libc/targets/sm83/emu_debug.s @@ -1,20 +0,0 @@ - .include "global.s" - - .title "EMU_debug" - .module EMU_debug - - .area _EMU_HEADER (ABS) - - .org 0x08 - JP _EMU_profiler_message - - .area _HOME - - ;; EMU profiler message -_EMU_profiler_message:: - LD D, D - JR 1$ - .dw 0x6464 - .dw 0 - .ascii "PROFILE,%(SP+$0)%,%(SP+$1)%,%A%,%TOTALCLKS%,%ROMBANK%,%WRAMBANK%" -1$: RET diff --git a/gbdk-lib/libc/targets/sm83/gb/Makefile b/gbdk-lib/libc/targets/sm83/gb/Makefile @@ -20,7 +20,7 @@ ASSRC = cgb.s cgb_palettes.s cgb_compat.s \ set_data.s set_prop.s set_spr.s set_wi_t.s set_xy_t.s \ set_1bit_data.s \ sgb.s font.s font_color.s delay.s \ - emu_debug.s emu_debug_printf.s \ + emu_debug_printf.s \ nowait.s far_ptr.s \ lcd.s joy.s tim.s tim.s tim_nested.s tim_common.s \ crash_handler.s \

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.