libgambatte CDL - dont log anything while the bios runs (fixes #1349)
This commit is contained in:
parent
a3e0a9818e
commit
25ff1f9539
|
@ -71,15 +71,19 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\output\dll</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\output\dll</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\output\dll</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\output\dll</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
|
@ -219,4 +223,9 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
|
@ -212,14 +212,19 @@ public:
|
|||
unsigned read(const unsigned P, const unsigned long cycleCounter) {
|
||||
if (readCallback)
|
||||
readCallback(P, (cycleCounter - basetime) >> 1);
|
||||
bool biosRange = ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200)));
|
||||
if(biosMode) {
|
||||
if (biosRange)
|
||||
return readBios(P);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(cdCallback)
|
||||
{
|
||||
CDMapResult map = CDMap(P);
|
||||
if(map.type != eCDLog_AddrType_None)
|
||||
cdCallback(map.addr,map.type,eCDLog_Flags_Data);
|
||||
}
|
||||
if (biosMode && ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200)))) {
|
||||
return readBios(P);
|
||||
}
|
||||
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);
|
||||
bool biosRange = ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200)));
|
||||
if (biosMode) {
|
||||
if(biosRange)
|
||||
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);
|
||||
}
|
||||
if (biosMode && ((!gbIsCgb_ && P < 0x100) || (gbIsCgb_ && P < 0x900 && (P < 0x100 || P >= 0x200)))) {
|
||||
return readBios(P);
|
||||
}
|
||||
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)
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue