CALL AUDREG
This page was last modified 10:01, 11 September 2019 by Mars2000you. Based on work by Gdx and NYYRIKKI.

This instruction is available in MSX-AUDIO Basic and MSX-MUSIC Basic.

Contents

Effect

Writes a value directly to music chip register.

Notes:

  • This instruction may not be effective to a register frequently written by the system software, for example by interrupts
  • In some cases, a system restarting may be necessary to execute this instruction
  • This instruction can't be used for MSX-MIDI

Syntax

CALL AUDREG (<register>, <value>[,<channel>])

Parameters

<register> is a value of OPLL/OPL1 register.

Valid values for MSX-MUSIC (OPLL) are 0 to 7, 14 to 24, 32 to 40 and 48 to 56.

Valid values for MSX-AUDIO (OPL1) are 1 to to 18, 21 to 26, 32 to 53, 64 to 85, 96 to 117, 128 to 149, 160 to 168, 176 to 184, 189 and 192 to 200.

<value> is 8-bit value to be written (between 0 and 255)

<channel> is optional, it specifies the channel to be used (0 or 1). It's useful only for MSX-AUDIO. When omitted, channel 0 will be used.

Example

CALL AUDREG (0,255)

Related to

CALL APEEK, CALL APOKE, PLAY, MSX-MUSIC programming

Compatibility

MSX-AUDIO BASIC, MSX-MUSIC BASIC