mirror of https://github.com/stella-emu/stella.git
changed CommaVid ROMs to 4K size (fixes #969)
This commit is contained in:
parent
db7fe478c5
commit
67a039b111
|
@ -24,11 +24,16 @@ CartridgeCV::CartridgeCV(const ByteBuffer& image, size_t size,
|
|||
size_t bsSize)
|
||||
: CartridgeEnhanced(image, size, md5, settings, bsSize)
|
||||
{
|
||||
myBankShift = BANK_SHIFT;
|
||||
myRamSize = RAM_SIZE;
|
||||
myRamWpHigh = RAM_HIGH_WP;
|
||||
|
||||
if(size == 4_KB)
|
||||
if (size == 2_KB)
|
||||
{
|
||||
// Move the ROM of 2K files to the 2nd half of the 4K ROM
|
||||
// The 1st half is used for RAM
|
||||
std::copy_n(image.get(), 2_KB, myImage.get() + 2_KB);
|
||||
}
|
||||
else if(size == 4_KB)
|
||||
{
|
||||
// The game has something saved in the RAM
|
||||
// Useful for MagiCard program listings
|
||||
|
|
|
@ -50,7 +50,7 @@ class CartridgeCV : public CartridgeEnhanced
|
|||
@param bsSize The size specified by the bankswitching scheme
|
||||
*/
|
||||
CartridgeCV(const ByteBuffer& image, size_t size, string_view md5,
|
||||
const Settings& settings, size_t bsSize = 2_KB);
|
||||
const Settings& settings, size_t bsSize = 4_KB);
|
||||
~CartridgeCV() override = default;
|
||||
|
||||
public:
|
||||
|
@ -86,9 +86,6 @@ class CartridgeCV : public CartridgeEnhanced
|
|||
ByteBuffer myInitialRAM{nullptr};
|
||||
|
||||
private:
|
||||
// Calculated as: log(ROM bank segment size) / log(2)
|
||||
static constexpr uInt16 BANK_SHIFT = 11; // 2K
|
||||
|
||||
// RAM size
|
||||
static constexpr uInt32 RAM_SIZE = 0x400; // 1K
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ CartridgeEnhanced::CartridgeEnhanced(const ByteBuffer& image, size_t size,
|
|||
else if(size < bsSize)
|
||||
{
|
||||
ostringstream buf;
|
||||
buf << "ROM smaller than expected (" << bsSize << " > " << size
|
||||
buf << "ROM smaller than expected (" << size << " < " << bsSize
|
||||
<< "), appending " << (bsSize - size) << " bytes\n";
|
||||
Logger::info(buf.str());
|
||||
}
|
||||
|
|
|
@ -79,9 +79,6 @@ class CartridgeF4SC : public CartridgeF4
|
|||
// RAM size
|
||||
static constexpr size_t RAM_SIZE = 0x80;
|
||||
|
||||
// RAM mask
|
||||
static constexpr uInt16 RAM_MASK = RAM_SIZE - 1;
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
CartridgeF4SC() = delete;
|
||||
|
|
|
@ -79,9 +79,6 @@ class CartridgeF6SC : public CartridgeF6
|
|||
// RAM size
|
||||
static constexpr size_t RAM_SIZE = 0x80;
|
||||
|
||||
// RAM mask
|
||||
static constexpr uInt16 RAM_MASK = RAM_SIZE - 1;
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
CartridgeF6SC() = delete;
|
||||
|
|
Loading…
Reference in New Issue