mirror of
https://github.com/holub/mame
synced 2025-07-02 00:29:37 +03:00
hh*: add private: section to classes
This commit is contained in:
parent
72340954af
commit
2504edaaa7
@ -36,6 +36,10 @@ public:
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
// devices
|
||||
required_device<amis2000_base_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -43,16 +47,12 @@ public:
|
||||
optional_ioport_array<4> m_inputs; // max 4
|
||||
|
||||
// misc common
|
||||
u16 m_a; // MCU address bus
|
||||
u8 m_d; // MCU data bus
|
||||
int m_f; // MCU F_out pin
|
||||
u16 m_inp_mux; // multiplexed inputs mask
|
||||
u16 m_a = 0; // MCU address bus
|
||||
u8 m_d = 0; // MCU data bus
|
||||
int m_f = 0; // MCU F_out pin
|
||||
u16 m_inp_mux = 0; // multiplexed inputs mask
|
||||
|
||||
u8 read_inputs(int columns);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
@ -60,12 +60,6 @@ protected:
|
||||
|
||||
void hh_amis2k_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
m_a = 0;
|
||||
m_d = 0;
|
||||
m_f = 0;
|
||||
m_inp_mux = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_a));
|
||||
save_item(NAME(m_d));
|
||||
@ -145,6 +139,12 @@ public:
|
||||
hh_amis2k_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void wildfire(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_a(u16 data);
|
||||
@ -152,11 +152,7 @@ public:
|
||||
|
||||
void speaker_update();
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim);
|
||||
double m_speaker_volume;
|
||||
void wildfire(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
double m_speaker_volume = 0.0;
|
||||
|
||||
std::vector<double> m_speaker_levels;
|
||||
};
|
||||
@ -164,9 +160,6 @@ protected:
|
||||
void wildfire_state::machine_start()
|
||||
{
|
||||
hh_amis2k_state::machine_start();
|
||||
|
||||
// zerofill/init
|
||||
m_speaker_volume = 0;
|
||||
save_item(NAME(m_speaker_volume));
|
||||
}
|
||||
|
||||
@ -236,7 +229,7 @@ static const u8 wildfire_7seg_table[0x10] =
|
||||
|
||||
void wildfire_state::wildfire(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
AMI_S2152(config, m_maincpu, 850000); // approximation - RC osc. R=?, C=?
|
||||
m_maincpu->set_7seg_table(wildfire_7seg_table);
|
||||
m_maincpu->read_i().set_ioport("IN.0");
|
||||
@ -244,13 +237,13 @@ void wildfire_state::wildfire(machine_config &config)
|
||||
m_maincpu->write_a().set(FUNC(wildfire_state::write_a));
|
||||
m_maincpu->write_f().set(FUNC(wildfire_state::write_f));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(12, 8);
|
||||
m_display->set_segmask(7, 0x7f);
|
||||
m_display->set_bri_levels(0.01, 0.1); // bumpers are dimmed
|
||||
config.set_default_layout(layout_wildfire);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
||||
|
@ -65,6 +65,12 @@ public:
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
// devices
|
||||
required_device<cop400_cpu_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -72,19 +78,14 @@ public:
|
||||
optional_ioport_array<6> m_inputs; // max 6
|
||||
|
||||
// misc common
|
||||
u8 m_l; // MCU port L write data
|
||||
u8 m_g; // MCU port G write data
|
||||
u8 m_d; // MCU port D write data
|
||||
int m_so; // MCU SO line state
|
||||
int m_sk; // MCU SK line state
|
||||
u16 m_inp_mux; // multiplexed inputs mask
|
||||
u8 m_l = 0; // MCU port L write data
|
||||
u8 m_g = 0; // MCU port G write data
|
||||
u8 m_d = 0; // MCU port D write data
|
||||
int m_so = 0; // MCU SO line state
|
||||
int m_sk = 0; // MCU SK line state
|
||||
u16 m_inp_mux = ~0; // multiplexed inputs mask
|
||||
|
||||
u16 read_inputs(int columns, u16 colmask = ~0);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
@ -92,14 +93,6 @@ protected:
|
||||
|
||||
void hh_cop400_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
m_l = 0;
|
||||
m_g = 0;
|
||||
m_d = 0;
|
||||
m_so = 0;
|
||||
m_sk = 0;
|
||||
m_inp_mux = ~0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_l));
|
||||
save_item(NAME(m_g));
|
||||
@ -170,10 +163,12 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ctstein(machine_config &config);
|
||||
|
||||
private:
|
||||
void write_g(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_l();
|
||||
void ctstein(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -220,7 +215,7 @@ INPUT_PORTS_END
|
||||
|
||||
void ctstein_state::ctstein(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP421(config, m_maincpu, 850000); // approximation - RC osc. R=12K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_g().set(FUNC(ctstein_state::write_g));
|
||||
@ -228,11 +223,11 @@ void ctstein_state::ctstein(machine_config &config)
|
||||
m_maincpu->write_sk().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
m_maincpu->read_l().set(FUNC(ctstein_state::read_l));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 4);
|
||||
config.set_default_layout(layout_ctstein);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -272,14 +267,15 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void h2hsoccerc(machine_config &config);
|
||||
void h2hbaskbc(machine_config &config);
|
||||
void h2hhockeyc(machine_config &config);
|
||||
|
||||
private:
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_in();
|
||||
|
||||
void h2hsoccerc(machine_config &config);
|
||||
void h2hbaskbc(machine_config &config);
|
||||
void h2hhockeyc(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -367,7 +363,7 @@ INPUT_PORTS_END
|
||||
|
||||
void h2hbaskbc_state::h2hbaskbc(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP420(config, m_maincpu, 1000000); // approximation - RC osc. R=43K, C=101pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(h2hbaskbc_state::write_d));
|
||||
@ -376,12 +372,12 @@ void h2hbaskbc_state::h2hbaskbc(machine_config &config)
|
||||
m_maincpu->read_in().set(FUNC(h2hbaskbc_state::read_in));
|
||||
m_maincpu->write_so().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(16, 7);
|
||||
m_display->set_segmask(3, 0x7f);
|
||||
config.set_default_layout(layout_h2hbaskbc);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -430,13 +426,15 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void einvaderc(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_sk);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_so);
|
||||
void write_l(u8 data);
|
||||
void einvaderc(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -499,7 +497,7 @@ INPUT_PORTS_END
|
||||
|
||||
void einvaderc_state::einvaderc(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP444L(config, m_maincpu, 850000); // approximation - RC osc. R=47K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->read_in().set_ioport("IN.0");
|
||||
@ -509,7 +507,7 @@ void einvaderc_state::einvaderc(machine_config &config)
|
||||
m_maincpu->write_so().set(FUNC(einvaderc_state::write_so));
|
||||
m_maincpu->write_l().set(FUNC(einvaderc_state::write_l));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &mask(SCREEN(config, "mask", SCREEN_TYPE_SVG));
|
||||
mask.set_refresh_hz(60);
|
||||
mask.set_size(919, 1080);
|
||||
@ -519,7 +517,7 @@ void einvaderc_state::einvaderc(machine_config &config)
|
||||
m_display->set_segmask(7, 0x7f);
|
||||
config.set_default_layout(layout_einvaderc);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -559,12 +557,14 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void unkeinv(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_g(u8 data);
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_l();
|
||||
void unkeinv(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -627,7 +627,7 @@ INPUT_PORTS_END
|
||||
|
||||
void unkeinv_state::unkeinv(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP421(config, m_maincpu, 850000); // frequency guessed
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_g().set(FUNC(unkeinv_state::write_g));
|
||||
@ -637,11 +637,11 @@ void unkeinv_state::unkeinv(machine_config &config)
|
||||
m_maincpu->read_l_tristate().set_constant(0xff);
|
||||
m_maincpu->write_so().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(6, 8);
|
||||
config.set_default_layout(layout_unkeinv);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -681,21 +681,24 @@ public:
|
||||
m_motor_on_out(*this, "motor_on")
|
||||
{ }
|
||||
|
||||
void lchicken(machine_config &config);
|
||||
|
||||
DECLARE_READ_LINE_MEMBER(motor_switch_r);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
output_finder<> m_motor_pos_out;
|
||||
output_finder<> m_motor_on_out;
|
||||
|
||||
u8 m_motor_pos = 0;
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick);
|
||||
DECLARE_READ_LINE_MEMBER(motor_switch_r);
|
||||
|
||||
void write_l(u8 data);
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
u8 read_g();
|
||||
void lchicken(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
};
|
||||
|
||||
void lchicken_state::machine_start()
|
||||
@ -782,7 +785,7 @@ INPUT_PORTS_END
|
||||
|
||||
void lchicken_state::lchicken(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP421(config, m_maincpu, 850000); // approximation - RC osc. R=12K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_l().set(FUNC(lchicken_state::write_l));
|
||||
@ -794,11 +797,11 @@ void lchicken_state::lchicken(machine_config &config)
|
||||
|
||||
TIMER(config, "chicken_motor").configure_periodic(FUNC(lchicken_state::motor_sim_tick), attotime::from_msec(6000/0x100)); // ~6sec for a full rotation
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(3, 4);
|
||||
config.set_default_layout(layout_lchicken);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -829,13 +832,15 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void funjacks(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
void write_g(u8 data);
|
||||
u8 read_l();
|
||||
u8 read_g();
|
||||
void funjacks(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -906,7 +911,7 @@ INPUT_PORTS_END
|
||||
|
||||
void funjacks_state::funjacks(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP410(config, m_maincpu, 850000); // approximation - RC osc. R=47K, C=56pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(funjacks_state::write_d));
|
||||
@ -915,11 +920,11 @@ void funjacks_state::funjacks(machine_config &config)
|
||||
m_maincpu->read_l().set(FUNC(funjacks_state::read_l));
|
||||
m_maincpu->read_g().set(FUNC(funjacks_state::read_g));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 2);
|
||||
config.set_default_layout(layout_funjacks);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -954,11 +959,13 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void funrlgl(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
void write_g(u8 data);
|
||||
void funrlgl(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1006,7 +1013,7 @@ INPUT_PORTS_END
|
||||
|
||||
void funrlgl_state::funrlgl(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP410(config, m_maincpu, 800000); // approximation - RC osc. R=51K, C=91pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(funrlgl_state::write_d));
|
||||
@ -1015,12 +1022,12 @@ void funrlgl_state::funrlgl(machine_config &config)
|
||||
m_maincpu->write_g().set(FUNC(funrlgl_state::write_g));
|
||||
m_maincpu->read_g().set_ioport("IN.0");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 4);
|
||||
m_display->set_bri_levels(0.005, 0.1); // top led is brighter
|
||||
config.set_default_layout(layout_funrlgl);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1051,13 +1058,15 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void funtag(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
void write_g(u8 data);
|
||||
u8 read_l();
|
||||
u8 read_g();
|
||||
void funtag(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1127,7 +1136,7 @@ INPUT_PORTS_END
|
||||
|
||||
void funtag_state::funtag(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP410(config, m_maincpu, 1000000); // approximation - RC osc. R=47K, C=91pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(funtag_state::write_d));
|
||||
@ -1136,11 +1145,11 @@ void funtag_state::funtag(machine_config &config)
|
||||
m_maincpu->read_l().set(FUNC(funtag_state::read_l));
|
||||
m_maincpu->read_g().set(FUNC(funtag_state::read_g));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 2);
|
||||
config.set_default_layout(layout_funtag);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1182,8 +1191,15 @@ public:
|
||||
m_on_timer(*this, "on_timer")
|
||||
{ }
|
||||
|
||||
void mbaskb2(machine_config &config);
|
||||
void msoccer2(machine_config &config);
|
||||
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(switch_r);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
required_device<cop400_cpu_device> m_subcpu;
|
||||
required_device<timer_device> m_on_timer;
|
||||
|
||||
@ -1193,12 +1209,6 @@ public:
|
||||
void sub_write_g(u8 data);
|
||||
void sub_write_d(u8 data);
|
||||
u8 sub_read_in();
|
||||
|
||||
void mbaskb2(machine_config &config);
|
||||
void msoccer2(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
void mbaskb2_state::machine_reset()
|
||||
@ -1291,7 +1301,7 @@ INPUT_PORTS_END
|
||||
|
||||
void mbaskb2_state::mbaskb2(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP420(config, m_maincpu, 500000); // approximation
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_SYNC_INPUT, false); // guessed
|
||||
m_maincpu->write_g().set(FUNC(mbaskb2_state::main_write_g));
|
||||
@ -1315,13 +1325,13 @@ void mbaskb2_state::mbaskb2(machine_config &config)
|
||||
|
||||
TIMER(config, "on_timer").configure_generic(nullptr);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 7);
|
||||
m_display->set_segmask(0xc0, 0x7f);
|
||||
m_display->set_bri_levels(0.008, 0.04); // offense is brighter
|
||||
config.set_default_layout(layout_mbaskb2);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1372,11 +1382,13 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void lafootb(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_l(u8 data);
|
||||
void write_d(u8 data);
|
||||
u8 read_g();
|
||||
void lafootb(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1428,7 +1440,7 @@ INPUT_PORTS_END
|
||||
|
||||
void lafootb_state::lafootb(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP421(config, m_maincpu, 900000); // approximation - RC osc. R=51K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_l().set(FUNC(lafootb_state::write_l));
|
||||
@ -1436,7 +1448,7 @@ void lafootb_state::lafootb(machine_config &config)
|
||||
m_maincpu->read_g().set(FUNC(lafootb_state::read_g));
|
||||
m_maincpu->write_sk().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &mask(SCREEN(config, "mask", SCREEN_TYPE_SVG));
|
||||
mask.set_refresh_hz(60);
|
||||
mask.set_size(1920, 864);
|
||||
@ -1448,7 +1460,7 @@ void lafootb_state::lafootb(machine_config &config)
|
||||
m_display->set_bri_levels(0.005);
|
||||
config.set_default_layout(layout_lafootb);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1484,12 +1496,14 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void mdallas(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_l(u8 data);
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
u8 read_in();
|
||||
void mdallas(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1580,7 +1594,7 @@ INPUT_PORTS_END
|
||||
|
||||
void mdallas_state::mdallas(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP444L(config, m_maincpu, 1000000); // approximation - RC osc. R=57K, C=101pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_l().set(FUNC(mdallas_state::write_l));
|
||||
@ -1589,12 +1603,12 @@ void mdallas_state::mdallas(machine_config &config)
|
||||
m_maincpu->read_in().set(FUNC(mdallas_state::read_in));
|
||||
m_maincpu->write_so().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 8);
|
||||
m_display->set_segmask(0xff, 0xff);
|
||||
config.set_default_layout(layout_mdallas);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1628,10 +1642,12 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void plus1(machine_config &config);
|
||||
|
||||
private:
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_l();
|
||||
void plus1(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1672,7 +1688,7 @@ INPUT_PORTS_END
|
||||
|
||||
void plus1_state::plus1(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP410(config, m_maincpu, 1000000); // approximation - RC osc. R=51K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(plus1_state::write_d));
|
||||
@ -1680,9 +1696,9 @@ void plus1_state::plus1(machine_config &config)
|
||||
m_maincpu->write_l().set(FUNC(plus1_state::write_l));
|
||||
m_maincpu->read_l().set(FUNC(plus1_state::read_l));
|
||||
|
||||
/* no visual feedback! */
|
||||
// no visual feedback!
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1725,12 +1741,14 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void lightfgt(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
DECLARE_WRITE_LINE_MEMBER(write_so);
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_g();
|
||||
void lightfgt(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1806,7 +1824,7 @@ INPUT_PORTS_END
|
||||
|
||||
void lightfgt_state::lightfgt(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP421(config, m_maincpu, 950000); // approximation - RC osc. R=82K, C=56pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_so().set(FUNC(lightfgt_state::write_so));
|
||||
@ -1815,11 +1833,11 @@ void lightfgt_state::lightfgt(machine_config &config)
|
||||
m_maincpu->write_sk().set(m_speaker, FUNC(speaker_sound_device::level_w));
|
||||
m_maincpu->read_g().set(FUNC(lightfgt_state::read_g));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(5, 5);
|
||||
config.set_default_layout(layout_lightfgt);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1851,12 +1869,14 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void bship82(machine_config &config);
|
||||
|
||||
private:
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
u8 read_l();
|
||||
u8 read_in();
|
||||
DECLARE_WRITE_LINE_MEMBER(write_so);
|
||||
void bship82(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1957,7 +1977,7 @@ INPUT_PORTS_END
|
||||
|
||||
void bship82_state::bship82(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP420(config, m_maincpu, 750000); // approximation - RC osc. R=14K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(bship82_state::write_d));
|
||||
@ -1967,11 +1987,11 @@ void bship82_state::bship82(machine_config &config)
|
||||
m_maincpu->write_so().set(FUNC(bship82_state::write_so));
|
||||
m_maincpu->read_si().set_ioport("IN.4");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 1);
|
||||
config.set_default_layout(layout_bship82);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[8] = { 0.0, 1.0/7.0, 2.0/7.0, 3.0/7.0, 4.0/7.0, 5.0/7.0, 6.0/7.0, 1.0 };
|
||||
@ -2008,13 +2028,15 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void qkracer(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_in();
|
||||
DECLARE_WRITE_LINE_MEMBER(write_sk);
|
||||
void qkracer(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2096,7 +2118,7 @@ INPUT_PORTS_END
|
||||
|
||||
void qkracer_state::qkracer(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP420(config, m_maincpu, 950000); // approximation - RC osc. R=47K, C=100pF
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(qkracer_state::write_d));
|
||||
@ -2105,13 +2127,13 @@ void qkracer_state::qkracer(machine_config &config)
|
||||
m_maincpu->read_in().set(FUNC(qkracer_state::read_in));
|
||||
m_maincpu->write_sk().set(FUNC(qkracer_state::write_sk));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 7);
|
||||
m_display->set_segmask(0xdf, 0x7f);
|
||||
m_display->set_segmask(0x20, 0x41); // equals sign
|
||||
config.set_default_layout(layout_qkracer);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
@ -2151,13 +2173,16 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void scat(machine_config &config);
|
||||
|
||||
private:
|
||||
void main_map(address_map &map);
|
||||
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_g(u8 data);
|
||||
void write_l(u8 data);
|
||||
u8 read_in();
|
||||
void main_map(address_map &map);
|
||||
void scat(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2243,7 +2268,7 @@ INPUT_PORTS_END
|
||||
|
||||
void scat_state::scat(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP404L(config, m_maincpu, 1500000); // R/C OSC via MM74C14N
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_32, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->set_addrmap(AS_PROGRAM, &scat_state::main_map);
|
||||
@ -2252,12 +2277,12 @@ void scat_state::scat(machine_config &config)
|
||||
m_maincpu->write_l().set(FUNC(scat_state::write_l));
|
||||
m_maincpu->read_in().set(FUNC(scat_state::read_in));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 8);
|
||||
m_display->set_segmask(0xff, 0xff);
|
||||
config.set_default_layout(layout_scat);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
@ -2295,11 +2320,13 @@ public:
|
||||
hh_cop400_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void vidchal(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u8 data);
|
||||
void write_l(u8 data);
|
||||
DECLARE_WRITE_LINE_MEMBER(write_sk);
|
||||
void vidchal(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2342,7 +2369,7 @@ INPUT_PORTS_END
|
||||
|
||||
void vidchal_state::vidchal(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
COP420(config, m_maincpu, 900000); // approximation
|
||||
m_maincpu->set_config(COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
|
||||
m_maincpu->write_d().set(FUNC(vidchal_state::write_d));
|
||||
@ -2351,12 +2378,12 @@ void vidchal_state::vidchal(machine_config &config)
|
||||
m_maincpu->read_in().set_ioport("IN.0");
|
||||
m_maincpu->write_sk().set(FUNC(vidchal_state::write_sk));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(6+1, 8);
|
||||
m_display->set_segmask(0x3f, 0xff);
|
||||
config.set_default_layout(layout_vidchal);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
DAC_4BIT_BINARY_WEIGHTED_SIGN_MAGNITUDE(config, "dac").add_route(ALL_OUTPUTS, "mono", 0.125); // unknown DAC
|
||||
}
|
||||
|
@ -48,6 +48,10 @@ public:
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
// devices
|
||||
required_device<cops1_base_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -64,10 +68,6 @@ public:
|
||||
int m_blk = false;
|
||||
|
||||
u8 read_inputs(int columns);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
@ -152,17 +152,18 @@ public:
|
||||
hh_cops1_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void mbaskb(machine_config &config);
|
||||
void msoccer(machine_config &config);
|
||||
void mhockey(machine_config &config);
|
||||
void mhockeya(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_do(u8 data);
|
||||
void write_blk(int state);
|
||||
void write_s(u8 data);
|
||||
void write_f(u8 data);
|
||||
u8 read_f();
|
||||
|
||||
void mbaskb(machine_config &config);
|
||||
void msoccer(machine_config &config);
|
||||
void mhockey(machine_config &config);
|
||||
void mhockeya(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -244,7 +245,7 @@ INPUT_PORTS_END
|
||||
|
||||
void mbaskb_state::mbaskb(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM5799(config, m_maincpu, 370000); // approximation
|
||||
m_maincpu->write_do().set(FUNC(mbaskb_state::write_do));
|
||||
m_maincpu->write_blk().set(FUNC(mbaskb_state::write_blk));
|
||||
@ -254,13 +255,13 @@ void mbaskb_state::mbaskb(machine_config &config)
|
||||
m_maincpu->read_k().set_ioport("IN.0");
|
||||
m_maincpu->read_inb().set_ioport("IN.1");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 7);
|
||||
m_display->set_segmask(3, 0x7f);
|
||||
m_display->set_bri_levels(0.015, 0.2); // ball led is brighter
|
||||
config.set_default_layout(layout_mbaskb);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -351,6 +352,9 @@ public:
|
||||
m_ds8874(*this, "ds8874")
|
||||
{ }
|
||||
|
||||
void qkracerm(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<ds8874_device> m_ds8874;
|
||||
void ds8874_output_w(u16 data);
|
||||
|
||||
@ -360,7 +364,6 @@ public:
|
||||
u8 read_f();
|
||||
u8 read_k();
|
||||
int read_si();
|
||||
void qkracerm(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -450,7 +453,7 @@ INPUT_PORTS_END
|
||||
|
||||
void qkracerm_state::qkracerm(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM5799(config, m_maincpu, 220000); // approximation
|
||||
m_maincpu->set_option_ram_d12(true);
|
||||
m_maincpu->set_option_lb_10(5);
|
||||
@ -460,14 +463,14 @@ void qkracerm_state::qkracerm(machine_config &config)
|
||||
m_maincpu->read_k().set(FUNC(qkracerm_state::read_k));
|
||||
m_maincpu->read_si().set(FUNC(qkracerm_state::read_si));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
DS8874(config, m_ds8874).write_output().set(FUNC(qkracerm_state::ds8874_output_w));
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 7);
|
||||
m_display->set_segmask(0xdf, 0x7f);
|
||||
m_display->set_segmask(0x20, 0x41); // equals sign
|
||||
config.set_default_layout(layout_qkracerm);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
@ -508,13 +511,15 @@ public:
|
||||
hh_cops1_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void qkspeller(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_do(u8 data);
|
||||
void write_s(u8 data);
|
||||
void write_f(u8 data);
|
||||
u8 read_f();
|
||||
u8 read_k();
|
||||
void qkspeller(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -630,7 +635,7 @@ INPUT_PORTS_END
|
||||
|
||||
void qkspeller_state::qkspeller(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM5799(config, m_maincpu, 220000); // approximation
|
||||
m_maincpu->write_do().set(FUNC(qkspeller_state::write_do));
|
||||
m_maincpu->write_s().set(FUNC(qkspeller_state::write_s));
|
||||
@ -640,12 +645,12 @@ void qkspeller_state::qkspeller(machine_config &config)
|
||||
m_maincpu->read_inb().set_ioport("TEST.0");
|
||||
m_maincpu->read_do3().set_ioport("TEST.1");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 7);
|
||||
m_display->set_segmask(3, 0x7f);
|
||||
config.set_default_layout(layout_qkspeller);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
@ -695,6 +700,9 @@ public:
|
||||
m_ds8874(*this, "ds8874")
|
||||
{ }
|
||||
|
||||
void cambrp(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<ds8874_device> m_ds8874;
|
||||
void ds8874_output_w(u16 data);
|
||||
|
||||
@ -703,7 +711,6 @@ public:
|
||||
void write_s(u8 data);
|
||||
u8 read_f();
|
||||
u8 read_k();
|
||||
void cambrp(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -789,7 +796,7 @@ INPUT_PORTS_END
|
||||
|
||||
void cambrp_state::cambrp(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM5799(config, m_maincpu, 200000); // approximation
|
||||
m_maincpu->set_option_ram_d12(true);
|
||||
m_maincpu->set_option_lb_10(4);
|
||||
@ -798,13 +805,13 @@ void cambrp_state::cambrp(machine_config &config)
|
||||
m_maincpu->read_f().set(FUNC(cambrp_state::read_f));
|
||||
m_maincpu->read_k().set(FUNC(cambrp_state::read_k));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
DS8874(config, m_ds8874).write_output().set(FUNC(cambrp_state::ds8874_output_w));
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 8);
|
||||
m_display->set_segmask(0x1ff, 0xff);
|
||||
config.set_default_layout(layout_cambrp);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -35,6 +35,12 @@ public:
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
// devices
|
||||
required_device<m58846_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -42,17 +48,12 @@ public:
|
||||
optional_ioport_array<4> m_inputs; // max 4
|
||||
|
||||
// misc common
|
||||
u16 m_inp_mux; // multiplexed inputs mask
|
||||
u16 m_inp_mux = 0; // multiplexed inputs mask
|
||||
|
||||
u32 m_grid; // VFD current row data
|
||||
u32 m_plate; // VFD current column data
|
||||
u32 m_grid = 0; // VFD current row data
|
||||
u32 m_plate = 0; // VFD current column data
|
||||
|
||||
u8 read_inputs(int columns);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
@ -60,11 +61,6 @@ protected:
|
||||
|
||||
void hh_melps4_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
m_inp_mux = 0;
|
||||
m_grid = 0;
|
||||
m_plate = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_inp_mux));
|
||||
save_item(NAME(m_grid));
|
||||
@ -134,12 +130,14 @@ public:
|
||||
hh_melps4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void cfrogger(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void grid_w(u16 data);
|
||||
DECLARE_WRITE_LINE_MEMBER(speaker_w);
|
||||
u16 input_r();
|
||||
void cfrogger(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -207,7 +205,7 @@ INPUT_PORTS_END
|
||||
|
||||
void cfrogger_state::cfrogger(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
M58846(config, m_maincpu, 600_kHz_XTAL);
|
||||
m_maincpu->read_k().set(FUNC(cfrogger_state::input_r));
|
||||
m_maincpu->write_s().set(FUNC(cfrogger_state::plate_w));
|
||||
@ -216,7 +214,7 @@ void cfrogger_state::cfrogger(machine_config &config)
|
||||
m_maincpu->write_d().set(FUNC(cfrogger_state::grid_w));
|
||||
m_maincpu->write_t().set(FUNC(cfrogger_state::speaker_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(500, 1080);
|
||||
@ -224,7 +222,7 @@ void cfrogger_state::cfrogger(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(12, 16);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -259,12 +257,14 @@ public:
|
||||
hh_melps4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void gjungler(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void grid_w(u16 data);
|
||||
DECLARE_WRITE_LINE_MEMBER(speaker_w);
|
||||
u16 input_r();
|
||||
void gjungler(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -332,7 +332,7 @@ INPUT_PORTS_END
|
||||
|
||||
void gjungler_state::gjungler(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
M58846(config, m_maincpu, 600_kHz_XTAL);
|
||||
m_maincpu->read_k().set(FUNC(gjungler_state::input_r));
|
||||
m_maincpu->write_s().set(FUNC(gjungler_state::plate_w));
|
||||
@ -342,7 +342,7 @@ void gjungler_state::gjungler(machine_config &config)
|
||||
m_maincpu->write_d().set(FUNC(gjungler_state::grid_w));
|
||||
m_maincpu->write_t().set(FUNC(gjungler_state::speaker_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(481, 1080);
|
||||
@ -350,7 +350,7 @@ void gjungler_state::gjungler(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(12, 18);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
|
@ -92,6 +92,12 @@ public:
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
// devices
|
||||
required_device<pic16c5x_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -99,19 +105,14 @@ public:
|
||||
optional_ioport_array<6> m_inputs; // max 6
|
||||
|
||||
// misc common
|
||||
u8 m_a; // MCU port A write data
|
||||
u8 m_b; // " B
|
||||
u8 m_c; // " C
|
||||
u8 m_d; // " D
|
||||
u16 m_inp_mux; // multiplexed inputs mask
|
||||
u8 m_a = 0; // MCU port A write data
|
||||
u8 m_b = 0; // " B
|
||||
u8 m_c = 0; // " C
|
||||
u8 m_d = 0; // " D
|
||||
u16 m_inp_mux = ~0; // multiplexed inputs mask
|
||||
|
||||
u16 read_inputs(int columns, u16 colmask = ~0);
|
||||
u8 read_rotated_inputs(int columns, u8 rowmask = ~0);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
@ -119,13 +120,6 @@ protected:
|
||||
|
||||
void hh_pic16_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
m_a = 0;
|
||||
m_b = 0;
|
||||
m_c = 0;
|
||||
m_d = 0;
|
||||
m_inp_mux = ~0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_a));
|
||||
save_item(NAME(m_b));
|
||||
@ -212,12 +206,14 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void touchme(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void update_speaker();
|
||||
u8 read_a();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void touchme(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -287,7 +283,7 @@ INPUT_PORTS_END
|
||||
|
||||
void touchme_state::touchme(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 300000); // approximation - RC osc. R=100K, C=47pF
|
||||
m_maincpu->read_a().set(FUNC(touchme_state::read_a));
|
||||
m_maincpu->write_b().set(FUNC(touchme_state::write_b));
|
||||
@ -297,12 +293,12 @@ void touchme_state::touchme(machine_config &config)
|
||||
// PIC CLKOUT, tied to RTCC
|
||||
CLOCK(config, "clock", 300000/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(7, 7);
|
||||
m_display->set_segmask(3, 0x7f);
|
||||
config.set_default_layout(layout_touchme);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -336,10 +332,12 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void pabball(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void pabball(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -397,19 +395,19 @@ INPUT_PORTS_END
|
||||
|
||||
void pabball_state::pabball(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 1200000); // approximation - RC osc. R=18K, C=27pF
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_b().set(FUNC(pabball_state::write_b));
|
||||
m_maincpu->read_c().set_ioport("IN.1");
|
||||
m_maincpu->write_c().set(FUNC(pabball_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 8);
|
||||
m_display->set_segmask(0x200, 0xff);
|
||||
config.set_default_layout(layout_hh_pic16_test);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -443,10 +441,12 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void melodym(machine_config &config);
|
||||
|
||||
private:
|
||||
void write_b(u8 data);
|
||||
u8 read_c();
|
||||
void write_c(u8 data);
|
||||
void melodym(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -519,19 +519,19 @@ INPUT_PORTS_END
|
||||
|
||||
void melodym_state::melodym(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 1000000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.5");
|
||||
m_maincpu->write_b().set(FUNC(melodym_state::write_b));
|
||||
m_maincpu->read_c().set(FUNC(melodym_state::read_c));
|
||||
m_maincpu->write_c().set(FUNC(melodym_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 1);
|
||||
m_display->set_bri_levels(0.9);
|
||||
config.set_default_layout(layout_melodym);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -569,11 +569,13 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void maniac(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void update_speaker();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void maniac(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -621,18 +623,18 @@ INPUT_PORTS_END
|
||||
|
||||
void maniac_state::maniac(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 1000000); // approximation - RC osc. R=~13.4K, C=470pF
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_b().set(FUNC(maniac_state::write_b));
|
||||
m_maincpu->write_c().set(FUNC(maniac_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(2, 7);
|
||||
m_display->set_segmask(3, 0x7f);
|
||||
config.set_default_layout(layout_maniac);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -682,6 +684,12 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void flash(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_b(u8 data);
|
||||
u8 read_c();
|
||||
@ -689,19 +697,12 @@ public:
|
||||
|
||||
void speaker_decay_reset();
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim);
|
||||
double m_speaker_volume;
|
||||
void flash(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
double m_speaker_volume = 0.0;
|
||||
};
|
||||
|
||||
void flash_state::machine_start()
|
||||
{
|
||||
hh_pic16_state::machine_start();
|
||||
|
||||
// zerofill/init
|
||||
m_speaker_volume = 0;
|
||||
save_item(NAME(m_speaker_volume));
|
||||
}
|
||||
|
||||
@ -776,19 +777,19 @@ INPUT_PORTS_END
|
||||
|
||||
void flash_state::flash(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 1050000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_b().set(FUNC(flash_state::write_b));
|
||||
m_maincpu->read_c().set(FUNC(flash_state::read_c));
|
||||
m_maincpu->write_c().set(FUNC(flash_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(2, 7+4);
|
||||
m_display->set_segmask(3, 0x7f);
|
||||
config.set_default_layout(layout_flash);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
TIMER(config, "speaker_decay").configure_periodic(FUNC(flash_state::speaker_decay_sim), attotime::from_msec(25));
|
||||
@ -832,16 +833,18 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
u8 read_c();
|
||||
|
||||
void set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(speed_switch) { set_clock(); }
|
||||
void matchme(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(speed_switch) { set_clock(); }
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void set_clock();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
u8 read_c();
|
||||
};
|
||||
|
||||
void matchme_state::machine_reset()
|
||||
@ -933,18 +936,18 @@ INPUT_PORTS_END
|
||||
|
||||
void matchme_state::matchme(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 1200000); // see set_clock
|
||||
m_maincpu->read_a().set_ioport("IN.3");
|
||||
m_maincpu->write_b().set(FUNC(matchme_state::write_b));
|
||||
m_maincpu->read_c().set(FUNC(matchme_state::read_c));
|
||||
m_maincpu->write_c().set(FUNC(matchme_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 8);
|
||||
config.set_default_layout(layout_matchme);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -983,11 +986,13 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void drdunk(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
u8 read_a();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void drdunk(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1053,20 +1058,20 @@ INPUT_PORTS_END
|
||||
|
||||
void drdunk_state::drdunk(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 800000); // approximation - RC osc. R=18K, C=47pF
|
||||
m_maincpu->read_a().set(FUNC(drdunk_state::read_a));
|
||||
m_maincpu->write_b().set(FUNC(drdunk_state::write_b));
|
||||
m_maincpu->read_c().set_constant(0xff);
|
||||
m_maincpu->write_c().set(FUNC(drdunk_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(6, 7);
|
||||
m_display->set_segmask(0x30, 0x7f);
|
||||
m_display->set_bri_levels(0.01, 0.2); // player led is brighter
|
||||
config.set_default_layout(layout_drdunk);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1112,25 +1117,24 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void leboom(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
u8 read_a();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
|
||||
void speaker_decay_reset();
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(speaker_decay_sim);
|
||||
double m_speaker_volume;
|
||||
void leboom(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
double m_speaker_volume = 0.0;
|
||||
};
|
||||
|
||||
void leboom_state::machine_start()
|
||||
{
|
||||
hh_pic16_state::machine_start();
|
||||
|
||||
// zerofill/init
|
||||
m_speaker_volume = 0;
|
||||
save_item(NAME(m_speaker_volume));
|
||||
}
|
||||
|
||||
@ -1218,18 +1222,18 @@ INPUT_PORTS_END
|
||||
|
||||
void leboom_state::leboom(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 1000000); // approximation
|
||||
m_maincpu->read_a().set(FUNC(leboom_state::read_a));
|
||||
m_maincpu->write_b().set(FUNC(leboom_state::write_b));
|
||||
m_maincpu->read_c().set_constant(0xff);
|
||||
m_maincpu->write_c().set(FUNC(leboom_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 1);
|
||||
config.set_default_layout(layout_leboom);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
TIMER(config, "speaker_decay").configure_periodic(FUNC(leboom_state::speaker_decay_sim), attotime::from_msec(25));
|
||||
@ -1267,12 +1271,14 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void rockpin(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_a(u8 data);
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void write_d(u8 data);
|
||||
void rockpin(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1329,7 +1335,7 @@ INPUT_PORTS_END
|
||||
|
||||
void rockpin_state::rockpin(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1650(config, m_maincpu, 450000); // approximation - RC osc. R=47K, C=47pF
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_a().set(FUNC(rockpin_state::write_a));
|
||||
@ -1343,12 +1349,12 @@ void rockpin_state::rockpin(machine_config &config)
|
||||
// PIC CLKOUT, tied to RTCC
|
||||
CLOCK(config, "clock", 450000/4).signal_handler().set_inputline(m_maincpu, PIC16C5x_RTCC);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(3+6, 8);
|
||||
m_display->set_segmask(7, 0x7f);
|
||||
config.set_default_layout(layout_rockpin);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -1386,11 +1392,13 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void hccbaskb(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
u8 read_a();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void hccbaskb(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1456,20 +1464,20 @@ INPUT_PORTS_END
|
||||
|
||||
void hccbaskb_state::hccbaskb(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 800000); // approximation - RC osc. R=15K, C=47pF
|
||||
m_maincpu->read_a().set(FUNC(hccbaskb_state::read_a));
|
||||
m_maincpu->write_b().set(FUNC(hccbaskb_state::write_b));
|
||||
m_maincpu->read_c().set_constant(0xff);
|
||||
m_maincpu->write_c().set(FUNC(hccbaskb_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(7, 7);
|
||||
m_display->set_segmask(0x60, 0x7f);
|
||||
m_display->set_bri_levels(0.01, 0.2); // player led is brighter
|
||||
config.set_default_layout(layout_hccbaskb);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1510,11 +1518,13 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ttfball(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
u8 read_a();
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void ttfball(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1618,20 +1628,20 @@ INPUT_PORTS_END
|
||||
|
||||
void ttfball_state::ttfball(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1655(config, m_maincpu, 500000); // approximation - RC osc. R=27K(set 1) or 33K(set 2), C=68pF
|
||||
m_maincpu->read_a().set(FUNC(ttfball_state::read_a));
|
||||
m_maincpu->write_b().set(FUNC(ttfball_state::write_b));
|
||||
m_maincpu->read_c().set_constant(0xff);
|
||||
m_maincpu->write_c().set(FUNC(ttfball_state::write_c));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 11);
|
||||
m_display->set_segmask(0x7f, 0xff);
|
||||
m_display->set_bri_levels(0.002, 0.02); // player led is brighter
|
||||
config.set_default_layout(layout_ttfball);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1671,12 +1681,14 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void uspbball(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_a(u8 data);
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void write_d(u8 data);
|
||||
void uspbball(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1735,7 +1747,7 @@ INPUT_PORTS_END
|
||||
|
||||
void uspbball_state::uspbball(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1650(config, m_maincpu, 900000); // approximation - RC osc. R=22K, C=47pF
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_a().set(FUNC(uspbball_state::write_a));
|
||||
@ -1749,12 +1761,12 @@ void uspbball_state::uspbball(machine_config &config)
|
||||
// PIC CLKOUT, tied to RTCC
|
||||
CLOCK(config, "clock", 900000/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(6, 16);
|
||||
m_display->set_segmask(7, 0x7f);
|
||||
config.set_default_layout(layout_hh_pic16_test);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
@ -1789,13 +1801,15 @@ public:
|
||||
hh_pic16_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void us2pfball(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
u8 read_a();
|
||||
void write_a(u8 data);
|
||||
void write_b(u8 data);
|
||||
void write_c(u8 data);
|
||||
void write_d(u8 data);
|
||||
void us2pfball(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1877,7 +1891,7 @@ INPUT_PORTS_END
|
||||
|
||||
void us2pfball_state::us2pfball(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
PIC1650(config, m_maincpu, 800000); // approximation - RC osc. R=39K, C=75pF
|
||||
m_maincpu->read_a().set(FUNC(us2pfball_state::read_a));
|
||||
m_maincpu->write_a().set(FUNC(us2pfball_state::write_a));
|
||||
@ -1891,12 +1905,12 @@ void us2pfball_state::us2pfball(machine_config &config)
|
||||
// PIC CLKOUT, tied to RTCC
|
||||
CLOCK(config, "clock", 800000/4).signal_handler().set_inputline("maincpu", PIC16C5x_RTCC);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 7);
|
||||
m_display->set_segmask(0xff, 0x7f);
|
||||
config.set_default_layout(layout_us2pfball);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
|
@ -50,6 +50,13 @@ public:
|
||||
m_inputs(*this, "IN.%u", 0)
|
||||
{ }
|
||||
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override { update_int(); }
|
||||
virtual void device_post_load() override { update_int(); }
|
||||
|
||||
// devices
|
||||
required_device<pps41_base_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -65,14 +72,7 @@ public:
|
||||
u16 m_r = 0;
|
||||
|
||||
u8 read_inputs(int columns);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
|
||||
protected:
|
||||
virtual void update_int() { ; }
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override { update_int(); }
|
||||
virtual void device_post_load() override { update_int(); }
|
||||
};
|
||||
|
||||
|
||||
@ -149,10 +149,12 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ftri1(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
void ftri1(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -200,18 +202,18 @@ INPUT_PORTS_END
|
||||
|
||||
void ftri1_state::ftri1(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM78(config, m_maincpu, 300000); // approximation - VC osc. R=68K
|
||||
m_maincpu->write_d().set(FUNC(ftri1_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(ftri1_state::write_r));
|
||||
m_maincpu->read_p().set_ioport("IN.0");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 8);
|
||||
m_display->set_segmask(0x1e0, 0x7f);
|
||||
config.set_default_layout(layout_ftri1);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -252,15 +254,16 @@ public:
|
||||
m_beeper(*this, "beeper")
|
||||
{ }
|
||||
|
||||
void mastmind(machine_config &config);
|
||||
void smastmind(machine_config &config);
|
||||
|
||||
private:
|
||||
optional_device<beep_device> m_beeper;
|
||||
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
u8 read_p();
|
||||
|
||||
void mastmind(machine_config &config);
|
||||
void smastmind(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -325,18 +328,18 @@ INPUT_PORTS_END
|
||||
|
||||
void mastmind_state::mastmind(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM75(config, m_maincpu, 360000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(mastmind_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(mastmind_state::write_r));
|
||||
m_maincpu->read_p().set(FUNC(mastmind_state::read_p));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 7);
|
||||
m_display->set_segmask(0xff, 0x7f);
|
||||
config.set_default_layout(layout_mastmind);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
void mastmind_state::smastmind(machine_config &config)
|
||||
@ -345,7 +348,7 @@ void mastmind_state::smastmind(machine_config &config)
|
||||
|
||||
config.set_default_layout(layout_smastmind);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
BEEP(config, m_beeper, 2400); // approximation
|
||||
m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -398,14 +401,16 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void dunksunk(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch) { update_int(); }
|
||||
DECLARE_INPUT_CHANGED_MEMBER(game_switch) { update_int(); }
|
||||
virtual void update_int() override;
|
||||
|
||||
private:
|
||||
virtual void update_int() override;
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
void dunksunk(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -467,19 +472,19 @@ INPUT_PORTS_END
|
||||
|
||||
void dunksunk_state::dunksunk(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM76EL(config, m_maincpu, 390000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(dunksunk_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(dunksunk_state::write_r));
|
||||
m_maincpu->read_p().set_ioport("IN.0");
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 7);
|
||||
m_display->set_segmask(0x1e0, 0x7f);
|
||||
m_display->set_bri_levels(0.015, 0.2); // player led is brighter
|
||||
config.set_default_layout(layout_dunksunk);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -524,14 +529,16 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(digits_switch) { update_int(); }
|
||||
virtual void update_int() override;
|
||||
void memoquiz(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(digits_switch) { update_int(); }
|
||||
|
||||
private:
|
||||
virtual void update_int() override;
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
u8 read_p();
|
||||
void memoquiz(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -608,18 +615,18 @@ INPUT_PORTS_END
|
||||
|
||||
void memoquiz_state::memoquiz(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM75(config, m_maincpu, 360000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(memoquiz_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(memoquiz_state::write_r));
|
||||
m_maincpu->read_p().set(FUNC(memoquiz_state::read_p));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 8);
|
||||
m_display->set_segmask(0xff, 0xff);
|
||||
config.set_default_layout(layout_memoquiz);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
@ -655,11 +662,13 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void mfootb2(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
void write_spk(u8 data);
|
||||
void mfootb2(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -712,7 +721,7 @@ INPUT_PORTS_END
|
||||
|
||||
void mfootb2_state::mfootb2(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM77LA(config, m_maincpu, 380000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(mfootb2_state::write_d));
|
||||
m_maincpu->read_d().set_ioport("IN.1");
|
||||
@ -720,14 +729,14 @@ void mfootb2_state::mfootb2(machine_config &config)
|
||||
m_maincpu->read_p().set_ioport("IN.0");
|
||||
m_maincpu->write_spk().set(FUNC(mfootb2_state::write_spk));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 11);
|
||||
m_display->set_segmask(0x3c7, 0x7f);
|
||||
m_display->set_segmask(0x002, 0xff);
|
||||
m_display->set_bri_levels(0.015, 0.2); // ball led is brighter
|
||||
config.set_default_layout(layout_mfootb2);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -767,12 +776,14 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void brainbaf(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
u8 read_p();
|
||||
void write_spk(u8 data);
|
||||
void brainbaf(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -875,19 +886,19 @@ INPUT_PORTS_END
|
||||
|
||||
void brainbaf_state::brainbaf(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM78LA(config, m_maincpu, 440000); // approximation - VC osc. R=10K
|
||||
m_maincpu->write_d().set(FUNC(brainbaf_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(brainbaf_state::write_r));
|
||||
m_maincpu->read_p().set(FUNC(brainbaf_state::read_p));
|
||||
m_maincpu->write_spk().set(FUNC(brainbaf_state::write_spk));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 14);
|
||||
m_display->set_segmask(0xff, 0x3fff);
|
||||
config.set_default_layout(layout_brainbaf);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -928,12 +939,14 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void horocomp(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
u8 read_p();
|
||||
void write_spk(u8 data);
|
||||
void horocomp(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1051,19 +1064,19 @@ INPUT_PORTS_END
|
||||
|
||||
void horocomp_state::horocomp(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM78LA(config, m_maincpu, 440000); // approximation - VC osc. R=10K
|
||||
m_maincpu->write_d().set(FUNC(horocomp_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(horocomp_state::write_r));
|
||||
m_maincpu->read_p().set(FUNC(horocomp_state::read_p));
|
||||
m_maincpu->write_spk().set(FUNC(horocomp_state::write_spk));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 14);
|
||||
m_display->set_segmask(0xff, 0x3fff);
|
||||
config.set_default_layout(layout_horocomp);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -1105,6 +1118,9 @@ public:
|
||||
m_subcpu(*this, "subcpu")
|
||||
{ }
|
||||
|
||||
void mwcfootb(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<pps41_base_device> m_subcpu;
|
||||
|
||||
void update_display();
|
||||
@ -1116,8 +1132,6 @@ public:
|
||||
|
||||
void sub_write_d(u16 data);
|
||||
void sub_write_r(u16 data);
|
||||
|
||||
void mwcfootb(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1234,7 +1248,7 @@ INPUT_PORTS_END
|
||||
|
||||
void mwcfootb_state::mwcfootb(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM78(config, m_maincpu, 360000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(mwcfootb_state::main_write_d));
|
||||
m_maincpu->read_d().set(FUNC(mwcfootb_state::main_read_d));
|
||||
@ -1250,7 +1264,7 @@ void mwcfootb_state::mwcfootb(machine_config &config)
|
||||
|
||||
config.set_perfect_quantum(m_maincpu);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 571);
|
||||
@ -1260,7 +1274,7 @@ void mwcfootb_state::mwcfootb(machine_config &config)
|
||||
m_display->set_segmask(0x7f, 0x7f);
|
||||
config.set_default_layout(layout_mwcfootb);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1301,14 +1315,16 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(players_switch) { update_int(); }
|
||||
virtual void update_int() override;
|
||||
void scrabsen(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(players_switch) { update_int(); }
|
||||
|
||||
private:
|
||||
virtual void update_int() override;
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
u8 read_p();
|
||||
void scrabsen(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1404,17 +1420,17 @@ INPUT_PORTS_END
|
||||
|
||||
void scrabsen_state::scrabsen(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM76EL(config, m_maincpu, 380000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(scrabsen_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(scrabsen_state::write_r));
|
||||
m_maincpu->read_p().set(FUNC(scrabsen_state::read_p));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(2, 8);
|
||||
config.set_default_layout(layout_scrabsen);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1452,14 +1468,16 @@ public:
|
||||
hh_pps41_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(players_switch) { update_int(); }
|
||||
virtual void update_int() override;
|
||||
void rdqa(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(players_switch) { update_int(); }
|
||||
|
||||
private:
|
||||
virtual void update_int() override;
|
||||
void update_display();
|
||||
void write_d(u16 data);
|
||||
void write_r(u16 data);
|
||||
u8 read_p();
|
||||
void rdqa(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1538,18 +1556,18 @@ INPUT_PORTS_END
|
||||
|
||||
void rdqa_state::rdqa(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
MM76EL(config, m_maincpu, 400000); // approximation - VC osc. R=56K
|
||||
m_maincpu->write_d().set(FUNC(rdqa_state::write_d));
|
||||
m_maincpu->write_r().set(FUNC(rdqa_state::write_r));
|
||||
m_maincpu->read_p().set(FUNC(rdqa_state::read_p));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(5, 7);
|
||||
m_display->set_segmask(0x1f, 0x7f);
|
||||
config.set_default_layout(layout_rdqa);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
|
@ -5678,14 +5678,15 @@ public:
|
||||
inp_fixed_last();
|
||||
}
|
||||
|
||||
// R2 connects to a single LED behind the screen
|
||||
void led_w(u8 data) { m_led_out = data >> 1 & 1; }
|
||||
output_finder<> m_led_out;
|
||||
|
||||
void tgaiden(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
|
||||
private:
|
||||
// R2 connects to a single LED behind the screen
|
||||
void led_w(u8 data) { m_led_out = data >> 1 & 1; }
|
||||
output_finder<> m_led_out;
|
||||
};
|
||||
|
||||
void tgaiden_state::machine_start()
|
||||
@ -5736,7 +5737,6 @@ INPUT_PORTS_END
|
||||
void tgaiden_state::tgaiden(machine_config &config)
|
||||
{
|
||||
sm510_tiger(config, 1476, 1080);
|
||||
|
||||
m_maincpu->write_r().append(FUNC(tgaiden_state::led_w));
|
||||
}
|
||||
|
||||
@ -8164,8 +8164,10 @@ public:
|
||||
inp_fixed_last();
|
||||
}
|
||||
|
||||
virtual void input_w(u8 data) override;
|
||||
void tnmarebc(machine_config &config);
|
||||
|
||||
private:
|
||||
virtual void input_w(u8 data) override;
|
||||
};
|
||||
|
||||
// handlers
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -122,12 +122,12 @@ protected:
|
||||
optional_ioport_array<6> m_inputs; // max 6
|
||||
|
||||
// misc common
|
||||
u8 m_port[9]; // MCU port A-I write data (optional)
|
||||
u8 m_int; // MCU INT pin state
|
||||
u16 m_inp_mux; // multiplexed inputs mask
|
||||
u8 m_port[9] = { }; // MCU port A-I write data (optional)
|
||||
u8 m_int = 0; // MCU INT pin state
|
||||
u16 m_inp_mux = 0; // multiplexed inputs mask
|
||||
|
||||
u32 m_grid; // VFD current row data
|
||||
u32 m_plate; // VFD current column data
|
||||
u32 m_grid = 0; // VFD current row data
|
||||
u32 m_plate = 0; // VFD current column data
|
||||
|
||||
u8 read_inputs(int columns);
|
||||
void refresh_interrupts(void);
|
||||
@ -152,13 +152,6 @@ protected:
|
||||
|
||||
void hh_ucom4_state::machine_start()
|
||||
{
|
||||
// zerofill
|
||||
memset(m_port, 0, sizeof(m_port));
|
||||
m_int = 0;
|
||||
m_inp_mux = 0;
|
||||
m_grid = 0;
|
||||
m_plate = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_port));
|
||||
save_item(NAME(m_int));
|
||||
@ -255,11 +248,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ufombs(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void speaker_w(u8 data);
|
||||
void ufombs(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -312,7 +307,7 @@ INPUT_PORTS_END
|
||||
|
||||
void ufombs_state::ufombs(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D552(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -324,7 +319,7 @@ void ufombs_state::ufombs(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(ufombs_state::grid_w));
|
||||
m_maincpu->write_i().set(FUNC(ufombs_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(243, 1080);
|
||||
@ -332,7 +327,7 @@ void ufombs_state::ufombs(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 10);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -377,11 +372,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ssfball(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
u8 input_b_r();
|
||||
void ssfball(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -468,7 +465,7 @@ INPUT_PORTS_END
|
||||
|
||||
void ssfball_state::ssfball(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.3");
|
||||
m_maincpu->read_b().set(FUNC(ssfball_state::input_b_r));
|
||||
@ -480,7 +477,7 @@ void ssfball_state::ssfball(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(ssfball_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(ssfball_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 482);
|
||||
@ -488,7 +485,7 @@ void ssfball_state::ssfball(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 16);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -538,11 +535,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void bmsoccer(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
u8 input_a_r();
|
||||
void bmsoccer(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -615,7 +614,7 @@ INPUT_PORTS_END
|
||||
|
||||
void bmsoccer_state::bmsoccer(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D552(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set(FUNC(bmsoccer_state::input_a_r));
|
||||
m_maincpu->read_b().set_ioport("IN.2");
|
||||
@ -627,7 +626,7 @@ void bmsoccer_state::bmsoccer(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(bmsoccer_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(bmsoccer_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(271, 1080);
|
||||
@ -635,7 +634,7 @@ void bmsoccer_state::bmsoccer(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 16);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -671,11 +670,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void bmsafari(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void speaker_w(u8 data);
|
||||
void bmsafari(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -733,7 +734,7 @@ INPUT_PORTS_END
|
||||
|
||||
void bmsafari_state::bmsafari(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D552(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -744,7 +745,7 @@ void bmsafari_state::bmsafari(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(bmsafari_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(bmsafari_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(248, 1080);
|
||||
@ -752,7 +753,7 @@ void bmsafari_state::bmsafari(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 10);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -791,11 +792,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void splasfgt(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
u8 input_b_r();
|
||||
void splasfgt(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -891,7 +894,7 @@ INPUT_PORTS_END
|
||||
|
||||
void splasfgt_state::splasfgt(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.4");
|
||||
m_maincpu->read_b().set(FUNC(splasfgt_state::input_b_r));
|
||||
@ -903,7 +906,7 @@ void splasfgt_state::splasfgt(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(splasfgt_state::grid_w));
|
||||
m_maincpu->write_i().set(FUNC(splasfgt_state::grid_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 476);
|
||||
@ -911,7 +914,7 @@ void splasfgt_state::splasfgt(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 16);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
static const double speaker_levels[] = { 0.0, 1.0, -1.0, 0.0 };
|
||||
@ -953,10 +956,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void bcclimbr(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void bcclimbr(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1006,7 +1011,7 @@ INPUT_PORTS_END
|
||||
|
||||
void bcclimbr_state::bcclimbr(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -1018,7 +1023,7 @@ void bcclimbr_state::bcclimbr(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(bcclimbr_state::grid_w));
|
||||
m_maincpu->write_i().set(FUNC(bcclimbr_state::grid_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(310, 1080);
|
||||
@ -1026,7 +1031,7 @@ void bcclimbr_state::bcclimbr(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(6, 20);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1068,11 +1073,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tactix(machine_config &config);
|
||||
|
||||
private:
|
||||
void leds_w(offs_t offset, u8 data);
|
||||
void speaker_w(u8 data);
|
||||
void input_w(offs_t offset, u8 data);
|
||||
u8 input_r();
|
||||
void tactix(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1139,7 +1146,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tactix_state::tactix(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D557L(config, m_maincpu, 200000); // approximation
|
||||
m_maincpu->read_a().set(FUNC(tactix_state::input_r));
|
||||
m_maincpu->write_c().set(FUNC(tactix_state::input_w));
|
||||
@ -1148,11 +1155,11 @@ void tactix_state::tactix(machine_config &config)
|
||||
m_maincpu->write_f().set(FUNC(tactix_state::leds_w));
|
||||
m_maincpu->write_g().set(FUNC(tactix_state::speaker_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(4, 4);
|
||||
config.set_default_layout(layout_tactix);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1187,15 +1194,17 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void ctntune(machine_config &config);
|
||||
|
||||
// start button powers unit back on
|
||||
DECLARE_INPUT_CHANGED_MEMBER(start_button) { m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); }
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void _7seg_w(offs_t offset, u8 data);
|
||||
void speaker_w(u8 data);
|
||||
void input_w(offs_t offset, u8 data);
|
||||
u8 input_r();
|
||||
void ctntune(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1279,7 +1288,7 @@ INPUT_PORTS_END
|
||||
|
||||
void ctntune_state::ctntune(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D557L(config, m_maincpu, 200000); // approximation
|
||||
m_maincpu->read_a().set(FUNC(ctntune_state::input_r));
|
||||
m_maincpu->write_c().set(FUNC(ctntune_state::input_w));
|
||||
@ -1288,12 +1297,12 @@ void ctntune_state::ctntune(machine_config &config)
|
||||
m_maincpu->write_f().set(FUNC(ctntune_state::_7seg_w));
|
||||
m_maincpu->write_g().set(FUNC(ctntune_state::speaker_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 7+2);
|
||||
m_display->set_segmask(1, 0x7f);
|
||||
config.set_default_layout(layout_ctntune);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1330,10 +1339,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void invspace(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void invspace(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1382,7 +1393,7 @@ INPUT_PORTS_END
|
||||
|
||||
void invspace_state::invspace(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D552(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -1394,7 +1405,7 @@ void invspace_state::invspace(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(invspace_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(invspace_state::grid_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(289, 1080);
|
||||
@ -1402,7 +1413,7 @@ void invspace_state::invspace(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 19);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1442,10 +1453,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void efball(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void efball(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1508,7 +1521,7 @@ INPUT_PORTS_END
|
||||
|
||||
void efball_state::efball(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -1520,11 +1533,11 @@ void efball_state::efball(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(efball_state::grid_w));
|
||||
m_maincpu->write_i().set(FUNC(efball_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 11);
|
||||
config.set_default_layout(layout_efball);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1563,11 +1576,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void galaxy2b(machine_config &config);
|
||||
void galaxy2(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void galaxy2b(machine_config &config);
|
||||
void galaxy2(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1616,7 +1631,7 @@ INPUT_PORTS_END
|
||||
|
||||
void galaxy2_state::galaxy2(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -1628,7 +1643,7 @@ void galaxy2_state::galaxy2(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(galaxy2_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(galaxy2_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(304, 1080);
|
||||
@ -1636,7 +1651,7 @@ void galaxy2_state::galaxy2(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 15);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1646,7 +1661,7 @@ void galaxy2_state::galaxy2b(machine_config &config)
|
||||
{
|
||||
galaxy2(config);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device *screen = subdevice<screen_device>("screen");
|
||||
screen->set_size(306, 1080);
|
||||
screen->set_visarea_full();
|
||||
@ -1695,10 +1710,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void astrocmd(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void astrocmd(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1754,7 +1771,7 @@ INPUT_PORTS_END
|
||||
|
||||
void astrocmd_state::astrocmd(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -1766,7 +1783,7 @@ void astrocmd_state::astrocmd(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(astrocmd_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(astrocmd_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 525);
|
||||
@ -1774,7 +1791,7 @@ void astrocmd_state::astrocmd(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 17);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1815,10 +1832,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void edracula(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void edracula(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1866,7 +1885,7 @@ INPUT_PORTS_END
|
||||
|
||||
void edracula_state::edracula(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -1878,7 +1897,7 @@ void edracula_state::edracula(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(edracula_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(edracula_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 526);
|
||||
@ -1886,7 +1905,7 @@ void edracula_state::edracula(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 18);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -1922,11 +1941,13 @@ public:
|
||||
m_lcd(*this, "lcd")
|
||||
{ }
|
||||
|
||||
void mcompgin(machine_config &config);
|
||||
|
||||
private:
|
||||
required_device<hlcd0530_device> m_lcd;
|
||||
|
||||
void lcd_output_w(offs_t offset, u32 data);
|
||||
void lcd_w(u8 data);
|
||||
void mcompgin(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -1964,13 +1985,13 @@ INPUT_PORTS_END
|
||||
|
||||
void mcompgin_state::mcompgin(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D650(config, m_maincpu, 400_kHz_XTAL); // TDK FCR400K
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
m_maincpu->write_e().set(FUNC(mcompgin_state::lcd_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
HLCD0530(config, m_lcd, 500); // C=0.01uF
|
||||
m_lcd->write_cols().set(FUNC(mcompgin_state::lcd_output_w));
|
||||
|
||||
@ -1978,7 +1999,7 @@ void mcompgin_state::mcompgin(machine_config &config)
|
||||
|
||||
config.set_default_layout(layout_mcompgin);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
// roms
|
||||
@ -2008,11 +2029,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void mvbfree(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void speaker_w(u8 data);
|
||||
void mvbfree(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2070,7 +2093,7 @@ INPUT_PORTS_END
|
||||
|
||||
void mvbfree_state::mvbfree(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -2082,11 +2105,11 @@ void mvbfree_state::mvbfree(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(mvbfree_state::grid_w));
|
||||
m_maincpu->write_i().set(FUNC(mvbfree_state::speaker_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(14, 10);
|
||||
config.set_default_layout(layout_mvbfree);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2127,11 +2150,13 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void grobot9(machine_config &config);
|
||||
|
||||
private:
|
||||
void lamps_w(offs_t offset, u8 data);
|
||||
void speaker_w(u8 data);
|
||||
void input_w(u8 data);
|
||||
u8 input_r();
|
||||
void grobot9(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2197,7 +2222,7 @@ INPUT_PORTS_END
|
||||
|
||||
void grobot9_state::grobot9(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D557L(config, m_maincpu, 160000); // approximation
|
||||
m_maincpu->read_a().set(FUNC(grobot9_state::input_r));
|
||||
m_maincpu->write_c().set(FUNC(grobot9_state::input_w));
|
||||
@ -2205,11 +2230,11 @@ void grobot9_state::grobot9(machine_config &config)
|
||||
m_maincpu->write_e().set(FUNC(grobot9_state::lamps_w));
|
||||
m_maincpu->write_f().set(FUNC(grobot9_state::lamps_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(1, 9);
|
||||
config.set_default_layout(layout_grobot9);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2246,10 +2271,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tccombat(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void tccombat(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2295,7 +2322,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tccombat_state::tccombat(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D552(config, m_maincpu, 400000); // approximation
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_c().set(FUNC(tccombat_state::grid_w));
|
||||
@ -2306,7 +2333,7 @@ void tccombat_state::tccombat(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(tccombat_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(tccombat_state::grid_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(300, 1080);
|
||||
@ -2314,7 +2341,7 @@ void tccombat_state::tccombat(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 20);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2356,18 +2383,20 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tmtennis(machine_config &config);
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch) { set_clock(); }
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
|
||||
private:
|
||||
void set_clock();
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void port_e_w(u8 data);
|
||||
u8 input_r(offs_t offset);
|
||||
|
||||
void set_clock();
|
||||
DECLARE_INPUT_CHANGED_MEMBER(difficulty_switch) { set_clock(); }
|
||||
void tmtennis(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
void tmtennis_state::machine_reset()
|
||||
@ -2463,7 +2492,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tmtennis_state::tmtennis(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D552(config, m_maincpu, 360000); // see set_clock
|
||||
m_maincpu->read_a().set(FUNC(tmtennis_state::input_r));
|
||||
m_maincpu->read_b().set(FUNC(tmtennis_state::input_r));
|
||||
@ -2475,7 +2504,7 @@ void tmtennis_state::tmtennis(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(tmtennis_state::grid_w));
|
||||
m_maincpu->write_i().set(FUNC(tmtennis_state::grid_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 417);
|
||||
@ -2484,7 +2513,7 @@ void tmtennis_state::tmtennis(machine_config &config)
|
||||
PWM_DISPLAY(config, m_display).set_size(12, 12);
|
||||
config.set_default_layout(layout_tmtennis);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2530,10 +2559,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tmpacman(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void tmpacman(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2583,7 +2614,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tmpacman_state::tmpacman(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 430_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -2595,7 +2626,7 @@ void tmpacman_state::tmpacman(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(tmpacman_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(tmpacman_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 508);
|
||||
@ -2603,7 +2634,7 @@ void tmpacman_state::tmpacman(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 19);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2645,10 +2676,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tmscramb(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void tmscramb(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2696,7 +2729,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tmscramb_state::tmscramb(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->read_b().set_ioport("IN.1");
|
||||
@ -2708,7 +2741,7 @@ void tmscramb_state::tmscramb(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(tmscramb_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(tmscramb_state::grid_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 556);
|
||||
@ -2716,7 +2749,7 @@ void tmscramb_state::tmscramb(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(10, 17);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2757,10 +2790,12 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void tcaveman(machine_config &config);
|
||||
|
||||
private:
|
||||
void update_display();
|
||||
void grid_w(offs_t offset, u8 data);
|
||||
void plate_w(offs_t offset, u8 data);
|
||||
void tcaveman(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2806,7 +2841,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tcaveman_state::tcaveman(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set_ioport("IN.0");
|
||||
m_maincpu->write_c().set(FUNC(tcaveman_state::grid_w));
|
||||
@ -2817,7 +2852,7 @@ void tcaveman_state::tcaveman(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(tcaveman_state::plate_w));
|
||||
m_maincpu->write_i().set(FUNC(tcaveman_state::plate_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(1920, 559);
|
||||
@ -2825,7 +2860,7 @@ void tcaveman_state::tcaveman(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(8, 19);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
@ -2867,9 +2902,11 @@ public:
|
||||
hh_ucom4_state(mconfig, type, tag)
|
||||
{ }
|
||||
|
||||
void alnchase(machine_config &config);
|
||||
|
||||
private:
|
||||
void output_w(offs_t offset, u8 data);
|
||||
u8 input_r();
|
||||
void alnchase(machine_config &config);
|
||||
};
|
||||
|
||||
// handlers
|
||||
@ -2948,7 +2985,7 @@ INPUT_PORTS_END
|
||||
|
||||
void alnchase_state::alnchase(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
NEC_D553(config, m_maincpu, 400_kHz_XTAL);
|
||||
m_maincpu->read_a().set(FUNC(alnchase_state::input_r));
|
||||
m_maincpu->read_b().set_ioport("IN.2");
|
||||
@ -2960,7 +2997,7 @@ void alnchase_state::alnchase(machine_config &config)
|
||||
m_maincpu->write_h().set(FUNC(alnchase_state::output_w));
|
||||
m_maincpu->write_i().set(FUNC(alnchase_state::output_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
|
||||
screen.set_refresh_hz(60);
|
||||
screen.set_size(365, 1080);
|
||||
@ -2968,7 +3005,7 @@ void alnchase_state::alnchase(machine_config &config)
|
||||
|
||||
PWM_DISPLAY(config, m_display).set_size(9, 17);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker);
|
||||
m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
|
@ -520,7 +520,6 @@ void tispeak_state::machine_start()
|
||||
hh_tms1k_state::machine_start();
|
||||
|
||||
m_ol_out.resolve();
|
||||
|
||||
init_cartridge();
|
||||
}
|
||||
|
||||
@ -1292,7 +1291,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tispeak_state::tms5110_route(machine_config &config)
|
||||
{
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
m_tms5100->m0().set(m_tms6100, FUNC(tms6100_device::m0_w));
|
||||
m_tms5100->m1().set(m_tms6100, FUNC(tms6100_device::m1_w));
|
||||
m_tms5100->addr().set(m_tms6100, FUNC(tms6100_device::add_w));
|
||||
@ -1303,7 +1302,7 @@ void tispeak_state::tms5110_route(machine_config &config)
|
||||
|
||||
void tispeak_state::snmath(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
TMS0270(config, m_maincpu, MASTER_CLOCK/2);
|
||||
m_maincpu->k().set(FUNC(tispeak_state::snspell_read_k));
|
||||
m_maincpu->o().set(FUNC(tispeak_state::snmath_write_o));
|
||||
@ -1313,12 +1312,12 @@ void tispeak_state::snmath(machine_config &config)
|
||||
m_maincpu->write_ctl().set("tms5100", FUNC(tms5110_device::ctl_w));
|
||||
m_maincpu->write_pdc().set("tms5100", FUNC(tms5110_device::pdc_w));
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(16, 16);
|
||||
m_display->set_segmask(0x21ff, 0x3fff);
|
||||
config.set_default_layout(layout_snmath);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
TMS6100(config, m_tms6100, MASTER_CLOCK/4);
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
@ -1331,12 +1330,12 @@ void tispeak_state::sns_cd2801(machine_config &config)
|
||||
{
|
||||
snmath(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
m_maincpu->o().set(FUNC(tispeak_state::snspell_write_o));
|
||||
|
||||
config.set_default_layout(layout_snspell);
|
||||
|
||||
/* cartridge */
|
||||
// cartridge
|
||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "snspell", "vsm");
|
||||
m_cart->set_device_load(FUNC(tispeak_state::cart_load));
|
||||
|
||||
@ -1347,7 +1346,7 @@ void tispeak_state::snspellit(machine_config &config)
|
||||
{
|
||||
sns_cd2801(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
config.set_default_layout(layout_snmath);
|
||||
}
|
||||
|
||||
@ -1355,7 +1354,7 @@ void tispeak_state::sns_tmc0281(machine_config &config)
|
||||
{
|
||||
sns_cd2801(config);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
TMC0281(config.replace(), m_tms5100, MASTER_CLOCK);
|
||||
tms5110_route(config);
|
||||
}
|
||||
@ -1364,7 +1363,7 @@ void tispeak_state::snspellsp(machine_config &config)
|
||||
{
|
||||
sns_tmc0281(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
config.set_default_layout(layout_snspellsp);
|
||||
}
|
||||
|
||||
@ -1372,7 +1371,7 @@ void tispeak_state::sns_tmc0281d(machine_config &config)
|
||||
{
|
||||
sns_cd2801(config);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
TMC0281D(config.replace(), m_tms5100, MASTER_CLOCK);
|
||||
tms5110_route(config);
|
||||
}
|
||||
@ -1382,12 +1381,12 @@ void tispeak_state::snread(machine_config &config)
|
||||
{
|
||||
snmath(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
m_maincpu->o().set(FUNC(tispeak_state::snspell_write_o));
|
||||
|
||||
config.set_default_layout(layout_snread);
|
||||
|
||||
/* cartridge */
|
||||
// cartridge
|
||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "snread", "vsm");
|
||||
m_cart->set_device_load(FUNC(tispeak_state::cart_load));
|
||||
|
||||
@ -1399,13 +1398,13 @@ void tispeak_state::lantutor(machine_config &config)
|
||||
{
|
||||
snmath(config);
|
||||
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
m_maincpu->o().set(FUNC(tispeak_state::snspell_write_o));
|
||||
m_maincpu->r().set(FUNC(tispeak_state::lantutor_write_r));
|
||||
|
||||
config.set_default_layout(layout_snread);
|
||||
|
||||
/* cartridge */
|
||||
// cartridge
|
||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "lantutor", "vsm,bin");
|
||||
m_cart->set_must_be_loaded(true);
|
||||
m_cart->set_device_load(FUNC(tispeak_state::cart_load));
|
||||
@ -1416,22 +1415,22 @@ void tispeak_state::lantutor(machine_config &config)
|
||||
|
||||
void tispeak_state::snspellc(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
TMS1100(config, m_maincpu, MASTER_CLOCK/2);
|
||||
m_maincpu->k().set(FUNC(tispeak_state::snspellc_read_k));
|
||||
m_maincpu->o().set(FUNC(tispeak_state::snspellc_write_o));
|
||||
m_maincpu->r().set(FUNC(tispeak_state::snspellc_write_r));
|
||||
|
||||
/* no visual feedback! */
|
||||
// no visual feedback!
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
TMS6100(config, m_tms6100, MASTER_CLOCK/4);
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
TMC0281D(config, m_tms5100, MASTER_CLOCK);
|
||||
tms5110_route(config);
|
||||
|
||||
/* cartridge */
|
||||
// cartridge
|
||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "snspell", "vsm");
|
||||
m_cart->set_device_load(FUNC(tispeak_state::cart_load));
|
||||
|
||||
@ -1442,7 +1441,7 @@ void tispeak_state::snspellcuk(machine_config &config)
|
||||
{
|
||||
snspellc(config);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
CD2801(config.replace(), m_tms5100, MASTER_CLOCK); // CD2801A!
|
||||
tms5110_route(config);
|
||||
}
|
||||
@ -1450,7 +1449,7 @@ void tispeak_state::snspellcuk(machine_config &config)
|
||||
|
||||
void tispeak_state::vocaid(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
TMS1100(config, m_maincpu, MASTER_CLOCK/2);
|
||||
m_maincpu->k().set(FUNC(tispeak_state::tntell_read_k));
|
||||
m_maincpu->o().set(FUNC(tispeak_state::snspellc_write_o));
|
||||
@ -1459,7 +1458,7 @@ void tispeak_state::vocaid(machine_config &config)
|
||||
TIMER(config, "ol_timer").configure_periodic(FUNC(tispeak_state::tntell_get_overlay), attotime::from_msec(50));
|
||||
config.set_default_layout(layout_tntell);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
TMS6100(config, m_tms6100, MASTER_CLOCK/4);
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
@ -1471,7 +1470,7 @@ void tispeak_state::tntell(machine_config &config)
|
||||
{
|
||||
vocaid(config);
|
||||
|
||||
/* cartridge */
|
||||
// cartridge
|
||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "tntell", "vsm");
|
||||
m_cart->set_device_load(FUNC(tispeak_state::cart_load));
|
||||
|
||||
@ -1481,7 +1480,7 @@ void tispeak_state::tntell(machine_config &config)
|
||||
|
||||
void tispeak_state::k28m2(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
TMS1400(config, m_maincpu, MASTER_CLOCK/2);
|
||||
m_maincpu->k().set(FUNC(tispeak_state::k28_read_k));
|
||||
m_maincpu->o().set(FUNC(tispeak_state::k28_write_o));
|
||||
@ -1489,14 +1488,14 @@ void tispeak_state::k28m2(machine_config &config)
|
||||
|
||||
config.set_default_layout(layout_k28m2);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
TMS6100(config, m_tms6100, MASTER_CLOCK/4);
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
TMS5110A(config, m_tms5100, MASTER_CLOCK);
|
||||
tms5110_route(config);
|
||||
|
||||
/* cartridge */
|
||||
// cartridge
|
||||
GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "k28m2", "vsm");
|
||||
m_cart->set_device_load(FUNC(tispeak_state::cart_load));
|
||||
|
||||
|
@ -86,9 +86,9 @@ private:
|
||||
optional_device<tms1k_base_device> m_subcpu;
|
||||
optional_device<tms6100_device> m_tms6100;
|
||||
|
||||
u8 m_rev1_ctl;
|
||||
u16 m_sub_o;
|
||||
u16 m_sub_r;
|
||||
u8 m_rev1_ctl = 0;
|
||||
u16 m_sub_o = 0;
|
||||
u16 m_sub_r = 0;
|
||||
|
||||
virtual void power_off() override;
|
||||
void power_subcpu();
|
||||
@ -114,11 +114,6 @@ void tispellb_state::machine_start()
|
||||
{
|
||||
hh_tms1k_state::machine_start();
|
||||
|
||||
// zerofill
|
||||
m_rev1_ctl = 0;
|
||||
m_sub_o = 0;
|
||||
m_sub_r = 0;
|
||||
|
||||
// register for savestates
|
||||
save_item(NAME(m_rev1_ctl));
|
||||
save_item(NAME(m_sub_o));
|
||||
@ -340,7 +335,7 @@ INPUT_PORTS_END
|
||||
|
||||
void tispellb_state::rev1(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
TMS0270(config, m_maincpu, 350000); // approximation
|
||||
m_maincpu->k().set(FUNC(tispellb_state::main_read_k));
|
||||
m_maincpu->o().set(FUNC(tispellb_state::main_write_o));
|
||||
@ -355,18 +350,18 @@ void tispellb_state::rev1(machine_config &config)
|
||||
|
||||
config.set_perfect_quantum(m_maincpu);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(16, 16);
|
||||
m_display->set_segmask(0xff, 0x3fff);
|
||||
config.set_default_layout(layout_spellb);
|
||||
|
||||
/* no sound! */
|
||||
// no sound!
|
||||
}
|
||||
|
||||
|
||||
void tispellb_state::rev2(machine_config &config)
|
||||
{
|
||||
/* basic machine hardware */
|
||||
// basic machine hardware
|
||||
TMS0270(config, m_maincpu, 350000); // approximation
|
||||
m_maincpu->k().set(FUNC(tispellb_state::main_read_k));
|
||||
m_maincpu->o().set(FUNC(tispellb_state::rev2_write_o));
|
||||
@ -377,12 +372,12 @@ void tispellb_state::rev2(machine_config &config)
|
||||
TMS6100(config, m_tms6100, 350000);
|
||||
m_tms6100->enable_4bit_mode(true);
|
||||
|
||||
/* video hardware */
|
||||
// video hardware
|
||||
PWM_DISPLAY(config, m_display).set_size(16, 16);
|
||||
m_display->set_segmask(0xff, 0x3fff);
|
||||
config.set_default_layout(layout_spellb);
|
||||
|
||||
/* sound hardware */
|
||||
// sound hardware
|
||||
SPEAKER(config, "mono").front_center();
|
||||
SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
|
||||
}
|
||||
|
@ -35,6 +35,16 @@ public:
|
||||
m_out_power(*this, "power")
|
||||
{ }
|
||||
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(power_button);
|
||||
|
||||
template<int Sel> DECLARE_INPUT_CHANGED_MEMBER(switch_next) { if (newval) switch_change(Sel, param, true); }
|
||||
template<int Sel> DECLARE_INPUT_CHANGED_MEMBER(switch_prev) { if (newval) switch_change(Sel, param, false); }
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
|
||||
// devices
|
||||
required_device<tms1k_base_device> m_maincpu;
|
||||
optional_device<pwm_display_device> m_display;
|
||||
@ -53,19 +63,10 @@ public:
|
||||
|
||||
u8 read_inputs(int columns);
|
||||
u8 read_rotated_inputs(int columns, u8 rowmask = 0xf);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(reset_button);
|
||||
virtual DECLARE_INPUT_CHANGED_MEMBER(power_button);
|
||||
virtual DECLARE_WRITE_LINE_MEMBER(auto_power_off);
|
||||
virtual void power_off();
|
||||
void set_power(bool state);
|
||||
|
||||
void switch_change(int sel, u32 mask, bool next);
|
||||
template<int Sel> DECLARE_INPUT_CHANGED_MEMBER(switch_next) { if (newval) switch_change(Sel, param, true); }
|
||||
template<int Sel> DECLARE_INPUT_CHANGED_MEMBER(switch_prev) { if (newval) switch_change(Sel, param, false); }
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ license:CC0
|
||||
-->
|
||||
<mamelayout version="2">
|
||||
|
||||
<!-- define elements -->
|
||||
<!-- define elements -->
|
||||
|
||||
<element name="led" defstate="0">
|
||||
<disk state="0"><color red="0.0" green="0.0" blue="0.0" /></disk>
|
||||
@ -16,7 +16,7 @@ license:CC0
|
||||
</element>
|
||||
|
||||
|
||||
<!-- build screen -->
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="0" right="60" top="-2" bottom="25" />
|
||||
|
Loading…
Reference in New Issue
Block a user