mirror of https://github.com/stella-emu/stella.git
Add CartCreator to VS project, and fix a few warnings.
This commit is contained in:
parent
683a84c619
commit
435761051b
|
@ -297,7 +297,7 @@ class ZipHandler
|
||||||
void addToCache();
|
void addToCache();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr uInt32 DECOMPRESS_BUFSIZE = 16_KB;
|
static constexpr size_t DECOMPRESS_BUFSIZE = 16_KB;
|
||||||
static constexpr uInt32 CACHE_SIZE = 8; // number of open files to cache
|
static constexpr uInt32 CACHE_SIZE = 8; // number of open files to cache
|
||||||
|
|
||||||
ZipFilePtr myZip;
|
ZipFilePtr myZip;
|
||||||
|
|
|
@ -80,10 +80,10 @@ bool Cartridge::bankChanged()
|
||||||
uInt16 Cartridge::bankSize(uInt16 bank) const
|
uInt16 Cartridge::bankSize(uInt16 bank) const
|
||||||
{
|
{
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
getImage(size);
|
getImage(size);
|
||||||
|
|
||||||
return std::min(size / romBankCount(), 4_KB); // assuming that each bank has the same size
|
return static_cast<uInt16>(
|
||||||
|
std::min(size / romBankCount(), 4_KB)); // assuming that each bank has the same size
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
|
@ -629,7 +629,7 @@ bool CartDetector::isProbablyFA2(const ByteBuffer& image, size_t)
|
||||||
// file sizes
|
// file sizes
|
||||||
|
|
||||||
// 32K version has all zeros in 29K-32K area
|
// 32K version has all zeros in 29K-32K area
|
||||||
for(uInt32 i = 29_KB; i < 32_KB; ++i)
|
for(size_t i = 29_KB; i < 32_KB; ++i)
|
||||||
if(image[i] != 0)
|
if(image[i] != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ class MT24LC256
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Sizes of the EEPROM
|
// Sizes of the EEPROM
|
||||||
static constexpr uInt32 FLASH_SIZE = 32_KB;
|
static constexpr size_t FLASH_SIZE = 32_KB;
|
||||||
static constexpr uInt32 PAGE_SIZE = 64;
|
static constexpr size_t PAGE_SIZE = 64;
|
||||||
static constexpr uInt32 PAGE_NUM = FLASH_SIZE / PAGE_SIZE;
|
static constexpr size_t PAGE_NUM = FLASH_SIZE / PAGE_SIZE;
|
||||||
|
|
||||||
// Initial state value of flash EEPROM
|
// Initial state value of flash EEPROM
|
||||||
static constexpr uInt8 INITIAL_VALUE = 0xff;
|
static constexpr uInt8 INITIAL_VALUE = 0xff;
|
||||||
|
|
|
@ -717,6 +717,7 @@
|
||||||
<ClCompile Include="..\emucore\Cart3EPlus.cxx" />
|
<ClCompile Include="..\emucore\Cart3EPlus.cxx" />
|
||||||
<ClCompile Include="..\emucore\Cart3EX.cxx" />
|
<ClCompile Include="..\emucore\Cart3EX.cxx" />
|
||||||
<ClCompile Include="..\emucore\Cart4KSC.cxx" />
|
<ClCompile Include="..\emucore\Cart4KSC.cxx" />
|
||||||
|
<ClCompile Include="..\emucore\CartCreator.cxx" />
|
||||||
<ClCompile Include="..\emucore\CartEnhanced.cxx" />
|
<ClCompile Include="..\emucore\CartEnhanced.cxx" />
|
||||||
<ClCompile Include="..\emucore\CartBF.cxx" />
|
<ClCompile Include="..\emucore\CartBF.cxx" />
|
||||||
<ClCompile Include="..\emucore\CartBFSC.cxx" />
|
<ClCompile Include="..\emucore\CartBFSC.cxx" />
|
||||||
|
@ -1739,6 +1740,7 @@
|
||||||
<ClInclude Include="..\emucore\Cart3EPlus.hxx" />
|
<ClInclude Include="..\emucore\Cart3EPlus.hxx" />
|
||||||
<ClInclude Include="..\emucore\Cart3EX.hxx" />
|
<ClInclude Include="..\emucore\Cart3EX.hxx" />
|
||||||
<ClInclude Include="..\emucore\Cart4KSC.hxx" />
|
<ClInclude Include="..\emucore\Cart4KSC.hxx" />
|
||||||
|
<ClInclude Include="..\emucore\CartCreator.hxx" />
|
||||||
<ClInclude Include="..\emucore\CartEnhanced.hxx" />
|
<ClInclude Include="..\emucore\CartEnhanced.hxx" />
|
||||||
<ClInclude Include="..\emucore\CartBF.hxx" />
|
<ClInclude Include="..\emucore\CartBF.hxx" />
|
||||||
<ClInclude Include="..\emucore\CartBFSC.hxx" />
|
<ClInclude Include="..\emucore\CartBFSC.hxx" />
|
||||||
|
|
|
@ -1008,8 +1008,11 @@
|
||||||
<ClCompile Include="..\emucore\CartTVBoy.cxx">
|
<ClCompile Include="..\emucore\CartTVBoy.cxx">
|
||||||
<Filter>Source Files\emucore</Filter>
|
<Filter>Source Files\emucore</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\debugger\CartTVBoyWidget.cxx">
|
<ClCompile Include="..\debugger\gui\CartTVBoyWidget.cxx">
|
||||||
<Filter>Source Files\debugger</Filter>
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\emucore\CartCreator.cxx">
|
||||||
|
<Filter>Source Files\emucore</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -2072,8 +2075,11 @@
|
||||||
<ClInclude Include="..\emucore\CartTVBoy.hxx">
|
<ClInclude Include="..\emucore\CartTVBoy.hxx">
|
||||||
<Filter>Header Files\emucore</Filter>
|
<Filter>Header Files\emucore</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\debugger\CartTVBoyWidget.hxx">
|
<ClInclude Include="..\debugger\gui\CartTVBoyWidget.hxx">
|
||||||
<Filter>Header Files\debugger</Filter>
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\emucore\CartCreator.hxx">
|
||||||
|
<Filter>Header Files\emucore</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Reference in New Issue