diff --git a/libgambatte/libgambatte.vcxproj b/libgambatte/libgambatte.vcxproj index 0af47e31bb..027a9db161 100644 --- a/libgambatte/libgambatte.vcxproj +++ b/libgambatte/libgambatte.vcxproj @@ -1,222 +1,231 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {5D630682-7BDA-474D-B387-0EB420DDC199} - Win32Proj - libgambatte - 8.1 - - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) - include;src;src\common - 4244;4373;4800;4804 - - - Windows - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) - include;src;src\common - 4244;4373;4800;4804 - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) - include;src;src\common - 4244;4373;4800;4804 - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) - include;src;src\common - 4244;4373;4800;4804 - - - Windows - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {5D630682-7BDA-474D-B387-0EB420DDC199} + Win32Proj + libgambatte + 8.1 + + + + DynamicLibrary + true + v140 + Unicode + + + DynamicLibrary + false + v140 + true + Unicode + + + DynamicLibrary + true + v140 + Unicode + + + DynamicLibrary + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + ..\output\dll + + + true + ..\output\dll + + + false + ..\output\dll + + + false + ..\output\dll + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) + include;src;src\common + 4244;4373;4800;4804 + + + Windows + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) + include;src;src\common + 4244;4373;4800;4804 + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) + include;src;src\common + 4244;4373;4800;4804 + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBGAMBATTE_EXPORTS;%(PreprocessorDefinitions) + include;src;src\common + 4244;4373;4800;4804 + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/libgambatte/src/memory.h b/libgambatte/src/memory.h index af9758eab5..3ea2eec6ac 100644 --- a/libgambatte/src/memory.h +++ b/libgambatte/src/memory.h @@ -212,14 +212,19 @@ public: unsigned read(const unsigned P, const unsigned long cycleCounter) { if (readCallback) readCallback(P, (cycleCounter - basetime) >> 1); - if(cdCallback) - { - CDMapResult map = CDMap(P); - if(map.type != eCDLog_AddrType_None) - cdCallback(map.addr,map.type,eCDLog_Flags_Data); + bool biosRange = ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200))); + if(biosMode) { + if (biosRange) + return readBios(P); } - if (biosMode && ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200)))) { - return readBios(P); + else + { + if(cdCallback) + { + CDMapResult map = CDMap(P); + if(map.type != eCDLog_AddrType_None) + cdCallback(map.addr,map.type,eCDLog_Flags_Data); + } } return cart.rmem(P >> 12) ? cart.rmem(P >> 12)[P] : nontrivial_read(P, cycleCounter); } @@ -227,14 +232,19 @@ public: unsigned read_excb(const unsigned P, const unsigned long cycleCounter, bool first) { if (execCallback) execCallback(P, (cycleCounter - basetime) >> 1); - if(cdCallback) - { - CDMapResult map = CDMap(P); - if(map.type != eCDLog_AddrType_None) - cdCallback(map.addr,map.type,first?eCDLog_Flags_ExecFirst : eCDLog_Flags_ExecOperand); + bool biosRange = ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200))); + if (biosMode) { + if(biosRange) + return readBios(P); } - if (biosMode && ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200)))) { - return readBios(P); + else + { + if(cdCallback) + { + CDMapResult map = CDMap(P); + if(map.type != eCDLog_AddrType_None) + cdCallback(map.addr,map.type,first?eCDLog_Flags_ExecFirst : eCDLog_Flags_ExecOperand); + } } return cart.rmem(P >> 12) ? cart.rmem(P >> 12)[P] : nontrivial_read(P, cycleCounter); } @@ -260,7 +270,7 @@ public: nontrivial_write(P, data, cycleCounter); if (writeCallback) writeCallback(P, (cycleCounter - basetime) >> 1); - if(cdCallback) + if(cdCallback && !biosMode) { CDMapResult map = CDMap(P); if(map.type != eCDLog_AddrType_None) @@ -275,7 +285,7 @@ public: nontrivial_ff_write(P, data, cycleCounter); if (writeCallback) writeCallback(P, (cycleCounter - basetime) >> 1); - if(cdCallback) + if(cdCallback && !biosMode) { CDMapResult map = CDMap(P); if(map.type != eCDLog_AddrType_None) diff --git a/output/dll/libgambatte.dll b/output/dll/libgambatte.dll index 79c5fccd1b..29bf3927f0 100644 Binary files a/output/dll/libgambatte.dll and b/output/dll/libgambatte.dll differ