Package libsidutils.sidid
Klasse SidIdV2
java.lang.Object
libsidutils.sidid.SidIdBase
libsidutils.sidid.SidIdV2
Scan tune files to find out the player ID. A configuration file is used with
patterns of well-known players.
- Autor:
- Ken Händel
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungprivate static classThis is a single pattern to match a player.private static classPlayer section of the SID-ID configuration file. -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate static final StringName of the configuration file.private static final intInteger base for hexadecimals.private static final intMaximum pattern length.private booleanScan multiple times.private final BNDMWildcardsSearch algorithm to be used.private ArrayList<SidIdV2.PlayerSection> Configuration sections.private static final StringPackage of the internal configuration file. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprivate voidandBytes(SidIdV2.PlayerSection section, ArrayList<Byte> byteList) Add all bytes of the byte list to the last element of the orList.private voidandBytesMaxPtnLength(ArrayList<SidIdV2.Pattern> ptnList, ArrayList<Byte> byteList, int byteListOffset, int byteCount, boolean isSubPattern) Add a pattern to the pattern search list.identify(byte[] prg) Search player ID of a program.Search player ID of a tune file.private booleanmatchAllOf(ArrayList<SidIdV2.Pattern> andList, byte[] prg) Match all patterns in the list.private booleanmatchOneOf(ArrayList<ArrayList<SidIdV2.Pattern>> orList, byte[] prg) Match one of the patterns in the list.voidRead configuration file and configure the SID-ID class.voidreadconfig(byte[] sidIdCfgBin) Read configuration file and configure the SID-ID class.voidsetMultiScan(boolean m) Scan file for multiple player IDs.Von Klasse geerbte Methoden libsidutils.sidid.SidIdBase
load, readConfiguration
-
Felddetails
-
SID_ID_PKG
Package of the internal configuration file.- Siehe auch:
-
FNAME
Name of the configuration file.- Siehe auch:
-
HEX_RADIX
private static final int HEX_RADIXInteger base for hexadecimals.- Siehe auch:
-
MAX_KEY_LENGTH
private static final int MAX_KEY_LENGTHMaximum pattern length.- Siehe auch:
-
search
Search algorithm to be used. -
sections
Configuration sections. -
multiScan
private boolean multiScanScan multiple times.
-
-
Konstruktordetails
-
SidIdV2
public SidIdV2()Constructor. Enable use of BNDM algorithm.
-
-
Methodendetails
-
setMultiScan
public void setMultiScan(boolean m) Scan file for multiple player IDs.- Parameter:
m- on/off multi scan
-
identify
Search player ID of a tune file.- Parameter:
filename- file name- Gibt zurück:
- list of players (depending of multiScan one or more entries)
- Löst aus:
IOException- read error
-
identify
Search player ID of a program.- Parameter:
prg- program to identify- Gibt zurück:
- list of players (depending of multiScan one or more entries)
-
matchOneOf
Match one of the patterns in the list.- Parameter:
orList- the list of patterns to matchprg- the byte array containing the text- Gibt zurück:
- true - one of the patterns have matched, false otherwise
-
matchAllOf
Match all patterns in the list.- Parameter:
andList- the list of patterns to matchprg- the byte array containing the text- Gibt zurück:
- true - all patterns have matched, false otherwise
-
readconfig
Read configuration file and configure the SID-ID class.- Löst aus:
IOException- I/O errorNumberFormatException
-
readconfig
Read configuration file and configure the SID-ID class.- Löst aus:
IOExceptionNumberFormatException
-
andBytes
Add all bytes of the byte list to the last element of the orList.- Parameter:
section- the current sectionbyteList- the bytes to add
-
andBytesMaxPtnLength
private void andBytesMaxPtnLength(ArrayList<SidIdV2.Pattern> ptnList, ArrayList<Byte> byteList, int byteListOffset, int byteCount, boolean isSubPattern) Add a pattern to the pattern search list.- Parameter:
ptnList- the pattern list to add a new pattern forbyteList- the list of bytes to addbyteListOffset- Current offset of the bytes to addbyteCount- length of bytes to add (will become the search pattern length, and must not exceed the maximum pattern length)isSubPattern- is this a splitted sub-pattern?
-