Difference between revisions of "Modules/trilo/trilo scc player"

From MSX Game Library

< Modules

 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
The {{MOD|trilo_scc_player}} module handle the playback of [http://trilobyte-msx.com/TriloTracker/index.php/Main_Page TriloTracker] SCC musics and SFX.
+
{{MODULE
 
+
|name=trilo/trilo_scc_player
== Dependencies ==
+
|category=Audio
* ''None''
+
|image=
 
+
|dependency1=
== Settings ==
+
|dependency2=
* <tt>TRILO_USE_SFXPLAY/tt>: Add support for SFX playback (default: 1)
+
|dependency3=
* <tt>TRILO_USE_TREMOLO/tt>: Add support for tremolo effect (default: 1)
+
|sample1=s_trilo
* <tt>TRILO_USE_TAIL/tt>: Force volume to don't fall to 0 (default: 0)
+
|sample2=
 
+
|sample3=
== Usage ==
+
}}
 
 
Original musics are in TMU format and have to be converted to ASM format first. Use tmucompiler to gegnerate assembler file (the script convert TMU to ASM, then convert ASM to be supported by SDCC assembler, sdasz80).
 
 
 
SCC sound chip is visible to CPU through bank #2 (address 8000h to 9FFFh). As player have to switch this bank to SCC,  both the TriloTracker player and the music data must be in another bank.
 
 
 
Adding trilo_scc_player module in front of the modules list allow to put it in bank #0 or #1. Then
 

Latest revision as of 23:10, 15 January 2024

trilo/trilo_scc_player

Code: trilo/trilo_scc_player.h

Category: Audio

Dependencies: None

Samples:

The trilo_scc_player module lets you play music (using both PSG and SCC) and sound effects in Trilo Tracker format.

Usage

To use this module, include "trilo/trilo_scc_player.h" in your source code, and add "trilo/trilo_scc_player" to the modules list (LibModules) in your project's configuration file (project_config.js).

Music

Original TriloTracker music are in TMU format and have to be converted to ASM format first. Use tools/audio/trilo/tmucompile.bat script to generate the assembler file (the script convert TMU to ASM, then convert ASM to be supported by SDCC assembler, sdasz80).

The music have then to be add to program to be compiled together (music data format include global address, not relative ones). You can either include the ASM file music in an assembler segment, or you can use the INCLUDE_ASM() macro to include it into a C source.

Program

The current version of the module only support program on a SCC cartridge (mapped-ROM using ROM_KONAMI_SCC mapper).

SCC sound chip is visible to CPU through bank #2 (address 8000h to 9FFFh). As player have to switch this bank to SCC during playback, both the TriloTracker player and the music data must be in another bank.

Adding trilo_scc_player module in front of the modules list allow to put it in bank #0. Then, I advise you to put your music in the bank #3 (a classical bank to switch mapped-ROM segment).

Samples

See module use cases in the sample programs:

Settings

Library configuration (msxgl_config.h):

// TriloTracker options
#define TRILO_USE_SFXPLAY	TRUE	// Add SFX playback through Trilo SCC player (ayFX + SCC format)
#define TRILO_USE_TREMOLO	TRUE	// Add support for tremolo effect (little bit expensive)
#define TRILO_USE_TAIL		FALSE	// Add tail to prevent volume to fall to zero

Dependencies

Dependency on other modules: None

Documentation