mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-26 11:11:48 +01:00
Nuked OPN2: Fix LFO PM
This commit is contained in:
parent
3d8bd155a7
commit
13ab2aafbc
@ -39,7 +39,7 @@
|
||||
* OPLx decapsulated(Matthew Gambrell, Olli Niemitalo):
|
||||
* OPL2 ROMs.
|
||||
*
|
||||
* version: 1.0.2
|
||||
* version: 1.0.3
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -488,9 +488,9 @@ void OPN2_PhaseCalcIncrement(ym3438_t *chip)
|
||||
lfo_l ^= 0x0f;
|
||||
}
|
||||
fm = (fnum_h >> pg_lfo_sh1[pms][lfo_l]) + (fnum_h >> pg_lfo_sh2[pms][lfo_l]);
|
||||
if (lfo_l > 5)
|
||||
if (pms > 5)
|
||||
{
|
||||
fm <<= 7 - lfo_l;
|
||||
fm <<= pms - 5;
|
||||
}
|
||||
fm >>= 2;
|
||||
if (lfo & 0x10)
|
||||
@ -554,11 +554,11 @@ void OPN2_PhaseGenerate(ym3438_t *chip)
|
||||
void OPN2_EnvelopeSSGEG(ym3438_t *chip)
|
||||
{
|
||||
Bit32u slot = chip->slot;
|
||||
Bit8u direction = 0;
|
||||
chip->eg_ssg_pgrst_latch[slot] = 0;
|
||||
chip->eg_ssg_repeat_latch[slot] = 0;
|
||||
chip->eg_ssg_hold_up_latch[slot] = 0;
|
||||
chip->eg_ssg_inv[slot] = 0;
|
||||
Bit8u direction = 0;
|
||||
if (chip->ssg_eg[slot] & 0x08)
|
||||
{
|
||||
direction = chip->eg_ssg_dir[slot];
|
||||
|
@ -39,7 +39,7 @@
|
||||
* OPLx decapsulated(Matthew Gambrell, Olli Niemitalo):
|
||||
* OPL2 ROMs.
|
||||
*
|
||||
* version: 1.0.2
|
||||
* version: 1.0.3
|
||||
*/
|
||||
|
||||
#ifndef YM3438_H
|
||||
|
Loading…
Reference in New Issue
Block a user