mirror of https://github.com/stella-emu/stella.git
Added patch support to 'WD' scheme.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
df5f3c1c5a
commit
c03bb5dc6b
|
@ -259,7 +259,16 @@ uInt16 CartridgeWD::bankCount() const
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeWD::patch(uInt16 address, uInt8 value)
|
||||
{
|
||||
return false; // TODO
|
||||
address &= 0x0FFF;
|
||||
|
||||
uInt16 idx = address >> 10;
|
||||
myImage[myOffset[idx] + (address & 0x03FF)] = value;
|
||||
|
||||
// The upper segment is mirrored, so we need to patch its buffer too
|
||||
if(idx == 3)
|
||||
mySegment3[(address & 0x03FF)] = value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue