MEGA65 / mega65-user-guide

MEGA65 User Guide
73 stars 49 forks source link

Document VOL <a>,<b> #596

Closed dansanderson closed 4 months ago

dansanderson commented 4 months ago

The VOL command is currently documented as only accepting one argument to set the volume system-wide. It actually accepts two arguments, one for the SIDs 1+2 (default pan right) and another for SIDs 3+4 (default pan left). Either argument can be omitted.

VOL 10
VOL 10,5
VOL ,5

An argument could be made that we should update the implementation to match the documentation. The C65 documentation suggests that a single system-wide volume was the original intent, but "THIS COMMAND WILL CHANGE" and "all 3 voices," plus the existing ROM code, make this intent ambiguous. :sweat_smile:

VOL -- Set audio volume level

                              VOL volume

                  [*** THIS COMMAND WILL CHANGE ***]

This statement sets the volume level for SOUND and PLAY statements.

VOLUME  can  be  set  from  0 to 15, where 15 is the maximum volume. A
volume  of  0  turns  sound  output off.  VOLume affects all 3 voices.
Note that PLAY strings can change the volume, too.