Difference between revisions of "ADPCM Functions"
From Archaic Pixels
(→ADPCM Functions) |
(→ADPCM Functions) |
||
Line 5: | Line 5: | ||
{| | {| | ||
|- | |- | ||
− | ! void ad_reset(void); [b][ 3.02+ ][/b] | + | ! [color=green]void[/color] ad_reset([color=green]void[/color]); [b][ 3.02+ ][/b] |
|- | |- | ||
| | | | ||
Line 15: | Line 15: | ||
{| | {| | ||
|- | |- | ||
− | ! void ad_stop(void); [b][ 3.21+ ][/b] | + | ! [color=green]void[/color] ad_stop([color=green]void[/color]); [b][ 3.21+ ][/b] |
|- | |- | ||
| | | | ||
Line 25: | Line 25: | ||
{| | {| | ||
|- | |- | ||
− | ! int ad_stat(void); [b][ 3.21+ ][/b] | + | ! [color=blue]int[/color] ad_stat([color=green]void[/color]); [b][ 3.21+ ][/b] |
|- | |- | ||
| | | | ||
Line 36: | Line 36: | ||
{| | {| | ||
|- | |- | ||
− | ! ??? ad_trans(int ovl_index, int sect_offset, char nb_sectors, int ad_addr); [b][ 3.21+ ][/b] | + | ! ??? ad_trans([color=blue]int[/color] ovl_index, [color=blue]int[/color] sect_offset, [color=red]char[/color] nb_sectors, [color=blue]int[/color] ad_addr); [b][ 3.21+ ][/b] |
|- | |- | ||
| | | | ||
Line 54: | Line 54: | ||
{| | {| | ||
|- | |- | ||
− | ! ??? ad_read(int ad_addr, char mode, int buf, int bytes); [b][ 3.21+ ][/b] | + | ! ??? ad_read([color=blue]int[/color] ad_addr, [color=red]char[/color] mode, [color=blue]int[/color] buf, [color=blue]int[/color] bytes); [b][ 3.21+ ][/b] |
|- | |- | ||
| | | | ||
Line 73: | Line 73: | ||
{| | {| | ||
|- | |- | ||
− | ! ??? ad_write(int ad_addr, char mode, int buf, int bytes); [b][ 3.21+ ][/b] | + | ! ??? ad_write([color=blue]int[/color] ad_addr, [color=red]char[/color] mode, [color=blue]int[/color] buf, [color=blue]int[/color] bytes); [b][ 3.21+ ][/b] |
|- | |- | ||
| | | | ||
Line 91: | Line 91: | ||
{| | {| | ||
|- | |- | ||
− | ! ??? ad_play(int ad_addr, int bytes, char freq, char mode); [b][ 3.21+ ][/b] | + | ! ??? ad_play([color=blue]int[/color] ad_addr, [color=blue]int[/color] bytes, [color=red]char[/color] freq, [color=red]char[/color] mode); [b][ 3.21+ ][/b] |
|- | |- | ||
| | | |
Revision as of 12:59, 13 September 2010
Contents
ADPCM Functions
ad_reset
void ad_reset(void); [ 3.02+ ] |
---|
Resets ADPCM hardware. |
ad_stop
void ad_stop(void); [ 3.21+ ] |
---|
Stop playing adpcm. |
ad_stat
int ad_stat(void); [ 3.21+ ] |
---|
Returns current adpcm status. Return FALSE(0) if adpcm playing isn't in progress else non zero value. |
ad_trans
??? ad_trans(int ovl_index, int sect_offset, char nb_sectors, int ad_addr); [ 3.21+ ] |
---|
Transfer data from CDROM into adpcm buffer. Read it from the overlay segment specified by 'ovl_idx', with sector offset (ie. multiples of 2048 bytes) of 'sect_offset'. Read 'nb_sectors' sectors and store data into adpcm buffer starting from offset 'ad_addr'. Non-zero return values indicate errors. |
ad_read
??? ad_read(int ad_addr, char mode, int buf, int bytes); [ 3.21+ ] |
---|
Read data from the adpcm buffer. Read 'bytes' bytes starting at offset 'ad_addr' in adpcm buffer. The mode 'mode' determines the meaning of the 'buf' offset. Valid modes Meaning of 'buf' ----------- ---------------- 0 Offset in the mapped ram. 2-6 Directly into memory mapped to MMR #'mode' 0xFF Offset in video ram. Non-zero return values indicate errors. |
ad_write
??? ad_write(int ad_addr, char mode, int buf, int bytes); [ 3.21+ ] |
---|
Write data into the adpcm buffer. Write 'bytes' bytes starting at offset 'ad_addr' in adpcm buffer. The mode 'mode' determines the meaning of the 'buf' offset. Valid modes Meaning of 'buf' ----------- ---------------- 0 Offset in the mapped ram. 2-6 Directly into memory mapped to MMR #'mode' 0xFF Offset in video ram. Non-zero return values indicate errors. |
ad_play
??? ad_play(int ad_addr, int bytes, char freq, char mode); [ 3.21+ ] |
---|
Play adpcm sound from data loaded in the adpcm buffer. Start playing from 'ad_addr' offset in the adpcm buffer, for 'bytes' bytes. The frequency used for playback is computed from 'freq' using the following formula : real_frequency_in_khz = 32 / (16 - 'freq'). Valid range for 'freq' is 0-15. If bit 0 of 'mode' is on, values of 'ad_addr', 'bytes' and 'freq' from the previous ad_play call are reused. If bit 7 of 'mode' is on, playback loops instead of stopping at the end of the range. |