summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/machine/mb87078.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/machine/mb87078.c')
-rw-r--r--src/emu/machine/mb87078.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/emu/machine/mb87078.c b/src/emu/machine/mb87078.c
index a681a5c2bd5..ae4bfa1b677 100644
--- a/src/emu/machine/mb87078.c
+++ b/src/emu/machine/mb87078.c
@@ -73,9 +73,9 @@
struct mb87078_state
{
- int gain[4]; /* gain index 0-63,64,65 */
- int channel_latch; /* current channel */
- UINT8 latch[2][4]; /* 6bit+3bit 4 data latches */
+ int gain[4]; /* gain index 0-63,64,65 */
+ int channel_latch; /* current channel */
+ UINT8 latch[2][4]; /* 6bit+3bit 4 data latches */
UINT8 reset_comp;
mb87078_gain_changed_cb gain_changed_cb;
@@ -84,26 +84,26 @@ struct mb87078_state
static const float mb87078_gain_decibel[66] = {
0.0, -0.5, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5,
- -4.0, -4.5, -5.0, -5.5, -6.0, -6.5, -7.0, -7.5,
- -8.0, -8.5, -9.0, -9.5,-10.0,-10.5,-11.0,-11.5,
- -12.0,-12.5,-13.0,-13.5,-14.0,-14.5,-15.0,-15.5,
- -16.0,-16.5,-17.0,-17.5,-18.0,-18.5,-19.0,-19.5,
- -20.0,-20.5,-21.0,-21.5,-22.0,-22.5,-23.0,-23.5,
- -24.0,-24.5,-25.0,-25.5,-26.0,-26.5,-27.0,-27.5,
- -28.0,-28.5,-29.0,-29.5,-30.0,-30.5,-31.0,-31.5,
- -32.0, -256.0
- };
+ -4.0, -4.5, -5.0, -5.5, -6.0, -6.5, -7.0, -7.5,
+ -8.0, -8.5, -9.0, -9.5,-10.0,-10.5,-11.0,-11.5,
+ -12.0,-12.5,-13.0,-13.5,-14.0,-14.5,-15.0,-15.5,
+ -16.0,-16.5,-17.0,-17.5,-18.0,-18.5,-19.0,-19.5,
+ -20.0,-20.5,-21.0,-21.5,-22.0,-22.5,-23.0,-23.5,
+ -24.0,-24.5,-25.0,-25.5,-26.0,-26.5,-27.0,-27.5,
+ -28.0,-28.5,-29.0,-29.5,-30.0,-30.5,-31.0,-31.5,
+ -32.0, -256.0
+ };
static const int mb87078_gain_percent[66] = {
- 100,94,89,84,79,74,70,66,
- 63,59,56,53,50,47,44,42,
- 39,37,35,33,31,29,28,26,
- 25,23,22,21,19,18,17,16,
- 15,14,14,13,12,11,11,10,
- 10, 9, 8, 8, 7, 7, 7, 6,
- 6, 5, 5, 5, 5, 4, 4, 4,
- 3, 3, 3, 3, 3, 2, 2, 2,
- 2, 0
+ 100,94,89,84,79,74,70,66,
+ 63,59,56,53,50,47,44,42,
+ 39,37,35,33,31,29,28,26,
+ 25,23,22,21,19,18,17,16,
+ 15,14,14,13,12,11,11,10,
+ 10, 9, 8, 8, 7, 7, 7, 6,
+ 6, 5, 5, 5, 5, 4, 4, 4,
+ 3, 3, 3, 3, 3, 2, 2, 2,
+ 2, 0
};
/*****************************************************************************
@@ -148,7 +148,7 @@ static int calc_gain_index( int data0, int data1 )
if (data1 & 0x10)
{
return GAIN_MAX_INDEX;
- }
+ }
else
{
if (data1 & 0x08)
@@ -187,11 +187,11 @@ void mb87078_data_w( device_t *device, int data, int dsel )
if (mb87078->reset_comp == 0)
return;
- if (dsel == 0) /* gd0 - gd5 */
+ if (dsel == 0) /* gd0 - gd5 */
{
mb87078->latch[0][mb87078->channel_latch] = data & 0x3f;
}
- else /* dcs1, dsc2, en, c0, c32, X */
+ else /* dcs1, dsc2, en, c0, c32, X */
{
mb87078->channel_latch = data & 3;
mb87078->latch[1][mb87078->channel_latch] = data & 0x1f; //always zero bit 5
@@ -300,5 +300,3 @@ void mb87078_device::device_reset()
{
DEVICE_RESET_NAME( mb87078 )(this);
}
-
-