mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
OPZ: more work
This commit is contained in:
parent
ad09254cf4
commit
dd6229a6b9
3 changed files with 8 additions and 5 deletions
|
@ -220,8 +220,8 @@ public:
|
|||
|
||||
// per-channel registers
|
||||
uint32_t ch_volume(uint32_t choffs) const { return byte(0x00, 0, 8, choffs); }
|
||||
uint32_t ch_output_any(uint32_t choffs) const { return byte(0x20, 7, 1, choffs) | byte(0x30, 0, 1, choffs); }
|
||||
uint32_t ch_output_0(uint32_t choffs) const { return byte(0x30, 0, 1, choffs); }
|
||||
uint32_t ch_output_any(uint32_t choffs) const { return 1; }
|
||||
uint32_t ch_output_0(uint32_t choffs) const { return byte(0x30, 0, 1, choffs) | (!byte(0x20, 7, 1, choffs)); }
|
||||
uint32_t ch_output_1(uint32_t choffs) const { return byte(0x20, 7, 1, choffs) | byte(0x30, 0, 1, choffs); }
|
||||
uint32_t ch_output_2(uint32_t choffs) const { return 0; }
|
||||
uint32_t ch_output_3(uint32_t choffs) const { return 0; }
|
||||
|
|
|
@ -490,6 +490,7 @@ int DivPlatformTX81Z::dispatch(DivCommand c) {
|
|||
case DIV_CMD_PANNING: {
|
||||
chan[c.chan].chVolL=((c.value>>4)>0);
|
||||
chan[c.chan].chVolR=((c.value&15)>0);
|
||||
chan[c.chan].freqChanged=true;
|
||||
/*
|
||||
if (isMuted[c.chan]) {
|
||||
rWrite(chanOffs[c.chan]+ADDR_LR_FB_ALG,(chan[c.chan].state.alg&7)|(chan[c.chan].state.fb<<3));
|
||||
|
|
|
@ -479,6 +479,7 @@ bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effe
|
|||
}
|
||||
|
||||
#define IS_YM2610 (sysOfChan[ch]==DIV_SYSTEM_YM2610 || sysOfChan[ch]==DIV_SYSTEM_YM2610_EXT || sysOfChan[ch]==DIV_SYSTEM_YM2610_FULL || sysOfChan[ch]==DIV_SYSTEM_YM2610_FULL_EXT || sysOfChan[ch]==DIV_SYSTEM_YM2610B || sysOfChan[ch]==DIV_SYSTEM_YM2610B_EXT)
|
||||
#define IS_OPM_LIKE (sysOfChan[ch]==DIV_SYSTEM_YM2151 || sysOfChan[ch]==DIV_SYSTEM_OPZ)
|
||||
|
||||
bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char effectVal) {
|
||||
switch (sysOfChan[ch]) {
|
||||
|
@ -491,9 +492,10 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
|
|||
case DIV_SYSTEM_YM2610_FULL_EXT:
|
||||
case DIV_SYSTEM_YM2610B:
|
||||
case DIV_SYSTEM_YM2610B_EXT:
|
||||
case DIV_SYSTEM_OPZ:
|
||||
switch (effect) {
|
||||
case 0x10: // LFO or noise mode
|
||||
if (sysOfChan[ch]==DIV_SYSTEM_YM2151) {
|
||||
if (IS_OPM_LIKE) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_STD_NOISE_FREQ,ch,effectVal));
|
||||
} else {
|
||||
dispatchCmd(DivCommand(DIV_CMD_FM_LFO,ch,effectVal));
|
||||
|
@ -520,12 +522,12 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
|
|||
}
|
||||
break;
|
||||
case 0x17: // arcade LFO
|
||||
if (sysOfChan[ch]==DIV_SYSTEM_YM2151) {
|
||||
if (IS_OPM_LIKE) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_FM_LFO,ch,effectVal));
|
||||
}
|
||||
break;
|
||||
case 0x18: // EXT or LFO waveform
|
||||
if (sysOfChan[ch]==DIV_SYSTEM_YM2151) {
|
||||
if (IS_OPM_LIKE) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_FM_LFO_WAVE,ch,effectVal));
|
||||
} else {
|
||||
dispatchCmd(DivCommand(DIV_CMD_FM_EXTCH,ch,effectVal));
|
||||
|
|
Loading…
Reference in a new issue