|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
Data Structures | |
| struct | module |
| struct | voice |
| struct | modsampinfo |
| struct | modsample |
| struct | modhead |
Macros | |
| #define | __NOLIBBASE__ |
| #define | INTLEVEL 0x8025 |
| #define | CIAAPRA (*(volatile UBYTE *)0xbfe001) |
| #define | mt_samplestarts mt.samplestarts |
| #define | mt_voices mt.voices |
| #define | RW(r, o) |
| #define | RL(r, o) |
| #define | SINFO(off, f) |
Functions | |
| void | doplaymod (void) |
| void | b_doplaymod (void) |
| void | dostopmod (void) |
| void | b_dostopmod (void) |
| void | trackerlib_codefinit (void) |
| void | freemod (void) |
| void | freemod_b (void) |
| void | myint (void) |
| void | playchk (void) |
| static void | mt_delay (void) |
| static void | mt_init (ULONG len) |
| static void | mt_end (void) |
| static void | mt_arpeggio (struct voice *v, ULONG aud) |
| static void | mt_setmyport (struct voice *v) |
| static void | mt_myport (struct voice *v, ULONG aud) |
| static void | mt_vib (struct voice *v, ULONG aud) |
| static void | mt_volslide (struct voice *v, ULONG aud) |
| static void | mt_portup (struct voice *v, ULONG aud) |
| static void | mt_portdown (struct voice *v, ULONG aud) |
| BL_ALWAYS_INLINE void | mt_checkcom (struct voice *v, ULONG aud) |
| BL_ALWAYS_INLINE void | mt_checkcom2 (struct voice *v, ULONG aud) |
| BL_ALWAYS_INLINE void | mt_playvoice (struct voice *v, ULONG aud, const UBYTE *note, const UBYTE *sinfo) |
| static void | mt_music (void) |
| static void | myint_c (void) |
| void | doloadmod (const UBYTE *name, struct DosLibrary *DOSBase) |
| LoadModule Module#,Filename$ - load a Sound/NoiseTracker module into chip memory (Amiga mode only). | |
| static void | freemod2 (struct module *m, int blitz) |
| static void | stopmod2 (int blitz) |
| static void | playmod2 (int blitz) |
| static void | doplaymod_a (void) |
| PlayModule Module# - start playing a module (Amiga / Blitz mode variant). | |
| static void | doplaymod_b (void) |
| PlayModule Module# - the Blitz mode variant (BLibJsr). | |
| static void | dostopmod_a (void) |
| StopModule - stop the module (Amiga mode variant; also the library's finit). | |
| static void | dostopmod_b (void) |
| StopModule - the Blitz mode variant (BLibJsr). | |
| static void | freemod_a (void) |
| Free Module (the object library's _free; Amiga / Blitz mode variant) - stop the module if it is playing, free its memory. | |
| static void | freemod_b_c (void) |
| BLITZ_ALIAS (b_doplaymod, doplaymod_b) | |
| BLITZ_ALIAS (b_dostopmod, dostopmod_b) | |
| static void | playchk_c (void) |
Variables | |
| static UBYTE * | mt_data |
| static UBYTE | mt_speed = 6 |
| static UBYTE | mt_songpos |
| static UWORD | mt_pattpos |
| static UBYTE | mt_counter |
| static UBYTE | mt_break |
| static UWORD | mt_dmacon |
| struct { | |
| UBYTE * samplestarts [31] | |
| struct voice voices [4] | |
| } | mt = { .voices = { { .dmabit = 1 }, { .dmabit = 2 }, { .dmabit = 4 }, { .dmabit = 8 } } } |
| static const UBYTE | mt_sin [32] |
| static const UWORD | mt_periods [38] |
| static const char | mess1 [] = "Error Accessing Module File" |
| const char | mess2 [] |
| #define __NOLIBBASE__ |
| #define CIAAPRA (*(volatile UBYTE *)0xbfe001) |
| #define INTLEVEL 0x8025 |
| #define mt_samplestarts mt.samplestarts |
| #define mt_voices mt.voices |
| #define RL | ( | r, | |
| o ) |
| #define RW | ( | r, | |
| o ) |
| #define SINFO | ( | off, | |
| f ) |
| void b_doplaymod | ( | void | ) |
| void b_dostopmod | ( | void | ) |
| BLITZ_ALIAS | ( | b_doplaymod | , |
| doplaymod_b | ) |
| BLITZ_ALIAS | ( | b_dostopmod | , |
| dostopmod_b | ) |
| void doloadmod | ( | const UBYTE * | name, |
| struct DosLibrary * | DOSBase ) |
LoadModule Module#,Filename$ - load a Sound/NoiseTracker module into chip memory (Amiga mode only).
Frees the old module (stopping it if it is playing), takes the length from Examine (FileInfoBlock from memlib), allocates chip memory and reads the file in one Read.
Errors: "Error Accessing Module File" (runtime error also without the debugger, its message in the normal code: fixed, #957) for a missing file or a directory, or when the file cannot be opened.
Fixed (#296): on that error the FileInfoBlock is freed and the lock released (the original kept both; a missing file was Examined with lock 0).
| void doplaymod | ( | void | ) |
|
static |
PlayModule Module# - start playing a module (Amiga / Blitz mode variant).
mt_init on the module (highest pattern, sample numbers above 31 cleared in the patterns, sample starts, clears the first long of each sample, filter off, speed 6), then the vertical blank interrupt (intlib SetInt $C100, level $8025; ALibJsr / BLibJsr) calls mt_music every frame. a3: the module object.
Errors (debugger, playchk): "Uninitialized Module".
|
static |
PlayModule Module# - the Blitz mode variant (BLibJsr).
| void dostopmod | ( | void | ) |
|
static |
StopModule - stop the module (Amiga mode variant; also the library's finit).
ClrInt $C101 (level $8025), then mt_end: volumes 0, audio DMA off.
|
static |
StopModule - the Blitz mode variant (BLibJsr).
| void freemod | ( | void | ) |
|
static |
|
static |
Free Module (the object library's _free; Amiga / Blitz mode variant) - stop the module if it is playing, free its memory.
a3: the module object.
| void freemod_b | ( | void | ) |
|
static |
|
static |
| BL_ALWAYS_INLINE void mt_checkcom | ( | struct voice * | v, |
| ULONG | aud ) |
| BL_ALWAYS_INLINE void mt_checkcom2 | ( | struct voice * | v, |
| ULONG | aud ) |
|
inlinestatic |
|
static |
|
static |
|
static |
|
static |
| BL_ALWAYS_INLINE void mt_playvoice | ( | struct voice * | v, |
| ULONG | aud, | ||
| const UBYTE * | note, | ||
| const UBYTE * | sinfo ) |
|
static |
|
static |
|
static |
|
static |
|
static |
| void myint | ( | void | ) |
|
static |
| void playchk | ( | void | ) |
|
static |
|
static |
|
static |
| void trackerlib_codefinit | ( | void | ) |
|
static |
|
extern |
| struct { ... } mt |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| UBYTE* samplestarts[31] |
| struct voice voices[4] |