From 60f56c43c769f39089f5005f736a06aacd393224 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Wed, 18 Jan 2023 11:55:52 +0100 Subject: [PATCH] some documentation fixes --- doc/funcref.sgml | 11 +++++++---- libsrc/atari/sound.s | 6 ++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/funcref.sgml b/doc/funcref.sgml index 2df86289e..6418723b5 100644 --- a/doc/funcref.sgml +++ b/doc/funcref.sgml @@ -1114,18 +1114,21 @@ considered random to a certain degree. / - +The function is available only as a fastcall function; so, it may be used +only in the presence of a prototype. The function is specific to the Atari 8 bit. Voice can be any of 0-3 different sound channels. Pitch goes from 0-255 (about 125 Hz to 32 Khz). Distortion (0-14) uses poly dividers to reshape wave in order to create a noise effect. Use 10 for a "pure" square-wave sound. Volume (0-15) is the intensity for the wave. Extra bits in those parameters will be ignored. +Parameters are the same as for the AtariBASIC SOUND statement. - @@ -4186,7 +4189,7 @@ be used in presence of a prototype. chdir (getdevicedir (device, buf, sizeof buf)); -cf. diff --git a/libsrc/atari/sound.s b/libsrc/atari/sound.s index 0d2362318..a8d11fd82 100644 --- a/libsrc/atari/sound.s +++ b/libsrc/atari/sound.s @@ -2,14 +2,16 @@ ; Mariano Domínguez ; 2022-12-4 ; -; atari lib +; this file provides an equivalent to the BASIC SOUND function +; +; void __fastcall__ _sound (unsigned char voice, unsigned char frequency, unsigned char distortion, unsigned char volume); ; .include "atari.inc" .export __sound .import popa .importzp tmp1,tmp2 -; play sound, arguments: voice, pitch, distortion, volume. same as BASIC +; play sound, arguments: voice, pitch, distortion, volume .proc __sound sta tmp2 ;save volume jsr popa ;get distortion