From 2e2440fe74bae59098329866e943cf27f3f68501 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Sun, 31 Aug 2025 00:44:06 +1000 Subject: [PATCH] Update bsnes' SameBoy integration for the new version. Hat tip to @alice-mkh for figuring out how to update bsnes' integration. --- bsnes/gb/GNUmakefile | 6 +++--- bsnes/sfc/coprocessor/icd/icd.cpp | 4 ++-- bsnes/sfc/sfc.hpp | 12 +++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bsnes/gb/GNUmakefile b/bsnes/gb/GNUmakefile index e88ac4181..fa3eb0f9a 100644 --- a/bsnes/gb/GNUmakefile +++ b/bsnes/gb/GNUmakefile @@ -1,13 +1,13 @@ include gb/version.mk export VERSION -flags += -DGB_INTERNAL -DGB_DISABLE_DEBUGGER -DGB_DISABLE_CHEATS -D_GNU_SOURCE -DGB_VERSION=\"$(VERSION)\" -Wno-multichar +flags += -DGB_INTERNAL -DGB_DISABLE_DEBUGGER -DGB_DISABLE_CHEATS -D_GNU_SOURCE -DGB_VERSION=\"$(VERSION)\" -DNDEBUG -Wno-multichar options += -I../sameboy objects += gb-apu gb-camera gb-rumble gb-display gb-gb gb-joypad gb-mbc objects += gb-memory gb-printer gb-random gb-rewind gb-save_state gb-sgb -objects += gb-sm83_cpu gb-symbol_hash gb-timing -#objects+= gb-debugger gb-sm83_disassembler +objects += gb-sm83_cpu gb-timing +#objects+= gb-debugger gb-sm83_disassembler gb-symbol_hash obj/gb-apu.o: gb/Core/apu.c obj/gb-camera.o: gb/Core/camera.c diff --git a/bsnes/sfc/coprocessor/icd/icd.cpp b/bsnes/sfc/coprocessor/icd/icd.cpp index ae56d8192..9a39f90b3 100644 --- a/bsnes/sfc/coprocessor/icd/icd.cpp +++ b/bsnes/sfc/coprocessor/icd/icd.cpp @@ -42,10 +42,10 @@ namespace SameBoy { icd.apuWrite(left, right); } - static auto vblank(GB_gameboy_t*) -> void { + static auto vblank(GB_gameboy_t*, GB_vblank_type_t) -> void { } - static auto log(GB_gameboy_t *gb, const char *string, GB_log_attributes attributes) -> void { + static auto log(GB_gameboy_t *gb, const char *string, GB_log_attributes_t attributes) -> void { } } diff --git a/bsnes/sfc/sfc.hpp b/bsnes/sfc/sfc.hpp index 9ecf56de0..60ef0543f 100644 --- a/bsnes/sfc/sfc.hpp +++ b/bsnes/sfc/sfc.hpp @@ -3,6 +3,13 @@ //license: GPLv3 //started: 2004-10-14 +extern "C" { + #include + #include + // Avoid conflict between `unreachable()` in SameBoy and `unreachable` in nall + #undef unreachable +} + #include #include #include @@ -14,11 +21,6 @@ #include #include -extern "C" { - #include - #include -} - namespace SuperFamicom { #define platform Emulator::platform namespace File = Emulator::File;