Commit 9aaf8b22 authored by Stephen Anthony's avatar Stephen Anthony
Browse files

Fix wrong address in poke methods in 'SC' schemes.

parent 4ff613b4
......@@ -88,6 +88,7 @@ uInt8 CartridgeBFSC::peek(uInt16 address)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeBFSC::poke(uInt16 address, uInt8 value)
{
uInt16 pokeAddress = address;
address &= 0x0FFF;
// Switch banks if necessary
......@@ -97,7 +98,7 @@ bool CartridgeBFSC::poke(uInt16 address, uInt8 value)
return false;
}
pokeRAM(myRAM[address & 0x007F], address, value);
pokeRAM(myRAM[address & 0x007F], pokeAddress, value);
return true;
}
......
......@@ -88,6 +88,7 @@ uInt8 CartridgeDFSC::peek(uInt16 address)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeDFSC::poke(uInt16 address, uInt8 value)
{
uInt16 pokeAddress = address;
address &= 0x0FFF;
// Switch banks if necessary
......@@ -97,7 +98,7 @@ bool CartridgeDFSC::poke(uInt16 address, uInt8 value)
return false;
}
pokeRAM(myRAM[address & 0x007F], address, value);
pokeRAM(myRAM[address & 0x007F], pokeAddress, value);
return true;
}
......
......@@ -88,6 +88,7 @@ uInt8 CartridgeEFSC::peek(uInt16 address)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeEFSC::poke(uInt16 address, uInt8 value)
{
uInt16 pokeAddress = address;
address &= 0x0FFF;
// Switch banks if necessary
......@@ -97,7 +98,7 @@ bool CartridgeEFSC::poke(uInt16 address, uInt8 value)
return false;
}
pokeRAM(myRAM[address & 0x007F], address, value);
pokeRAM(myRAM[address & 0x007F], pokeAddress, value);
return true;
}
......
......@@ -88,6 +88,7 @@ uInt8 CartridgeF4SC::peek(uInt16 address)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeF4SC::poke(uInt16 address, uInt8 value)
{
uInt16 pokeAddress = address;
address &= 0x0FFF;
// Switch banks if necessary
......@@ -97,7 +98,7 @@ bool CartridgeF4SC::poke(uInt16 address, uInt8 value)
return false;
}
pokeRAM(myRAM[address & 0x007F], address, value);
pokeRAM(myRAM[address & 0x007F], pokeAddress, value);
return true;
}
......
......@@ -111,10 +111,8 @@ uInt8 CartridgeF6SC::peek(uInt16 address)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeF6SC::poke(uInt16 address, uInt8 value)
{
address &= 0x0FFF;
// Switch banks if necessary
switch(address)
switch(address & 0x0FFF)
{
case 0x0FF6:
// Set the current bank to the first 4k bank
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment