sgdk
Loading...
Searching...
No Matches
xgm.h
Go to the documentation of this file.
1
13#ifndef _XGM_H_
14#define _XGM_H_
15
16
21u8 XGM_isPlaying(void);
34void XGM_startPlay(const u8 *song);
49void XGM_startPlay_FAR(const u8 *song, u32 size);
50
57void XGM_stopPlay(void);
67void XGM_pausePlay(void);
77void XGM_resumePlay(void);
78
98u8 XGM_isPlayingPCM(const u16 channel_mask);
117void XGM_setPCM(const u8 id, const u8 *sample, const u32 len);
135void XGM_setPCMFast(const u8 id, const u8 *sample, const u32 len);
140void XGM_setPCM_FAR(const u8 id, const u8 *sample, const u32 len);
145void XGM_setPCMFast_FAR(const u8 id, const u8 *sample, const u32 len);
164void XGM_startPlayPCM(const u8 id, const u8 priority, const u16 channel);
177void XGM_stopPlayPCM(const u16 channel);
178
187u32 XGM_getElapsed(void);
213void XGM_setMusicTempo(u16 value);
214
230void XGM_setManualSync(u16 value);
251#define XGM_nextFrame() XGM_nextXFrame(1)
258void XGM_nextXFrame(u16 num);
259
266void XGM_setLoopNumber(s8 value);
267
274void XGM_set68KBUSProtection(u8 value);
281bool XGM_getForceDelayDMA(void);
286void XGM_setForceDelayDMA(bool value);
287
299u32 XGM_getCPULoad(void);
300
301
302#endif // _XGM_H_
unsigned long u32
Definition types.h:105
char s8
Definition types.h:79
unsigned short u16
Definition types.h:100
unsigned char u8
Definition types.h:95
void XGM_set68KBUSProtection(u8 value)
Same as Z80_setBusProtection(..) (generic version of the method)
Definition xgm.c:392
void XGM_setMusicTempo(u16 value)
Set the music tempo (in tick per second). Default value is 60 or 50 depending the system is NTSC or ...
Definition xgm.c:438
void XGM_setPCMFast(const u8 id, const u8 *sample, const u32 len)
Same as XGM_setPCM but fast version. This method assume that XGM driver is loaded and that 68000 has...
Definition xgm.c:272
void XGM_stopPlay(void)
Stop playing music (XGM music player driver).
Definition xgm.c:144
void XGM_setPCMFast_FAR(const u8 id, const u8 *sample, const u32 len)
Same as XGM_setPCMFast(..) allowing PCM access through bank switch.
Definition xgm.c:300
u8 XGM_isPlayingPCM(const u16 channel_mask)
Return play status of specified PCM channel (XGM music player driver).
Definition xgm.c:232
void XGM_resumePlay(void)
Resume playing music after pausing with XGM_pausePlay (XGM music player driver). Note that due to th...
Definition xgm.c:205
u8 XGM_isPlaying(void)
Returns play music state (XGM music player driver).
Definition xgm.c:48
void XGM_startPlay_FAR(const u8 *song, u32 size)
Same as XGM_startPlay(..) except it supports music accessible through bank switch.
Definition xgm.c:139
u32 XGM_getCPULoad(void)
Returns an estimation of the Z80 CPU load (XGM driver). The low 16 bits returns the estimated Z80 CP...
Definition xgm.c:480
void XGM_stopPlayPCM(const u16 channel)
Stop play PCM on specified channel (XGM music player driver). No effect if no sample was currently p...
Definition xgm.c:342
void XGM_startPlayPCM(const u8 id, const u8 priority, const u16 channel)
Play a PCM sample on specified channel (XGM music player driver). If a sample was currently playing ...
Definition xgm.c:314
u32 XGM_getElapsed(void)
Return the elapsed play time since the last XGM_startPlay(..) call. The returned value is in music f...
Definition xgm.c:445
void XGM_startPlay(const u8 *song)
Start playing the specified XGM track (XGM music player driver).
Definition xgm.c:72
void XGM_pausePlay(void)
Pause playing music, music can be resumed by calling XGM_resumePlay (XGM music player driver)....
Definition xgm.c:181
void XGM_setPCM(const u8 id, const u8 *sample, const u32 len)
Declare a new PCM sample (maximum = 255) for the XGM music player driver. Sample id < 64 are reserve...
Definition xgm.c:256
void XGM_setPCM_FAR(const u8 id, const u8 *sample, const u32 len)
Same as XGM_setPCM(..) allowing PCM access through bank switch.
Definition xgm.c:284
bool XGM_getForceDelayDMA(void)
Same as Z80_getForceDelayDMA() (generic version of the method)
Definition xgm.c:423
u16 XGM_getManualSync(void)
Returns manual sync mode state of XGM driver (by default auto sync is used).
Definition xgm.c:398
void XGM_setLoopNumber(s8 value)
Set the loop number for music with loop command. Default value is -1 for pseudo unfinite (255) loops...
Definition xgm.c:370
void XGM_setManualSync(u16 value)
Set manual sync mode of XGM driver (by default auto sync is used).
Definition xgm.c:403
void XGM_setForceDelayDMA(bool value)
Same as Z80_getForceDelayDMA(..) (generic version of the method)
Definition xgm.c:428
void XGM_nextXFrame(u16 num)
Same as XGM_nextFrame() except you can specify the numer of frame.
Definition xgm.c:589
u16 XGM_getMusicTempo(void)
Get the current music tempo (in tick per second). Default value is 60 or 50 depending the system is ...
Definition xgm.c:433