SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 12ad85355cf924d34bcd88c559401f81569c9d58 parent a9ce9f538f2241ec89338f4b8b19b2d39e1a334b Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 4 Aug 2023 20:02:42 +0300 Build the iOS frontend without the debugger Diffstat:
| M | Core/cheats.c | 2 | ++ |
| M | Core/gb.c | 6 | +++--- |
| M | Core/rewind.c | 1 | + |
| M | Makefile | 3 | ++- |
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Core/cheats.c b/Core/cheats.c @@ -3,6 +3,8 @@ #include <stdio.h> #include <assert.h> #include <errno.h> +#include <string.h> +#include <stdlib.h> static inline uint8_t hash_addr(uint16_t addr) { diff --git a/Core/gb.c b/Core/gb.c @@ -210,9 +210,6 @@ void GB_free(GB_gameboy_t *gb) } #ifndef GB_DISABLE_DEBUGGER GB_debugger_clear_symbols(gb); -#endif - GB_rewind_reset(gb); -#ifndef GB_DISABLE_CHEATS if (gb->breakpoints) { free(gb->breakpoints); } @@ -225,6 +222,9 @@ void GB_free(GB_gameboy_t *gb) if (gb->undo_state) { free(gb->undo_state); } +#endif + GB_rewind_reset(gb); +#ifndef GB_DISABLE_CHEATS while (gb->cheats) { GB_remove_cheat(gb, gb->cheats[0]); } diff --git a/Core/rewind.c b/Core/rewind.c @@ -4,6 +4,7 @@ #include <stdlib.h> #include <math.h> #include <assert.h> +#include <string.h> static uint8_t *state_compress(const uint8_t *prev, const uint8_t *data, size_t uncompressed_size) { diff --git a/Makefile b/Makefile @@ -229,7 +229,8 @@ SYSROOT := $(shell xcodebuild -sdk iphoneos -version Path 2> $(NULL)) ifeq ($(SYSROOT),) $(error Could not find an iOS SDK) endif -CFLAGS += -arch arm64 -miphoneos-version-min=11.0 -isysroot $(SYSROOT) -IAppleCommon +CFLAGS += -arch arm64 -miphoneos-version-min=11.0 -isysroot $(SYSROOT) -IAppleCommon -DGB_DISABLE_DEBUGGER +CORE_FILTER += Core/debugger.c Core/sm83_disassembler.c Core/symbol_hash.c LDFLAGS += -arch arm64 OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) LDFLAGS += -miphoneos-version-min=11.0 -isysroot $(SYSROOT)
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.