mirror of https://github.com/stella-emu/stella.git
added WF8 detection and test ROMs
(cherry picked from commit 28050d5d9cfa502b4f0214c2b9e322a36dc0c4bf)
This commit is contained in:
parent
2317cfd3c5
commit
12cb8c07ca
|
@ -90,6 +90,8 @@ 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;
|
||||
}
|
||||
|
@ -826,6 +828,20 @@ 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,6 +241,11 @@ 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