This instruction is available in MSX-AUDIO Basic and MSX-MUSIC Basic.
Contents |
Effect
Writes a value directly to a register of the sound chip.
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>)
The last parameter is optional. Parameters can not end with a comma alone.
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