NY6 User Manual
Ver 1.3 2019/03/28
40
3.16.3 CHNM
The CHNM register is a channel selector that specifies which voice or MIDI channel will be referred to
by the subsequently channel related register control or instruction execution. Before accessing the
channel related registers or executing the channel related instructions, the CHNM register should be set
correctly by instruction CHNO. The channel related registers include the ENV[7:0] and the DECMDx in
SFR[0x7/0x8]. These registers have individual register settings for each channel. The channel related
instructions include the PLAY, LDSEC, STOP, SNP, SP, SNHP, LDEN, RBEN and LDPH instructions.
The CHNM register is also used to specify the data or voice pointer register to be utilized by the LDPR,
RDN, RDNI, RBPR, RBNVPR and RBVPR instructions. In NY6 chip, there are total 8 register locations
shared by the data pointer registers and stack registers. The usage of stack registers grows from
location 0x7 toward location 0x0 and the usage of data pointer registers should grow in the opposite
direction.
3.16.4 ENV
This register is used to set the output voice envelope value (0x00 ~ 0xFF). Therefore digital volume of
each channel is also controlled by 8-bit envelope. The channel to apply envelope setting is selected is
by instruction LDEN, and the ENV will be loaded by RPT[7:0] (RPT1, RPT0). Also ENV is able to read
back by instruction RBEN, and the RPT[7:0] is the register which saves envelope value. Note that the
envelope data is a set of data dedicated for individual channel, that means the referenced channel has
to be chosen before load or read back envelope date from ENV register toward/backward RPT[7:0].
3.16.5 Head Play Flag
HPF flag of a specific channel reflects the playback status of Head waveform at this specific channel,
which can be Channel 0 to Channel 5. Therefore HPF flag is only associated with Head waveform.
When HPF flag of a specific channel is 0, it means playback at this specific channel is completed. When
HPF flag of a specific channel is 1, it means playback at this specific channel is on-going. The specific
channel is determined by executing instruction CHNO and the ACC register should be written for
CHNM. Users can obtain the status of HPF flag by instruction SNHP.
3.16.6 Play Flag
PFLG flag of a specific channel reflects the playback status of Head waveform or Tail waveform at this
specific channel, which can be Channel 0 to Channel 5. Therefore PFLG flag is associated with Head
waveform and Tail waveform. As long as either Head waveform is playing or Tail waveform is playing,
PFLG flag of this specific channel will be 1. When Head waveform is end of play and Tail waveform is
end of play, PFLG flag of this specific channel will be 0.