From 80858801300a2f48ad250721a79ebc7b1b0aba92 Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Thu, 20 Dec 2012 18:10:38 -0500 Subject: Remove the SNES Open Bus behaviour by default. Also simplify translation again. SNES Open Bus is a quirk of the memory subsystem that allow reads of invalid addresses to return the last byte read from memory. However, it is seldom needed by a game, and it costs 1 to 3 MIPS instructions per SNES instruction to emulate. If you need SNES Open Bus, you can remove -DNO_OPEN_BUS from the Makefile. --- source/memmap.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/memmap.h') diff --git a/source/memmap.h b/source/memmap.h index 58f0c9f..f838065 100644 --- a/source/memmap.h +++ b/source/memmap.h @@ -276,7 +276,7 @@ bool8 LoadZip(const char* zipname, END_EXTERN_C extern "C" { -void S9xAutoSaveSRAM (); + void S9xAutoSaveSRAM (); } #ifdef NO_INLINE_SET_GET @@ -288,9 +288,12 @@ void S9xSetPCBase (uint32 Address); uint8 *S9xGetMemPointer (uint32 Address); uint8 *GetBasePointer (uint32 Address); -extern "C"{ -extern uint8 OpenBus; +#ifndef NO_OPEN_BUS +extern "C" { + extern uint8 OpenBus; } +#endif + #else #define INLINE inline #include "getset.h" -- cgit v1.2.3