mirror of https://github.com/stella-emu/stella.git
Fixed CDFJ+ issue if the first byte of the cartridge contained a value of FF_OFFSET thru FF_OFFSET + $23 (#879)
Updated Thumbulator's debug mode to allow run-time updating of the FF_OFFSET value.
This commit is contained in:
parent
d658d72871
commit
37180e18df
|
@ -153,8 +153,9 @@ void CartridgeCDF::setInitialState()
|
||||||
// need to confirm with Chris
|
// need to confirm with Chris
|
||||||
myMode = 0xFF;
|
myMode = 0xFF;
|
||||||
|
|
||||||
myBankOffset = myLDAXYimmediateOperandAddress = myJMPoperandAddress = 0;
|
myBankOffset = myJMPoperandAddress = 0;
|
||||||
myFastJumpActive = myFastJumpStream = 0;
|
myFastJumpActive = myFastJumpStream = 0;
|
||||||
|
myLDAXYimmediateOperandAddress = LDAXY_OVERRIDE_INACTIVE;
|
||||||
|
|
||||||
CartridgeARM::setInitialState();
|
CartridgeARM::setInitialState();
|
||||||
}
|
}
|
||||||
|
@ -290,7 +291,7 @@ uInt8 CartridgeCDF::peek(uInt16 address)
|
||||||
&& peekvalue <= myAmplitudeStream);
|
&& peekvalue <= myAmplitudeStream);
|
||||||
if (fastfetch)
|
if (fastfetch)
|
||||||
{
|
{
|
||||||
myLDAXYimmediateOperandAddress = 0;
|
myLDAXYimmediateOperandAddress = LDAXY_OVERRIDE_INACTIVE;
|
||||||
if (myFastFetcherOffset)
|
if (myFastFetcherOffset)
|
||||||
peekvalue -= myRAM[myFastFetcherOffset]; // normalize peekvalue to 0 - 35
|
peekvalue -= myRAM[myFastFetcherOffset]; // normalize peekvalue to 0 - 35
|
||||||
if (peekvalue == myAmplitudeStream)
|
if (peekvalue == myAmplitudeStream)
|
||||||
|
@ -329,7 +330,7 @@ uInt8 CartridgeCDF::peek(uInt16 address)
|
||||||
return readFromDatastream(peekvalue);
|
return readFromDatastream(peekvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myLDAXYimmediateOperandAddress = 0;
|
myLDAXYimmediateOperandAddress = LDAXY_OVERRIDE_INACTIVE;
|
||||||
|
|
||||||
// Switch banks if necessary
|
// Switch banks if necessary
|
||||||
switch(address)
|
switch(address)
|
||||||
|
|
|
@ -58,6 +58,9 @@ class System;
|
||||||
@authors: Darrell Spice Jr, Chris Walton, Fred Quimby, John Champeau
|
@authors: Darrell Spice Jr, Chris Walton, Fred Quimby, John Champeau
|
||||||
Thomas Jentzsch, Stephen Anthony, Bradford W. Mott
|
Thomas Jentzsch, Stephen Anthony, Bradford W. Mott
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define LDAXY_OVERRIDE_INACTIVE 0xFFFF
|
||||||
|
|
||||||
class CartridgeCDF : public CartridgeARM
|
class CartridgeCDF : public CartridgeARM
|
||||||
{
|
{
|
||||||
friend class CartridgeCDFWidget;
|
friend class CartridgeCDFWidget;
|
||||||
|
@ -341,7 +344,7 @@ class CartridgeCDF : public CartridgeARM
|
||||||
|
|
||||||
// set to address of #value if last byte peeked was A9 (LDA #),
|
// set to address of #value if last byte peeked was A9 (LDA #),
|
||||||
// or for CDFJ+ variations if A0 (LDY #) or A2 (LDX #)
|
// or for CDFJ+ variations if A0 (LDY #) or A2 (LDX #)
|
||||||
uInt16 myLDAXYimmediateOperandAddress{0};
|
uInt16 myLDAXYimmediateOperandAddress{LDAXY_OVERRIDE_INACTIVE};
|
||||||
|
|
||||||
// Some CDFJ+ drivers also override LDX # and/or LDY # for fast fetcher
|
// Some CDFJ+ drivers also override LDX # and/or LDY # for fast fetcher
|
||||||
// use. These flag if this has been done.
|
// use. These flag if this has been done.
|
||||||
|
|
|
@ -548,6 +548,11 @@ void Thumbulator::write32(uInt32 addr, uInt32 data)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool Thumbulator::isProtected(uInt32 addr)
|
bool Thumbulator::isProtected(uInt32 addr)
|
||||||
{
|
{
|
||||||
|
// Protected is within the driver RAM.
|
||||||
|
// For CDF variations parts of the driver RAM are reused to hold the
|
||||||
|
// datastream information, so is not protected.
|
||||||
|
// Additionally for CDFJ+ the Fast Fetcher offset is not write protected.
|
||||||
|
|
||||||
if (addr < 0x40000000) return false;
|
if (addr < 0x40000000) return false;
|
||||||
addr -= 0x40000000;
|
addr -= 0x40000000;
|
||||||
|
|
||||||
|
@ -562,9 +567,11 @@ bool Thumbulator::isProtected(uInt32 addr)
|
||||||
return (addr < 0x0800) && (addr > 0x0028) && !((addr >= 0x00a0) && (addr < (0x00a0 + 284)));
|
return (addr < 0x0800) && (addr > 0x0028) && !((addr >= 0x00a0) && (addr < (0x00a0 + 284)));
|
||||||
|
|
||||||
case ConfigureFor::CDFJ:
|
case ConfigureFor::CDFJ:
|
||||||
case ConfigureFor::CDFJplus:
|
|
||||||
return (addr < 0x0800) && (addr > 0x0028) && !((addr >= 0x0098) && (addr < (0x0098 + 292)));
|
return (addr < 0x0800) && (addr > 0x0028) && !((addr >= 0x0098) && (addr < (0x0098 + 292)));
|
||||||
|
|
||||||
|
case ConfigureFor::CDFJplus:
|
||||||
|
return (addr < 0x0800) && (addr > 0x0028) && !((addr >= 0x0098) && (addr < (0x0098 + 292))) && addr != 0x3E0;
|
||||||
|
|
||||||
case ConfigureFor::BUS:
|
case ConfigureFor::BUS:
|
||||||
return (addr < 0x06d8) && (addr > 0x0028);
|
return (addr < 0x06d8) && (addr > 0x0028);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue