The smallest addressable page size in Stella is currently 64 bytes,

so we need to make sure that Sub2K ROMs less than 64 bytes are
properly 'paged' to that size.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1825 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-07-02 17:58:48 +00:00
parent 594954789c
commit 22544e1f00
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ Cartridge2K::Cartridge2K(const uInt8* image, uInt32 size)
while(mySize < size)
mySize <<= 1;
// The smallest addressable area by Stella is 64 bytes
// This should really be read from the System, but for now I'm going
// to cheat a little and hard-code it to 64 (aka 2^6)
if(mySize < 64)
mySize = 64;
// Initialize ROM with illegal 6502 opcode that causes a real 6502 to jam
myImage = new uInt8[mySize];
memset(myImage, 0x02, mySize);