mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
ym2612: temporarily limit table lookup ranges (nw)
This commit is contained in:
parent
89652f00ef
commit
c0dd40be90
@ -1447,7 +1447,7 @@ INLINE void update_phase_lfo_slot(FM_OPN *OPN, FM_SLOT *SLOT, INT32 pms, UINT32
|
||||
UINT32 fn = block_fnum & 0xfff;
|
||||
|
||||
/* recalculate keyscale code */
|
||||
int kc = (blk<<2) | opn_fktable[fn >> 7];
|
||||
int kc = (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
|
||||
|
||||
/* recalculate (frequency) phase increment counter */
|
||||
int fc = (OPN->fn_table[fn]>>(7-blk)) + SLOT->DT[kc];
|
||||
@ -1479,7 +1479,7 @@ INLINE void update_phase_lfo_channel(FM_OPN *OPN, FM_CH *CH)
|
||||
UINT32 fn = block_fnum & 0xfff;
|
||||
|
||||
/* recalculate keyscale code */
|
||||
int kc = (blk<<2) | opn_fktable[fn >> 7];
|
||||
int kc = (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
|
||||
|
||||
/* recalculate (frequency) phase increment counter */
|
||||
int fc = (OPN->fn_table[fn]>>(7-blk));
|
||||
@ -1915,7 +1915,7 @@ static void OPNWriteReg(FM_OPN *OPN, int r, int v)
|
||||
UINT32 fn = (((UINT32)( (OPN->ST.fn_h)&7))<<8) + v;
|
||||
UINT8 blk = OPN->ST.fn_h>>3;
|
||||
/* keyscale code */
|
||||
CH->kcode = (blk<<2) | opn_fktable[fn >> 7];
|
||||
CH->kcode = (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
|
||||
/* phase increment counter */
|
||||
CH->fc = OPN->fn_table[fn*2]>>(7-blk);
|
||||
|
||||
@ -1934,7 +1934,7 @@ static void OPNWriteReg(FM_OPN *OPN, int r, int v)
|
||||
UINT32 fn = (((UINT32)(OPN->SL3.fn_h&7))<<8) + v;
|
||||
UINT8 blk = OPN->SL3.fn_h>>3;
|
||||
/* keyscale code */
|
||||
OPN->SL3.kcode[c]= (blk<<2) | opn_fktable[fn >> 7];
|
||||
OPN->SL3.kcode[c]= (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
|
||||
/* phase increment counter */
|
||||
OPN->SL3.fc[c] = OPN->fn_table[fn*2]>>(7-blk);
|
||||
OPN->SL3.block_fnum[c] = (blk<<11) | fn;
|
||||
|
Loading…
Reference in New Issue
Block a user