SCC player
TriloSCC_Initialize
void TriloSCC_Initialize()

Initialize replayer data. Only call this on start-up.

TriloSCC_Pause
void TriloSCC_Pause()

Stop/Restart music playback.

TriloSCC_Resume
inline void TriloSCC_Resume()

Stop/Restart music playback.

TriloSCC_FadeOut
void TriloSCC_FadeOut(
u8 speed
)

Fade out the music. Once the sound is silence the replayer is paused.

Parameters
speed
u8

Fade speed (1 - 255)

TriloSCC_SetBalanceSCC
void TriloSCC_SetBalanceSCC(
u8 vol
)

Set the main volume for the SCC chip.  This enables for setting the balance between SCC and PSG as some MSX models default balance differs.

Parameters
vol
u8

Master volume (0-7) 0=halve volume, 8=full volume.

TriloSCC_SetBalancePSG
void TriloSCC_SetBalancePSG(
u8 vol
)

Set the main volume for the PSG chip.  This enables for setting the balance between SCC and PSG as some MSX models default balance differs.

Parameters
vol
u8

Master volume (0-7) 0=halve volume, 8=full volume.

TriloSCC_SetFrequency
inline void TriloSCC_SetFrequency(
u8 freq
)

Set playback frequency.

Parameters
freq
u8

Can be TRILO_50HZ (0) or TRILO_60HZ (not 0).

TriloSCC_LoadMusic
void TriloSCC_LoadMusic(
const voidaddr
)

Initialize a music for playback.

Parameters
addr
const void*

Address of the music data

TriloSCC_SetToneTable
inline void TriloSCC_SetToneTable(
const voidaddr
)

Set a custom tone table.

Parameters
addr
const void*

Address of the tone table

TriloSCC_Silent
void TriloSCC_Silent()

Set mixer values to silent.

TriloSCC_Update
void TriloSCC_Update()

Decode music data and process instruments and effects.

TriloSCC_Apply
void TriloSCC_Apply()

Output the data to the CHIP registers.

SFX player
TriloSFX_Initialize
void TriloSFX_Initialize()

Initialise the sfx player. Sets initial priorities, volume balancce and initial SCC waveform.  Note : TriloTracker SFX replayer is ayFX bank format but use 2 bank entry for each Trilo SFX.  The first one describe the PSG part of the SFX and the second one the SCC part of the SFX.

TriloSFX_SetBank
inline void TriloSFX_SetBank(
const voidbank,
const voidwave
)

Set the current SFX bank data

Parameters
bank
const void*

Address of the ayFX bank data

wave
const void*

Address of the bank wave table

TriloSFX_GetNumber
inline u8 TriloSFX_GetNumber()

Get the number of SFX in the bank.

Return

Number of SFX in the bank.  Note: TriloTracker SFX replayer use 2 bank entry for each SFX so return size is half the ayFX bank size.

TriloSFX_SetBalanceSCC
void TriloSFX_SetBalanceSCC(
u8 vol
)

Set the main SFX volume for the SCC chip.

Parameters
vol
u8

Master volume (0-15) 0=silenced, 15=full volume.

TriloSFX_SetBalancePSG
void TriloSFX_SetBalancePSG(
u8 vol
)

Set the main SFXvolume for the PSG chip.

Parameters
vol
u8

Master volume (0-15) 0=silenced, 15=full volume.

TriloSFX_Play
void TriloSFX_Play(
u8 sfx,
u8 prio
)

Start a new SFX.

Parameters
sfx
u8

SFX index in the bank.

prio
u8

Sound priority (0 is lowest, 255 is highest).

TriloSFX_Update
void TriloSFX_Update()

Decode SFX streams.