Update Visual Studio for new BUS class, and fix some minor warnings.

This commit is contained in:
Stephen Anthony 2022-06-11 21:27:36 -02:30
parent 70f70c21bb
commit 94836cda4d
6 changed files with 39 additions and 19 deletions

View File

@ -34,7 +34,7 @@ CartridgeBUSWidget::CartridgeBUSWidget(
VGAP = 4;
int xpos = HBORDER, ypos = VBORDER;
int ds2_rows;
int ds2_rows = 0;
// if (cart.myBUSSubtype == CartridgeBUS::BUSSubtype::BUS0)
// {
@ -397,7 +397,6 @@ void CartridgeBUSWidget::loadConfig()
}
myMusicWaveformSizes->setList(alist, vlist, changed);
if (myCart.myBUSSubtype == CartridgeBUS::BUSSubtype::BUS3)
{
alist.clear(); vlist.clear(); changed.clear();

View File

@ -307,8 +307,8 @@ uInt8 CartridgeBUS::peek(uInt16 address)
uInt8 result = 0;
// Get the index of the data fetcher that's being accessed
uInt32 index = address & 0x0f;
uInt32 function = (address >> 4) & 0x01;
const uInt32 index = address & 0x0f;
const uInt32 function = (address >> 4) & 0x01;
switch(function)
{
@ -335,20 +335,28 @@ uInt8 CartridgeBUS::peek(uInt16 address)
break;
case 0x08: // 0x18 = AMPLITUDE
{
// Update the music data fetchers (counter & flag)
updateMusicModeDataFetchers();
// using myDisplayImage[] instead of myProgramImage[] because waveforms
// can be modified during runtime.
uInt32 i = myDisplayImage[(getWaveform(0) ) + (myMusicCounters[0] >> myMusicWaveformSize[0])] +
const uInt32 i = myDisplayImage[(getWaveform(0)) + (myMusicCounters[0] >> myMusicWaveformSize[0])] +
myDisplayImage[(getWaveform(1)) + (myMusicCounters[1] >> myMusicWaveformSize[1])] +
myDisplayImage[(getWaveform(2)) + (myMusicCounters[2] >> myMusicWaveformSize[2])];
result = uInt8(i);
result = static_cast<uInt8>(i);
break;
}
default:
break;
}
break;
}
default:
break;
}
return result;
@ -402,6 +410,9 @@ uInt8 CartridgeBUS::peek(uInt16 address)
case 0xFF3: // CALLFN
// these are write-only
break;
default:
break;
}
}
else if (myBUSSubtype == BUSSubtype::BUS0)
@ -762,6 +773,9 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
case 0x0A: // 0x1A CALLFUNCTION
callFunction(value);
break;
default:
break;
}
}
}
@ -1142,9 +1156,8 @@ void CartridgeBUS::setupVersion()
// 3 versions of the BUS driver have been found. Location of the BUS
// strings are in a different location for each.
// get offset of BUS ID
uInt32 busOffset = scanBUSDriver(0x00535542);
const uInt32 busOffset = scanBUSDriver(0x00535542);
switch(busOffset)
{

View File

@ -191,7 +191,7 @@ bool FilesystemNodeWINDOWS::
current_drive += _tcslen(current_drive) + 1)
{
FilesystemNodeWINDOWS entry;
char drive_name[2];
char drive_name[2] = { 0, 0 };
drive_name[0] = toAscii(current_drive)[0];
drive_name[1] = '\0';

View File

@ -711,6 +711,7 @@
<ClCompile Include="..\debugger\gui\CartBFWidget.cxx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\debugger\gui\CartBUSInfoWidget.cxx" />
<ClCompile Include="..\debugger\gui\CartBUSWidget.cxx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
</ClCompile>
@ -1893,6 +1894,7 @@
<ClInclude Include="..\debugger\gui\CartBFWidget.hxx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="..\debugger\gui\CartBUSInfoWidget.hxx" />
<ClInclude Include="..\debugger\gui\CartBUSWidget.hxx">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
</ClInclude>

View File

@ -1137,6 +1137,9 @@
<ClCompile Include="..\debugger\gui\Cart0FA0Widget.cxx">
<Filter>Source Files\debugger</Filter>
</ClCompile>
<ClCompile Include="..\debugger\gui\CartBUSInfoWidget.cxx">
<Filter>Source Files\debugger</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\bspf.hxx">
@ -2354,6 +2357,9 @@
<ClInclude Include="..\debugger\gui\Cart0FA0Widget.hxx">
<Filter>Header Files\debugger</Filter>
</ClInclude>
<ClInclude Include="..\debugger\gui\CartBUSInfoWidget.hxx">
<Filter>Header Files\debugger</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="stella.ico">