mirror of https://github.com/stella-emu/stella.git
Cleaned up the Cartridge API. Certain methods are now explicitly marked
as 'const', and return types are closer to the actual type of data returned. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1985 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
22994b4acf
commit
0d367461a4
|
@ -846,6 +846,11 @@
|
|||
and always allows all 4 directions.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><pre>-usemouse <1|0></pre></td>
|
||||
<td>Enable using the mouse for various controllers (paddle, driving, etc).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><pre>-pspeed <number></pre></td>
|
||||
<td>Speed for digital emulation of paddles (1-15).</td>
|
||||
|
@ -2774,12 +2779,12 @@ Ms Pac-Man (Stella extended codes):
|
|||
<tr><td>2K </td><td>64-2048 byte Atari </td></tr>
|
||||
<tr><td>3E </td><td>32K Tigervision </td></tr>
|
||||
<tr><td>3F </td><td>512K Tigervision </td></tr>
|
||||
<tr><td>4A50 ¹²</td><td>64K 4A50 + ram </td></tr>
|
||||
<tr><td>4A50 ¹</td><td>64K 4A50 + ram </td></tr>
|
||||
<tr><td>4K </td><td>4K Atari </td></tr>
|
||||
<tr><td>AR ²</td><td>Supercharger </td></tr>
|
||||
<tr><td>AR </td><td>Supercharger </td></tr>
|
||||
<tr><td>CV </td><td>Commavid extra ram </td></tr>
|
||||
<tr><td>DPC ²</td><td>Pitfall II </td></tr>
|
||||
<tr><td>DPC+ ²</td><td>Enhanced DPC </td></tr>
|
||||
<tr><td>DPC </td><td>Pitfall II </td></tr>
|
||||
<tr><td>DPC+</td><td>Enhanced DPC </td></tr>
|
||||
<tr><td>E0 </td><td>8K Parker Bros </td></tr>
|
||||
<tr><td>E7 </td><td>16K M-network </td></tr>
|
||||
<tr><td>EF </td><td>64K Homestar Runner </td></tr>
|
||||
|
@ -2796,7 +2801,7 @@ Ms Pac-Man (Stella extended codes):
|
|||
<tr><td>MC ¹²</td><td>C. Wilkson Megacart </td></tr>
|
||||
<tr><td>SB </td><td>128-256k SUPERbanking </td></tr>
|
||||
<tr><td>UA </td><td>8K UA Ltd. </td></tr>
|
||||
<tr><td>X07 ¹²</td><td>64K AtariAge </td></tr>
|
||||
<tr><td>X07 ¹</td><td>64K AtariAge </td></tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ bool Cartridge::save(ofstream& out)
|
|||
{
|
||||
int size = -1;
|
||||
|
||||
uInt8* image = getImage(size);
|
||||
const uInt8* image = getImage(size);
|
||||
if(image == 0 || size <= 0)
|
||||
{
|
||||
cerr << "save not supported" << endl;
|
||||
|
|
|
@ -132,7 +132,7 @@ class Cartridge : public Device
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
virtual int bank() = 0;
|
||||
virtual uInt16 bank() const = 0;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge. Note that
|
||||
|
@ -142,7 +142,7 @@ class Cartridge : public Device
|
|||
Such cases occur when pages of ROM can be swapped in and out,
|
||||
yet the 4K image is considered the same.
|
||||
*/
|
||||
virtual int bankCount() = 0;
|
||||
virtual uInt16 bankCount() const = 0;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -159,7 +159,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 uInt8* getImage(int& size) = 0;
|
||||
virtual const uInt8* getImage(int& size) const = 0;
|
||||
|
||||
/**
|
||||
Save the current state of this device to the given Serializer.
|
||||
|
|
|
@ -169,13 +169,13 @@ void Cartridge0840::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge0840::bank()
|
||||
uInt16 Cartridge0840::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge0840::bankCount()
|
||||
uInt16 Cartridge0840::bankCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ bool Cartridge0840::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* Cartridge0840::getImage(int& size)
|
||||
const uInt8* Cartridge0840::getImage(int& size) const
|
||||
{
|
||||
size = 8192;
|
||||
return myImage;
|
||||
|
|
|
@ -68,12 +68,12 @@ class Cartridge0840 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -90,7 +90,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -104,14 +104,14 @@ void Cartridge2K::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge2K::bank()
|
||||
uInt16 Cartridge2K::bank() const
|
||||
{
|
||||
// Doesn't support bankswitching
|
||||
return 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge2K::bankCount()
|
||||
uInt16 Cartridge2K::bankCount() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ bool Cartridge2K::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* Cartridge2K::getImage(int& size)
|
||||
const uInt8* Cartridge2K::getImage(int& size) const
|
||||
{
|
||||
size = mySize;
|
||||
return myImage;
|
||||
|
|
|
@ -72,12 +72,12 @@ class Cartridge2K : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -94,7 +94,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -224,13 +224,13 @@ void Cartridge3E::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge3E::bank()
|
||||
uInt16 Cartridge3E::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge3E::bankCount()
|
||||
uInt16 Cartridge3E::bankCount() const
|
||||
{
|
||||
// Because the RAM banks always start at 256 and above, we require the
|
||||
// number of ROM banks to be 256
|
||||
|
@ -259,7 +259,7 @@ bool Cartridge3E::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* Cartridge3E::getImage(int& size)
|
||||
const uInt8* Cartridge3E::getImage(int& size) const
|
||||
{
|
||||
size = mySize;
|
||||
return myImage;
|
||||
|
|
|
@ -100,12 +100,12 @@ class Cartridge3E : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -156,13 +156,13 @@ void Cartridge3F::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge3F::bank()
|
||||
uInt16 Cartridge3F::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge3F::bankCount()
|
||||
uInt16 Cartridge3F::bankCount() const
|
||||
{
|
||||
return mySize >> 11;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ bool Cartridge3F::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* Cartridge3F::getImage(int& size)
|
||||
const uInt8* Cartridge3F::getImage(int& size) const
|
||||
{
|
||||
size = mySize;
|
||||
return myImage;
|
||||
|
|
|
@ -76,15 +76,13 @@ class Cartridge3F : public Cartridge
|
|||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
||||
@return The current bank, or -1 if bankswitching not supported
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -101,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -314,14 +314,14 @@ void Cartridge4A50::bank(uInt16)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge4A50::bank()
|
||||
uInt16 Cartridge4A50::bank() const
|
||||
{
|
||||
// Doesn't support bankswitching in the normal sense
|
||||
return 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge4A50::bankCount()
|
||||
uInt16 Cartridge4A50::bankCount() const
|
||||
{
|
||||
// Doesn't support bankswitching in the normal sense
|
||||
// There is one 'virtual' bank that can change in many different ways
|
||||
|
@ -361,7 +361,7 @@ bool Cartridge4A50::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* Cartridge4A50::getImage(int& size)
|
||||
const uInt8* Cartridge4A50::getImage(int& size) const
|
||||
{
|
||||
size = 131072;
|
||||
return myImage;
|
||||
|
|
|
@ -85,12 +85,12 @@ class Cartridge4A50 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -107,7 +107,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -82,14 +82,14 @@ void Cartridge4K::bank(uInt16)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge4K::bank()
|
||||
uInt16 Cartridge4K::bank() const
|
||||
{
|
||||
// Doesn't support bankswitching
|
||||
return 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int Cartridge4K::bankCount()
|
||||
uInt16 Cartridge4K::bankCount() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ bool Cartridge4K::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* Cartridge4K::getImage(int& size)
|
||||
const uInt8* Cartridge4K::getImage(int& size) const
|
||||
{
|
||||
size = 4096;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class Cartridge4K : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -413,13 +413,13 @@ void CartridgeAR::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeAR::bank()
|
||||
uInt16 CartridgeAR::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeAR::bankCount()
|
||||
uInt16 CartridgeAR::bankCount() const
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
|
@ -432,9 +432,9 @@ bool CartridgeAR::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeAR::getImage(int& size)
|
||||
const uInt8* CartridgeAR::getImage(int& size) const
|
||||
{
|
||||
size = sizeof(myLoadImages);
|
||||
size = myNumberOfLoadImages * 8448;
|
||||
return myLoadImages;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,12 +86,12 @@ class CartridgeAR : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -108,7 +108,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -22,9 +22,6 @@
|
|||
#include "System.hxx"
|
||||
#include "CartCV.hxx"
|
||||
|
||||
// TODO - Port to new CartDebug/disassembler scheme
|
||||
// Add bankchanged code
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
CartridgeCV::CartridgeCV(const uInt8* image, uInt32 size)
|
||||
: myInitialRAM(0),
|
||||
|
@ -154,14 +151,14 @@ void CartridgeCV::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeCV::bank()
|
||||
uInt16 CartridgeCV::bank() const
|
||||
{
|
||||
// Doesn't support bankswitching
|
||||
return 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeCV::bankCount()
|
||||
uInt16 CartridgeCV::bankCount() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -186,7 +183,7 @@ bool CartridgeCV::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeCV::getImage(int& size)
|
||||
const uInt8* CartridgeCV::getImage(int& size) const
|
||||
{
|
||||
size = 2048;
|
||||
return myImage;
|
||||
|
|
|
@ -73,12 +73,12 @@ class CartridgeCV : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -95,7 +95,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -443,13 +443,13 @@ void CartridgeDPC::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeDPC::bank()
|
||||
uInt16 CartridgeDPC::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeDPC::bankCount()
|
||||
uInt16 CartridgeDPC::bankCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ bool CartridgeDPC::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeDPC::getImage(int& size)
|
||||
const uInt8* CartridgeDPC::getImage(int& size) const
|
||||
{
|
||||
size = 8192 + 2048 + 255;
|
||||
return myImageCopy;
|
||||
|
|
|
@ -78,12 +78,12 @@ class CartridgeDPC : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -100,7 +100,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -560,13 +560,13 @@ void CartridgeDPCPlus::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeDPCPlus::bank()
|
||||
uInt16 CartridgeDPCPlus::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeDPCPlus::bankCount()
|
||||
uInt16 CartridgeDPCPlus::bankCount() const
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ bool CartridgeDPCPlus::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeDPCPlus::getImage(int& size)
|
||||
const uInt8* CartridgeDPCPlus::getImage(int& size) const
|
||||
{
|
||||
size = 4096 * 6 + 4096 + 255;
|
||||
return myImageCopy;
|
||||
|
|
|
@ -78,12 +78,12 @@ class CartridgeDPCPlus : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -100,7 +100,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -201,16 +201,17 @@ void CartridgeE0::bank(uInt16)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeE0::bank()
|
||||
uInt16 CartridgeE0::bank() const
|
||||
{
|
||||
// Doesn't support bankswitching in the normal sense
|
||||
return 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeE0::bankCount()
|
||||
uInt16 CartridgeE0::bankCount() const
|
||||
{
|
||||
// Doesn't support bankswitching in the normal sense
|
||||
// There is one 'virtual' bank that can change in many different ways
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -223,7 +224,7 @@ bool CartridgeE0::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeE0::getImage(int& size)
|
||||
const uInt8* CartridgeE0::getImage(int& size) const
|
||||
{
|
||||
size = 8192;
|
||||
return myImage;
|
||||
|
|
|
@ -79,12 +79,12 @@ class CartridgeE0 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -101,7 +101,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -243,13 +243,13 @@ void CartridgeE7::bank(uInt16 slice)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeE7::bank()
|
||||
uInt16 CartridgeE7::bank() const
|
||||
{
|
||||
return myCurrentSlice[0];
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeE7::bankCount()
|
||||
uInt16 CartridgeE7::bankCount() const
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ bool CartridgeE7::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeE7::getImage(int& size)
|
||||
const uInt8* CartridgeE7::getImage(int& size) const
|
||||
{
|
||||
size = 16384;
|
||||
return myImage;
|
||||
|
|
|
@ -96,12 +96,12 @@ class CartridgeE7 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -118,7 +118,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -119,13 +119,13 @@ void CartridgeEF::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeEF::bank()
|
||||
uInt16 CartridgeEF::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeEF::bankCount()
|
||||
uInt16 CartridgeEF::bankCount() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ bool CartridgeEF::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeEF::getImage(int& size)
|
||||
const uInt8* CartridgeEF::getImage(int& size) const
|
||||
{
|
||||
size = 65536;
|
||||
return myImage;
|
||||
|
|
|
@ -74,12 +74,12 @@ class CartridgeEF : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -96,7 +96,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -162,13 +162,13 @@ void CartridgeEFSC::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeEFSC::bank()
|
||||
uInt16 CartridgeEFSC::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeEFSC::bankCount()
|
||||
uInt16 CartridgeEFSC::bankCount() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ bool CartridgeEFSC::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeEFSC::getImage(int& size)
|
||||
const uInt8* CartridgeEFSC::getImage(int& size) const
|
||||
{
|
||||
size = 65536;
|
||||
return myImage;
|
||||
|
|
|
@ -74,12 +74,12 @@ class CartridgeEFSC : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -96,7 +96,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -131,13 +131,13 @@ void CartridgeF0::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF0::bank()
|
||||
uInt16 CartridgeF0::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF0::bankCount()
|
||||
uInt16 CartridgeF0::bankCount() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ bool CartridgeF0::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF0::getImage(int& size)
|
||||
const uInt8* CartridgeF0::getImage(int& size) const
|
||||
{
|
||||
size = 65536;
|
||||
return myImage;
|
||||
|
|
|
@ -71,12 +71,12 @@ class CartridgeF0 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -93,7 +93,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -124,13 +124,13 @@ void CartridgeF4::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF4::bank()
|
||||
uInt16 CartridgeF4::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF4::bankCount()
|
||||
uInt16 CartridgeF4::bankCount() const
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ bool CartridgeF4::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF4::getImage(int& size)
|
||||
const uInt8* CartridgeF4::getImage(int& size) const
|
||||
{
|
||||
size = 32768;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class CartridgeF4 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -165,13 +165,13 @@ void CartridgeF4SC::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF4SC::bank()
|
||||
uInt16 CartridgeF4SC::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF4SC::bankCount()
|
||||
uInt16 CartridgeF4SC::bankCount() const
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ bool CartridgeF4SC::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF4SC::getImage(int& size)
|
||||
const uInt8* CartridgeF4SC::getImage(int& size) const
|
||||
{
|
||||
size = 32768;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class CartridgeF4SC : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -164,13 +164,13 @@ void CartridgeF6::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF6::bank()
|
||||
uInt16 CartridgeF6::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF6::bankCount()
|
||||
uInt16 CartridgeF6::bankCount() const
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ bool CartridgeF6::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF6::getImage(int& size)
|
||||
const uInt8* CartridgeF6::getImage(int& size) const
|
||||
{
|
||||
size = 16384;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class CartridgeF6 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -208,13 +208,13 @@ void CartridgeF6SC::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF6SC::bank()
|
||||
uInt16 CartridgeF6SC::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF6SC::bankCount()
|
||||
uInt16 CartridgeF6SC::bankCount() const
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ bool CartridgeF6SC::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF6SC::getImage(int& size)
|
||||
const uInt8* CartridgeF6SC::getImage(int& size) const
|
||||
{
|
||||
size = 16384;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class CartridgeF6SC : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -145,13 +145,13 @@ void CartridgeF8::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF8::bank()
|
||||
uInt16 CartridgeF8::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF8::bankCount()
|
||||
uInt16 CartridgeF8::bankCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ bool CartridgeF8::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF8::getImage(int& size)
|
||||
const uInt8* CartridgeF8::getImage(int& size) const
|
||||
{
|
||||
size = 8192;
|
||||
return myImage;
|
||||
|
|
|
@ -71,12 +71,12 @@ class CartridgeF8 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -93,7 +93,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -188,13 +188,13 @@ void CartridgeF8SC::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF8SC::bank()
|
||||
uInt16 CartridgeF8SC::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeF8SC::bankCount()
|
||||
uInt16 CartridgeF8SC::bankCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ bool CartridgeF8SC::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeF8SC::getImage(int& size)
|
||||
const uInt8* CartridgeF8SC::getImage(int& size) const
|
||||
{
|
||||
size = 8192;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class CartridgeF8SC : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -198,13 +198,13 @@ void CartridgeFA::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeFA::bank()
|
||||
uInt16 CartridgeFA::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeFA::bankCount()
|
||||
uInt16 CartridgeFA::bankCount() const
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ bool CartridgeFA::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeFA::getImage(int& size)
|
||||
const uInt8* CartridgeFA::getImage(int& size) const
|
||||
{
|
||||
size = 12288;
|
||||
return myImage;
|
||||
|
|
|
@ -70,12 +70,12 @@ class CartridgeFA : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -92,7 +92,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -87,14 +87,14 @@ void CartridgeFE::bank(uInt16 b)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeFE::bank()
|
||||
uInt16 CartridgeFE::bank() const
|
||||
{
|
||||
// The current bank depends on the last address accessed
|
||||
return ((myLastAddress1 & 0x2000) == 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeFE::bankCount()
|
||||
uInt16 CartridgeFE::bankCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ bool CartridgeFE::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeFE::getImage(int& size)
|
||||
const uInt8* CartridgeFE::getImage(int& size) const
|
||||
{
|
||||
size = 8192;
|
||||
return myImage;
|
||||
|
|
|
@ -85,12 +85,12 @@ class CartridgeFE : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Answer whether the bank has changed since the last time this
|
||||
|
@ -115,7 +115,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -210,14 +210,14 @@ void CartridgeMC::bank(uInt16 b)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeMC::bank()
|
||||
uInt16 CartridgeMC::bank() const
|
||||
{
|
||||
// TODO - add support for debugger
|
||||
return 0;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeMC::bankCount()
|
||||
uInt16 CartridgeMC::bankCount() const
|
||||
{
|
||||
// TODO - add support for debugger
|
||||
return 1;
|
||||
|
@ -231,7 +231,7 @@ bool CartridgeMC::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeMC::getImage(int& size)
|
||||
const uInt8* CartridgeMC::getImage(int& size) const
|
||||
{
|
||||
size = 128 * 1024; // FIXME: keep track of original size
|
||||
return myImage;
|
||||
|
|
|
@ -177,12 +177,12 @@ class CartridgeMC : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -199,7 +199,7 @@ class CartridgeMC : public Cartridge
|
|||
@param size Set to the size of the internal ROM image data
|
||||
@return A pointer to the internal ROM image data
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -148,13 +148,13 @@ void CartridgeSB::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeSB::bank()
|
||||
uInt16 CartridgeSB::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeSB::bankCount()
|
||||
uInt16 CartridgeSB::bankCount() const
|
||||
{
|
||||
return mySize >> 12;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ bool CartridgeSB::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeSB::getImage(int& size)
|
||||
const uInt8* CartridgeSB::getImage(int& size) const
|
||||
{
|
||||
size = mySize;
|
||||
return myImage;
|
||||
|
|
|
@ -68,12 +68,12 @@ class CartridgeSB : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -90,7 +90,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -156,13 +156,13 @@ void CartridgeUA::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeUA::bank()
|
||||
uInt16 CartridgeUA::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeUA::bankCount()
|
||||
uInt16 CartridgeUA::bankCount() const
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ bool CartridgeUA::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeUA::getImage(int& size)
|
||||
const uInt8* CartridgeUA::getImage(int& size) const
|
||||
{
|
||||
size = 8192;
|
||||
return myImage;
|
||||
|
|
|
@ -71,12 +71,12 @@ class CartridgeUA : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -93,7 +93,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -142,13 +142,13 @@ void CartridgeX07::bank(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeX07::bank()
|
||||
uInt16 CartridgeX07::bank() const
|
||||
{
|
||||
return myCurrentBank;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
int CartridgeX07::bankCount()
|
||||
uInt16 CartridgeX07::bankCount() const
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ bool CartridgeX07::patch(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8* CartridgeX07::getImage(int& size)
|
||||
const uInt8* CartridgeX07::getImage(int& size) const
|
||||
{
|
||||
size = 65536;
|
||||
return myImage;
|
||||
|
|
|
@ -80,12 +80,12 @@ class CartridgeX07 : public Cartridge
|
|||
/**
|
||||
Get the current bank.
|
||||
*/
|
||||
int bank();
|
||||
uInt16 bank() const;
|
||||
|
||||
/**
|
||||
Query the number of banks supported by the cartridge.
|
||||
*/
|
||||
int bankCount();
|
||||
uInt16 bankCount() const;
|
||||
|
||||
/**
|
||||
Patch the cartridge ROM.
|
||||
|
@ -102,7 +102,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
|
||||
*/
|
||||
uInt8* getImage(int& size);
|
||||
const uInt8* getImage(int& size) const;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
Loading…
Reference in New Issue