summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Alex W. Jackson <alex.w.jackson@gmail.com>2015-05-30 05:03:29 -0400
committer Alex W. Jackson <alex.w.jackson@gmail.com>2015-05-30 05:03:58 -0400
commitbafa89c8a8e50de936d8045291f996967362c944 (patch)
tree0712d850222eda4399ad8e7407520d98349cc839
parent359be6fcf06f80fb1196f30a7f072c9c9ded1cfb (diff)
Fix the damage (nw)
-rw-r--r--src/emu/sound/fmopl.c14
-rw-r--r--src/emu/sound/ym2413.c14
-rw-r--r--src/emu/sound/ymf262.c14
-rw-r--r--src/mess/drivers/atarist.c2
-rw-r--r--src/mess/drivers/nascom1.c18
-rw-r--r--src/mess/includes/atarist.h5
6 files changed, 32 insertions, 35 deletions
diff --git a/src/emu/sound/fmopl.c b/src/emu/sound/fmopl.c
index a681de4744c..4932cde31fa 100644
--- a/src/emu/sound/fmopl.c
+++ b/src/emu/sound/fmopl.c
@@ -344,7 +344,7 @@ static const int slot_array[32]=
/* table is 3dB/octave , DV converts this into 6dB/octave */
/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */
#define DV (0.1875/2.0)
-static const double ksl_tab[8*16]=
+static const UINT32 ksl_tab[8*16]=
{
/* OCT 0 */
0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
@@ -511,10 +511,10 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),
/* multiple table */
#define ML 2
-static const double mul_tab[16]= {
+static const UINT8 mul_tab[16]= {
/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */
- 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML,
- 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML
+ ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*ML,
+ 8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML
};
#undef ML
@@ -1299,7 +1299,7 @@ static void OPL_initalize(FM_OPL *OPL)
logerror("FMOPL.C: ksl_tab[oct=%2i] =",i);
for (j=0; j<16; j++)
{
- logerror("%08x ", (UINT32) ksl_tab[i*16+j] );
+ logerror("%08x ", ksl_tab[i*16+j] );
}
logerror("\n");
}
@@ -1388,7 +1388,7 @@ INLINE void set_mul(FM_OPL *OPL,int slot,int v)
OPL_CH *CH = &OPL->P_CH[slot/2];
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
- SLOT->mul = (UINT8)mul_tab[v&0x0f];
+ SLOT->mul = mul_tab[v&0x0f];
SLOT->KSR = (v&0x10) ? 0 : 2;
SLOT->eg_type = (v&0x20);
SLOT->vib = (v&0x40);
@@ -1674,7 +1674,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v)
CH->block_fnum = block_fnum;
- CH->ksl_base = (UINT32) ksl_tab[block_fnum>>6];
+ CH->ksl_base = ksl_tab[block_fnum>>6];
CH->fc = OPL->fn_tab[block_fnum&0x03ff] >> (7-block);
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode */
diff --git a/src/emu/sound/ym2413.c b/src/emu/sound/ym2413.c
index 94d039bae9d..631560912b0 100644
--- a/src/emu/sound/ym2413.c
+++ b/src/emu/sound/ym2413.c
@@ -280,7 +280,7 @@ struct YM2413
/* table is 3dB/octave, DV converts this into 6dB/octave */
/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */
#define DV (0.1875/1.0)
-static const double ksl_tab[8*16]=
+static const UINT32 ksl_tab[8*16]=
{
/* OCT 0 */
0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
@@ -447,10 +447,10 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),
/* multiple table */
#define ML 2
-static const double mul_tab[16]= {
+static const UINT8 mul_tab[16]= {
/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */
- 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML,
- 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML
+ ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*ML,
+ 8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML
};
#undef ML
@@ -1367,7 +1367,7 @@ static void OPLL_initalize(YM2413 *chip, device_t *device)
logerror("ym2413.c: ksl_tab[oct=%2i] =",i);
for (j=0; j<16; j++)
{
- logerror("%08x ", (UINT32)ksl_tab[i*16+j] );
+ logerror("%08x ", ksl_tab[i*16+j] );
}
logerror("\n");
}
@@ -1470,7 +1470,7 @@ INLINE void set_mul(YM2413 *chip,int slot,int v)
OPLL_CH *CH = &chip->P_CH[slot/2];
OPLL_SLOT *SLOT = &CH->SLOT[slot&1];
- SLOT->mul = (UINT8)mul_tab[v&0x0f];
+ SLOT->mul = mul_tab[v&0x0f];
SLOT->KSR = (v&0x10) ? 0 : 2;
SLOT->eg_type = (v&0x20);
SLOT->vib = (v&0x40);
@@ -1839,7 +1839,7 @@ static void OPLLWriteReg(YM2413 *chip, int r, int v)
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode, FNUM MSB -> kcode LSB */
CH->kcode = (block_fnum&0x0f00)>>8;
- CH->ksl_base = (UINT32) ksl_tab[block_fnum>>5];
+ CH->ksl_base = ksl_tab[block_fnum>>5];
block_fnum = block_fnum * 2;
block = (block_fnum&0x1c00) >> 10;
diff --git a/src/emu/sound/ymf262.c b/src/emu/sound/ymf262.c
index 0f04a97eee1..0982ae266e8 100644
--- a/src/emu/sound/ymf262.c
+++ b/src/emu/sound/ymf262.c
@@ -297,7 +297,7 @@ static const int slot_array[32]=
/* table is 3dB/octave , DV converts this into 6dB/octave */
/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */
#define DV (0.1875/2.0)
-static const double ksl_tab[8*16]=
+static const UINT32 ksl_tab[8*16]=
{
/* OCT 0 */
0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
@@ -464,10 +464,10 @@ O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),
/* multiple table */
#define ML 2
-static const double mul_tab[16]= {
+static const UINT8 mul_tab[16]= {
/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */
- 0.50*ML, 1.00*ML, 2.00*ML, 3.00*ML, 4.00*ML, 5.00*ML, 6.00*ML, 7.00*ML,
- 8.00*ML, 9.00*ML,10.00*ML,10.00*ML,12.00*ML,12.00*ML,15.00*ML,15.00*ML
+ ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*ML,
+ 8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML
};
#undef ML
@@ -1345,7 +1345,7 @@ static void OPL3_initalize(OPL3 *chip)
logerror("YMF262.C: ksl_tab[oct=%2i] =",i);
for (j=0; j<16; j++)
{
- logerror("%08x ", (UINT32) ksl_tab[i*16+j] );
+ logerror("%08x ", ksl_tab[i*16+j] );
}
logerror("\n");
}
@@ -1438,7 +1438,7 @@ INLINE void set_mul(OPL3 *chip,int slot,int v)
OPL3_CH *CH = &chip->P_CH[slot/2];
OPL3_SLOT *SLOT = &CH->SLOT[slot&1];
- SLOT->mul = (UINT8)mul_tab[v&0x0f];
+ SLOT->mul = mul_tab[v&0x0f];
SLOT->KSR = (v&0x10) ? 0 : 2;
SLOT->eg_type = (v&0x20);
SLOT->vib = (v&0x40);
@@ -1959,7 +1959,7 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v)
CH->block_fnum = block_fnum;
- CH->ksl_base = (UINT32) ksl_tab[block_fnum>>6];
+ CH->ksl_base = ksl_tab[block_fnum>>6];
CH->fc = chip->fn_tab[block_fnum&0x03ff] >> (7-block);
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode */
diff --git a/src/mess/drivers/atarist.c b/src/mess/drivers/atarist.c
index 024d82626ab..46ad6a90e95 100644
--- a/src/mess/drivers/atarist.c
+++ b/src/mess/drivers/atarist.c
@@ -1625,7 +1625,7 @@ static INPUT_PORTS_START( ste )
PORT_CONFNAME( 0x01, 0x00, "Input Port 0 Device")
PORT_CONFSETTING( 0x00, "Mouse" )
PORT_CONFSETTING( 0x01, DEF_STR( Joystick ) )
- PORT_CONFNAME( 0x80, 0x80, "Monitor") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, st_state, write_monochrome)
+ PORT_CONFNAME( 0x80, 0x80, "Monitor") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, ste_state, write_monochrome)
PORT_CONFSETTING( 0x00, "Monochrome (Atari SM124)" )
PORT_CONFSETTING( 0x80, "Color (Atari SC1435)" )
diff --git a/src/mess/drivers/nascom1.c b/src/mess/drivers/nascom1.c
index ac1bde10eb7..948919fdab6 100644
--- a/src/mess/drivers/nascom1.c
+++ b/src/mess/drivers/nascom1.c
@@ -72,8 +72,7 @@ public:
DECLARE_READ8_MEMBER(nascom1_port_01_r);
DECLARE_WRITE8_MEMBER(nascom1_port_01_w);
DECLARE_READ8_MEMBER(nascom1_port_02_r);
- // FIXME
- /*virtual*/ DECLARE_DRIVER_INIT(nascom);
+ DECLARE_DRIVER_INIT(nascom);
void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height);
DECLARE_READ8_MEMBER(nascom1_hd6402_si);
DECLARE_WRITE8_MEMBER(nascom1_hd6402_so);
@@ -113,9 +112,8 @@ public:
DECLARE_WRITE_LINE_MEMBER(ram_disable_w);
DECLARE_WRITE_LINE_MEMBER(ram_disable_cpm_w);
- // FIXME
- /*virtual*/ DECLARE_DRIVER_INIT(nascom);
- /*virtual*/ DECLARE_DRIVER_INIT(nascomc);
+ DECLARE_DRIVER_INIT(nascom2);
+ DECLARE_DRIVER_INIT(nascom2c);
UINT32 screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
int load_cart(device_image_interface &image, generic_slot_device *slot, int slot_id);
@@ -352,9 +350,9 @@ void nascom2_state::machine_reset()
m_maincpu->set_state_int(Z80_PC, m_lsw1->read() << 12);
}
-DRIVER_INIT_MEMBER( nascom2_state, nascom )
+DRIVER_INIT_MEMBER( nascom2_state, nascom2 )
{
- nascom_state::init_nascom();
+ DRIVER_INIT_CALL(nascom);
// setup nasbus
m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM));
@@ -372,7 +370,7 @@ WRITE_LINE_MEMBER( nascom2_state::ram_disable_w )
}
}
-DRIVER_INIT_MEMBER( nascom2_state, nascomc )
+DRIVER_INIT_MEMBER( nascom2_state, nascom2c )
{
// install memory
m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0000 + m_ram->size() - 1, m_ram->pointer());
@@ -774,5 +772,5 @@ ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
COMP( 1977, nascom1, 0, 0, nascom1, nascom1, nascom_state, nascom, "Nascom Microcomputers", "Nascom 1", GAME_NO_SOUND_HW )
-COMP( 1979, nascom2, 0, 0, nascom2, nascom2, nascom2_state, nascom, "Nascom Microcomputers", "Nascom 2", GAME_NO_SOUND_HW )
-COMP( 1980, nascom2c, nascom2, 0, nascom2c, nascom2c, nascom2_state, nascomc, "Nascom Microcomputers", "Nascom 2 (CP/M)", GAME_NO_SOUND_HW )
+COMP( 1979, nascom2, 0, 0, nascom2, nascom2, nascom2_state, nascom2, "Nascom Microcomputers", "Nascom 2", GAME_NO_SOUND_HW )
+COMP( 1980, nascom2c, nascom2, 0, nascom2c, nascom2c, nascom2_state, nascom2c, "Nascom Microcomputers", "Nascom 2 (CP/M)", GAME_NO_SOUND_HW )
diff --git a/src/mess/includes/atarist.h b/src/mess/includes/atarist.h
index d9b3d8be175..2e153b4a59a 100644
--- a/src/mess/includes/atarist.h
+++ b/src/mess/includes/atarist.h
@@ -332,8 +332,7 @@ public:
int m_monochrome;
required_device<palette_device> m_palette;
- // make GCC 5.1 happy.. FIXME
- /*virtual*/ DECLARE_WRITE_LINE_MEMBER( write_monochrome );
+ DECLARE_WRITE_LINE_MEMBER( write_monochrome );
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
@@ -395,7 +394,7 @@ public:
DECLARE_WRITE16_MEMBER( microwire_mask_w );
DECLARE_READ8_MEMBER( mfp_gpio_r );
- virtual DECLARE_WRITE_LINE_MEMBER( write_monochrome );
+ DECLARE_WRITE_LINE_MEMBER( write_monochrome );
void dmasound_set_state(int level);
void dmasound_tick();