-

Changes

Jump to: navigation, search

LIBRARIES PUBLIC DOCUMENT MPK

54 bytes added, 18:05, 7 August 2017
m
no edit summary
Copy INST.BAT which is a bat file to attach functional object files of this library to appropriate library.
Object files of functions are appended to library file by typing
  >INST LibraryFileName 
from directory and drive which has functional objects and is
executable environment of LIBR.COM of HI-TECH C.
:Initializes MPK. This function should be called before execution of other functions.
:;char mpk_initplay(void *data);;:Initializes playing music. Call it with top address of music data as argument data. If it returns other than 0, error occurs. 1 means version error of data and 2 means other errors.
:;void mpk_stop(void);;:Stops playing music and initialize sound devices.
;void mpk_playspeed(char speed);
;unsigned long mpk_getchannel(void);
:Gets channel information which is used to play music.
:Bits of returned value means channels retrospectively.:Bit 0-1 means FM channel 0-8.:Bit 9-11 means PSG channel 1-3.
:Bit 12-16 means SCC channel 1-5.
:When musics are playing, every bits for used channel has 1.
:Bit 23 represents rhythm mode. 0 means FM 9 sound mode.
;void mpk_play(void);
:Gets values about playing information into mpkinfo structure. Mpkinfo structure is defined as below in MPK.H.
:MPK Version 0.99B or higher is needed to use this functions.
struct mpkinfo { unsigned int version; /* Version */ unsigned char m_version; /* Minor version */ unsigned char fm_slot; /* Slot number of FM */ unsigned char scc_slot; /* Slot number of SCC */ unsigned char *ver_mes; /* Address of version message */ unsigned char *play_info; /* Top address of playing information address */ };
:Refer MPK manual for details of each member.
:MPK Version 0.99B or higher is needed to use this functions.
:;void mpk_setchannel(unsigned long);,:Specifies playing or masking each channels by same format as return of mpk_getchannel function. Rhythm channel is specified by a bit of FM7. MPK Version 1.04 or higher is needed to use function.
==Limitation==

Navigation menu