Fixed the descriptions of the Creativision's functions.

Fixed bios_playsound()'s position in the alphabetical list of functions.
This commit is contained in:
Greg King
2021-05-29 08:53:13 -04:00
parent 6bedade593
commit c0f29993e0

View File

@@ -1669,41 +1669,6 @@ used in presence of a prototype.
</quote> </quote>
<sect1>bios_playsound<label id="bios_playsound"><p>
<quote>
<descrip>
<tag/Function/Play sound sequence.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void __fastcall__ bios_playsound(void *a, unsigned char b);/
<tag/Description/The function may play chords based on a BASIC statement,
note and duration are defined in the manual chapter 13 on page 102 resp. 103.
<tag/Notes/<itemize>
<item>BASIC has a fixed tempo of 18.
<item>The function is only available as fastcall function, so it may only be
used in presence of a prototype.
</itemize>
<tag/Availability/Creativision
<tag/See also/
<ref id="psg_delay" name="psg_delay">,
<ref id="psg_outb" name="psg_outb">
<tag/Example/
<verb>
static const unsigned char notes[] = {
0x77, 0x4F, 0x37,
0x4B, 0x05, 0xBB,
0x4F, 0x27, 0x83,
0x93, 0x9B, 0x93,
0x17, 0x4F, 0x96,
0xAB, 0x17, 0x4F,
0x0E
};
bios_playsound (notes, sizeof notes);
</verb>
</descrip>
</quote>
<sect1>bgcolor<label id="bgcolor"><p> <sect1>bgcolor<label id="bgcolor"><p>
<quote> <quote>
@@ -1729,6 +1694,44 @@ used in presence of a prototype.
</quote> </quote>
<sect1>bios_playsound<label id="bios_playsound"><p>
<quote>
<descrip>
<tag/Function/Play a sequence of musical notes.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void __fastcall__ bios_playsound (const void *a, unsigned char b);/
<tag/Description/The function plays chords based on a BASIC statement. Notes and
durations are defined in the BASIC manual, chapter 13 on pages 102 resp. 103.
<tag/Notes/<itemize>
<item>BASIC has a fixed tempo of 18.
<item>The function is only available as fastcall function, so it may only be
used in presence of a prototype.
</itemize>
<tag/Availability/cc65
<tag/See also/
<ref id="psg_delay" name="psg_delay">,
<ref id="psg_outb" name="psg_outb">
<tag/Example/<verb>
#include <creativision.h>
void main (void)
{
static const unsigned char notes[] = {
0x77, 0x4F, 0x37,
0x4B, 0x05, 0xBB,
0x4F, 0x27, 0x83,
0x93, 0x9B, 0x93,
0x17, 0x4F, 0x96, // played backwards
0xAB, 0x17, 0x4F, // three-note chords
0x0E // tempo
};
bios_playsound (notes, sizeof notes);
}
</verb>
</descrip>
</quote>
<sect1>bordercolor<label id="bordercolor"><p> <sect1>bordercolor<label id="bordercolor"><p>
<quote> <quote>
@@ -1823,7 +1826,7 @@ be used in presence of a prototype.
<item>The function is specific to the C128. <item>The function is specific to the C128.
<item>The function will not return to the caller. <item>The function will not return to the caller.
</itemize> </itemize>
<tag/Availability/C128 <tag/Availability/cc65
<tag/Example/None. <tag/Example/None.
</descrip> </descrip>
</quote> </quote>
@@ -5827,7 +5830,7 @@ notes should last.
<item>The function is only available as fastcall function, so it may only be <item>The function is only available as fastcall function, so it may only be
used in presence of a prototype. used in presence of a prototype.
</itemize> </itemize>
<tag/Availability/Creativision <tag/Availability/cc65
<tag/See also/ <tag/See also/
<ref id="psg_outb" name="psg_outb">, <ref id="psg_outb" name="psg_outb">,
<ref id="psg_silence" name="psg_silence"> <ref id="psg_silence" name="psg_silence">
@@ -5840,23 +5843,29 @@ used in presence of a prototype.
<quote> <quote>
<descrip> <descrip>
<tag/Function/Output a byte. <tag/Function/Output a byte to the PSG.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/ <tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void __fastcall__ psg_outb (unsigned char b);/ <tag/Declaration/<tt/void __fastcall__ psg_outb (unsigned char b);/
<tag/Description/The function will send a PSG byte and wait for acknowledge. <tag/Description/The function sends a byte to the Programmable Sound
Generator, then waits for the PSG to acknowledge.
<tag/Notes/<itemize> <tag/Notes/<itemize>
<item>The function is only available as fastcall function, so it may only be <item>The function is only available as fastcall function, so it may only be
used in presence of a prototype. used in presence of a prototype.
</itemize> </itemize>
<tag/Availability/Creativision <tag/Availability/cc65
<tag/See also/ <tag/See also/
<ref id="psg_delay" name="psg_delay">, <ref id="psg_delay" name="psg_delay">,
<ref id="psg_silence" name="psg_silence"> <ref id="psg_silence" name="psg_silence">
<tag/Example/ <tag/Example/<verb>
<verb> #include <creativision.h>
void main (void)
{
psg_outb (0x80); // Latch frequency psg_outb (0x80); // Latch frequency
psg_outb (0x07); // Frequency byte 2 psg_outb (0x07); // Frequency byte 2
psg_outb (0x90); // Channel 0 full volume psg_outb (0x90); // Channel 0 full volume
psg_delay (100);
psg_silence ();
}
</verb> </verb>
</descrip> </descrip>
</quote> </quote>
@@ -5866,13 +5875,14 @@ psg_outb (0x90); // Channel 0 full volume
<quote> <quote>
<descrip> <descrip>
<tag/Function/Set volume off on each channel. <tag/Function/Set volume off on each PSG channel.
<tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/ <tag/Header/<tt/<ref id="creativision.h" name="creativision.h">/
<tag/Declaration/<tt/void psg_silence (void);/ <tag/Declaration/<tt/void psg_silence (void);/
<tag/Description/The function sends $9F, $BF, $DF, $FF to the PSG. <tag/Description/The function resets the Programmable Sound Generator,
then sends $9F, $BF, $DF, $FF to the PSG.
<tag/Notes/<itemize> <tag/Notes/<itemize>
</itemize> </itemize>
<tag/Availability/Creativision <tag/Availability/cc65
<tag/See also/ <tag/See also/
<ref id="psg_delay" name="psg_delay">, <ref id="psg_delay" name="psg_delay">,
<ref id="psg_outb" name="psg_outb"> <ref id="psg_outb" name="psg_outb">