mirror of https://github.com/stella-emu/stella.git
Revert "Merge branch 'master' of https://github.com/stella-emu/stella"
This reverts commit3f9ef8026b
, reversing changes made to191684b6d2
.
This commit is contained in:
parent
3f9ef8026b
commit
4466f470a3
|
@ -141,6 +141,7 @@ Bankswitch::BSList = {{
|
|||
{ "FE" , "FE (8K Decathlon)" },
|
||||
{ "MDM" , "MDM (Menu Driven Megacart)" },
|
||||
{ "SB" , "SB (128-256K SUPERbank)" },
|
||||
{ "TVBOY" , "TV Boy (512K)" },
|
||||
{ "UA" , "UA (8K UA Ltd.)" },
|
||||
{ "UASW" , "UASW (8K UA swapped banks)" },
|
||||
{ "WD" , "WD (Pink Panther)" },
|
||||
|
@ -226,6 +227,8 @@ Bankswitch::ExtensionMap Bankswitch::ourExtensions = {
|
|||
{ "FE" , Bankswitch::Type::_FE },
|
||||
{ "MDM" , Bankswitch::Type::_MDM },
|
||||
{ "SB" , Bankswitch::Type::_SB },
|
||||
{ "TVB" , Bankswitch::Type::_TVBOY },
|
||||
{ "TVBOY" , Bankswitch::Type::_TVBOY },
|
||||
{ "UA" , Bankswitch::Type::_UA },
|
||||
{ "UASW" , Bankswitch::Type::_UASW },
|
||||
{ "WD" , Bankswitch::Type::_WD },
|
||||
|
@ -282,6 +285,7 @@ Bankswitch::NameToTypeMap Bankswitch::ourNameToTypes = {
|
|||
{ "FE" , Bankswitch::Type::_FE },
|
||||
{ "MDM" , Bankswitch::Type::_MDM },
|
||||
{ "SB" , Bankswitch::Type::_SB },
|
||||
{ "TVBOY" , Bankswitch::Type::_TVBOY },
|
||||
{ "UA" , Bankswitch::Type::_UA },
|
||||
{ "UASW" , Bankswitch::Type::_UASW },
|
||||
{ "WD" , Bankswitch::Type::_WD },
|
||||
|
|
|
@ -44,8 +44,8 @@ class Bankswitch
|
|||
_CDF, _CM, _CTY, _CV, _DF, _DFSC, _DPC,
|
||||
_DPCP, _E0, _E7, _E78K, _EF, _EFSC, _F0,
|
||||
_F4, _F4SC, _F6, _F6SC, _F8, _F8SC, _FA,
|
||||
_FA2, _FC, _FE, _MDM, _SB, _UA, _UASW,
|
||||
_WD, _WDSW, _X07,
|
||||
_FA2, _FC, _FE, _MDM, _SB, _TVBOY, _UA,
|
||||
_UASW, _WD, _WDSW, _X07,
|
||||
#ifdef CUSTOM_ARM
|
||||
_CUSTOM,
|
||||
#endif
|
||||
|
|
|
@ -169,13 +169,8 @@ class Cartridge : public Device
|
|||
scheme defines banks in a standard format (ie, 0 for first bank,
|
||||
1 for second, etc). Carts which will handle their own bankswitching
|
||||
completely or non-bankswitched carts can ignore this method.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
virtual bool bank(uInt16 bank, uInt16 segment = 0) { return false; }
|
||||
virtual bool bank(uInt16) { return false; }
|
||||
|
||||
/**
|
||||
Get the current bank for the provided address. Carts which have only
|
||||
|
@ -202,6 +197,7 @@ class Cartridge : public Device
|
|||
*/
|
||||
virtual uInt16 romBankCount() const { return 1; }
|
||||
|
||||
|
||||
/**
|
||||
Query the number of RAM 'banks' supported by the cartridge. Note that
|
||||
this information is cart-specific, where each cart basically defines
|
||||
|
|
|
@ -392,7 +392,7 @@ void CartridgeAR::loadIntoRAM(uInt8 load)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeAR::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeAR::bank(uInt16 bank)
|
||||
{
|
||||
if(!bankLocked())
|
||||
return bankConfiguration(uInt8(bank));
|
||||
|
|
|
@ -74,11 +74,8 @@ class CartridgeAR : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -429,7 +429,7 @@ bool CartridgeBUS::poke(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeBUS::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeBUS::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked()) return false;
|
||||
|
||||
|
|
|
@ -85,11 +85,8 @@ class CartridgeBUS : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -402,7 +402,7 @@ bool CartridgeCDF::poke(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeCDF::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeCDF::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked()) return false;
|
||||
|
||||
|
|
|
@ -91,11 +91,8 @@ class CartridgeCDF : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -98,7 +98,7 @@ uInt8 CartridgeCM::column() const
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeCM::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeCM::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked()) return false;
|
||||
|
||||
|
|
|
@ -142,11 +142,8 @@ class CartridgeCM : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -229,7 +229,7 @@ bool CartridgeCTY::poke(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeCTY::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeCTY::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked()) return false;
|
||||
|
||||
|
|
|
@ -140,11 +140,8 @@ class CartridgeCTY : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -591,7 +591,7 @@ bool CartridgeDPCPlus::poke(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeDPCPlus::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeDPCPlus::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked()) return false;
|
||||
|
||||
|
|
|
@ -87,11 +87,8 @@ class CartridgeDPCPlus : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "CartFE.hxx"
|
||||
#include "CartMDM.hxx"
|
||||
#include "CartSB.hxx"
|
||||
#include "CartTVBoy.hxx"
|
||||
#include "CartUA.hxx"
|
||||
#include "CartWD.hxx"
|
||||
#include "CartX07.hxx"
|
||||
|
@ -328,6 +329,8 @@ CartDetector::createFromImage(const ByteBuffer& image, size_t size, Bankswitch::
|
|||
return make_unique<CartridgeUA>(image, size, md5, settings, true);
|
||||
case Bankswitch::Type::_SB:
|
||||
return make_unique<CartridgeSB>(image, size, md5, settings);
|
||||
case Bankswitch::Type::_TVBOY:
|
||||
return make_unique<CartridgeTVBoy>(image, size, md5, settings);
|
||||
case Bankswitch::Type::_WD:
|
||||
case Bankswitch::Type::_WDSW:
|
||||
return make_unique<CartridgeWD>(image, size, md5, settings);
|
||||
|
@ -524,6 +527,11 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si
|
|||
else /*if(isProbablySB(image, size))*/
|
||||
type = Bankswitch::Type::_SB;
|
||||
}
|
||||
else if(size == 512_KB)
|
||||
{
|
||||
if(isProbablyTVBoy(image, size))
|
||||
type = Bankswitch::Type::_TVBOY;
|
||||
}
|
||||
else // what else can we do?
|
||||
{
|
||||
if(isProbably3EX(image, size))
|
||||
|
@ -1000,6 +1008,14 @@ bool CartDetector::isProbablySB(const ByteBuffer& image, size_t size)
|
|||
return searchForBytes(image, size, signature[1], 3);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartDetector::isProbablyTVBoy(const ByteBuffer& image, size_t size)
|
||||
{
|
||||
// TV Boy cart bankswitching switches banks by accessing addresses 0x1800..$187F
|
||||
uInt8 signature[5] = {0x91, 0x82, 0x6c, 0xfc, 0xff}; // STA ($82),Y; JMP ($FFFC)
|
||||
return searchForBytes(image, size, signature, 5);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartDetector::isProbablyUA(const ByteBuffer& image, size_t size)
|
||||
{
|
||||
|
|
|
@ -247,6 +247,11 @@ class CartDetector
|
|||
*/
|
||||
static bool isProbablySB(const ByteBuffer& image, size_t size);
|
||||
|
||||
/**
|
||||
Returns true if the image is probably a TV Boy bankswitching cartridge
|
||||
*/
|
||||
static bool isProbablyTVBoy(const ByteBuffer& image, size_t size);
|
||||
|
||||
/**
|
||||
Returns true if the image is probably a UA bankswitching cartridge
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,16 @@ class CartridgeEnhanced : public Cartridge
|
|||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
virtual bool bank(uInt16 bank, uInt16 segment);
|
||||
|
||||
/**
|
||||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank) override { return this->bank(bank, 0); }
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -88,7 +88,7 @@ bool CartridgeMDM::poke(uInt16 address, uInt8 value)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeMDM::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeMDM::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked() || myBankingDisabled) return false;
|
||||
|
||||
|
|
|
@ -74,11 +74,8 @@ class CartridgeMDM : public CartridgeEnhanced
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Save the current state of this cart to the given Serializer.
|
||||
|
|
|
@ -201,7 +201,7 @@ void CartridgeMNetwork::bankRAM(uInt16 bank)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartridgeMNetwork::bank(uInt16 bank, uInt16)
|
||||
bool CartridgeMNetwork::bank(uInt16 bank)
|
||||
{
|
||||
if(bankLocked()) return false;
|
||||
|
||||
|
|
|
@ -95,11 +95,8 @@ class CartridgeMNetwork : public Cartridge
|
|||
Install pages for the specified bank in the system.
|
||||
|
||||
@param bank The bank that should be installed in the system
|
||||
@param segment The segment the bank should be using
|
||||
|
||||
@return true, if bank has changed
|
||||
*/
|
||||
bool bank(uInt16 bank, uInt16 segment = 0) override;
|
||||
bool bank(uInt16 bank) override;
|
||||
|
||||
/**
|
||||
Get the current bank.
|
||||
|
|
|
@ -717,27 +717,57 @@ void EventHandler::handleEvent(Event::Type event, Int32 value, bool repeated)
|
|||
return;
|
||||
|
||||
case Event::VidmodeStd:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::OFF);
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::OFF);
|
||||
myAdjustDirect = AdjustSetting::NTSC_PRESET;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::VidmodeRGB:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::RGB);
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::RGB);
|
||||
myAdjustSetting = AdjustSetting::NTSC_PRESET;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::VidmodeSVideo:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::SVIDEO);
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::SVIDEO);
|
||||
myAdjustSetting = AdjustSetting::NTSC_PRESET;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::VidModeComposite:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::COMPOSITE);
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::COMPOSITE);
|
||||
myAdjustSetting = AdjustSetting::NTSC_PRESET;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::VidModeBad:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::BAD);
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::BAD);
|
||||
myAdjustSetting = AdjustSetting::NTSC_PRESET;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::VidModeCustom:
|
||||
if (pressed && !repeated) myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::CUSTOM);
|
||||
if(pressed && !repeated)
|
||||
{
|
||||
myOSystem.frameBuffer().tiaSurface().setNTSC(NTSCFilter::Preset::CUSTOM);
|
||||
myAdjustSetting = AdjustSetting::NTSC_PRESET;
|
||||
myAdjustActive = true;
|
||||
}
|
||||
return;
|
||||
|
||||
case Event::PreviousAttribute:
|
||||
|
|
|
@ -414,7 +414,7 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
|
|||
}
|
||||
catch(const runtime_error& e)
|
||||
{
|
||||
buf << "ERROR: " << e.what();
|
||||
buf << "ERROR: Couldn't create console (" << e.what() << ")";
|
||||
Logger::error(buf.str());
|
||||
return buf.str();
|
||||
}
|
||||
|
|
|
@ -523,6 +523,7 @@
|
|||
<ClCompile Include="..\debugger\BreakpointMap.cxx">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\debugger\CartTVBoyWidget.cxx" />
|
||||
<ClCompile Include="..\debugger\Debugger.cxx">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
|
@ -729,6 +730,7 @@
|
|||
<ClCompile Include="..\emucore\CartMDM.cxx" />
|
||||
<ClCompile Include="..\emucore\CartMNetwork.cxx" />
|
||||
<ClCompile Include="..\emucore\CartE78K.cxx" />
|
||||
<ClCompile Include="..\emucore\CartTVBoy.cxx" />
|
||||
<ClCompile Include="..\emucore\CartWD.cxx" />
|
||||
<ClCompile Include="..\emucore\CompuMate.cxx" />
|
||||
<ClCompile Include="..\emucore\ControllerDetector.cxx" />
|
||||
|
@ -1532,6 +1534,7 @@
|
|||
<ClInclude Include="..\debugger\BreakpointMap.hxx">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\debugger\CartTVBoyWidget.hxx" />
|
||||
<ClInclude Include="..\debugger\gui\AmigaMouseWidget.hxx">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug-NoDebugger|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
|
@ -1747,6 +1750,7 @@
|
|||
<ClInclude Include="..\emucore\CartMDM.hxx" />
|
||||
<ClInclude Include="..\emucore\CartMNetwork.hxx" />
|
||||
<ClInclude Include="..\emucore\CartE78K.hxx" />
|
||||
<ClInclude Include="..\emucore\CartTVBoy.hxx" />
|
||||
<ClInclude Include="..\emucore\CartWD.hxx" />
|
||||
<ClInclude Include="..\emucore\CompuMate.hxx" />
|
||||
<ClInclude Include="..\emucore\ControllerDetector.hxx" />
|
||||
|
|
|
@ -1005,6 +1005,12 @@
|
|||
<ClCompile Include="..\gui\VideoAudioDialog.cxx">
|
||||
<Filter>Source Files\gui</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\emucore\CartTVBoy.cxx">
|
||||
<Filter>Source Files\emucore</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\debugger\CartTVBoyWidget.cxx">
|
||||
<Filter>Source Files\debugger</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\common\bspf.hxx">
|
||||
|
@ -2063,6 +2069,12 @@
|
|||
<ClInclude Include="..\gui\VideoAudioDialog.hxx">
|
||||
<Filter>Header Files\gui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\emucore\CartTVBoy.hxx">
|
||||
<Filter>Header Files\emucore</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\debugger\CartTVBoyWidget.hxx">
|
||||
<Filter>Header Files\debugger</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="stella.ico">
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue