Previous 199869 Revisions Next

r22769 Saturday 11th May, 2013 at 16:41:23 UTC by R. Belmont
ym2612: temporarily limit table lookup ranges (nw)
[src/emu/sound]fm2612.c

trunk/src/emu/sound/fm2612.c
r22768r22769
14471447      UINT32 fn  = block_fnum & 0xfff;
14481448
14491449      /* recalculate keyscale code */
1450      int kc = (blk<<2) | opn_fktable[fn >> 7];
1450      int kc = (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
14511451
14521452      /* recalculate (frequency) phase increment counter */
14531453      int fc = (OPN->fn_table[fn]>>(7-blk)) + SLOT->DT[kc];
r22768r22769
14791479      UINT32 fn  = block_fnum & 0xfff;
14801480
14811481      /* recalculate keyscale code */
1482      int kc = (blk<<2) | opn_fktable[fn >> 7];
1482      int kc = (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
14831483
14841484      /* recalculate (frequency) phase increment counter */
14851485      int fc = (OPN->fn_table[fn]>>(7-blk));
r22768r22769
19151915            UINT32 fn = (((UINT32)( (OPN->ST.fn_h)&7))<<8) + v;
19161916            UINT8 blk = OPN->ST.fn_h>>3;
19171917            /* keyscale code */
1918            CH->kcode = (blk<<2) | opn_fktable[fn >> 7];
1918            CH->kcode = (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
19191919            /* phase increment counter */
19201920            CH->fc = OPN->fn_table[fn*2]>>(7-blk);
19211921
r22768r22769
19341934            UINT32 fn = (((UINT32)(OPN->SL3.fn_h&7))<<8) + v;
19351935            UINT8 blk = OPN->SL3.fn_h>>3;
19361936            /* keyscale code */
1937            OPN->SL3.kcode[c]= (blk<<2) | opn_fktable[fn >> 7];
1937            OPN->SL3.kcode[c]= (blk<<2) | opn_fktable[(fn >> 7) & 0xf];
19381938            /* phase increment counter */
19391939            OPN->SL3.fc[c] = OPN->fn_table[fn*2]>>(7-blk);
19401940            OPN->SL3.block_fnum[c] = (blk<<11) | fn;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team