enhanced CartCV to support small ROMs

This commit is contained in:
thrust26 2023-09-11 22:26:01 +02:00
parent 74b682e572
commit 811bcfdf30
1 changed files with 3 additions and 3 deletions

View File

@ -27,11 +27,11 @@ 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
// 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);
std::copy_n(image.get(), size, myImage.get() + 4_KB - size);
}
else if(size == 4_KB)
{