ignore adlib 0xc0 high bits (seemingly unused on real cards), reduce volume
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3376
This commit is contained in:
parent
177f197961
commit
1975a129cc
3 changed files with 8 additions and 11 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: adlib.h,v 1.4 2009-04-26 10:33:53 harekiet Exp $ */
|
||||
/* $Id: adlib.h,v 1.5 2009-04-28 21:45:43 c2woody Exp $ */
|
||||
|
||||
#ifndef DOSBOX_ADLIB_H
|
||||
#define DOSBOX_ADLIB_H
|
||||
|
@ -24,7 +24,6 @@
|
|||
#include "dosbox.h"
|
||||
#include "mixer.h"
|
||||
#include "inout.h"
|
||||
#include "mixer.h"
|
||||
#include "setup.h"
|
||||
#include "pic.h"
|
||||
#include "hardware.h"
|
||||
|
|
|
@ -499,8 +499,8 @@ void adlib_init(Bit32u samplerate) {
|
|||
#if defined(OPLTYPE_IS_OPL3)
|
||||
op[i].is_4op = false;
|
||||
op[i].is_4op_attached = false;
|
||||
op[i].left_pan = 2;
|
||||
op[i].right_pan = 2;
|
||||
op[i].left_pan = 1;
|
||||
op[i].right_pan = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -848,8 +848,8 @@ void adlib_write(Bitu idx, Bit8u val) {
|
|||
change_feedback(chanbase,&op[opbase]);
|
||||
#if defined(OPLTYPE_IS_OPL3)
|
||||
// OPL3 panning
|
||||
op[opbase].left_pan = ((val&0x10)>>4)+((val&0x40)>>6);
|
||||
op[opbase].right_pan = ((val&0x20)>>5)+((val&0x80)>>7);
|
||||
op[opbase].left_pan = ((val&0x10)>>4);
|
||||
op[opbase].right_pan = ((val&0x20)>>5);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -933,7 +933,7 @@ static void INLINE clipit16(Bit32s ival, Bit16s* outval) {
|
|||
outbufl[i] += chanval*cptr[0].left_pan; \
|
||||
outbufr[i] += chanval*cptr[0].right_pan; \
|
||||
} else { \
|
||||
outbufl[i] += chanval*2; \
|
||||
outbufl[i] += chanval; \
|
||||
}
|
||||
#else
|
||||
#define CHANVAL_OUT \
|
||||
|
|
|
@ -2073,16 +2073,14 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v)
|
|||
/* OPL3 mode */
|
||||
chip->pan[ base ] = (v & 0x10) ? 1 : 0; /* ch.A */
|
||||
chip->pan[ base +1 ] = (v & 0x20) ? 1 : 0; /* ch.B */
|
||||
if (v & 0x40) chip->pan[ base ] += 1; /* ch.C->ch.A */
|
||||
if (v & 0x80) chip->pan[ base +1 ] += 1; /* ch.D->ch.B */
|
||||
}
|
||||
else
|
||||
{
|
||||
int base = ((r&0xf) + ch_offset) * 2;
|
||||
|
||||
/* OPL2 mode - always enabled */
|
||||
chip->pan[ base ] = 2; /* ch.A */
|
||||
chip->pan[ base +1 ] = 2; /* ch.B */
|
||||
chip->pan[ base ] = 1; /* ch.A */
|
||||
chip->pan[ base +1 ] = 1; /* ch.B */
|
||||
}
|
||||
|
||||
CH->SLOT[SLOT1].FB = (v>>1)&7 ? ((v>>1)&7) + 7 : 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue