git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 00000971d753e4868d8e02d30547380052952d36
parent 58bd40b833eeb96d92a65e146de52adaaf9c6fba
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Tue, 24 Jun 2025 21:53:18 +0300

Describe addresses correctly in unbanked portions of RAM and ROM

Diffstat:
MCocoa/GBHexStatusBarRepresenter.m2+-
MCore/debugger.c3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Cocoa/GBHexStatusBarRepresenter.m b/Cocoa/GBHexStatusBarRepresenter.m @@ -136,7 +136,7 @@ if (!_gb) { return [NSString stringWithFormat:@"$%llX", offset]; } - return @(GB_debugger_describe_address(_gb, offset + _baseAddress, _bankForDescription, false, isRangeEnd)); + return @(GB_debugger_describe_address(_gb, offset + _baseAddress, offset < 0x4000? -1 :_bankForDescription, false, isRangeEnd)); } diff --git a/Core/debugger.c b/Core/debugger.c @@ -2775,6 +2775,9 @@ const char *GB_debugger_describe_address(GB_gameboy_t *gb, if (bank == (uint16_t)-1) { bank = bank_for_addr(gb, addr); } + if ((addr >> 12) == 0xC) { + bank = 0; + } if (exact_match) { const GB_bank_symbol_t *symbol = GB_map_find_symbol(get_symbol_map(gb, bank), addr, prefer_local); if (symbol && symbol->addr == addr) return symbol->name;

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