3EX now reads number of RAM banks - 1 from 0xfffa

This commit is contained in:
thrust26 2020-04-22 12:50:26 +02:00
parent 4a6e14d306
commit 579f73d1ea
4 changed files with 8 additions and 7 deletions

View File

@ -32,6 +32,8 @@
* Restored 'cfg' directory for Distella config files.
* Added 3EX bank switching type.
* Removed unused CV+ and DASH bank switching types.
-Have fun!

View File

@ -3790,8 +3790,9 @@ Ms Pac-Man (Stella extended codes):
<tr><td>32IN1 &#185;</td><td>64-128K Multicart (32 games) </td><td>.32N, .32N1 </td></tr>
<tr><td>64IN1 &#185;</td><td>64/128K Multicart </td><td>.64N, .64N1 </td></tr>
<tr><td>128IN1 &#185;</td><td>256/512K Multicart </td><td>.128, .128N1 </td></tr>
<tr><td>2K </td><td>32-2048 byte Atari </td><td>.2K </td></tr>
<tr><td>3E </td><td>32K Tigervision </td><td>.3E </td></tr>
<tr><td>2K </td><td>32-2048 bytes Atari </td><td>.2K </td></tr>
<tr><td>3E </td><td>512K Tigervision + 32K RAM</td><td>.3E </td></tr>
<tr><td>3EX </td><td>512K Tigervision + 256K RAM</td><td>.3EX </td></tr>
<tr><td>3E+ </td><td>3E+ (TJ modified 3E) </td><td>.3EP, .3E+ </td></tr>
<tr><td>3F </td><td>512K Tigervision </td><td>.3F </td></tr>
<tr><td>4A50 &#178;</td><td>64K 4A50 + RAM </td><td>.4A5, .4A50 </td></tr>
@ -3826,7 +3827,7 @@ Ms Pac-Man (Stella extended codes):
<tr><td>FC </td><td>Amiga Power Play Aracde 16/32K </td><td>.FC </td></tr>
<tr><td>FE </td><td>8K Decathlon </td><td>.FE </td></tr>
<tr><td>MDM </td><td>Menu Driven Megacart </td><td>.MDM </td></tr>
<tr><td>SB </td><td>128-256k SUPERbanking </td><td>.SB </td></tr>
<tr><td>SB </td><td>128-256K SUPERbanking </td><td>.SB </td></tr>
<tr><td>UA </td><td>8K UA Ltd. </td><td>.UA </td></tr>
<tr><td>UASW </td><td>8K UA Ltd. (swapped banks)</td><td>.UASW </td></tr>
<tr><td>WD </td><td>Wickstead Design (Pink Panther) </td><td>.WD </td></tr>

View File

@ -23,5 +23,6 @@ Cartridge3EX::Cartridge3EX(const ByteBuffer& image, size_t size,
: Cartridge3E(image, size, md5, settings)
{
myRamSize = RAM_SIZE;
myRamBankCount = RAM_BANKS;
// 0xFFFA contains RAM bank count - 1;
myRamBankCount = image[size - 6] + 1;
}

View File

@ -69,9 +69,6 @@ public:
#endif
private:
// The number of RAM banks
static constexpr uInt16 RAM_BANKS = 256;
// RAM size
static constexpr size_t RAM_SIZE = RAM_BANKS << (BANK_SHIFT - 1); // = 256K = 0x40000;