mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 07:38:05 -04:00
sound: fix ym2612 freq latch
there is only a single register, as described in: http://www.mjsstuf.x10host.com/pages/vgmPlay/vgmPlay.htm
This commit is contained in:
parent
ca980e1b0a
commit
68e06234e3
2 changed files with 6 additions and 5 deletions
|
@ -1671,8 +1671,8 @@ static int OPNWriteReg(int r, int v)
|
|||
switch( OPN_SLOT(r) ){
|
||||
case 0: /* 0xa0-0xa2 : FNUM1 | depends on fn_h (below) */
|
||||
{
|
||||
UINT32 fn = (((UINT32)( (CH->fn_h)&7))<<8) + v;
|
||||
UINT8 blk = CH->fn_h>>3;
|
||||
UINT32 fn = ((UINT32)(ym2612.OPN.ST.fn_h & 7) << 8) | v;
|
||||
UINT8 blk = ym2612.OPN.ST.fn_h >> 3;
|
||||
/* keyscale code */
|
||||
CH->kcode = (blk<<2) | opn_fktable[fn >> 7];
|
||||
/* phase increment counter */
|
||||
|
@ -1685,7 +1685,7 @@ static int OPNWriteReg(int r, int v)
|
|||
}
|
||||
break;
|
||||
case 1: /* 0xa4-0xa6 : FNUM2,BLK */
|
||||
CH->fn_h = v&0x3f;
|
||||
ym2612.OPN.ST.fn_h = v & 0x3f;
|
||||
ret = 0;
|
||||
break;
|
||||
case 2: /* 0xa8-0xaa : 3CH FNUM1 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue