mirror of https://github.com/stella-emu/stella.git
added WF8 (Todo: doc)
This commit is contained in:
parent
12cb8c07ca
commit
d259b33bc6
|
@ -62,6 +62,7 @@
|
|||
#include "CartTVBoy.hxx"
|
||||
#include "CartUA.hxx"
|
||||
#include "CartWD.hxx"
|
||||
#include "CartWF8.hxx"
|
||||
#include "CartX07.hxx"
|
||||
#include "MD5.hxx"
|
||||
#include "Settings.hxx"
|
||||
|
@ -279,6 +280,7 @@ CartCreator::createFromImage(const ByteBuffer& image, size_t size,
|
|||
case _TVBOY:return make_unique<CartridgeTVBoy>(image, size, md5, settings);
|
||||
case _WD: [[fallthrough]];
|
||||
case _WDSW: return make_unique<CartridgeWD>(image, size, md5, settings);
|
||||
case _WF8: return make_unique<CartridgeWF8>(image, size, md5, settings);
|
||||
case _X07: return make_unique<CartridgeX07>(image, size, md5, settings);
|
||||
default: return nullptr; // The remaining types have already been handled
|
||||
}
|
||||
|
|
|
@ -90,8 +90,6 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si
|
|||
type = Bankswitch::Type::_FC;
|
||||
else if(isProbably03E0(image, size))
|
||||
type = Bankswitch::Type::_03E0;
|
||||
else if (isProbablyWF8(image, size))
|
||||
type = Bankswitch::Type::_WF8;
|
||||
else
|
||||
type = Bankswitch::Type::_F8;
|
||||
}
|
||||
|
@ -828,20 +826,6 @@ bool CartDetector::isProbablyWD(const ByteBuffer& image, size_t size)
|
|||
return searchForBytes(image, size, signature[0], 3);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartDetector::isProbablyWF8(const ByteBuffer& image, size_t size)
|
||||
{
|
||||
// WF8 cart bankswitching for certain Coleco white lable ROMs, switches to
|
||||
// - bank 0 by writing D3 = 0
|
||||
// - bank 1 by writing D3 = 1
|
||||
// into 0xfff8
|
||||
static constexpr uInt8 sig[] = {
|
||||
0xa9, 0x04, 0x8d, 0xf8, 0xff
|
||||
};
|
||||
|
||||
return searchForBytes(image, size, sig, sizeof(sig));
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool CartDetector::isProbablyX07(const ByteBuffer& image, size_t size)
|
||||
{
|
||||
|
|
|
@ -241,11 +241,6 @@ class CartDetector
|
|||
*/
|
||||
static bool isProbablyWD(const ByteBuffer& image, size_t size);
|
||||
|
||||
/**
|
||||
Returns true if the image is probably a Coleco (white label) WF8 bankswitching cartridge
|
||||
*/
|
||||
static bool isProbablyWF8(const ByteBuffer& image, size_t size);
|
||||
|
||||
/**
|
||||
Returns true if the image is probably an X07 bankswitching cartridge
|
||||
*/
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue