Cart::getImage refactoring: use uInt32, since sizes are never negative.

This commit is contained in:
Stephen Anthony 2017-09-01 10:23:17 -02:30
parent e858ddf167
commit c2302c2e71
85 changed files with 87 additions and 87 deletions

View File

@ -70,11 +70,11 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem)
// Banksizes greater than 4096 indicate multi-bank ROMs, but we handle only
// 4K pieces at a time
// Banksizes less than 4K use the actual value
int banksize = 0;
uInt32 banksize = 0;
myConsole.cartridge().getImage(banksize);
BankInfo info;
info.size = std::min(banksize, 4096);
info.size = std::min(banksize, 4096u);
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i)
myBankInfo.push_back(info);

View File

@ -45,10 +45,10 @@ void Cartridge::setAbout(const string& about, const string& type,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Cartridge::saveROM(ofstream& out) const
{
int size = -1;
uInt32 size = 0;
const uInt8* image = getImage(size);
if(image == nullptr || size <= 0)
if(image == nullptr || size == 0)
{
cerr << "save not supported" << endl;
return false;

View File

@ -146,7 +146,7 @@ class Cartridge : public Device
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
virtual const uInt8* getImage(int& size) const = 0;
virtual const uInt8* getImage(uInt32& size) const = 0;
/**
Informs the cartridge about the name of the ROM file used when

View File

@ -166,7 +166,7 @@ bool Cartridge0840::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge0840::getImage(int& size) const
const uInt8* Cartridge0840::getImage(uInt32& size) const
{
size = 8192;
return myImage;

View File

@ -93,7 +93,7 @@ class Cartridge0840 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -78,7 +78,7 @@ bool Cartridge2K::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge2K::getImage(int& size) const
const uInt8* Cartridge2K::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -79,7 +79,7 @@ class Cartridge2K : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -236,7 +236,7 @@ bool Cartridge3E::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge3E::getImage(int& size) const
const uInt8* Cartridge3E::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -122,7 +122,7 @@ class Cartridge3E : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -297,7 +297,7 @@ bool Cartridge3EPlus::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge3EPlus::getImage(int& size) const
const uInt8* Cartridge3EPlus::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -83,7 +83,7 @@ class Cartridge3EPlus: public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -164,7 +164,7 @@ bool Cartridge3F::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge3F::getImage(int& size) const
const uInt8* Cartridge3F::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -99,7 +99,7 @@ class Cartridge3F : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -356,7 +356,7 @@ bool Cartridge4A50::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge4A50::getImage(int& size) const
const uInt8* Cartridge4A50::getImage(uInt32& size) const
{
size = mySize;
return myImage;

View File

@ -96,7 +96,7 @@ class Cartridge4A50 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -60,7 +60,7 @@ bool Cartridge4K::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge4K::getImage(int& size) const
const uInt8* Cartridge4K::getImage(uInt32& size) const
{
size = 4096;
return myImage;

View File

@ -76,7 +76,7 @@ class Cartridge4K : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -107,7 +107,7 @@ bool Cartridge4KSC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* Cartridge4KSC::getImage(int& size) const
const uInt8* Cartridge4KSC::getImage(uInt32& size) const
{
size = 4096;
return myImage;

View File

@ -75,7 +75,7 @@ class Cartridge4KSC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -439,7 +439,7 @@ bool CartridgeAR::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeAR::getImage(int& size) const
const uInt8* CartridgeAR::getImage(uInt32& size) const
{
size = mySize;
return myLoadImages.get();

View File

@ -107,7 +107,7 @@ class CartridgeAR : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -125,7 +125,7 @@ bool CartridgeBF::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeBF::getImage(int& size) const
const uInt8* CartridgeBF::getImage(uInt32& size) const
{
size = 64 * 4096;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeBF : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -173,7 +173,7 @@ bool CartridgeBFSC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeBFSC::getImage(int& size) const
const uInt8* CartridgeBFSC::getImage(uInt32& size) const
{
size = 64 * 4096;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeBFSC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -488,7 +488,7 @@ bool CartridgeBUS::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeBUS::getImage(int& size) const
const uInt8* CartridgeBUS::getImage(uInt32& size) const
{
size = 32768;
return myImage;

View File

@ -120,7 +120,7 @@ class CartridgeBUS : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -452,7 +452,7 @@ bool CartridgeCDF::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeCDF::getImage(int& size) const
const uInt8* CartridgeCDF::getImage(uInt32& size) const
{
size = 32768;
return myImage;

View File

@ -120,7 +120,7 @@ class CartridgeCDF : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -181,7 +181,7 @@ bool CartridgeCM::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeCM::getImage(int& size) const
const uInt8* CartridgeCM::getImage(uInt32& size) const
{
size = 16384;
return myImage;

View File

@ -168,7 +168,7 @@ class CartridgeCM : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -277,7 +277,7 @@ bool CartridgeCTY::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeCTY::getImage(int& size) const
const uInt8* CartridgeCTY::getImage(uInt32& size) const
{
size = 32768;
return myImage;

View File

@ -177,7 +177,7 @@ class CartridgeCTY : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -132,7 +132,7 @@ bool CartridgeCV::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeCV::getImage(int& size) const
const uInt8* CartridgeCV::getImage(uInt32& size) const
{
size = 2048;
return myImage;

View File

@ -79,7 +79,7 @@ class CartridgeCV : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -189,7 +189,7 @@ bool CartridgeCVPlus::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeCVPlus::getImage(int& size) const
const uInt8* CartridgeCVPlus::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -106,7 +106,7 @@ class CartridgeCVPlus : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -302,7 +302,7 @@ bool CartridgeDASH::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeDASH::getImage(int& size) const
const uInt8* CartridgeDASH::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -165,7 +165,7 @@ class CartridgeDASH: public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -121,7 +121,7 @@ bool CartridgeDF::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeDF::getImage(int& size) const
const uInt8* CartridgeDF::getImage(uInt32& size) const
{
size = 131072;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeDF : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -173,7 +173,7 @@ bool CartridgeDFSC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeDFSC::getImage(int& size) const
const uInt8* CartridgeDFSC::getImage(uInt32& size) const
{
size = 131072;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeDFSC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -446,7 +446,7 @@ bool CartridgeDPC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeDPC::getImage(int& size) const
const uInt8* CartridgeDPC::getImage(uInt32& size) const
{
size = mySize;
return myImage;

View File

@ -105,7 +105,7 @@ class CartridgeDPC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -636,7 +636,7 @@ bool CartridgeDPCPlus::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeDPCPlus::getImage(int& size) const
const uInt8* CartridgeDPCPlus::getImage(uInt32& size) const
{
size = mySize;
return myImage + (32768u - mySize);

View File

@ -121,7 +121,7 @@ class CartridgeDPCPlus : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -187,7 +187,7 @@ bool CartridgeE0::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeE0::getImage(int& size) const
const uInt8* CartridgeE0::getImage(uInt32& size) const
{
size = 8192;
return myImage;

View File

@ -85,7 +85,7 @@ class CartridgeE0 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -264,7 +264,7 @@ bool CartridgeE7::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeE7::getImage(int& size) const
const uInt8* CartridgeE7::getImage(uInt32& size) const
{
size = 16384;
return myImage;

View File

@ -119,7 +119,7 @@ class CartridgeE7 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -121,7 +121,7 @@ bool CartridgeEF::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeEF::getImage(int& size) const
const uInt8* CartridgeEF::getImage(uInt32& size) const
{
size = 65536;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeEF : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -173,7 +173,7 @@ bool CartridgeEFSC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeEFSC::getImage(int& size) const
const uInt8* CartridgeEFSC::getImage(uInt32& size) const
{
size = 65536;
return myImage;

View File

@ -95,7 +95,7 @@ class CartridgeEFSC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -130,7 +130,7 @@ bool CartridgeF0::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF0::getImage(int& size) const
const uInt8* CartridgeF0::getImage(uInt32& size) const
{
size = 65536;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeF0 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -126,7 +126,7 @@ bool CartridgeF4::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF4::getImage(int& size) const
const uInt8* CartridgeF4::getImage(uInt32& size) const
{
size = 32768;
return myImage;

View File

@ -93,7 +93,7 @@ class CartridgeF4 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -176,7 +176,7 @@ bool CartridgeF4SC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF4SC::getImage(int& size) const
const uInt8* CartridgeF4SC::getImage(uInt32& size) const
{
size = 32768;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeF4SC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -166,7 +166,7 @@ bool CartridgeF6::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF6::getImage(int& size) const
const uInt8* CartridgeF6::getImage(uInt32& size) const
{
size = 16384;
return myImage;

View File

@ -93,7 +93,7 @@ class CartridgeF6 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -219,7 +219,7 @@ bool CartridgeF6SC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF6SC::getImage(int& size) const
const uInt8* CartridgeF6SC::getImage(uInt32& size) const
{
size = 16384;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeF6SC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -154,7 +154,7 @@ bool CartridgeF8::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF8::getImage(int& size) const
const uInt8* CartridgeF8::getImage(uInt32& size) const
{
size = 8192;
return myImage;

View File

@ -95,7 +95,7 @@ class CartridgeF8 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -199,7 +199,7 @@ bool CartridgeF8SC::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeF8SC::getImage(int& size) const
const uInt8* CartridgeF8SC::getImage(uInt32& size) const
{
size = 8192;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeF8SC : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -209,7 +209,7 @@ bool CartridgeFA::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeFA::getImage(int& size) const
const uInt8* CartridgeFA::getImage(uInt32& size) const
{
size = 12288;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeFA : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -275,7 +275,7 @@ bool CartridgeFA2::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeFA2::getImage(int& size) const
const uInt8* CartridgeFA2::getImage(uInt32& size) const
{
size = mySize;
return myImage;

View File

@ -106,7 +106,7 @@ class CartridgeFA2 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -127,7 +127,7 @@ bool CartridgeFE::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeFE::getImage(int& size) const
const uInt8* CartridgeFE::getImage(uInt32& size) const
{
size = 8192;
return myImage;

View File

@ -136,7 +136,7 @@ class CartridgeFE : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -145,7 +145,7 @@ bool CartridgeMDM::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeMDM::getImage(int& size) const
const uInt8* CartridgeMDM::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -105,7 +105,7 @@ class CartridgeMDM : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -150,7 +150,7 @@ bool CartridgeSB::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeSB::getImage(int& size) const
const uInt8* CartridgeSB::getImage(uInt32& size) const
{
size = mySize;
return myImage.get();

View File

@ -94,7 +94,7 @@ class CartridgeSB : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -156,7 +156,7 @@ bool CartridgeUA::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeUA::getImage(int& size) const
const uInt8* CartridgeUA::getImage(uInt32& size) const
{
size = 8192;
return myImage;

View File

@ -94,7 +94,7 @@ class CartridgeUA : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -261,7 +261,7 @@ bool CartridgeWD::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeWD::getImage(int& size) const
const uInt8* CartridgeWD::getImage(uInt32& size) const
{
size = mySize;
return myImage;

View File

@ -122,7 +122,7 @@ class CartridgeWD : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.

View File

@ -145,7 +145,7 @@ bool CartridgeX07::patch(uInt16 address, uInt8 value)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* CartridgeX07::getImage(int& size) const
const uInt8* CartridgeX07::getImage(uInt32& size) const
{
size = 65536;
return myImage;

View File

@ -103,7 +103,7 @@ class CartridgeX07 : public Cartridge
@param size Set to the size of the internal ROM image data
@return A pointer to the internal ROM image data
*/
const uInt8* getImage(int& size) const override;
const uInt8* getImage(uInt32& size) const override;
/**
Save the current state of this cart to the given Serializer.