public class SidTune extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SidTune.Decompressed |
static class |
SidTune.LoadStatus |
| Modifier and Type | Field and Description |
|---|---|
protected Buffer_sidtt |
cache |
protected short[] |
clockSpeed |
protected static String[] |
fileNameExtensions
Filename extensions to append for various file types.
|
protected int |
fileOffset
For files with header: offset to real data
|
protected SidTuneInfo |
info |
protected String[] |
infoString
holds text info from the format headers etc.
|
protected int |
musDataLen
Needed for MUS/STR player installation.
|
static int |
SIDTUNE_CLOCK_ANY |
static int |
SIDTUNE_CLOCK_NTSC |
static int |
SIDTUNE_CLOCK_PAL |
static int |
SIDTUNE_CLOCK_UNKNOWN |
static int |
SIDTUNE_COMPATIBILITY_BASIC
File requires C64 Basic
|
static int |
SIDTUNE_COMPATIBILITY_C64
File is C64 compatible
|
static int |
SIDTUNE_COMPATIBILITY_PSID
File is PSID specific
|
static int |
SIDTUNE_COMPATIBILITY_R64
File is Real C64 only
|
static int |
SIDTUNE_MAX_CREDIT_STRINGS |
static int |
SIDTUNE_MAX_CREDIT_STRLEN
80 characters plus terminating zero.
|
static int |
SIDTUNE_MAX_FILELEN
C64KB+LOAD+PSID
|
static int |
SIDTUNE_MAX_MEMORY
C64KB
|
static int |
SIDTUNE_MAX_SONGS
Also PSID file format limit.
|
static int |
SIDTUNE_SIDMODEL_6581 |
static int |
SIDTUNE_SIDMODEL_8580 |
static int |
SIDTUNE_SIDMODEL_ANY |
static int |
SIDTUNE_SIDMODEL_UNKNOWN |
static int |
SIDTUNE_SPEED_CIA_1A
CIA 1 Timer A
|
static int |
SIDTUNE_SPEED_VBI
Vertical-Blanking-Interrupt
|
protected short[] |
songLength |
protected short[] |
songSpeed |
protected boolean |
status |
protected static String |
txt_badAddr |
protected static String |
txt_badReloc |
protected static String |
txt_cantCreateFile |
protected static String |
txt_cantLoadFile |
protected static String |
txt_cantOpenFile |
protected static String |
txt_CIA |
protected static String |
txt_corrupt |
protected static String |
txt_dataTooLong |
protected static String |
txt_empty |
protected static String |
txt_fileIoError |
protected static String |
txt_fileTooLong |
protected static String |
txt_na |
protected static String |
txt_noDataFile |
protected static String |
txt_noErrors |
protected static String |
txt_notEnoughMemory |
protected static String |
txt_songNumberExceed |
protected static String |
txt_unrecognizedFormat |
protected static String |
txt_VBI |
| Constructor and Description |
|---|
SidTune(short[] oneFileFormatSidtune,
int sidtuneLength)
Load a single-file sidtune from a memory buffer.
|
SidTune(String fileName,
String[] fileNameExt)
Load a sidtune from a file.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
bool()
Determine current state of object (true = okay, false = error).
|
protected boolean |
checkCompatibility()
Check compatibility details are sensible
|
protected boolean |
checkRelocInfo()
Check for valid relocation information
|
protected void |
convertOldStyleSpeedToTables(long speed,
short clock)
Convert 32-bit PSID-style speed word to internal tables.
|
protected int |
convertPetsciiToAscii(SmartPtr_sidtt spPet,
StringBuffer dest) |
void |
fixLoadAddress(boolean force,
int init,
int play)
This function can be used to remove a duplicate C64 load address in the
C64 data (example: FE 0F 00 10 4C ...).
|
SidTuneInfo |
getInfo()
Retrieve sub-song specific information.
|
boolean |
getStatus()
Determine current state of object (true = okay, false = error).
|
protected SidTune.LoadStatus |
INFO_fileSupport(Buffer_sidtt dataBuf,
Buffer_sidtt infoBuf) |
boolean |
isStereo()
Whether sidtune uses two SID chips.
|
boolean |
load(String fileName)
Load a sidtune into an existing object.
|
boolean |
loadFile(String fileName,
Buffer_sidtt bufferRef)
Does not affect status of object, and therefore can be used to load
files.
|
protected boolean |
MUS_detect(short[] buffer,
int bufLen,
Mus.Voice3Index voice3Index) |
protected SidTune.LoadStatus |
MUS_fileSupport(Buffer_sidtt musBuf,
Buffer_sidtt strBuf) |
protected void |
MUS_installPlayer(short[] c64buf) |
protected SidTune.LoadStatus |
MUS_load(Buffer_sidtt musBuf,
boolean init) |
protected SidTune.LoadStatus |
MUS_load(Buffer_sidtt musBuf,
Buffer_sidtt strBuf,
boolean init) |
protected boolean |
MUS_mergeParts(Buffer_sidtt musBuf,
Buffer_sidtt strBuf) |
protected void |
MUS_setPlayerAddress() |
SidTuneInfo |
opGet(int songNum)
Select sub-song (0 = default starting song) and retrieve active song
information.
|
boolean |
placeSidTuneInC64mem(short[] c64buf)
Copy sidtune into C64 memory (64 KB).
|
protected SidTune.LoadStatus |
PRG_fileSupport(String fileName,
Buffer_sidtt dataBuf) |
protected SidTune.LoadStatus |
PSID_fileSupport(Buffer_sidtt dataBuf) |
protected boolean |
PSID_fileSupportSave(OutputStream toFile,
short[] dataBuffer) |
boolean |
read(short[] sourceBuffer,
int bufferLen)
From a buffer.
|
protected boolean |
resolveAddrs(short[] c64data,
int fileOffset2)
Common address resolution procedure
|
boolean |
saveC64dataFile(String destFileName,
boolean overWriteFlag) |
boolean |
savePSIDfile(String destFileName,
boolean overWriteFlag) |
boolean |
saveSIDfile(String destFileName,
boolean overWriteFlag) |
boolean |
saveToOpenFile(OutputStream toFile,
short[] buffer,
int bufferOffset,
int bufLen) |
int |
selectSong(int selectedSong)
Select sub-song (0 = default starting song) and return active song number
out of [1,2,..
|
static void |
setFileNameExtensions(String[] fileNameExt)
The sidTune class does not copy the list of file name extensions, so make
sure you keep it.
|
protected SidTune.LoadStatus |
SID_fileSupport(Buffer_sidtt dataBuf,
Buffer_sidtt sidBuf) |
protected boolean |
SID_fileSupportSave(OutputStream toFile) |
protected SidTune.LoadStatus |
X00_fileSupport(String fileName,
Buffer_sidtt dataBuf) |
public static final int SIDTUNE_MAX_SONGS
public static final int SIDTUNE_MAX_CREDIT_STRINGS
public static final int SIDTUNE_MAX_CREDIT_STRLEN
public static final int SIDTUNE_MAX_MEMORY
public static final int SIDTUNE_MAX_FILELEN
public static final int SIDTUNE_SPEED_VBI
public static final int SIDTUNE_SPEED_CIA_1A
public static final int SIDTUNE_CLOCK_UNKNOWN
public static final int SIDTUNE_CLOCK_PAL
public static final int SIDTUNE_CLOCK_NTSC
public static final int SIDTUNE_CLOCK_ANY
public static final int SIDTUNE_SIDMODEL_UNKNOWN
public static final int SIDTUNE_SIDMODEL_6581
public static final int SIDTUNE_SIDMODEL_8580
public static final int SIDTUNE_SIDMODEL_ANY
public static final int SIDTUNE_COMPATIBILITY_C64
public static final int SIDTUNE_COMPATIBILITY_PSID
public static final int SIDTUNE_COMPATIBILITY_R64
public static final int SIDTUNE_COMPATIBILITY_BASIC
protected SidTuneInfo info
protected boolean status
protected short[] songSpeed
protected short[] clockSpeed
protected short[] songLength
protected String[] infoString
protected int fileOffset
protected int musDataLen
protected Buffer_sidtt cache
protected static String[] fileNameExtensions
protected static final String txt_songNumberExceed
protected static final String txt_empty
protected static final String txt_unrecognizedFormat
protected static final String txt_noDataFile
protected static final String txt_notEnoughMemory
protected static final String txt_cantLoadFile
protected static final String txt_cantOpenFile
protected static final String txt_fileTooLong
protected static final String txt_dataTooLong
protected static final String txt_cantCreateFile
protected static final String txt_fileIoError
protected static final String txt_VBI
protected static final String txt_CIA
protected static final String txt_noErrors
protected static final String txt_na
protected static final String txt_badAddr
protected static final String txt_badReloc
protected static final String txt_corrupt
public SidTune(String fileName, String[] fileNameExt)
fileName - fileNameExt - public SidTune(short[] oneFileFormatSidtune,
int sidtuneLength)
oneFileFormatSidtune - sidtuneLength - public static void setFileNameExtensions(String[] fileNameExt)
fileNameExt - public boolean load(String fileName)
fileName - public boolean read(short[] sourceBuffer,
int bufferLen)
sourceBuffer - bufferLen - public final SidTuneInfo opGet(int songNum)
songNum - public int selectSong(int selectedSong)
selectedSong - public final SidTuneInfo getInfo()
public boolean bool()
public boolean getStatus()
public boolean isStereo()
public boolean placeSidTuneInC64mem(short[] c64buf)
c64buf - public boolean saveC64dataFile(String destFileName, boolean overWriteFlag)
destFileName - overWriteFlag - true = Overwrite existing file, false = Defaultpublic boolean saveSIDfile(String destFileName, boolean overWriteFlag)
destFileName - overWriteFlag - true = Overwrite existing file, false = Defaultpublic boolean savePSIDfile(String destFileName, boolean overWriteFlag)
destFileName - overWriteFlag - true = Overwrite existing file, false = Defaultpublic void fixLoadAddress(boolean force,
int init,
int play)
force - init - play - public boolean loadFile(String fileName, Buffer_sidtt bufferRef)
fileName - bufferRef - public boolean saveToOpenFile(OutputStream toFile, short[] buffer, int bufferOffset, int bufLen)
protected void convertOldStyleSpeedToTables(long speed,
short clock)
speed - clock - protected int convertPetsciiToAscii(SmartPtr_sidtt spPet, StringBuffer dest)
protected boolean checkCompatibility()
protected boolean checkRelocInfo()
protected boolean resolveAddrs(short[] c64data,
int fileOffset2)
c64data - fileOffset2 - protected SidTune.LoadStatus PSID_fileSupport(Buffer_sidtt dataBuf)
protected boolean PSID_fileSupportSave(OutputStream toFile, short[] dataBuffer)
protected SidTune.LoadStatus SID_fileSupport(Buffer_sidtt dataBuf, Buffer_sidtt sidBuf)
protected boolean SID_fileSupportSave(OutputStream toFile)
protected SidTune.LoadStatus MUS_fileSupport(Buffer_sidtt musBuf, Buffer_sidtt strBuf)
protected SidTune.LoadStatus MUS_load(Buffer_sidtt musBuf, boolean init)
protected SidTune.LoadStatus MUS_load(Buffer_sidtt musBuf, Buffer_sidtt strBuf, boolean init)
protected boolean MUS_detect(short[] buffer,
int bufLen,
Mus.Voice3Index voice3Index)
protected boolean MUS_mergeParts(Buffer_sidtt musBuf, Buffer_sidtt strBuf)
protected void MUS_setPlayerAddress()
protected void MUS_installPlayer(short[] c64buf)
protected SidTune.LoadStatus INFO_fileSupport(Buffer_sidtt dataBuf, Buffer_sidtt infoBuf)
protected SidTune.LoadStatus PRG_fileSupport(String fileName, Buffer_sidtt dataBuf)
protected SidTune.LoadStatus X00_fileSupport(String fileName, Buffer_sidtt dataBuf)
Copyright © 2014. All rights reserved.