Fixed 'read from write port' bug in E7 bankswitching; while the read

from write port was correctly detected for the 1K area, it was actually
zeroing ROM instead of RAM!

Added support for 'read from write port' logic for the upper 256 byte
page in E7 bankswitching.

Bumped version # for release to testers on AtariAge.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1919 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-01-09 20:50:38 +00:00
parent 6885416d02
commit be2d42202e
3 changed files with 13 additions and 7 deletions

View File

@ -21,7 +21,7 @@
#include <cstdlib>
#define STELLA_BASE_VERSION "3.1_test2"
#define STELLA_BASE_VERSION "3.1_test3"
#ifdef NIGHTLY_BUILD
#define STELLA_VERSION STELLA_BASE_VERSION "pre-" NIGHTLY_BUILD

View File

@ -22,8 +22,6 @@
#include "System.hxx"
#include "CartE7.hxx"
// TODO - check for unwanted read from write port in the upper 256B RAM area
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeE7::CartridgeE7(const uInt8* image)
{
@ -106,13 +104,21 @@ uInt8 CartridgeE7::peek(uInt16 address)
bankRAM(address & 0x0003);
}
if((address < 0x0400) && (bank() == 7))
if((myCurrentSlice[0] == 7) && (address < 0x0400))
{
// Reading from the write port triggers an unwanted write
// Reading from the 1K write port @ $1000 triggers an unwanted write
uInt8 value = mySystem->getDataBusState(0xFF);
if(myBankLocked) return value;
else return myImage[(myCurrentSlice[address >> 11] << 11) + (address & 0x07FF)] = value;
else return myRAM[address & 0x03FF] = value;
}
else if((address >= 0x0800) && (address <= 0x08FF))
{
// Reading from the 256B write port @ $1800 triggers an unwanted write
uInt8 value = mySystem->getDataBusState(0xFF);
if(myBankLocked) return value;
else return myRAM[1024 + (myCurrentRAM << 8) + (address & 0x00FF)] = value;
}
else
return myImage[(myCurrentSlice[address >> 11] << 11) + (address & 0x07FF)];

View File

@ -48,7 +48,7 @@ class System;
read port. The second 1K of RAM appears at 1800-19FF.
1800-18FF is the write port while 1900-19FF is the
read port. You select which 256 byte block appears
here by accessing 1FF8 to 1FFB.
here by accessing 1FE8 to 1FEB.
@author Bradford W. Mott
@version $Id$