mirror of
https://github.com/holub/mame
synced 2025-06-09 14:22:41 +03:00
Fix the damage (nw)
This commit is contained in:
parent
359be6fcf0
commit
bafa89c8a8
@ -344,7 +344,7 @@ static const int slot_array[32]=
|
|||||||
/* table is 3dB/octave , DV converts this into 6dB/octave */
|
/* 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 */
|
/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */
|
||||||
#define DV (0.1875/2.0)
|
#define DV (0.1875/2.0)
|
||||||
static const double ksl_tab[8*16]=
|
static const UINT32 ksl_tab[8*16]=
|
||||||
{
|
{
|
||||||
/* OCT 0 */
|
/* OCT 0 */
|
||||||
0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
|
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 */
|
/* multiple table */
|
||||||
#define ML 2
|
#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 */
|
/* 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,
|
ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*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
|
8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML
|
||||||
};
|
};
|
||||||
#undef ML
|
#undef ML
|
||||||
|
|
||||||
@ -1299,7 +1299,7 @@ static void OPL_initalize(FM_OPL *OPL)
|
|||||||
logerror("FMOPL.C: ksl_tab[oct=%2i] =",i);
|
logerror("FMOPL.C: ksl_tab[oct=%2i] =",i);
|
||||||
for (j=0; j<16; j++)
|
for (j=0; j<16; j++)
|
||||||
{
|
{
|
||||||
logerror("%08x ", (UINT32) ksl_tab[i*16+j] );
|
logerror("%08x ", ksl_tab[i*16+j] );
|
||||||
}
|
}
|
||||||
logerror("\n");
|
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_CH *CH = &OPL->P_CH[slot/2];
|
||||||
OPL_SLOT *SLOT = &CH->SLOT[slot&1];
|
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->KSR = (v&0x10) ? 0 : 2;
|
||||||
SLOT->eg_type = (v&0x20);
|
SLOT->eg_type = (v&0x20);
|
||||||
SLOT->vib = (v&0x40);
|
SLOT->vib = (v&0x40);
|
||||||
@ -1674,7 +1674,7 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v)
|
|||||||
|
|
||||||
CH->block_fnum = block_fnum;
|
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);
|
CH->fc = OPL->fn_tab[block_fnum&0x03ff] >> (7-block);
|
||||||
|
|
||||||
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode */
|
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode */
|
||||||
|
@ -280,7 +280,7 @@ struct YM2413
|
|||||||
/* table is 3dB/octave, DV converts this into 6dB/octave */
|
/* 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 */
|
/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */
|
||||||
#define DV (0.1875/1.0)
|
#define DV (0.1875/1.0)
|
||||||
static const double ksl_tab[8*16]=
|
static const UINT32 ksl_tab[8*16]=
|
||||||
{
|
{
|
||||||
/* OCT 0 */
|
/* OCT 0 */
|
||||||
0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
|
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 */
|
/* multiple table */
|
||||||
#define ML 2
|
#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 */
|
/* 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,
|
ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*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
|
8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML
|
||||||
};
|
};
|
||||||
#undef ML
|
#undef ML
|
||||||
|
|
||||||
@ -1367,7 +1367,7 @@ static void OPLL_initalize(YM2413 *chip, device_t *device)
|
|||||||
logerror("ym2413.c: ksl_tab[oct=%2i] =",i);
|
logerror("ym2413.c: ksl_tab[oct=%2i] =",i);
|
||||||
for (j=0; j<16; j++)
|
for (j=0; j<16; j++)
|
||||||
{
|
{
|
||||||
logerror("%08x ", (UINT32)ksl_tab[i*16+j] );
|
logerror("%08x ", ksl_tab[i*16+j] );
|
||||||
}
|
}
|
||||||
logerror("\n");
|
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_CH *CH = &chip->P_CH[slot/2];
|
||||||
OPLL_SLOT *SLOT = &CH->SLOT[slot&1];
|
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->KSR = (v&0x10) ? 0 : 2;
|
||||||
SLOT->eg_type = (v&0x20);
|
SLOT->eg_type = (v&0x20);
|
||||||
SLOT->vib = (v&0x40);
|
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 */
|
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode, FNUM MSB -> kcode LSB */
|
||||||
CH->kcode = (block_fnum&0x0f00)>>8;
|
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_fnum = block_fnum * 2;
|
||||||
block = (block_fnum&0x1c00) >> 10;
|
block = (block_fnum&0x1c00) >> 10;
|
||||||
|
@ -297,7 +297,7 @@ static const int slot_array[32]=
|
|||||||
/* table is 3dB/octave , DV converts this into 6dB/octave */
|
/* 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 */
|
/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */
|
||||||
#define DV (0.1875/2.0)
|
#define DV (0.1875/2.0)
|
||||||
static const double ksl_tab[8*16]=
|
static const UINT32 ksl_tab[8*16]=
|
||||||
{
|
{
|
||||||
/* OCT 0 */
|
/* OCT 0 */
|
||||||
0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
|
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 */
|
/* multiple table */
|
||||||
#define ML 2
|
#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 */
|
/* 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,
|
ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*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
|
8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML
|
||||||
};
|
};
|
||||||
#undef ML
|
#undef ML
|
||||||
|
|
||||||
@ -1345,7 +1345,7 @@ static void OPL3_initalize(OPL3 *chip)
|
|||||||
logerror("YMF262.C: ksl_tab[oct=%2i] =",i);
|
logerror("YMF262.C: ksl_tab[oct=%2i] =",i);
|
||||||
for (j=0; j<16; j++)
|
for (j=0; j<16; j++)
|
||||||
{
|
{
|
||||||
logerror("%08x ", (UINT32) ksl_tab[i*16+j] );
|
logerror("%08x ", ksl_tab[i*16+j] );
|
||||||
}
|
}
|
||||||
logerror("\n");
|
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_CH *CH = &chip->P_CH[slot/2];
|
||||||
OPL3_SLOT *SLOT = &CH->SLOT[slot&1];
|
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->KSR = (v&0x10) ? 0 : 2;
|
||||||
SLOT->eg_type = (v&0x20);
|
SLOT->eg_type = (v&0x20);
|
||||||
SLOT->vib = (v&0x40);
|
SLOT->vib = (v&0x40);
|
||||||
@ -1959,7 +1959,7 @@ static void OPL3WriteReg(OPL3 *chip, int r, int v)
|
|||||||
|
|
||||||
CH->block_fnum = block_fnum;
|
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);
|
CH->fc = chip->fn_tab[block_fnum&0x03ff] >> (7-block);
|
||||||
|
|
||||||
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode */
|
/* BLK 2,1,0 bits -> bits 3,2,1 of kcode */
|
||||||
|
@ -1625,7 +1625,7 @@ static INPUT_PORTS_START( ste )
|
|||||||
PORT_CONFNAME( 0x01, 0x00, "Input Port 0 Device")
|
PORT_CONFNAME( 0x01, 0x00, "Input Port 0 Device")
|
||||||
PORT_CONFSETTING( 0x00, "Mouse" )
|
PORT_CONFSETTING( 0x00, "Mouse" )
|
||||||
PORT_CONFSETTING( 0x01, DEF_STR( Joystick ) )
|
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( 0x00, "Monochrome (Atari SM124)" )
|
||||||
PORT_CONFSETTING( 0x80, "Color (Atari SC1435)" )
|
PORT_CONFSETTING( 0x80, "Color (Atari SC1435)" )
|
||||||
|
|
||||||
|
@ -72,8 +72,7 @@ public:
|
|||||||
DECLARE_READ8_MEMBER(nascom1_port_01_r);
|
DECLARE_READ8_MEMBER(nascom1_port_01_r);
|
||||||
DECLARE_WRITE8_MEMBER(nascom1_port_01_w);
|
DECLARE_WRITE8_MEMBER(nascom1_port_01_w);
|
||||||
DECLARE_READ8_MEMBER(nascom1_port_02_r);
|
DECLARE_READ8_MEMBER(nascom1_port_02_r);
|
||||||
// FIXME
|
DECLARE_DRIVER_INIT(nascom);
|
||||||
/*virtual*/ DECLARE_DRIVER_INIT(nascom);
|
|
||||||
void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height);
|
void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect, int char_height);
|
||||||
DECLARE_READ8_MEMBER(nascom1_hd6402_si);
|
DECLARE_READ8_MEMBER(nascom1_hd6402_si);
|
||||||
DECLARE_WRITE8_MEMBER(nascom1_hd6402_so);
|
DECLARE_WRITE8_MEMBER(nascom1_hd6402_so);
|
||||||
@ -113,9 +112,8 @@ public:
|
|||||||
|
|
||||||
DECLARE_WRITE_LINE_MEMBER(ram_disable_w);
|
DECLARE_WRITE_LINE_MEMBER(ram_disable_w);
|
||||||
DECLARE_WRITE_LINE_MEMBER(ram_disable_cpm_w);
|
DECLARE_WRITE_LINE_MEMBER(ram_disable_cpm_w);
|
||||||
// FIXME
|
DECLARE_DRIVER_INIT(nascom2);
|
||||||
/*virtual*/ DECLARE_DRIVER_INIT(nascom);
|
DECLARE_DRIVER_INIT(nascom2c);
|
||||||
/*virtual*/ DECLARE_DRIVER_INIT(nascomc);
|
|
||||||
UINT32 screen_update_nascom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
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);
|
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);
|
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
|
// setup nasbus
|
||||||
m_nasbus->set_program_space(&m_maincpu->space(AS_PROGRAM));
|
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
|
// install memory
|
||||||
m_maincpu->space(AS_PROGRAM).install_ram(0x0000, 0x0000 + m_ram->size() - 1, m_ram->pointer());
|
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 */
|
// 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( 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( 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, nascomc, "Nascom Microcomputers", "Nascom 2 (CP/M)", GAME_NO_SOUND_HW )
|
COMP( 1980, nascom2c, nascom2, 0, nascom2c, nascom2c, nascom2_state, nascom2c, "Nascom Microcomputers", "Nascom 2 (CP/M)", GAME_NO_SOUND_HW )
|
||||||
|
@ -332,8 +332,7 @@ public:
|
|||||||
|
|
||||||
int m_monochrome;
|
int m_monochrome;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
// make GCC 5.1 happy.. FIXME
|
DECLARE_WRITE_LINE_MEMBER( write_monochrome );
|
||||||
/*virtual*/ DECLARE_WRITE_LINE_MEMBER( write_monochrome );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
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_WRITE16_MEMBER( microwire_mask_w );
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER( mfp_gpio_r );
|
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_set_state(int level);
|
||||||
void dmasound_tick();
|
void dmasound_tick();
|
||||||
|
Loading…
Reference in New Issue
Block a user