diff options
| author | Javier Degirolmo | 2012-08-27 07:58:24 -0300 |
|---|---|---|
| committer | Javier Degirolmo | 2012-08-27 07:58:24 -0300 |
| commit | 6266e3e5577bc7c11d300a873c150b6a7900376a (patch) | |
| tree | 82b14ee437f6f802cd5cd896dd66c58c29ea7ec0 /c/README | |
| parent | 2f83b4822b5825d58ab4a74e4e9e5f0be2cc78f2 (diff) | |
Fuck it, we're doing it live
Diffstat (limited to 'c/README')
| -rw-r--r-- | c/README | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/c/README b/c/README deleted file mode 100644 index 63a0c59..0000000 --- a/c/README +++ /dev/null @@ -1,100 +0,0 @@ -Quick readme that's going to be here until proper documentation is made. - -Echo is licensed under the zlib license. Feel free to use it as long as you -don't claim you made Echo (no credit needed though). If you modify it don't -claim it's vanilla Echo either :P - -THIS CODE HAS NOT BEEN TESTED YET. I CURRENTLY DON'T HAVE ANY C DEVKIT TO -VERIFY IT WORKS FINE. I HAVE DONE AS MANY CHECKS AS POSSIBLE (AND IT -DEFINITELY SHOULD BUILD) BUT I NEED REPORTS TO KNOW IF IT'S WORKING AS -EXPECTED. SORRY FOR THE INCONVENIENCE. - -============================================================================= - -To include Echo in your program, you need to include echo.c, echo.h and -echoblob.h in it (and yes, you can put echo.h as a system file if you want). -That's pretty much it. - -To access the Echo stuff, include echo.h in the source files that need to -make use of it. It contains all the function definitions and such, as well as -the macros needed to make the instrument list. - -echoblob.h is already included here, but if you want to use a different Z80 -blob from the included one, you can use the blob2c tool. It's a command line -tool and its usage is pretty simple: blob2c «input.bin» «output.c» - -============================================================================= - -Echo makes use of an instrument list. In the case of the C version of Echo, -you need to make a null-terminated pointer list, e.g. as follows: - -const void *list[] = { - instrument1, - instrument2, - instrument3, - instrument4, - instrument5, - NULL -}; - -Where 'list' is the name the list will have. This is the same name you have -to pass to echo_init(). 'instrument1' etc. are pointers to the data of each -instrument (EIF, EEF, EWF). - -If NULL isn't defined for whatever reason either include stddef.h or just use -0 instead (which is the same value). - -============================================================================= - -Quick overview of the functions. The functions map 1:1 to their asm -counterparts, by the way. - - echo_init(list) - - Initializes Echo. 'list' is a pointer to the instrument list (pass here - the name you passed to ECHO_LIST_START). Make sure to call this before - doing anything else with Echo. - - echo_play_bgm(stream) - - Plays background music. 'stream' is a pointer to the ESF data. - - echo_stop_bgm() - - Stops background music playback. - - echo_resume_bgm() - - Resumes background music playback (useful for unpausing). - - echo_play_sfx(stream) - - Plays a sound effect. 'stream' is a pointer to the ESF data. - - echo_stop_sfx() - - Stops sound effect playback. - - echo_get_status() - - Gets the current status of Echo. It returns a value which is an OR of - the following flags (as appropriate): - - ECHO_STAT_BGM .... Background music is playing - ECHO_STAT_SFX .... Sound effect is playing - ECHO_STAT_BUSY ... Echo is busy (can't parse commands yet) - - And just to make it clear: if you send a command to Echo while it's - busy, it won't fail, it'll just make the 68000 wait until Echo is - ready. No need to explicitly check for it. Check this only if you want - to prevent the 68000 waiting. - - echo_send_command(command) - - Lets you send a raw command to Echo. Use this for commands not taking - parameters. - - echo_send_command_ex(command, address) - - Lets you send a raw command to Echo. Use this for commands that take an - address as a parameter. |
