mirror of https://github.com/stella-emu/stella.git
Implemented autodetect for DASH scheme.
Requires 'TJAD' to be present in ROM. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2965 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
21eff3b800
commit
301926ebfc
|
@ -518,6 +518,10 @@ string Cartridge::autodetectType(const uInt8* image, uInt32 size)
|
|||
type = "4K"; // Most common bankswitching type
|
||||
}
|
||||
|
||||
// Because it's a variable size ROM format, DASH check is independent of image size and comes last
|
||||
if(isProbablyDASH(image, size))
|
||||
type = "DASH";
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
|
@ -688,7 +692,9 @@ bool Cartridge::isProbablyCV(const uInt8* image, uInt32 size)
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool Cartridge::isProbablyDASH(const uInt8* image, uInt32 size)
|
||||
{
|
||||
return false; // TODO - add autodetection
|
||||
// DASH cart is identified key 'TJAD' in the ROM
|
||||
uInt8 signature[] = { 0x54, 0x4a, 0x41, 0x44 };
|
||||
return searchForBytes(image, size, signature, 4, 1);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
Loading…
Reference in New Issue