4. JAM api description


Now we have to learn how to talk with loaded plugin. Here are the enums for different commands:

Jam commands
enum _JamMsg{ JAM_INFO=1, JAM_INIT=2, JAM_ACTIVATE=3, JAM_SONGSELECT=4, JAM_SONGINFO=5, JAM_PLAY=6, JAM_STOP=7, JAM_DEACTIVATE=8, JAM_DEINIT=9, JAM_SONG_NEXT_HOOK=0xA, JAM_LOG_HOOK=0xB, JAM_ALERT_HOOK=0xC } eJamMsg;


We send them with following function:

C function declaration (jam.h)
extern void *sendJamCmd(void *par0,void *par1,long msg,long val); extern void *activePlugin; /*pointer to our loaded plugin defined in m68k module below */


M68k implementation:

jam_m68k.s
XDEF _sendJamCmd XREF _activePlugin _sendJamCmd: move.l 4(sp),a0 ;data pointer move.l 8(sp),a1 ;data pointer move.l 12(sp),d1 ;MSG move.l 16(sp),d0 ;parameter move.l _activePlugin,a2 jsr (a2) move.l a0,d0 ;return value to d0 rts BSS _activePlugin: ds.l 1



page:3/8