mirror of https://github.com/stella-emu/stella.git
enhanced CartCV to support small ROMs (Part 3)
This commit is contained in:
parent
140657c453
commit
2754edd176
|
@ -27,11 +27,12 @@ CartridgeCV::CartridgeCV(const ByteBuffer& image, size_t size,
|
|||
myRamSize = RAM_SIZE;
|
||||
myRamWpHigh = RAM_HIGH_WP;
|
||||
|
||||
if (size <= 2_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(), size, myImage.get() + 4_KB - size);
|
||||
for(size_t i = 0; i < 2_KB; i += size)
|
||||
// Copy 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(), size, myImage.get() + 2_KB + i);
|
||||
}
|
||||
else if(size == 4_KB)
|
||||
{
|
||||
|
|
|
@ -34,10 +34,6 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si
|
|||
else
|
||||
type = Bankswitch::Type::_AR;
|
||||
}
|
||||
//else if(size < 2_KB) // Sub2K images
|
||||
//{
|
||||
// type = isProbablyCV(image, size) ? Bankswitch::Type::_CV : Bankswitch::Type::_2K;
|
||||
//}
|
||||
else if((size <= 2_KB) ||
|
||||
(size == 4_KB && std::memcmp(image.get(), image.get() + 2_KB, 2_KB) == 0))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue