Replace set_led_value and set_lamp_value with output_finders. [Wilbe… (#3592)

* Replace set_led_value and set_lamp_value with output_finders.  [Wilbert Pol]

* segaufo: keep the 2 bit lamp outputs
This commit is contained in:
wilbertpol 2018-05-20 19:27:20 +02:00 committed by R. Belmont
parent acf93837ac
commit 2beba4ce73
316 changed files with 5607 additions and 4684 deletions

View File

@ -478,6 +478,7 @@ abc99_device::abc99_device(const machine_config &mconfig, const char *tag, devic
m_speaker(*this, "speaker"),
m_z14(*this, "Z14"),
m_mouseb(*this, "MOUSEB"),
m_led(*this, "led%u", 0U),
m_si(1),
m_si_en(1),
m_so_z2(1),
@ -498,6 +499,7 @@ abc99_device::abc99_device(const machine_config &mconfig, const char *tag, devic
void abc99_device::device_start()
{
m_led.resolve();
// allocate timers
m_serial_timer = timer_alloc(TIMER_SERIAL);
m_serial_timer->adjust(MCS48_ALE_CLOCK(XTAL(6'000'000)/3), 0, MCS48_ALE_CLOCK(XTAL(6'000'000)/3));
@ -573,14 +575,14 @@ WRITE8_MEMBER( abc99_device::z2_led_w )
{
if (m_led_en) return;
machine().output().set_led_value(LED_1, BIT(data, 0));
machine().output().set_led_value(LED_2, BIT(data, 1));
machine().output().set_led_value(LED_3, BIT(data, 2));
machine().output().set_led_value(LED_4, BIT(data, 3));
machine().output().set_led_value(LED_5, BIT(data, 4));
machine().output().set_led_value(LED_6, BIT(data, 5));
machine().output().set_led_value(LED_7, BIT(data, 6));
machine().output().set_led_value(LED_8, BIT(data, 7));
m_led[LED_1] = BIT(data, 0);
m_led[LED_2] = BIT(data, 1);
m_led[LED_3] = BIT(data, 2);
m_led[LED_4] = BIT(data, 3);
m_led[LED_5] = BIT(data, 4);
m_led[LED_6] = BIT(data, 5);
m_led[LED_7] = BIT(data, 6);
m_led[LED_8] = BIT(data, 7);
}
@ -616,9 +618,9 @@ WRITE8_MEMBER( abc99_device::z2_p1_w )
m_t1_z5 = BIT(data, 2);
// key LEDs
machine().output().set_led_value(LED_INS, BIT(data, 3));
machine().output().set_led_value(LED_ALT, BIT(data, 4));
machine().output().set_led_value(LED_CAPS_LOCK, BIT(data, 5));
m_led[LED_INS] = BIT(data, 3);
m_led[LED_ALT] = BIT(data, 4);
m_led[LED_CAPS_LOCK] = BIT(data, 5);
// speaker output
m_speaker->level_w(!BIT(data, 6));

View File

@ -97,6 +97,7 @@ private:
required_device<speaker_sound_device> m_speaker;
required_ioport m_z14;
required_ioport m_mouseb;
output_finder<11> m_led;
int m_si;
int m_si_en;

View File

@ -726,7 +726,7 @@ WRITE8_MEMBER( c1541_device_base::via1_pb_w )
m_ga->stp_w(data & 0x03);
// activity LED
machine().output().set_led_value(LED_ACT, BIT(data, 3));
m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@ -943,6 +943,7 @@ c1541_device_base::c1541_device_base(const machine_config &mconfig, device_type
m_via1(*this, M6522_1_TAG),
m_ga(*this, C64H156_TAG),
m_address(*this, "ADDRESS"),
m_led(*this, "led%u", 0U),
m_data_out(1),
m_via0_irq(CLEAR_LINE),
m_via1_irq(CLEAR_LINE)
@ -1057,6 +1058,8 @@ indus_gt_device::indus_gt_device(const machine_config &mconfig, const char *tag,
void c1541_device_base::device_start()
{
m_led.resolve();
// install image callbacks
m_ga->set_floppy(m_floppy);

View File

@ -93,6 +93,7 @@ private:
required_device<via6522_device> m_via1;
required_device<c64h156_device> m_ga;
required_ioport m_address;
output_finder<2> m_led;
// IEC bus
int m_data_out; // serial data out

View File

@ -459,7 +459,7 @@ WRITE8_MEMBER( c1571_device::via1_pb_w )
m_ga->stp_w(data & 0x03); // TODO actually STP1=0, STP0=!(PB0^PB1), Y0=PB1, Y2=!PB1
// activity LED
machine().output().set_led_value(LED_ACT, BIT(data, 3));
m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@ -791,6 +791,7 @@ c1571_device::c1571_device(const machine_config &mconfig, device_type type, cons
m_ga(*this, C64H156_TAG),
m_floppy(*this, C64H156_TAG":0:525qd"),
m_address(*this, "ADDRESS"),
m_led(*this, "led%u", 0U),
m_1_2mhz(0),
m_data_out(1),
m_ser_dir(0),
@ -844,6 +845,8 @@ mini_chief_device::mini_chief_device(const machine_config &mconfig, const char *
void c1571_device::device_start()
{
m_led.resolve();
// install image callbacks
m_ga->set_floppy(m_floppy);
//m_fdc->set_floppy(m_floppy);

View File

@ -107,6 +107,7 @@ protected:
required_device<c64h156_device> m_ga;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
output_finder<2> m_led;
// signals
int m_1_2mhz; // clock speed

View File

@ -171,10 +171,10 @@ WRITE8_MEMBER( c1581_device::cia_pa_w )
m_floppy->mon_w(BIT(data, 2));
// power led
machine().output().set_led_value(LED_POWER, BIT(data, 5));
m_led[LED_POWER] = BIT(data, 5);
// activity led
machine().output().set_led_value(LED_ACT, BIT(data, 6));
m_led[LED_ACT] = BIT(data, 6);
}
READ8_MEMBER( c1581_device::cia_pb_r )
@ -326,6 +326,7 @@ c1581_device::c1581_device(const machine_config &mconfig, device_type type, cons
m_fdc(*this, WD1772_TAG),
m_floppy(*this, WD1772_TAG":0:35dd"),
m_address(*this, "ADDRESS"),
m_led(*this, "led%u", 0U),
m_data_out(0),
m_atn_ack(0),
m_fast_ser_dir(0),
@ -354,6 +355,8 @@ c1563_device::c1563_device(const machine_config &mconfig, const char *tag, devic
void c1581_device::device_start()
{
m_led.resolve();
// state saving
save_item(NAME(m_data_out));
save_item(NAME(m_atn_ack));

View File

@ -82,6 +82,7 @@ private:
required_device<wd1772_device> m_fdc;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
output_finder<2> m_led;
int m_data_out; // serial data out
int m_atn_ack; // attention acknowledge

View File

@ -261,7 +261,7 @@ WRITE8_MEMBER( c2031_device::via1_pb_w )
m_ga->stp_w(data & 0x03);
// activity LED
machine().output().set_led_value(LED_ACT, BIT(data, 3));
m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@ -398,6 +398,7 @@ c2031_device::c2031_device(const machine_config &mconfig, const char *tag, devic
, m_ga(*this, C64H156_TAG)
, m_floppy(*this, C64H156_TAG":0:525ssqd")
, m_address(*this, "ADDRESS")
, m_led(*this, "led%u", 0U)
, m_nrfd_out(1)
, m_ndac_out(1)
, m_atna(1)
@ -414,6 +415,7 @@ c2031_device::c2031_device(const machine_config &mconfig, const char *tag, devic
void c2031_device::device_start()
{
m_led.resolve();
// install image callbacks
m_ga->set_floppy(m_floppy);

View File

@ -68,6 +68,7 @@ private:
required_device<c64h156_device> m_ga;
required_device<floppy_image_device> m_floppy;
required_ioport m_address;
output_finder<2> m_led;
// IEEE-488 bus
int m_nrfd_out; // not ready for data

View File

@ -365,13 +365,13 @@ WRITE8_MEMBER( c2040_device::riot1_pb_w )
*/
// activity led 1
machine().output().set_led_value(LED_ACT1, BIT(data, 3));
m_led[LED_ACT1] = BIT(data, 3);
// activity led 0
machine().output().set_led_value(LED_ACT0, BIT(data, 4));
m_led[LED_ACT0] = BIT(data, 4);
// error led
machine().output().set_led_value(LED_ERR, BIT(data, 5));
m_led[LED_ERR] = BIT(data, 5);
}
@ -650,6 +650,7 @@ c2040_device::c2040_device(const machine_config &mconfig, device_type type, cons
m_fdc(*this, FDC_TAG),
m_gcr(*this, "gcr"),
m_address(*this, "ADDRESS"),
m_led(*this, "led%u", 0U),
m_rfdo(1),
m_daco(1),
m_atna(1),
@ -689,6 +690,7 @@ c4040_device::c4040_device(const machine_config &mconfig, const char *tag, devic
void c2040_device::device_start()
{
m_led.resolve();
// install image callbacks
m_fdc->set_floppy(m_floppy0, m_floppy1);

View File

@ -81,6 +81,7 @@ protected:
required_device<c2040_fdc_device> m_fdc;
required_memory_region m_gcr;
required_ioport m_address;
output_finder<4> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output

View File

@ -415,13 +415,13 @@ WRITE8_MEMBER( c8050_device::riot1_pb_w )
*/
// activity led 1
machine().output().set_led_value(LED_ACT1, BIT(data, 3));
m_led[LED_ACT1] = BIT(data, 3);
// activity led 0
machine().output().set_led_value(LED_ACT0, BIT(data, 4));
m_led[LED_ACT0] = BIT(data, 4);
// error led
machine().output().set_led_value(LED_ERR, BIT(data, 5));
m_led[LED_ERR] = BIT(data, 5);
}
WRITE8_MEMBER( c8050_device::via_pb_w )
@ -782,6 +782,7 @@ c8050_device::c8050_device(const machine_config &mconfig, device_type type, cons
m_floppy1(*this, FDC_TAG ":1"),
m_fdc(*this, FDC_TAG),
m_address(*this, "ADDRESS"),
m_led(*this, "led%u", 0U),
m_rfdo(1),
m_daco(1),
m_atna(1),
@ -831,6 +832,8 @@ sfd1001_device::sfd1001_device(const machine_config &mconfig, const char *tag, d
void c8050_device::device_start()
{
m_led.resolve();
// install image callbacks
m_fdc->set_floppy(m_floppy0, m_floppy1);

View File

@ -72,6 +72,7 @@ protected:
optional_device<floppy_connector> m_floppy1;
required_device<c8050_fdc_device> m_fdc;
required_ioport m_address;
output_finder<4> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output

View File

@ -269,13 +269,13 @@ WRITE8_MEMBER( c8280_device::riot1_pb_w )
*/
// activity led 1
machine().output().set_led_value(LED_ACT1, BIT(data, 3));
m_led[LED_ACT1] = BIT(data, 3);
// activity led 0
machine().output().set_led_value(LED_ACT0, BIT(data, 4));
m_led[LED_ACT0] = BIT(data, 4);
// error led
machine().output().set_led_value(LED_ERR, BIT(data, 5));
m_led[LED_ERR] = BIT(data, 5);
}
static void c8280_floppies(device_slot_interface &device)
@ -385,7 +385,9 @@ c8280_device::c8280_device(const machine_config &mconfig, const char *tag, devic
m_fdc(*this, WD1797_TAG),
m_floppy0(*this, WD1797_TAG ":0"),
m_floppy1(*this, WD1797_TAG ":1"),
m_address(*this, "ADDRESS"), m_floppy(nullptr),
m_address(*this, "ADDRESS"),
m_floppy(nullptr),
m_led(*this, "led%u", 0U),
m_rfdo(1),
m_daco(1),
m_atna(1), m_ifc(0), m_fk5(0)
@ -399,6 +401,8 @@ c8280_device::c8280_device(const machine_config &mconfig, const char *tag, devic
void c8280_device::device_start()
{
m_led.resolve();
// state saving
save_item(NAME(m_rfdo));
save_item(NAME(m_daco));

View File

@ -71,6 +71,7 @@ private:
required_device<floppy_connector> m_floppy1;
required_ioport m_address;
floppy_image_device *m_floppy;
output_finder<4> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output

View File

@ -305,13 +305,13 @@ WRITE8_MEMBER( d9060_device_base::riot1_pb_w )
*/
// ready led
machine().output().set_led_value(LED_READY, BIT(data, 4));
m_led[LED_READY] = BIT(data, 4);
// power led
machine().output().set_led_value(LED_POWER, BIT(data, 5));
m_led[LED_POWER] = BIT(data, 5);
// error led
machine().output().set_led_value(LED_ERROR, !BIT(data, 5));
m_led[LED_ERROR] = !BIT(data, 5);
}
@ -486,6 +486,7 @@ d9060_device_base::d9060_device_base(const machine_config &mconfig, device_type
, m_sasibus(*this, SASIBUS_TAG)
, m_sasi_data_out(*this, "sasi_data_out")
, m_address(*this, "ADDRESS")
, m_led(*this, "led%u", 0U)
, m_rfdo(1)
, m_daco(1)
, m_atna(1)
@ -523,6 +524,8 @@ d9090_device::d9090_device(const machine_config &mconfig, const char *tag, devic
void d9060_device_base::device_start()
{
m_led.resolve();
// state saving
save_item(NAME(m_rfdo));
save_item(NAME(m_daco));

View File

@ -73,6 +73,7 @@ private:
required_device<scsi_port_device> m_sasibus;
required_device<output_latch_device> m_sasi_data_out;
required_ioport m_address;
output_finder<3> m_led;
// IEEE-488 bus
int m_rfdo; // not ready for data output

View File

@ -257,9 +257,9 @@ WRITE8_MEMBER( hardbox_device::ppi1_pc_w )
*/
machine().output().set_led_value(LED_A, !BIT(data, 0));
machine().output().set_led_value(LED_B, !BIT(data, 1));
machine().output().set_led_value(LED_READY, !BIT(data, 2));
m_led[LED_A] = BIT(~data, 0);
m_led[LED_B] = BIT(~data, 1);
m_led[LED_READY] = BIT(~data, 2);
}
@ -344,6 +344,7 @@ hardbox_device::hardbox_device(const machine_config &mconfig, const char *tag, d
, device_ieee488_interface(mconfig, *this)
, m_maincpu(*this, Z80_TAG)
, m_hdc(*this, CORVUS_HDC_TAG)
, m_led(*this, "led%u", 0U)
, m_ifc(0)
{
}
@ -355,6 +356,7 @@ hardbox_device::hardbox_device(const machine_config &mconfig, const char *tag, d
void hardbox_device::device_start()
{
m_led.resolve();
}

View File

@ -61,13 +61,14 @@ private:
enum
{
LED_A,
LED_A = 0,
LED_B,
LED_READY
};
required_device<cpu_device> m_maincpu;
required_device<corvus_hdc_device> m_hdc;
output_finder<3> m_led;
int m_ifc; // Tracks previous state of IEEE-488 IFC line
};

View File

@ -215,9 +215,9 @@ WRITE8_MEMBER( softbox_device::ppi1_pc_w )
*/
machine().output().set_led_value(LED_A, !BIT(data, 0));
machine().output().set_led_value(LED_B, !BIT(data, 1));
machine().output().set_led_value(LED_READY, !BIT(data, 2));
m_led[LED_A] = BIT(~data, 0);
m_led[LED_B] = BIT(~data, 1);
m_led[LED_READY] = BIT(~data, 2);
}
static DEVICE_INPUT_DEFAULTS_START( terminal )
@ -324,6 +324,7 @@ softbox_device::softbox_device(const machine_config &mconfig, const char *tag, d
, m_maincpu(*this, Z80_TAG)
, m_dbrg(*this, COM8116_TAG)
, m_hdc(*this, CORVUS_HDC_TAG)
, m_led(*this, "led%u", 0U)
, m_ifc(0)
{
}
@ -335,6 +336,7 @@ softbox_device::softbox_device(const machine_config &mconfig, const char *tag, d
void softbox_device::device_start()
{
m_led.resolve();
}

View File

@ -64,7 +64,7 @@ private:
enum
{
LED_A,
LED_A = 0,
LED_B,
LED_READY
};
@ -72,6 +72,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<com8116_device> m_dbrg;
required_device<corvus_hdc_device> m_hdc;
output_finder<3> m_led;
int m_ifc; // Tracks previous state of IEEE-488 IFC line
};

View File

@ -142,6 +142,7 @@ msx_cart_disk_wd_device::msx_cart_disk_wd_device(const machine_config &mconfig,
msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: msx_cart_disk_wd_device(mconfig, type, tag, owner, clock)
, m_led(*this, "led0")
, m_side_control(0)
, m_control(0)
{
@ -150,6 +151,7 @@ msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mco
msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: msx_cart_disk_wd_device(mconfig, type, tag, owner, clock)
, m_led(*this, "led0")
, m_control(0)
{
}
@ -262,6 +264,8 @@ MACHINE_CONFIG_END
void msx_cart_disk_type1_device::device_start()
{
m_led.resolve();
save_item(NAME(m_side_control));
save_item(NAME(m_control));
@ -312,7 +316,7 @@ void msx_cart_disk_type1_device::set_control(uint8_t data)
if ((old_m_control ^ m_control) & 0x40)
{
machine().output().set_led_value(0, !(m_control & 0x40));
m_led = BIT(~m_control, 6);
}
}
@ -418,6 +422,8 @@ WRITE8_MEMBER(msx_cart_disk_type1_device::write_cart)
void msx_cart_disk_type2_device::device_start()
{
m_led.resolve();
save_item(NAME(m_control));
machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_disk_type2_device::post_load), this));
@ -472,7 +478,7 @@ void msx_cart_disk_type2_device::set_control(uint8_t data)
if ((old_m_control ^ m_control) & 0x40)
{
machine().output().set_led_value(0, !(m_control & 0x40));
m_led = BIT(~m_control, 6);
}
}

View File

@ -58,6 +58,7 @@ protected:
void post_load();
output_finder<> m_led;
uint8_t m_side_control;
uint8_t m_control;
@ -81,6 +82,7 @@ protected:
void post_load();
output_finder<> m_led;
uint8_t m_control;
void set_control(uint8_t data);

View File

@ -83,6 +83,7 @@ void msx_slot_disk_device::device_start()
msx_slot_wd_disk_device::msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
: msx_slot_disk_device(mconfig, type, tag, owner, clock)
, m_fdc(nullptr)
, m_led(*this, "led0")
{
}
@ -91,6 +92,7 @@ void msx_slot_wd_disk_device::device_start()
{
msx_slot_disk_device::device_start();
m_led.resolve();
m_fdc = owner()->subdevice<wd_fdc_analog_device_base>(m_fdc_tag);
if (m_fdc == nullptr)
@ -200,7 +202,7 @@ void msx_slot_disk1_device::set_control(uint8_t data)
if ((old_m_control ^ m_control) & 0x40)
{
machine().output().set_led_value(0, !(m_control & 0x40));
m_led = BIT(~m_control, 6);
}
}
@ -349,7 +351,7 @@ void msx_slot_disk2_device::set_control(uint8_t data)
if ((old_m_control ^ m_control) & 0x40)
{
machine().output().set_led_value(0, !(m_control & 0x40));
m_led = BIT(~m_control, 6);
}
}

View File

@ -109,6 +109,7 @@ protected:
virtual void device_start() override;
wd_fdc_analog_device_base *m_fdc;
output_finder<> m_led;
};

View File

@ -343,6 +343,7 @@ ibm_pc_at_84_keyboard_device::ibm_pc_at_84_keyboard_device(const machine_config
m_dr(*this, "DR%02u", 0),
m_kbdida(*this, "KBDIDA"),
m_kbdidb(*this, "KBDIDB"),
m_led(*this, "led%u", 0U),
m_db(0),
m_cnt(0),
m_sense(0),
@ -369,6 +370,8 @@ void ibm_pc_at_84_keyboard_device::device_start()
{
set_pc_kbdc_device();
m_led.resolve();
// state saving
save_item(NAME(m_db));
save_item(NAME(m_cnt));
@ -526,9 +529,9 @@ WRITE8_MEMBER( ibm_pc_at_84_keyboard_device::p2_w )
*/
machine().output().set_led_value(LED_SCROLL, BIT(data, 0));
machine().output().set_led_value(LED_NUM, BIT(data, 1));
machine().output().set_led_value(LED_CAPS, BIT(data, 2));
m_led[LED_SCROLL] = BIT(data, 0);
m_led[LED_NUM] = BIT(data, 1);
m_led[LED_CAPS] = BIT(data, 2);
m_pc_kbdc->data_write_from_kb(!BIT(data, 7));
m_pc_kbdc->clock_write_from_kb(!BIT(data, 6));

View File

@ -57,7 +57,7 @@ private:
enum
{
LED_SCROLL,
LED_SCROLL = 0,
LED_NUM,
LED_CAPS
};
@ -68,6 +68,7 @@ private:
required_ioport_array<16> m_dr;
optional_ioport m_kbdida;
optional_ioport m_kbdidb;
output_finder<3> m_led;
uint8_t m_db;
int m_cnt;

View File

@ -109,7 +109,7 @@ WRITE8_MEMBER( c1551_device::port_w )
m_ga->mtr_w(BIT(data, 2));
// activity LED
machine().output().set_led_value(LED_ACT, BIT(data, 3));
m_led[LED_ACT] = BIT(data, 3);
// density select
m_ga->ds_w((data >> 5) & 0x03);
@ -416,6 +416,7 @@ c1551_device::c1551_device(const machine_config &mconfig, const char *tag, devic
, m_floppy(*this, C64H156_TAG":0:525ssqd")
, m_exp(*this, PLUS4_EXPANSION_SLOT_TAG)
, m_jp1(*this, "JP1")
, m_led(*this, "led%u", 0U)
, m_tcbm_data(0xff)
, m_status(1)
, m_dav(1)
@ -432,6 +433,8 @@ c1551_device::c1551_device(const machine_config &mconfig, const char *tag, devic
void c1551_device::device_start()
{
m_led.resolve();
// allocate timers
m_irq_timer = timer_alloc();
m_irq_timer->adjust(attotime::zero, CLEAR_LINE);

View File

@ -82,6 +82,7 @@ private:
required_device<floppy_image_device> m_floppy;
required_device<plus4_expansion_slot_device> m_exp;
required_ioport m_jp1;
output_finder<2> m_led;
// TCBM bus
uint8_t m_tcbm_data; // data

View File

@ -753,6 +753,7 @@ hle_device_base::hle_device_base(
, m_dips(*this, "DIP")
, m_click_timer(nullptr)
, m_beeper(*this, "beeper")
, m_led(*this, "led%u", 0U)
, m_make_count(0U)
, m_rx_state(RX_IDLE)
, m_keyclick(0U)
@ -802,6 +803,7 @@ MACHINE_CONFIG_END
void hle_device_base::device_start()
{
m_led.resolve();
m_click_timer = timer_alloc(CLICK_TIMER_ID);
save_item(NAME(m_make_count));
@ -836,11 +838,11 @@ void hle_device_base::device_reset()
output_rxd(1);
// start with keyboard LEDs off
machine().output().set_led_value(LED_NUM, 0);
machine().output().set_led_value(LED_COMPOSE, 0);
machine().output().set_led_value(LED_SCROLL, 0);
machine().output().set_led_value(LED_CAPS, 0);
machine().output().set_led_value(LED_KANA, 0);
m_led[LED_NUM] = 0;
m_led[LED_COMPOSE] = 0;
m_led[LED_SCROLL] = 0;
m_led[LED_CAPS] = 0;
m_led[LED_KANA] = 0;
// no beep
m_click_timer->reset();
@ -972,11 +974,11 @@ void hle_device_base::received_byte(uint8_t byte)
switch (m_rx_state)
{
case RX_LED:
machine().output().set_led_value(LED_NUM, BIT(byte, 0));
machine().output().set_led_value(LED_COMPOSE, BIT(byte, 1));
machine().output().set_led_value(LED_SCROLL, BIT(byte, 2));
machine().output().set_led_value(LED_CAPS, BIT(byte, 3));
machine().output().set_led_value(LED_KANA, BIT(byte, 4));
m_led[LED_NUM] = BIT(byte, 0);
m_led[LED_COMPOSE] = BIT(byte, 1);
m_led[LED_SCROLL] = BIT(byte, 2);
m_led[LED_CAPS] = BIT(byte, 3);
m_led[LED_KANA] = BIT(byte, 4);
m_rx_state = RX_IDLE;
break;

View File

@ -93,6 +93,7 @@ private:
emu_timer *m_click_timer;
required_device<beep_device> m_beeper;
output_finder<5> m_led;
uint8_t m_make_count;
uint8_t m_rx_state;

View File

@ -24,6 +24,7 @@ amiga_fdc_device::amiga_fdc_device(const machine_config &mconfig, const char *ta
m_write_dma(*this),
m_write_dskblk(*this),
m_write_dsksyn(*this),
m_leds(*this, "led%u", 1U),
floppy(nullptr), t_gen(nullptr), dsklen(0), pre_dsklen(0), dsksync(0), dskbyt(0), adkcon(0), dmacon(0), dskpt(0), dma_value(0), dma_state(0)
{
}
@ -35,6 +36,7 @@ void amiga_fdc_device::device_start()
m_write_dma.resolve_safe();
m_write_dskblk.resolve_safe();
m_write_dsksyn.resolve_safe();
m_leds.resolve();
static const char *names[] = { "0", "1", "2", "3" };
for(int i=0; i != 4; i++) {
@ -440,8 +442,8 @@ void amiga_fdc_device::setup_leds()
machine().output().set_value("drive_2_led", drive == 2);
machine().output().set_value("drive_3_led", drive == 3);
machine().output().set_led_value(1, drive == 0); /* update internal drive led */
machine().output().set_led_value(2, drive == 1); /* update external drive led */
m_leds[0] = drive == 0 ? 1 : 0; // update internal drive led
m_leds[1] = drive == 1 ? 1 : 0; // update external drive led
}
}

View File

@ -107,6 +107,7 @@ private:
devcb_write16 m_write_dma;
devcb_write_line m_write_dskblk;
devcb_write_line m_write_dsksyn;
output_finder<2> m_leds;
floppy_image_device *floppy;
floppy_image_device *floppy_devices[4];

View File

@ -293,6 +293,7 @@ pc_keyboard_device::pc_keyboard_device(const machine_config &mconfig, device_typ
at_keyboard_device::at_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
pc_keyboard_device(mconfig, AT_KEYB, tag, owner, clock),
m_leds(*this, "led%u", 0U),
m_scan_code_set(1)
{
m_type = KEYBOARD_TYPE::AT;
@ -333,6 +334,7 @@ void at_keyboard_device::device_start()
save_item(NAME(m_scan_code_set));
save_item(NAME(m_input_state));
pc_keyboard_device::device_start();
m_leds.resolve();
}
void pc_keyboard_device::device_reset()
@ -341,10 +343,6 @@ void pc_keyboard_device::device_reset()
m_repeat = 8;
m_numlock = 0;
m_on = true;
/* set default led state */
machine().output().set_led_value(2, 0);
machine().output().set_led_value(0, 0);
machine().output().set_led_value(1, 0);
m_head = m_tail = 0;
queue_insert(0xaa);
@ -355,6 +353,11 @@ void at_keyboard_device::device_reset()
{
m_input_state = 0;
pc_keyboard_device::device_reset();
/* set default led state */
m_leds[2] = 0;
m_leds[0] = 0;
m_leds[1] = 0;
}
WRITE_LINE_MEMBER(pc_keyboard_device::enable)
@ -783,11 +786,10 @@ WRITE8_MEMBER(at_keyboard_device::write)
/* bits: 0 scroll lock, 1 num lock, 2 capslock */
/* led's in same order as my keyboard leds. */
/* num lock, caps lock, scroll lock */
machine().output().set_led_value(2, (data & 0x01));
machine().output().set_led_value(0, ((data & 0x02)>>1));
machine().output().set_led_value(1, ((data & 0x04)>>2));
/* num lock, caps lock, scroll lock */
m_leds[2] = BIT(data, 0);
m_leds[0] = BIT(data, 1);
m_leds[1] = BIT(data, 2);
}
break;
case 2:

View File

@ -102,6 +102,7 @@ private:
static const int m_scancode_set_2_3[];
static const extended_keyboard_code m_mf2_code[0x10][2];
output_finder<3> m_leds;
int m_scan_code_set;
int m_input_state;
};

View File

@ -180,10 +180,6 @@ public:
// map a unique ID back to a name
const char *id_to_name(u32 id);
// helpers
[[deprecated("string format and hash in critical path")]] void set_led_value(int index, int value) { set_indexed_value("led", index, value ? 1 : 0); }
[[deprecated("string format and hash in critical path")]] void set_lamp_value(int index, int value) { set_indexed_value("lamp", index, value); }
void pause();
void resume();

View File

@ -691,7 +691,7 @@ DISCRETE_SOUND_END
WRITE_LINE_MEMBER(copsnrob_state::one_start_w)
{
/* One Start */
m_led = !state;
m_led[0] = state ? 0 :1;
}

View File

@ -964,7 +964,7 @@ WRITE8_MEMBER( cd32_state::akiko_cia_0_port_a_write )
m_cdda->set_output_gain(0, BIT(data, 0) ? 0.0 : 1.0);
// bit 1, power led
output().set_led_value(0, BIT(data, 1) ? 0 : 1);
m_power_led = BIT(~data, 1);
handle_joystick_cia(data, m_cia_0->read(space, 2));
}

View File

@ -59,7 +59,8 @@ public:
m_palette(*this, "palette"),
m_hopper(*this, "hopper"),
m_ticket(*this, "ticket"),
m_spriteram(*this, "spriteram")
m_spriteram(*this, "spriteram"),
m_lamp(*this, "lamp%u", 0U)
{ }
// devices
@ -101,6 +102,11 @@ public:
void showhand_map(address_map &map);
void skilldrp_map(address_map &map);
void speeddrp_map(address_map &map);
protected:
virtual void machine_start() override;
output_finder<7> m_lamp;
};
/***************************************************************************
@ -240,17 +246,17 @@ WRITE16_MEMBER(astrocorp_state::showhand_outputs_w)
if (ACCESSING_BITS_0_7)
{
machine().bookkeeping().coin_counter_w(0, (data & 0x0004)); // coin counter
output().set_led_value(0, (data & 0x0008)); // you win
m_lamp[0] = BIT(data, 3); // you win
if ((data & 0x0010)) machine().bookkeeping().increment_dispensed_tickets(1); // coin out
output().set_led_value(1, (data & 0x0020)); // coin/hopper jam
m_lamp[1] = BIT(data, 5); // coin/hopper jam
}
if (ACCESSING_BITS_8_15)
{
output().set_led_value(2, (data & 0x0100)); // bet
output().set_led_value(3, (data & 0x0800)); // start
output().set_led_value(4, (data & 0x1000)); // ? select/choose
output().set_led_value(5, (data & 0x2000)); // ? select/choose
output().set_led_value(6, (data & 0x4000)); // look
m_lamp[2] = BIT(data, 8); // bet
m_lamp[3] = BIT(data, 11); // start
m_lamp[4] = BIT(data, 12); // ? select/choose
m_lamp[5] = BIT(data, 13); // ? select/choose
m_lamp[6] = BIT(data, 15); // look
}
// popmessage("%04X",data);
}
@ -280,18 +286,18 @@ WRITE16_MEMBER(astrocorp_state::skilldrp_outputs_w)
machine().bookkeeping().coin_counter_w(1, BIT(data, 2)); // key out |
m_hopper->motor_w(BIT(data, 3)); // hopper motor?
// BIT(data, 4) // hopper?
output().set_led_value(0, BIT(data, 5)); // error lamp (coin/hopper jam: "call attendant")
m_lamp[0] = BIT(data, 5); // error lamp (coin/hopper jam: "call attendant")
m_ticket->motor_w(BIT(data, 7)); // ticket motor?
}
if (ACCESSING_BITS_8_15)
{
// lamps:
output().set_led_value(1, BIT(data, 8)); // select
output().set_led_value(2, BIT(data, 10)); // take
output().set_led_value(3, BIT(data, 11)); // bet
output().set_led_value(4, BIT(data, 12)); // start
output().set_led_value(5, BIT(data, 14)); // win / test
output().set_led_value(6, BIT(data, 15)); // ticket?
m_lamp[1] = BIT(data, 8); // select
m_lamp[2] = BIT(data, 10); // take
m_lamp[3] = BIT(data, 11); // bet
m_lamp[4] = BIT(data, 12); // start
m_lamp[5] = BIT(data, 14); // win / test
m_lamp[6] = BIT(data, 15); // ticket?
}
// popmessage("%04X",data);
@ -495,6 +501,12 @@ GFXDECODE_END
static const uint16_t showhand_default_eeprom[15] = {0x0001,0x0007,0x000a,0x0003,0x0000,0x0009,0x0003,0x0000,0x0002,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000};
void astrocorp_state::machine_start()
{
m_lamp.resolve();
}
/*
TODO: understand if later hardware uses different parameters (XTAL is almost surely NOT 20 MHz so ...). Also, weirdly enough, there's an unused
6x PAL XTAL according to notes, but VSync = 58,85 Hz?

View File

@ -514,6 +514,8 @@ GFXDECODE_END
void atarifb_state::machine_start()
{
m_led.resolve();
save_item(NAME(m_CTRLD));
save_item(NAME(m_sign_x_1));
save_item(NAME(m_sign_x_2));

View File

@ -626,7 +626,7 @@ WRITE8_MEMBER( st_state::ikbd_port3_w )
*/
// caps lock led
output().set_led_value(1, BIT(data, 0));
m_led = BIT(data, 0);
// keyboard row select
m_ikbd_keylatch = (m_ikbd_keylatch & 0xff00) | data;
@ -1890,6 +1890,8 @@ void st_state::state_save()
void st_state::machine_start()
{
m_led.resolve();
// configure RAM banking
configure_memory();
@ -1952,6 +1954,8 @@ void ste_state::state_save()
void ste_state::machine_start()
{
m_led.resolve();
/* configure RAM banking */
configure_memory();
@ -1990,6 +1994,8 @@ void megaste_state::machine_start()
void stbook_state::machine_start()
{
m_led.resolve();
/* configure RAM banking */
address_space &program = m_maincpu->space(AS_PROGRAM);

View File

@ -199,6 +199,8 @@ MACHINE_START_MEMBER(atarisy2_state,atarisy2)
{
atarigen_state::machine_start();
m_led.resolve();
save_item(NAME(m_interrupt_enable));
save_item(NAME(m_p2portwr_state));
save_item(NAME(m_p2portrd_state));
@ -333,8 +335,8 @@ READ8_MEMBER(atarisy2_state::switch_6502_r)
WRITE8_MEMBER(atarisy2_state::switch_6502_w)
{
output().set_led_value(0, data & 0x04);
output().set_led_value(1, data & 0x08);
m_led[0] = BIT(data, 2);
m_led[1] = BIT(data, 3);
if (m_tms5220.found())
{
data = 12 | ((data >> 5) & 1);

View File

@ -154,8 +154,8 @@ READ8_MEMBER(baraduke_state::inputport_r)
WRITE8_MEMBER(baraduke_state::baraduke_lamps_w)
{
output().set_led_value(0,data & 0x08);
output().set_led_value(1,data & 0x10);
m_lamp[0] = BIT(data, 3);
m_lamp[1] = BIT(data, 4);
}
WRITE8_MEMBER(baraduke_state::baraduke_irq_ack_w)
@ -372,6 +372,11 @@ static GFXDECODE_START( gfx_baraduke )
GFXDECODE_END
void baraduke_state::machine_start()
{
m_lamp.resolve();
}
MACHINE_CONFIG_START(baraduke_state::baraduke)

View File

@ -50,7 +50,8 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_digits(*this, "digit%u", 0U)
{ }
, m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(fpga_w);
DECLARE_WRITE8_MEMBER(port0_w);
@ -60,9 +61,10 @@ public:
private:
unsigned char row_selection;
void fpga_send(unsigned char cmd);
virtual void machine_start() override { m_digits.resolve(); }
virtual void machine_start() override { m_digits.resolve(); m_lamp.resolve(); }
required_device<cpu_device> m_maincpu;
output_finder<4> m_digits;
output_finder<16> m_lamp;
};
/************************
@ -204,12 +206,12 @@ void barata_state::fpga_send(unsigned char cmd)
{
// logerror("LED: ERASE ALL\n");
for (int i=0; i<16; i++){
output().set_led_value(i, 1);
m_lamp[i] = 1;
}
}
else
{
output().set_led_value(lamp_index, state ? 0 : 1);
m_lamp[lamp_index] = state ? 0 : 1;
}
default:
mode = FPGA_WAITING_FOR_NEW_CMD;

View File

@ -58,7 +58,8 @@ public:
m_speaker(*this, "speaker"),
m_eprom(*this, EPROM_TAG),
m_q(*this, "Q%u", 6U),
m_digit(*this, "digit%u", 0U)
m_digit(*this, "digit%u", 0U),
m_led(*this, "led%u", 0U)
{ }
DECLARE_INPUT_CHANGED_MEMBER( trigger_reset );
@ -85,6 +86,7 @@ private:
required_device<generic_slot_device> m_eprom;
required_ioport_array<4> m_q;
output_finder<6> m_digit;
output_finder<2> m_led;
/* EPROM state */
int m_eprom_oe;
@ -259,10 +261,10 @@ WRITE8_MEMBER( beta_state::riot_pb_w )
m_speaker->level_w(!BIT(data, 4));
/* address led */
output().set_led_value(0, BIT(data, 5));
m_led[0] = BIT(data, 5);
/* data led */
output().set_led_value(1, !BIT(data, 5));
m_led[1] = !BIT(data, 5);
/* EPROM address shift */
if (!BIT(m_old_data, 5) && BIT(data, 5))
@ -315,6 +317,7 @@ DEVICE_IMAGE_UNLOAD_MEMBER( beta_state, beta_eprom )
void beta_state::machine_start()
{
m_digit.resolve();
m_led.resolve();
m_led_refresh_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(beta_state::led_refresh),this));

View File

@ -127,7 +127,8 @@ public:
m_reels(*this, "reel%u", 0U),
m_upd7759(*this, "upd"),
m_vfd0(*this, "vfd0"),
m_meters(*this, "meters")
m_meters(*this, "meters"),
m_lamp(*this, "lamp%u", 0U)
{ }
void init_toppoker();
@ -175,6 +176,7 @@ protected:
void save_state();
virtual void machine_start() override { m_lamp.resolve(); }
virtual void machine_reset() override;
INTERRUPT_GEN_MEMBER(timer_irq);
void sc1_common_init(int reels, int decrypt, int defaultbank);
@ -213,6 +215,7 @@ private:
optional_device<upd7759_device> m_upd7759;
optional_device<bfm_bd1_device> m_vfd0;
required_device<meters_device> m_meters;
output_finder<256> m_lamp;
};
#define VFD_RESET 0x20
@ -464,17 +467,13 @@ WRITE8_MEMBER(bfm_sc1_state::mux1latch_w)
int input_strobe = data & 0x07;
if ( !(data & 0x08) )
{ // clock changed to low
int strobe, offset, pattern, i;
int strobe = data & 0x07;
int offset = strobe<<4;
strobe = data & 0x07;
offset = strobe<<4;
pattern = 0x01;
for ( i = 0; i < 8; i++ )
for ( int i = 0; i < 8; i++ )
{
output().set_lamp_value(BFM_strcnv[offset ], (m_mux1_datalo & pattern?1:0) );
output().set_lamp_value(BFM_strcnv[offset+8], (m_mux1_datahi & pattern?1:0) );
pattern<<=1;
m_lamp[BFM_strcnv[offset ]] = BIT(m_mux1_datalo, i);
m_lamp[BFM_strcnv[offset+8]] = BIT(m_mux1_datahi, i);
offset++;
}
@ -537,17 +536,13 @@ WRITE8_MEMBER(bfm_sc1_state::mux2latch_w)
if ( !(data & 0x08) )
{ // clock changed to low
int strobe, offset, pattern, i;
int strobe = data & 0x07;
int offset = 128+(strobe<<4);
strobe = data & 0x07;
offset = 128+(strobe<<4);
pattern = 0x01;
for ( i = 0; i < 8; i++ )
for ( int i = 0; i < 8; i++ )
{
output().set_lamp_value(BFM_strcnv[offset ], (m_mux2_datalo & pattern?1:0) );
output().set_lamp_value(BFM_strcnv[offset+8], (m_mux2_datahi & pattern?1:0) );
pattern<<=1;
m_lamp[BFM_strcnv[offset ]] = BIT(m_mux2_datalo, i);
m_lamp[BFM_strcnv[offset+8]] = BIT(m_mux2_datahi, i);
offset++;
}
}

View File

@ -205,6 +205,7 @@ public:
, m_rombank1(*this, "bank1")
, m_ym2413(*this, "ymsnd")
, m_meters(*this, "meters")
, m_lamp(*this, "lamp%u", 0U)
{
for (auto &elem : m_lamps_old)
elem = 0;
@ -321,6 +322,7 @@ private:
int m_e2data_to_read;
uint8_t m_codec_data[256];
uint8_t m_lamps_old[0x20];
output_finder<256> m_lamp;
};
@ -704,11 +706,11 @@ WRITE8_MEMBER(bfm_sc2_state::mux_output_w)
for (i = 0; i < 8; i++)
{
int oldbit = m_lamps_old[offset] & (1 << i);
int newbit = data & (1 << i);
int oldbit = BIT(m_lamps_old[offset], i);
int newbit = BIT(data, i);
if (oldbit != newbit)
output().set_lamp_value(off + i, newbit != 0);
m_lamp[off + i] = newbit;
}
m_lamps_old[offset] = data;
@ -2268,6 +2270,7 @@ MACHINE_CONFIG_END
void bfm_sc2_state::machine_start()
{
m_lamp.resolve();
nvram_device *e2ram = subdevice<nvram_device>("e2ram");
if (e2ram != nullptr)
e2ram->set_base(m_e2ram, sizeof(m_e2ram));

View File

@ -74,7 +74,8 @@ ___________________________________________________________________________
class bfmsys85_state : public driver_device
{
public:
bfmsys85_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag),
bfmsys85_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_vfd(*this, "vfd"),
m_maincpu(*this, "maincpu"),
m_reel0(*this, "reel0"),
@ -82,28 +83,14 @@ public:
m_reel2(*this, "reel2"),
m_reel3(*this, "reel3"),
m_acia6850_0(*this, "acia6850_0"),
m_meters(*this, "meters")
{
}
m_meters(*this, "meters"),
m_lamp(*this, "lamp%u", 0U)
{ }
int m_mmtr_latch;
int m_triac_latch;
int m_alpha_clock;
int m_irq_status;
int m_optic_pattern;
DECLARE_WRITE_LINE_MEMBER(reel0_optic_cb) { if (state) m_optic_pattern |= 0x01; else m_optic_pattern &= ~0x01; }
DECLARE_WRITE_LINE_MEMBER(reel1_optic_cb) { if (state) m_optic_pattern |= 0x02; else m_optic_pattern &= ~0x02; }
DECLARE_WRITE_LINE_MEMBER(reel2_optic_cb) { if (state) m_optic_pattern |= 0x04; else m_optic_pattern &= ~0x04; }
DECLARE_WRITE_LINE_MEMBER(reel3_optic_cb) { if (state) m_optic_pattern |= 0x08; else m_optic_pattern &= ~0x08; }
int m_locked;
int m_is_timer_enabled;
int m_coin_inhibits;
int m_mux_output_strobe;
int m_mux_input_strobe;
int m_mux_input;
uint8_t m_Inputs[64];
uint8_t m_codec_data[256];
uint8_t m_sys85_data_line_t;
DECLARE_WRITE8_MEMBER(watchdog_w);
DECLARE_READ8_MEMBER(irqlatch_r);
DECLARE_WRITE8_MEMBER(reel12_w);
@ -122,10 +109,29 @@ public:
DECLARE_WRITE_LINE_MEMBER(write_acia_clock);
void init_decode();
void init_nodecode();
INTERRUPT_GEN_MEMBER(timer_irq);
int b85_find_project_string();
void bfmsys85(machine_config &config);
void memmap(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
INTERRUPT_GEN_MEMBER(timer_irq);
int b85_find_project_string( );
int m_mmtr_latch;
int m_triac_latch;
int m_alpha_clock;
int m_irq_status;
int m_optic_pattern;
int m_locked;
int m_is_timer_enabled;
int m_coin_inhibits;
int m_mux_output_strobe;
int m_mux_input_strobe;
int m_mux_input;
uint8_t m_Inputs[64];
uint8_t m_codec_data[256];
uint8_t m_sys85_data_line_t;
optional_device<rocvfd_device> m_vfd;
required_device<cpu_device> m_maincpu;
required_device<stepper_device> m_reel0;
@ -134,8 +140,7 @@ public:
required_device<stepper_device> m_reel3;
required_device<acia6850_device> m_acia6850_0;
required_device<meters_device> m_meters;
void bfmsys85(machine_config &config);
void memmap(address_map &map);
output_finder<256> m_lamp;
};
#define MASTER_CLOCK (XTAL(4'000'000))
@ -310,13 +315,11 @@ READ8_MEMBER(bfmsys85_state::mux_ctrl_r)
WRITE8_MEMBER(bfmsys85_state::mux_data_w)
{
int pattern = 0x01, i,
off = m_mux_output_strobe<<4;
int off = m_mux_output_strobe<<4;
for ( i = 0; i < 8; i++ )
for (int i = 0; i < 8; i++ )
{
output().set_lamp_value(off, (data & pattern ? 1 : 0));
pattern <<= 1;
m_lamp[off] = BIT(data, i);
off++;
}
}
@ -352,6 +355,7 @@ READ8_MEMBER(bfmsys85_state::triac_r)
void bfmsys85_state::machine_start()
{
m_lamp.resolve();
}
// memory map for bellfruit system85 board ////////////////////////////////

View File

@ -73,11 +73,13 @@ public:
, m_maincpu(*this, "maincpu")
, m_hopper(*this, "hopper")
, m_in(*this, "IN%u", 1)
, m_lamp(*this, "lamp")
{ }
void big10(machine_config &config);
protected:
virtual void machine_start() override { m_lamp.resolve(); }
void main_io(address_map &map);
void main_map(address_map &map);
@ -90,6 +92,7 @@ private:
required_device<cpu_device> m_maincpu;
required_device<ticket_dispenser_device> m_hopper;
required_ioport_array<6> m_in;
output_finder<> m_lamp;
};
@ -106,7 +109,7 @@ WRITE8_MEMBER(big10_state::mux_w)
{
m_mux_data = ~data;
m_hopper->motor_w(BIT(data, 6));
machine().output().set_lamp_value(1, BIT(~data, 7)); // maybe a coin counter?
m_lamp = BIT(~data, 7); // maybe a coin counter?
}
READ8_MEMBER(big10_state::mux_r)

View File

@ -73,8 +73,8 @@ WRITE8_MEMBER(bladestl_state::bladestl_bankswitch_w)
machine().bookkeeping().coin_counter_w(1,data & 0x02);
/* bits 2 & 3 = lamps */
output().set_led_value(0,data & 0x04);
output().set_led_value(1,data & 0x08);
m_lamp[0] = BIT(data, 2);
m_lamp[1] = BIT(data, 3);
/* bit 4 = relay (???) */
@ -285,6 +285,7 @@ GFXDECODE_END
void bladestl_state::machine_start()
{
m_rombank->configure_entries(0, 4, memregion("maincpu")->base(), 0x2000);
m_lamp.resolve();
save_item(NAME(m_spritebank));
save_item(NAME(m_last_track));

View File

@ -59,35 +59,24 @@ class blitz68k_state : public driver_device
{
public:
blitz68k_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_nvram(*this, "nvram"),
m_frame_buffer(*this, "frame_buffer"),
m_blit_romaddr(*this, "blit_romaddr"),
m_blit_attr1_ram(*this, "blit_attr1_ram"),
m_blit_dst_ram_loword(*this, "blitram_loword"),
m_blit_attr2_ram(*this, "blit_attr2_ram"),
m_blit_dst_ram_hiword(*this, "blitram_hiword"),
m_blit_vregs(*this, "blit_vregs"),
m_blit_transpen(*this, "blit_transpen"),
m_leds0(*this, "leds0"),
m_leds1(*this, "leds1"),
m_leds2(*this, "leds2") ,
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette") { }
: driver_device(mconfig, type, tag)
, m_nvram(*this, "nvram")
, m_frame_buffer(*this, "frame_buffer")
, m_blit_romaddr(*this, "blit_romaddr")
, m_blit_attr1_ram(*this, "blit_attr1_ram")
, m_blit_dst_ram_loword(*this, "blitram_loword")
, m_blit_attr2_ram(*this, "blit_attr2_ram")
, m_blit_dst_ram_hiword(*this, "blitram_hiword")
, m_blit_vregs(*this, "blit_vregs")
, m_blit_transpen(*this, "blit_transpen")
, m_leds0(*this, "leds0")
, m_leds1(*this, "leds1")
, m_leds2(*this, "leds2")
, m_maincpu(*this, "maincpu")
, m_palette(*this, "palette")
, m_led(*this, "led%u", 0U)
{ }
optional_shared_ptr<uint16_t> m_nvram;
std::unique_ptr<uint8_t[]> m_blit_buffer;
optional_shared_ptr<uint16_t> m_frame_buffer;
optional_shared_ptr<uint16_t> m_blit_romaddr;
optional_shared_ptr<uint16_t> m_blit_attr1_ram;
optional_shared_ptr<uint16_t> m_blit_dst_ram_loword;
optional_shared_ptr<uint16_t> m_blit_attr2_ram;
optional_shared_ptr<uint16_t> m_blit_dst_ram_hiword;
optional_shared_ptr<uint16_t> m_blit_vregs;
optional_shared_ptr<uint16_t> m_blit_transpen;
optional_shared_ptr<uint16_t> m_leds0;
optional_shared_ptr<uint16_t> m_leds1;
optional_shared_ptr<uint16_t> m_leds2;
DECLARE_WRITE16_MEMBER(blit_copy_w);
DECLARE_READ8_MEMBER(blit_status_r);
DECLARE_WRITE8_MEMBER(blit_x_w);
@ -182,8 +171,6 @@ public:
uint32_t screen_update_blitz68k_noblit(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(steaser_mcu_sim);
MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
void hermit(machine_config &config);
void bankrob(machine_config &config);
void cjffruit(machine_config &config);
@ -203,6 +190,26 @@ public:
void maxidbl_map(address_map &map);
void ramdac_map(address_map &map);
void steaser_map(address_map &map);
protected:
virtual void machine_start() override { m_led.resolve(); }
optional_shared_ptr<uint16_t> m_nvram;
std::unique_ptr<uint8_t[]> m_blit_buffer;
optional_shared_ptr<uint16_t> m_frame_buffer;
optional_shared_ptr<uint16_t> m_blit_romaddr;
optional_shared_ptr<uint16_t> m_blit_attr1_ram;
optional_shared_ptr<uint16_t> m_blit_dst_ram_loword;
optional_shared_ptr<uint16_t> m_blit_attr2_ram;
optional_shared_ptr<uint16_t> m_blit_dst_ram_hiword;
optional_shared_ptr<uint16_t> m_blit_vregs;
optional_shared_ptr<uint16_t> m_blit_transpen;
optional_shared_ptr<uint16_t> m_leds0;
optional_shared_ptr<uint16_t> m_leds1;
optional_shared_ptr<uint16_t> m_leds2;
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
output_finder<17> m_led;
};
/*************************************************************************************************************
@ -869,13 +876,13 @@ WRITE16_MEMBER(blitz68k_state::cjffruit_leds1_w)
if (ACCESSING_BITS_8_15)
{
machine().bookkeeping().coin_counter_w(0, data & 0x0100); // coin in
output().set_led_value(0, data & 0x0200); // win???
m_led[0] = BIT(data, 9); // win???
// 1 data & 0x0400 // win???
output().set_led_value(2, data & 0x0800); // small
output().set_led_value(3, data & 0x1000); // big
output().set_led_value(4, data & 0x2000); // take
output().set_led_value(5, data & 0x4000); // double up
output().set_led_value(6, data & 0x8000); // cancel
m_led[2] = BIT(data, 11); // small
m_led[3] = BIT(data, 12); // big
m_led[4] = BIT(data, 13); // take
m_led[5] = BIT(data, 14); // double up
m_led[6] = BIT(data, 15); // cancel
show_leds123();
}
}
@ -885,14 +892,14 @@ WRITE16_MEMBER(blitz68k_state::cjffruit_leds2_w)
data = COMBINE_DATA(m_leds1);
if (ACCESSING_BITS_8_15)
{
output().set_led_value( 7, data & 0x0100); // start
output().set_led_value( 8, data & 0x0200); // bet
output().set_led_value( 9, data & 0x0400); // hold 5
output().set_led_value(10, data & 0x0800); // hold 4
output().set_led_value(11, data & 0x1000); // hold 3
output().set_led_value(12, data & 0x2000); // hold 2
output().set_led_value(13, data & 0x4000); // collect
output().set_led_value(14, data & 0x8000); // call attendant
m_led[ 7] = BIT(data, 8); // start
m_led[ 8] = BIT(data, 9); // bet
m_led[ 9] = BIT(data, 10); // hold 5
m_led[10] = BIT(data, 11); // hold 4
m_led[11] = BIT(data, 12); // hold 3
m_led[12] = BIT(data, 13); // hold 2
m_led[13] = BIT(data, 14); // collect
m_led[14] = BIT(data, 15); // call attendant
show_leds123();
}
}
@ -902,8 +909,8 @@ WRITE16_MEMBER(blitz68k_state::cjffruit_leds3_w)
data = COMBINE_DATA(m_leds2);
if (ACCESSING_BITS_8_15)
{
output().set_led_value(15, data & 0x0100); // hopper coins?
output().set_led_value(16, data & 0x0400); // coin out?
m_led[15] = BIT(data, 8); // hopper coins?
m_led[16] = BIT(data, 10); // coin out?
show_leds123();
}
}
@ -1010,13 +1017,13 @@ WRITE16_MEMBER(blitz68k_state::deucesw2_leds1_w)
if (ACCESSING_BITS_8_15)
{
machine().bookkeeping().coin_counter_w(0, data & 0x0100); // coin in
output().set_led_value(0, data & 0x0200); // win???
m_led[0] = BIT(data, 9); // win???
// 1 data & 0x0400 // win???
output().set_led_value(2, data & 0x0800); // small
output().set_led_value(3, data & 0x1000); // big
output().set_led_value(4, data & 0x2000); // take
output().set_led_value(5, data & 0x4000); // double up
output().set_led_value(6, data & 0x8000); // cancel
m_led[2] = BIT(data, 11); // small
m_led[3] = BIT(data, 12); // big
m_led[4] = BIT(data, 13); // take
m_led[5] = BIT(data, 14); // double up
m_led[6] = BIT(data, 15); // cancel
show_leds123();
}
}
@ -1026,14 +1033,14 @@ WRITE16_MEMBER(blitz68k_state::deucesw2_leds2_w)
data = COMBINE_DATA(m_leds1);
if (ACCESSING_BITS_8_15)
{
output().set_led_value( 7, data & 0x0100); // start
output().set_led_value( 8, data & 0x0200); // bet
output().set_led_value( 9, data & 0x0400); // hold 5
output().set_led_value(10, data & 0x0800); // hold 4
output().set_led_value(11, data & 0x1000); // hold 3
output().set_led_value(12, data & 0x2000); // hold 2
output().set_led_value(13, data & 0x4000); // hold 1
output().set_led_value(14, data & 0x8000); // call attendant
m_led[ 7] = BIT(data, 8); // start
m_led[ 8] = BIT(data, 9); // bet
m_led[ 9] = BIT(data, 10); // hold 5
m_led[10] = BIT(data, 11); // hold 4
m_led[11] = BIT(data, 12); // hold 3
m_led[12] = BIT(data, 13); // hold 2
m_led[13] = BIT(data, 14); // hold 1
m_led[14] = BIT(data, 15); // call attendant
show_leds123();
}
}
@ -1043,8 +1050,8 @@ WRITE16_MEMBER(blitz68k_state::deucesw2_leds3_w)
data = COMBINE_DATA(m_leds2);
if (ACCESSING_BITS_8_15)
{
output().set_led_value(15, data & 0x0100); // hopper coins?
output().set_led_value(16, data & 0x0400); // coin out?
m_led[15] = BIT(data, 8); // hopper coins?
m_led[16] = BIT(data, 10); // coin out?
show_leds123();
}
}
@ -1211,7 +1218,7 @@ WRITE16_MEMBER(blitz68k_state::hermit_leds2_w)
data = COMBINE_DATA(m_leds1);
if (ACCESSING_BITS_8_15)
{
output().set_led_value( 7, data & 0x0100); // button
m_led[7] = BIT(data, 8); // button
show_leds12();
}
}

View File

@ -39,7 +39,9 @@ public:
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"){ }
m_palette(*this, "palette"),
m_led(*this, "led%u", 0U)
{ }
void boxer(machine_config &config);
@ -80,6 +82,7 @@ private:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
output_finder<2> m_led;
};
/*************************************
@ -330,8 +333,8 @@ WRITE8_MEMBER(boxer_state::crowd_w)
WRITE8_MEMBER(boxer_state::led_w)
{
output().set_led_value(1, !(data & 1));
output().set_led_value(0, !(data & 2));
m_led[1] = BIT(~data, 0);
m_led[0] = BIT(~data, 1);
}
@ -470,6 +473,7 @@ GFXDECODE_END
void boxer_state::machine_start()
{
m_led.resolve();
m_pot_interrupt = timer_alloc(TIMER_POT_INTERRUPT);
m_periodic_timer = timer_alloc(TIMER_PERIODIC);

View File

@ -129,7 +129,7 @@ void bw12_state::ls259_w(int address, int data)
break;
case 4: /* CAP LOCK */
output().set_led_value(0, data);
m_led = data ? 1 : 0;
break;
case 5: /* MOTOR 0 */
@ -479,6 +479,8 @@ WRITE_LINE_MEMBER( bw12_state::ay3600_data_ready_w )
void bw12_state::machine_start()
{
m_led.resolve();
/* setup memory banking */
membank("bank1")->configure_entry(0, m_rom->base());
membank("bank1")->configure_entry(1, m_ram->pointer());

View File

@ -336,8 +336,8 @@ WRITE8_MEMBER(bwidow_state::bwidow_misc_w)
*/
if (data == m_lastdata) return;
output().set_led_value(0,~data & 0x10);
output().set_led_value(1,~data & 0x20);
m_led[0] = BIT(~data, 4);
m_led[1] = BIT(~data, 5);
machine().bookkeeping().coin_counter_w(0, data & 0x01);
machine().bookkeeping().coin_counter_w(1, data & 0x02);
m_lastdata = data;
@ -346,8 +346,8 @@ WRITE8_MEMBER(bwidow_state::bwidow_misc_w)
WRITE8_MEMBER(bwidow_state::spacduel_coin_counter_w)
{
if (data == m_lastdata) return;
output().set_led_value(0, !BIT(data,5)); // start lamp
output().set_led_value(1, !BIT(data,4)); // select lamp
m_led[0] = BIT(~data, 5); // start lamp
m_led[1] = BIT(~data, 4); // select lamp
machine().bookkeeping().coin_lockout_w(0, !BIT(data,3));
machine().bookkeeping().coin_lockout_w(1, !BIT(data,3));
machine().bookkeeping().coin_lockout_w(2, !BIT(data,3));

View File

@ -35,23 +35,17 @@ class cabaret_state : public driver_device
{
public:
cabaret_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_fg_tile_ram(*this, "fg_tile_ram"),
m_fg_color_ram(*this, "fg_color_ram"),
m_bg_scroll(*this, "bg_scroll"),
m_bg_tile_ram(*this, "bg_tile_ram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
: driver_device(mconfig, type, tag)
, m_fg_tile_ram(*this, "fg_tile_ram")
, m_fg_color_ram(*this, "fg_color_ram")
, m_bg_scroll(*this, "bg_scroll")
, m_bg_tile_ram(*this, "bg_tile_ram")
, m_maincpu(*this, "maincpu")
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
, m_led(*this, "led6")
{ }
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
required_shared_ptr<uint8_t> m_bg_scroll;
required_shared_ptr<uint8_t> m_bg_tile_ram;
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
int m_nmi_enable;
uint8_t m_out[3];
DECLARE_WRITE8_MEMBER(bg_scroll_w);
DECLARE_WRITE8_MEMBER(bg_tile_w);
DECLARE_WRITE8_MEMBER(fg_tile_w);
@ -63,16 +57,29 @@ public:
void init_cabaret();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_cabaret(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(cabaret_interrupt);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
void cabaret(machine_config &config);
void cabaret_map(address_map &map);
void cabaret_portmap(address_map &map);
protected:
virtual void machine_start() override { m_led.resolve(); }
virtual void machine_reset() override;
virtual void video_start() override;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
required_shared_ptr<uint8_t> m_bg_scroll;
required_shared_ptr<uint8_t> m_bg_tile_ram;
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
int m_nmi_enable;
uint8_t m_out[3];
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
output_finder<> m_led;
};
@ -167,7 +174,7 @@ WRITE8_MEMBER(cabaret_state::nmi_and_coins_w)
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
output().set_led_value(6, data & 0x40); // led for coin m_out / hopper active
m_led = BIT(data, 6); // led for coin m_out / hopper active
m_nmi_enable = data; // data & 0x80 // nmi enable?

View File

@ -788,33 +788,33 @@ WRITE8_MEMBER(calomega_state::pia1_bout_w)
WRITE8_MEMBER(calomega_state::lamps_903a_w)
{
/* First 5 bits of PIA0 port B */
output().set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
output().set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
output().set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
output().set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
output().set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
m_lamp[1] = BIT(~data, 0); /* L1 (Hold 1) */
m_lamp[2] = BIT(~data, 1); /* L2 (Hold 2) */
m_lamp[3] = BIT(~data, 2); /* L3 (Hold 3) */
m_lamp[4] = BIT(~data, 3); /* L4 (Hold 4) */
m_lamp[5] = BIT(~data, 4); /* L5 (Hold 5) */
}
WRITE8_MEMBER(calomega_state::lamps_903b_w)
{
/* First 4 bits of PIA1 port A */
output().set_lamp_value(6, 1-((data) & 1)); /* L6 (Cancel) */
output().set_lamp_value(7, 1-((data >> 1) & 1)); /* L7 (Bet) */
output().set_lamp_value(8, 1-((data >> 2) & 1)); /* L8 (Take) */
output().set_lamp_value(9, 1-((data >> 3) & 1)); /* L9 (Door?) */
m_lamp[6] = BIT(~data, 0); /* L6 (Cancel) */
m_lamp[7] = BIT(~data, 1); /* L7 (Bet) */
m_lamp[8] = BIT(~data, 2); /* L8 (Take) */
m_lamp[9] = BIT(~data, 3); /* L9 (Door?) */
}
WRITE8_MEMBER(calomega_state::lamps_905_w)
{
/* Whole 8 bits of PIA0 port B */
output().set_lamp_value(1, 1-((data) & 1)); /* L1 (Hold 1) */
output().set_lamp_value(2, 1-((data >> 1) & 1)); /* L2 (Hold 2) */
output().set_lamp_value(3, 1-((data >> 2) & 1)); /* L3 (Hold 3) */
output().set_lamp_value(4, 1-((data >> 3) & 1)); /* L4 (Hold 4) */
output().set_lamp_value(5, 1-((data >> 4) & 1)); /* L5 (Hold 5) */
output().set_lamp_value(6, 1-((data >> 5) & 1)); /* L6 (unknown) */
output().set_lamp_value(7, 1-((data >> 6) & 1)); /* L7 (unknown) */
output().set_lamp_value(8, 1-((data >> 7) & 1)); /* L8 (unknown) */
m_lamp[1] = BIT(~data, 0); /* L1 (Hold 1) */
m_lamp[2] = BIT(~data, 1); /* L2 (Hold 2) */
m_lamp[3] = BIT(~data, 2); /* L3 (Hold 3) */
m_lamp[4] = BIT(~data, 3); /* L4 (Hold 4) */
m_lamp[5] = BIT(~data, 4); /* L5 (Hold 5) */
m_lamp[6] = BIT(~data, 5); /* L6 (unknown) */
m_lamp[7] = BIT(~data, 6); /* L7 (unknown) */
m_lamp[8] = BIT(~data, 7); /* L8 (unknown) */
}

View File

@ -36,22 +36,17 @@
class cardline_state : public driver_device
{
public:
cardline_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
cardline_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_screen(*this, "screen")
m_screen(*this, "screen"),
m_lamp(*this, "lamp%u", 0U)
{ }
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
uint8_t m_video;
uint8_t m_hsync_q;
DECLARE_WRITE8_MEMBER(vram_w);
DECLARE_WRITE8_MEMBER(attr_w);
DECLARE_WRITE8_MEMBER(video_w);
@ -64,24 +59,34 @@ public:
DECLARE_PALETTE_INIT(cardline);
virtual void machine_start() override;
DECLARE_WRITE_LINE_MEMBER(hsync_changed);
DECLARE_WRITE_LINE_MEMBER(vsync_changed);
MC6845_BEGIN_UPDATE(crtc_begin_update);
MC6845_UPDATE_ROW(crtc_update_row);
void cardline(machine_config &config);
void mem_io(address_map &map);
void mem_prg(address_map &map);
protected:
virtual void machine_start() override;
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
uint8_t m_video;
uint8_t m_hsync_q;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<screen_device> m_screen;
void cardline(machine_config &config);
void mem_io(address_map &map);
void mem_prg(address_map &map);
output_finder<8> m_lamp;
};
void cardline_state::machine_start()
{
m_lamp.resolve();
m_video = 0;
m_hsync_q = 1;
for (int i=0; i < 0x2000; i++)
@ -202,14 +207,14 @@ READ8_MEMBER(cardline_state::hsync_r)
WRITE8_MEMBER(cardline_state::lamps_w)
{
/* button lamps 1-8 (collect, card 1-5, bet, start) */
output().set_lamp_value(5,(data >> 0) & 1);
output().set_lamp_value(0,(data >> 1) & 1);
output().set_lamp_value(1,(data >> 2) & 1);
output().set_lamp_value(2,(data >> 3) & 1);
output().set_lamp_value(3,(data >> 4) & 1);
output().set_lamp_value(4,(data >> 5) & 1);
output().set_lamp_value(6,(data >> 6) & 1);
output().set_lamp_value(7,(data >> 7) & 1);
m_lamp[5] = BIT(data, 0);
m_lamp[0] = BIT(data, 1);
m_lamp[1] = BIT(data, 2);
m_lamp[2] = BIT(data, 3);
m_lamp[3] = BIT(data, 4);
m_lamp[4] = BIT(data, 5);
m_lamp[6] = BIT(data, 6);
m_lamp[7] = BIT(data, 7);
}
void cardline_state::mem_prg(address_map &map)

View File

@ -700,10 +700,10 @@ WRITE16_MEMBER(cave_state::korokoro_leds_w)
{
COMBINE_DATA(&m_leds[0]);
output().set_led_value(0, data & 0x8000);
output().set_led_value(1, data & 0x4000);
output().set_led_value(2, data & 0x1000); // square button
output().set_led_value(3, data & 0x0800); // round button
m_led[0] = BIT(data, 15);
m_led[1] = BIT(data, 14);
m_led[2] = BIT(data, 12); // square button
m_led[3] = BIT(data, 11); // round button
// machine().bookkeeping().coin_lockout_w(1, ~data & 0x0200); // coin lockouts?
// machine().bookkeeping().coin_lockout_w(0, ~data & 0x0100);
@ -711,10 +711,10 @@ WRITE16_MEMBER(cave_state::korokoro_leds_w)
// machine().bookkeeping().coin_counter_w(1, data & 0x0020);
machine().bookkeeping().coin_counter_w(0, data & 0x0010);
output().set_led_value(5, data & 0x0008);
output().set_led_value(6, data & 0x0004);
output().set_led_value(7, data & 0x0002);
output().set_led_value(8, data & 0x0001);
m_led[5] = BIT(data, 3);
m_led[6] = BIT(data, 2);
m_led[7] = BIT(data, 1);
m_led[8] = BIT(data, 0);
show_leds();
}
@ -907,17 +907,17 @@ WRITE16_MEMBER(cave_state::ppsatan_out_w)
{
machine().bookkeeping().coin_counter_w(0, data & 0x0001);
output().set_led_value(0, data & 0x0010);
output().set_led_value(1, data & 0x0020);
output().set_led_value(2, data & 0x0040);
output().set_led_value(3, data & 0x0080);
m_led[0] = BIT(data, 4);
m_led[1] = BIT(data, 5);
m_led[2] = BIT(data, 6);
m_led[3] = BIT(data, 7);
}
if (ACCESSING_BITS_8_15)
{
output().set_led_value(4, data & 0x0100);
output().set_led_value(5, data & 0x0200);
output().set_led_value(6, data & 0x0400); // not tested in service mode
output().set_led_value(7, data & 0x0800); // not tested in service mode
m_led[4] = BIT(data, 8);
m_led[5] = BIT(data, 9);
m_led[6] = BIT(data, 10); // not tested in service mode
m_led[7] = BIT(data, 11); // not tested in service mode
m_oki[0]->set_rom_bank((data & 0x8000) >> 15);
}
@ -1133,14 +1133,14 @@ WRITE16_MEMBER(cave_state::tjumpman_leds_w)
{
if (ACCESSING_BITS_0_7)
{
output().set_led_value(0, data & 0x0001); // suru
output().set_led_value(1, data & 0x0002); // shinai
output().set_led_value(2, data & 0x0004); // payout
output().set_led_value(3, data & 0x0008); // go
output().set_led_value(4, data & 0x0010); // 1 bet
output().set_led_value(5, data & 0x0020); // medal
m_hopper = data & 0x0040; // hopper
output().set_led_value(6, data & 0x0080); // 3 bet
m_led[0] = BIT(data, 0); // suru
m_led[1] = BIT(data, 1); // shinai
m_led[2] = BIT(data, 2); // payout
m_led[3] = BIT(data, 3); // go
m_led[4] = BIT(data, 4); // 1 bet
m_led[5] = BIT(data, 5); // medal
m_hopper = BIT(data, 6); // hopper
m_led[6] = BIT(data, 7); // 3 bet
}
// popmessage("led %04X", data);
@ -1179,13 +1179,13 @@ WRITE16_MEMBER(cave_state::pacslot_leds_w)
{
if (ACCESSING_BITS_0_7)
{
output().set_led_value(0, data & 0x0001); // pac-man
output().set_led_value(1, data & 0x0002); // ms. pac-man
output().set_led_value(2, data & 0x0004); // payout
output().set_led_value(3, data & 0x0008); // start
output().set_led_value(4, data & 0x0010); // bet
output().set_led_value(5, data & 0x0020); // medal
m_hopper = data & 0x0040; // hopper
m_led[0] = data & 0x0001; // pac-man
m_led[1] = data & 0x0002; // ms. pac-man
m_led[2] = data & 0x0004; // payout
m_led[3] = data & 0x0008; // start
m_led[4] = data & 0x0010; // bet
m_led[5] = data & 0x0020; // medal
m_hopper = data & 0x0040; // hopper
}
// popmessage("led %04X", data);
@ -2062,8 +2062,9 @@ GFXDECODE_END
***************************************************************************/
MACHINE_START_MEMBER(cave_state,cave)
void cave_state::machine_start()
{
m_led.resolve();
m_vblank_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cave_state::cave_vblank_end), this));
save_item(NAME(m_soundbuf_wptr));
@ -2101,7 +2102,6 @@ MACHINE_CONFIG_START(cave_state::dfeveron)
MCFG_DEVICE_PROGRAM_MAP(dfeveron_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2142,7 +2142,6 @@ MACHINE_CONFIG_START(cave_state::ddonpach)
MCFG_DEVICE_PROGRAM_MAP(ddonpach_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2182,7 +2181,6 @@ MACHINE_CONFIG_START(cave_state::donpachi)
MCFG_DEVICE_PROGRAM_MAP(donpachi_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2229,7 +2227,6 @@ MACHINE_CONFIG_START(cave_state::esprade)
MCFG_DEVICE_PROGRAM_MAP(esprade_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2269,7 +2266,6 @@ MACHINE_CONFIG_START(cave_state::gaia)
MCFG_DEVICE_PROGRAM_MAP(gaia_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)
@ -2310,7 +2306,6 @@ MACHINE_CONFIG_START(cave_state::guwange)
MCFG_DEVICE_PROGRAM_MAP(guwange_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2353,7 +2348,6 @@ MACHINE_CONFIG_START(cave_state::hotdogst)
MCFG_DEVICE_PROGRAM_MAP(hotdogst_sound_map)
MCFG_DEVICE_IO_MAP(hotdogst_sound_portmap)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2403,7 +2397,6 @@ MACHINE_CONFIG_START(cave_state::korokoro)
MCFG_DEVICE_PROGRAM_MAP(korokoro_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_8BIT_ADD("eeprom")
@ -2456,7 +2449,6 @@ MACHINE_CONFIG_START(cave_state::mazinger)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2513,7 +2505,6 @@ MACHINE_CONFIG_START(cave_state::metmqstr)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) /* start with the watchdog armed */
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2569,7 +2560,6 @@ MACHINE_CONFIG_START(cave_state::pacslot)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2629,7 +2619,6 @@ MACHINE_CONFIG_START(cave_state::ppsatan)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1)) /* a guess, and certainly wrong */
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2694,7 +2683,6 @@ MACHINE_CONFIG_START(cave_state::pwrinst2)
MCFG_DEVICE_PROGRAM_MAP(pwrinst2_sound_map)
MCFG_DEVICE_IO_MAP(pwrinst2_sound_portmap)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2771,7 +2759,6 @@ MACHINE_CONFIG_START(cave_state::sailormn)
// MCFG_QUANTUM_TIME(attotime::from_hz(600))
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,sailormn)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2829,7 +2816,6 @@ MACHINE_CONFIG_START(cave_state::tekkencw)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2885,7 +2871,6 @@ MACHINE_CONFIG_START(cave_state::tjumpman)
MCFG_WATCHDOG_ADD("watchdog")
MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(3)) /* a guess, and certainly wrong */
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
@ -2930,7 +2915,6 @@ MACHINE_CONFIG_START(cave_state::uopoko)
MCFG_DEVICE_PROGRAM_MAP(uopoko_map)
MCFG_DEVICE_VBLANK_INT_DRIVER("screen", cave_state, cave_interrupt)
MCFG_MACHINE_START_OVERRIDE(cave_state,cave)
MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start)

View File

@ -91,17 +91,48 @@
class cc40_state : public driver_device
{
public:
cc40_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
cc40_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_cart(*this, "cartslot"),
m_key_matrix(*this, "IN.%u", 0),
m_battery_inp(*this, "BATTERY")
m_battery_inp(*this, "BATTERY"),
m_lamp(*this, "lamp%u", 0U)
{
m_sysram[0] = nullptr;
m_sysram[1] = nullptr;
}
void postload();
void init_sysram(int chip, u16 size);
void update_lcd_indicator(u8 y, u8 x, int state);
void update_clock_divider();
DECLARE_READ8_MEMBER(sysram_r);
DECLARE_WRITE8_MEMBER(sysram_w);
DECLARE_READ8_MEMBER(bus_control_r);
DECLARE_WRITE8_MEMBER(bus_control_w);
DECLARE_WRITE8_MEMBER(power_w);
DECLARE_READ8_MEMBER(battery_r);
DECLARE_READ8_MEMBER(bankswitch_r);
DECLARE_WRITE8_MEMBER(bankswitch_w);
DECLARE_READ8_MEMBER(clock_control_r);
DECLARE_WRITE8_MEMBER(clock_control_w);
DECLARE_READ8_MEMBER(keyboard_r);
DECLARE_WRITE8_MEMBER(keyboard_w);
DECLARE_PALETTE_INIT(cc40);
DECLARE_INPUT_CHANGED_MEMBER(sysram_size_changed);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cc40_cartridge);
HD44780_PIXEL_UPDATE(cc40_pixel_update);
void cc40(machine_config &config);
void main_map(address_map &map);
protected:
virtual void machine_reset() override;
virtual void machine_start() override;
private:
required_device<tms70c20_device> m_maincpu;
required_device<generic_slot_device> m_cart;
required_ioport_array<8> m_key_matrix;
@ -122,33 +153,7 @@ public:
u16 m_sysram_size[2];
u16 m_sysram_end[2];
u16 m_sysram_mask[2];
void postload();
void init_sysram(int chip, u16 size);
void update_lcd_indicator(u8 y, u8 x, int state);
void update_clock_divider();
DECLARE_READ8_MEMBER(sysram_r);
DECLARE_WRITE8_MEMBER(sysram_w);
DECLARE_READ8_MEMBER(bus_control_r);
DECLARE_WRITE8_MEMBER(bus_control_w);
DECLARE_WRITE8_MEMBER(power_w);
DECLARE_READ8_MEMBER(battery_r);
DECLARE_READ8_MEMBER(bankswitch_r);
DECLARE_WRITE8_MEMBER(bankswitch_w);
DECLARE_READ8_MEMBER(clock_control_r);
DECLARE_WRITE8_MEMBER(clock_control_w);
DECLARE_READ8_MEMBER(keyboard_r);
DECLARE_WRITE8_MEMBER(keyboard_w);
virtual void machine_reset() override;
virtual void machine_start() override;
DECLARE_PALETTE_INIT(cc40);
DECLARE_INPUT_CHANGED_MEMBER(sysram_size_changed);
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cc40_cartridge);
HD44780_PIXEL_UPDATE(cc40_pixel_update);
void cc40(machine_config &config);
void main_map(address_map &map);
output_finder<80> m_lamp;
};
@ -199,7 +204,7 @@ void cc40_state::update_lcd_indicator(u8 y, u8 x, int state)
// ---- raw lcd screen here ----
// under | ERROR v v v v v v _LOW
// output# | 60 61 62 63 50 51 52 53
output().set_lamp_value(y * 10 + x, state);
m_lamp[y * 10 + x] = state ? 1 : 0;
}
HD44780_PIXEL_UPDATE(cc40_state::cc40_pixel_update)
@ -543,6 +548,7 @@ void cc40_state::postload()
void cc40_state::machine_start()
{
// init
m_lamp.resolve();
std::string region_tag;
m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());

View File

@ -188,6 +188,8 @@ void ccastles_state::machine_start()
{
rectangle visarea;
m_led.resolve();
/* initialize globals */
m_syncprom = memregion("proms")->base() + 0x000;
@ -250,7 +252,7 @@ WRITE8_MEMBER(ccastles_state::irq_ack_w)
WRITE8_MEMBER(ccastles_state::led_w)
{
output().set_led_value(offset, ~data & 1);
m_led[offset] = BIT(~data, 0);
}

View File

@ -31,12 +31,14 @@
class chance32_state : public driver_device
{
public:
chance32_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
chance32_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_fgram(*this, "fgram"),
m_bgram(*this, "bgram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode") { }
m_gfxdecode(*this, "gfxdecode"),
m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(chance32_fgram_w)
{
@ -54,6 +56,18 @@ public:
DECLARE_WRITE8_MEMBER(muxout_w);
DECLARE_READ8_MEMBER(mux_r);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
uint32_t screen_update_chance32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void chance32(machine_config &config);
void chance32_map(address_map &map);
void chance32_portmap(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
@ -61,17 +75,9 @@ public:
required_shared_ptr<uint8_t> m_bgram;
uint8_t mux_data;
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update_chance32(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
void chance32(machine_config &config);
void chance32_map(address_map &map);
void chance32_portmap(address_map &map);
output_finder<13> m_lamp;
};
@ -173,13 +179,13 @@ WRITE8_MEMBER(chance32_state::muxout_w)
if (data & 1) // bit 0 is the mux selector.
{
output().set_lamp_value(0, (data >> 1) & 1); /* Lamp 0 - Small / Big */
output().set_lamp_value(1, (data >> 2) & 1); /* Lamp 1 - Big / Small */
output().set_lamp_value(2, (data >> 3) & 1); /* Lamp 2 - Hold 5 */
output().set_lamp_value(3, (data >> 4) & 1); /* Lamp 3 - Hold 4 */
output().set_lamp_value(4, (data >> 5) & 1); /* Lamp 4 - Hold 3 */
output().set_lamp_value(5, (data >> 6) & 1); /* Lamp 5 - Hold 2 */
output().set_lamp_value(6, (data >> 7) & 1); /* Lamp 6 - Hold 1 */
m_lamp[0] = BIT(data, 1); /* Lamp 0 - Small / Big */
m_lamp[1] = BIT(data, 2); /* Lamp 1 - Big / Small */
m_lamp[2] = BIT(data, 3); /* Lamp 2 - Hold 5 */
m_lamp[3] = BIT(data, 4); /* Lamp 3 - Hold 4 */
m_lamp[4] = BIT(data, 5); /* Lamp 4 - Hold 3 */
m_lamp[5] = BIT(data, 6); /* Lamp 5 - Hold 2 */
m_lamp[6] = BIT(data, 7); /* Lamp 6 - Hold 1 */
logerror("Lamps A: %02x\n", data);
}
@ -187,12 +193,12 @@ WRITE8_MEMBER(chance32_state::muxout_w)
else
{
// bit 1 is unknown...
output().set_lamp_value(7, (data >> 2) & 1); /* Lamp 7 - Fever! */
output().set_lamp_value(8, (data >> 3) & 1); /* Lamp 8 - Cancel */
output().set_lamp_value(9, (data >> 4) & 1); /* Lamp 9 - D-Up / Take */
output().set_lamp_value(10, (data >> 5) & 1); /* Lamp 10 - Take / D-Up */
output().set_lamp_value(11, (data >> 6) & 1); /* Lamp 11 - Deal */
output().set_lamp_value(12, (data >> 7) & 1); /* Lamp 12 - Bet */
m_lamp[7] = BIT(data, 2); /* Lamp 7 - Fever! */
m_lamp[8] = BIT(data, 3); /* Lamp 8 - Cancel */
m_lamp[9] = BIT(data, 4); /* Lamp 9 - D-Up / Take */
m_lamp[10] = BIT(data, 5); /* Lamp 10 - Take / D-Up */
m_lamp[11] = BIT(data, 6); /* Lamp 11 - Deal */
m_lamp[12] = BIT(data, 7); /* Lamp 12 - Bet */
logerror("Lamps B: %02x\n", data);
}
@ -442,6 +448,7 @@ GFXDECODE_END
void chance32_state::machine_start()
{
m_lamp.resolve();
}
void chance32_state::machine_reset()

View File

@ -38,6 +38,8 @@ public:
, m_digitalker(*this, "digitalker")
, m_aysnd(*this, "aysnd")
, m_digits(*this, "digit%u", 0U)
, m_leds(*this, "led%u", 0U)
, m_lamps(*this, "lamp%u", 0U)
{
}
@ -87,6 +89,8 @@ private:
required_device<digitalker_device> m_digitalker;
optional_device<ay8910_device> m_aysnd; // only faceoffh
output_finder<4> m_digits;
output_finder<3> m_leds;
output_finder<2> m_lamps;
};
@ -151,9 +155,9 @@ WRITE_LINE_MEMBER(chexx_state::via_cb2_out)
m_digits[3] = patterns[(m_shift >> (8+0)) & 0xf];
// Leds (period being played)
output().set_led_value(0, BIT(m_shift,2));
output().set_led_value(1, BIT(m_shift,1));
output().set_led_value(2, BIT(m_shift,0));
m_leds[0] = BIT(m_shift,2);
m_leds[1] = BIT(m_shift,1);
m_leds[2] = BIT(m_shift,0);
// logerror("%s: VIA write CB2 = %02X\n", machine().describe_context(), state);
}
@ -190,8 +194,8 @@ void chexx_state::chexx83_map(address_map &map)
WRITE8_MEMBER(chexx_state::lamp_w)
{
m_lamp = data;
output().set_lamp_value(0, BIT(m_lamp,0));
output().set_lamp_value(1, BIT(m_lamp,1));
m_lamps[0] = BIT(m_lamp,0);
m_lamps[1] = BIT(m_lamp,1);
}
WRITE8_MEMBER(chexx_state::ay_w)
@ -262,6 +266,8 @@ INPUT_PORTS_END
void chexx_state::machine_start()
{
m_digits.resolve();
m_leds.resolve();
m_lamps.resolve();
}
void chexx_state::digitalker_set_bank(uint8_t bank)

View File

@ -36,15 +36,35 @@ class chsuper_state : public driver_device
{
public:
chsuper_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
, m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(chsuper_vram_w);
DECLARE_WRITE8_MEMBER(chsuper_outporta_w);
DECLARE_WRITE8_MEMBER(chsuper_outportb_w);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void chsuper(machine_config &config);
void chsuper_portmap(address_map &map);
void chsuper_prg_map(address_map &map);
void ramdac_map(address_map &map);
void init_chsuper3();
void init_chmpnum();
void init_chsuper2();
protected:
// driver_device overrides
virtual void machine_start() override { m_lamp.resolve(); }
//virtual void machine_reset();
virtual void video_start() override;
int m_tilexor;
uint8_t m_blacklamp;
uint8_t m_redlamp;
@ -53,22 +73,7 @@ public:
required_device<z180_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void chsuper(machine_config &config);
void chsuper_portmap(address_map &map);
void chsuper_prg_map(address_map &map);
void ramdac_map(address_map &map);
protected:
// driver_device overrides
//virtual void machine_start();
//virtual void machine_reset();
virtual void video_start() override;
public:
void init_chsuper3();
void init_chmpnum();
void init_chsuper2();
output_finder<7> m_lamp;
};
@ -152,11 +157,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_vram_w )
WRITE8_MEMBER( chsuper_state::chsuper_outporta_w ) // Port EEh
{
machine().bookkeeping().coin_counter_w(0, data & 0x01); // Coin counter
output().set_lamp_value(0, (data >> 1) & 1); // Hold 1 / Black (Nero) lamp.
m_lamp[0] = BIT(data, 1); // Hold 1 / Black (Nero) lamp.
machine().bookkeeping().coin_counter_w(1, data & 0x04); // Payout / Ticket Out pulse
output().set_lamp_value(1, (data >> 3) & 1); // Hold 2 / Low (Bassa) lamp.
m_lamp[1] = BIT(data, 3); // Hold 2 / Low (Bassa) lamp.
// D4: unused...
output().set_lamp_value(5, (data >> 5) & 1); // BET lamp
m_lamp[5] = BIT(data, 5); // BET lamp
// D6: ticket motor...
// D7: unused...
@ -167,11 +172,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_outporta_w ) // Port EEh
if ((m_blacklamp == 1) & (m_redlamp == 1)) // if both are ON...
{
output().set_lamp_value(2, 1); // HOLD 3 ON
m_lamp[2] = 1; // HOLD 3 ON
}
else
{
output().set_lamp_value(2, 0); // otherwise HOLD 3 OFF
m_lamp[2] = 0; // otherwise HOLD 3 OFF
}
}
@ -179,11 +184,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_outportb_w ) // Port EFh
{
// D0: unknown...
// D1: unused...
output().set_lamp_value(3, (data >> 2) & 1); // Hold 4 / High (Alta) lamp.
m_lamp[3] = BIT(data, 2); // Hold 4 / High (Alta) lamp.
// D3: unused...
// D4: unused...
output().set_lamp_value(4, (data >> 5) & 1); // Hold 5 / Red (Rosso) / Gamble (Raddoppio) lamp.
output().set_lamp_value(6, (data >> 6) & 1); // Start / Gamble (Raddoppio) lamp.
m_lamp[4] = BIT(data, 5); // Hold 5 / Red (Rosso) / Gamble (Raddoppio) lamp.
m_lamp[6] = BIT(data, 6); // Start / Gamble (Raddoppio) lamp.
// D7: unused...
/* Workaround to get the HOLD 3 lamp line active,
@ -193,11 +198,11 @@ WRITE8_MEMBER( chsuper_state::chsuper_outportb_w ) // Port EFh
if ((m_blacklamp == 1) & (m_redlamp == 1)) // if both are ON...
{
output().set_lamp_value(2, 1); // Hold 3 ON
m_lamp[2] = 1; // Hold 3 ON
}
else
{
output().set_lamp_value(2, 0); // Hold 3 OFF
m_lamp[2] = 0; // Hold 3 OFF
}
}

View File

@ -114,9 +114,9 @@ WRITE8_MEMBER( cidelsa_state::altair_out1_w )
7 CONT. M1
*/
output().set_led_value(0, data & 0x08); // 1P
output().set_led_value(1, data & 0x10); // 2P
output().set_led_value(2, data & 0x20); // FIRE
m_led[0] = BIT(data, 3); // 1P
m_led[1] = BIT(data, 4); // 2P
m_led[2] = BIT(data, 5); // FIRE
}
WRITE8_MEMBER( draco_state::out1_w )
@ -370,18 +370,21 @@ void cidelsa_state::device_timer(emu_timer &timer, device_timer_id id, int param
void cidelsa_state::machine_start()
{
m_led.resolve();
/* register for state saving */
save_item(NAME(m_reset));
}
void draco_state::machine_start()
{
cidelsa_state::machine_start();
/* setup COP402 memory banking */
membank("bank1")->configure_entries(0, 2, memregion(COP402N_TAG)->base(), 0x400);
membank("bank1")->set_entry(0);
/* register for state saving */
save_item(NAME(m_reset));
save_item(NAME(m_sound));
save_item(NAME(m_psg_latch));
}

View File

@ -544,15 +544,15 @@ WRITE16_MEMBER(cischeat_state::scudhamm_leds_w)
{
if (ACCESSING_BITS_8_15)
{
output().set_led_value(0, data & 0x0100); // 3 buttons
output().set_led_value(1, data & 0x0200);
output().set_led_value(2, data & 0x0400);
m_led[0] = BIT(data, 8); // 3 buttons
m_led[1] = BIT(data, 9);
m_led[2] = BIT(data, 10);
}
if (ACCESSING_BITS_0_7)
{
// output().set_led_value(3, data & 0x0010); // if we had more leds..
// output().set_led_value(4, data & 0x0020);
m_led[3] = BIT(data, 4);
m_led[4] = BIT(data, 5);
}
}
@ -647,10 +647,10 @@ WRITE16_MEMBER(cischeat_state::armchmp2_leds_w)
{
if (ACCESSING_BITS_8_15)
{
output().set_led_value(0, data & 0x0100);
output().set_led_value(1, data & 0x1000);
output().set_led_value(2, data & 0x2000);
output().set_led_value(3, data & 0x4000);
m_led[0] = BIT(data, 8);
m_led[1] = BIT(data, 12);
m_led[2] = BIT(data, 13);
m_led[3] = BIT(data, 14);
}
if (ACCESSING_BITS_0_7)
@ -694,9 +694,9 @@ WRITE16_MEMBER(cischeat_state::captflag_leds_w)
if (ACCESSING_BITS_8_15)
{
machine().bookkeeping().coin_counter_w(1, data & 0x0100); // coin 2
output().set_led_value(0, data & 0x0200); // decide
m_led[0] = BIT(data, 8); // decide
machine().bookkeeping().coin_counter_w(0, data & 0x0400); // coin 1
output().set_led_value(1, data & 0x2000); // select
m_led[1] = BIT(data, 13); // select
int power = (data & 0x1000);
m_captflag_hopper->motor_w(power ? 1 : 0); // prize motor

View File

@ -94,20 +94,16 @@ class cliffhgr_state : public driver_device
{
public:
cliffhgr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_laserdisc(*this, "laserdisc"),
m_port_bank(0),
m_phillips_code(0) ,
m_maincpu(*this, "maincpu"),
m_discrete(*this, "discrete"),
m_screen(*this, "screen") { }
: driver_device(mconfig, type, tag)
, m_laserdisc(*this, "laserdisc")
, m_port_bank(0)
, m_phillips_code(0)
, m_maincpu(*this, "maincpu")
, m_discrete(*this, "discrete")
, m_screen(*this, "screen")
, m_led(*this, "led0")
{ }
required_device<pioneer_pr8210_device> m_laserdisc;
int m_port_bank;
uint32_t m_phillips_code;
emu_timer *m_irq_timer;
DECLARE_WRITE8_MEMBER(cliff_test_led_w);
DECLARE_WRITE8_MEMBER(cliff_port_bank_w);
DECLARE_READ8_MEMBER(cliff_port_r);
@ -118,15 +114,27 @@ public:
DECLARE_WRITE8_MEMBER(cliff_ldwire_w);
DECLARE_WRITE8_MEMBER(cliff_sound_overlay_w);
void init_cliff();
virtual void machine_start() override;
virtual void machine_reset() override;
TIMER_CALLBACK_MEMBER(cliff_irq_callback);
required_device<cpu_device> m_maincpu;
required_device<discrete_device> m_discrete;
required_device<screen_device> m_screen;
void cliffhgr(machine_config &config);
void mainmem(address_map &map);
void mainport(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
required_device<pioneer_pr8210_device> m_laserdisc;
int m_port_bank;
uint32_t m_phillips_code;
emu_timer *m_irq_timer;
required_device<cpu_device> m_maincpu;
required_device<discrete_device> m_discrete;
required_device<screen_device> m_screen;
output_finder<> m_led;
};
@ -134,7 +142,7 @@ public:
WRITE8_MEMBER(cliffhgr_state::cliff_test_led_w)
{
output().set_led_value(0, offset ^ 1);
m_led = offset ^ 1;
}
WRITE8_MEMBER(cliffhgr_state::cliff_port_bank_w)
@ -228,6 +236,7 @@ TIMER_CALLBACK_MEMBER(cliffhgr_state::cliff_irq_callback)
void cliffhgr_state::machine_start()
{
m_led.resolve();
m_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(cliffhgr_state::cliff_irq_callback),this));
}

View File

@ -79,7 +79,7 @@ WRITE8_MEMBER(copsnrob_state::copsnrob_misc2_w)
{
m_misc = data & 0x7f;
/* Multi Player Start */
output().set_led_value(1, !((data >> 6) & 0x01));
m_led[1] = BIT(~data, 6);
}

View File

@ -324,21 +324,15 @@
class corona_state : public driver_device
{
public:
corona_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
corona_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_soundcpu(*this, "soundcpu"),
m_screen(*this, "screen"),
m_soundlatch(*this, "soundlatch") { }
m_soundlatch(*this, "soundlatch"),
m_lamps(*this, "lamp%u", 0U)
{ }
uint8_t m_blitter_x_reg;
uint8_t m_blitter_y_reg;
uint8_t m_blitter_aux_reg;
uint8_t m_blitter_unk_reg;
std::unique_ptr<uint8_t[]> m_videobuf;
uint8_t m_lamp;
uint8_t m_lamp_old;
int m_input_selector;
DECLARE_WRITE8_MEMBER(blitter_y_w);
DECLARE_WRITE8_MEMBER(blitter_unk_w);
DECLARE_WRITE8_MEMBER(blitter_x_w);
@ -356,10 +350,6 @@ public:
DECLARE_PALETTE_INIT(corona);
uint32_t screen_update_winner(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_luckyrlt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
void winner81(machine_config &config);
void winner82(machine_config &config);
void rcirulet(machine_config &config);
@ -381,6 +371,23 @@ public:
void winner82_map(address_map &map);
void winner82_sound_cpu_io_map(address_map &map);
void winner82_sound_map(address_map &map);
protected:
virtual void machine_start() override { m_lamps.resolve(); }
uint8_t m_blitter_x_reg;
uint8_t m_blitter_y_reg;
uint8_t m_blitter_aux_reg;
uint8_t m_blitter_unk_reg;
std::unique_ptr<uint8_t[]> m_videobuf;
uint8_t m_lamp;
uint8_t m_lamp_old;
int m_input_selector;
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_soundcpu;
required_device<screen_device> m_screen;
required_device<generic_latch_8_device> m_soundlatch;
output_finder<256> m_lamps;
};
@ -536,8 +543,8 @@ WRITE8_MEMBER(corona_state::ball_w)
{
m_lamp = data;
output().set_lamp_value(data, 1);
output().set_lamp_value(m_lamp_old, 0);
m_lamps[data] = 1;
m_lamps[m_lamp_old] = 0;
m_lamp_old = m_lamp;
}

View File

@ -409,7 +409,7 @@ WRITE8_MEMBER( cubo_state::akiko_cia_0_port_a_write )
m_cdda->set_output_gain( 0, ( data & 1 ) ? 0.0 : 1.0 );
/* bit 1 = Power Led on Amiga */
output().set_led_value(0, (data & 2) ? 0 : 1);
m_power_led = BIT(~data, 1);
handle_joystick_cia(data, m_cia_0->read(space, 2));
}

View File

@ -925,8 +925,11 @@ GFXDECODE_END
*
*************************************/
MACHINE_START_MEMBER(cvs_state,cvs)
void cvs_state::machine_start()
{
m_lamp.resolve();
/* allocate memory */
if (m_gfxdecode->gfx(1) != nullptr)
m_gfxdecode->gfx(1)->set_source(m_character_ram);
@ -949,7 +952,7 @@ MACHINE_START_MEMBER(cvs_state,cvs)
save_item(NAME(m_stars_scroll));
}
MACHINE_RESET_MEMBER(cvs_state,cvs)
void cvs_state::machine_reset()
{
m_character_banking_mode = 0;
m_character_ram_page_start = 0;
@ -984,9 +987,6 @@ MACHINE_CONFIG_START(cvs_state::cvs)
//MCFG_S2650_SENSE_INPUT(READLINE(*this, cvs_state, cvs_393hz_clock_r))
MCFG_S2650_SENSE_INPUT(READLINE("tms", tms5110_device, romclk_hack_r))
MCFG_MACHINE_START_OVERRIDE(cvs_state,cvs)
MCFG_MACHINE_RESET_OVERRIDE(cvs_state,cvs)
/* video hardware */
MCFG_VIDEO_START_OVERRIDE(cvs_state,cvs)

View File

@ -45,43 +45,18 @@ class dacholer_state : public driver_device
{
public:
dacholer_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_audiocpu(*this,"audiocpu"),
m_msm(*this, "msm"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_bgvideoram(*this, "bgvideoram"),
m_fgvideoram(*this, "fgvideoram"),
m_spriteram(*this, "spriteram") { }
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
optional_device<msm5205_device> m_msm;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
/* memory pointers */
required_shared_ptr<uint8_t> m_bgvideoram;
required_shared_ptr<uint8_t> m_fgvideoram;
required_shared_ptr<uint8_t> m_spriteram;
/* video-related */
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
int m_bg_bank;
uint8_t m_scroll_x;
uint8_t m_scroll_y;
/* sound-related */
int m_msm_data;
int m_msm_toggle;
uint8_t m_snd_interrupt_enable;
uint8_t m_music_interrupt_enable;
uint8_t m_snd_ack;
: driver_device(mconfig, type, tag)
, m_maincpu(*this,"maincpu")
, m_audiocpu(*this,"audiocpu")
, m_msm(*this, "msm")
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
, m_soundlatch(*this, "soundlatch")
, m_bgvideoram(*this, "bgvideoram")
, m_fgvideoram(*this, "fgvideoram")
, m_spriteram(*this, "spriteram")
, m_led(*this, "led%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(bg_scroll_x_w);
DECLARE_WRITE8_MEMBER(bg_scroll_y_w);
@ -97,9 +72,6 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_PALETTE_INIT(dacholer);
uint32_t screen_update_dacholer(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(sound_irq);
@ -114,6 +86,42 @@ public:
void main_map(address_map &map);
void snd_io_map(address_map &map);
void snd_map(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
private:
/* devices */
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
optional_device<msm5205_device> m_msm;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
/* memory pointers */
required_shared_ptr<uint8_t> m_bgvideoram;
required_shared_ptr<uint8_t> m_fgvideoram;
required_shared_ptr<uint8_t> m_spriteram;
output_finder<2> m_led;
/* video-related */
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
int m_bg_bank;
uint8_t m_scroll_x;
uint8_t m_scroll_y;
/* sound-related */
int m_msm_data;
int m_msm_toggle;
uint8_t m_snd_interrupt_enable;
uint8_t m_music_interrupt_enable;
uint8_t m_snd_ack;
};
TILE_GET_INFO_MEMBER(dacholer_state::get_bg_tile_info)
@ -223,8 +231,8 @@ WRITE8_MEMBER(dacholer_state::coins_w)
machine().bookkeeping().coin_counter_w(0, data & 1);
machine().bookkeeping().coin_counter_w(1, data & 2);
output().set_led_value(0, data & 4);
output().set_led_value(1, data & 8);
m_led[0] = BIT(data, 2);
m_led[1] = BIT(data, 3);
}
WRITE8_MEMBER(dacholer_state::main_irq_ack_w)
@ -596,6 +604,8 @@ WRITE_LINE_MEMBER(dacholer_state::adpcm_int)
void dacholer_state::machine_start()
{
m_led.resolve();
save_item(NAME(m_bg_bank));
save_item(NAME(m_msm_data));
save_item(NAME(m_msm_toggle));

View File

@ -168,73 +168,15 @@ class ddenlovr_state : public dynax_state
{
public:
ddenlovr_state(const machine_config &mconfig, device_type type, const char *tag)
: dynax_state(mconfig, type, tag),
m_protection1(*this, "protection1"),
m_protection2(*this, "protection2"),
m_soundlatch(*this, "soundlatch") { }
: dynax_state(mconfig, type, tag)
, m_protection1(*this, "protection1")
, m_protection2(*this, "protection2")
, m_soundlatch(*this, "soundlatch")
, m_led(*this, "led%u", 0U)
{ }
void set_blitter_irq(write_line_delegate &&handler) { m_blitter_irq_handler = std::move(handler); }
write_line_delegate m_blitter_irq_handler;
optional_shared_ptr<uint16_t> m_protection1;
optional_shared_ptr<uint16_t> m_protection2;
optional_device<generic_latch_8_device> m_soundlatch;
std::unique_ptr<uint8_t[]> m_ddenlovr_pixmap[8];
/* blitter (TODO: merge with the dynax.h, where possible) */
int m_extra_layers;
int m_ddenlovr_dest_layer;
int m_ddenlovr_blit_flip;
int m_ddenlovr_blit_x;
int m_ddenlovr_blit_y;
int m_ddenlovr_blit_address;
int m_ddenlovr_blit_pen;
int m_ddenlovr_blit_pen_mode;
int m_ddenlovr_blitter_irq_flag;
int m_ddenlovr_blitter_irq_enable;
int m_ddenlovr_rect_width;
int m_ddenlovr_rect_height;
int m_ddenlovr_clip_width;
int m_ddenlovr_clip_height;
int m_ddenlovr_line_length;
int m_ddenlovr_clip_ctrl;
int m_ddenlovr_clip_x;
int m_ddenlovr_clip_y;
int m_ddenlovr_scroll[8*2];
int m_ddenlovr_priority;
int m_ddenlovr_priority2;
int m_ddenlovr_bgcolor;
int m_ddenlovr_bgcolor2;
int m_ddenlovr_layer_enable;
int m_ddenlovr_layer_enable2;
int m_ddenlovr_palette_base[8];
int m_ddenlovr_palette_mask[8];
int m_ddenlovr_transparency_pen[8];
int m_ddenlovr_transparency_mask[8];
int m_ddenlovr_blit_latch;
int m_ddenlovr_blit_pen_mask; // not implemented
int m_ddenlovr_blit_rom_bits; // usually 8, 16 in hanakanz
const int *m_ddenlovr_blit_commands;
int m_ddenlovr_blit_regs[2];
/* ddenlovr misc (TODO: merge with dynax.h, where possible) */
uint8_t m_palram[0x200];
int m_okibank;
uint8_t m_prot_val;
uint16_t m_prot_16;
uint16_t m_quiz365_protection[2];
uint16_t m_mmpanic_leds; /* A led for each of the 9 buttons */
uint8_t m_funkyfig_lockout;
uint8_t m_romdata[2];
int m_palette_index;
uint8_t m_hginga_rombank;
uint8_t m_mjflove_irq_cause;
uint8_t m_daimyojn_palette_sel;
DECLARE_MACHINE_START(ddenlovr);
DECLARE_MACHINE_RESET(ddenlovr);
DECLARE_VIDEO_START(ddenlovr);
@ -532,6 +474,67 @@ public:
void sryudens_map(address_map &map);
void sryudens_portmap(address_map &map);
void ultrchmp_map(address_map &map);
protected:
write_line_delegate m_blitter_irq_handler;
optional_shared_ptr<uint16_t> m_protection1;
optional_shared_ptr<uint16_t> m_protection2;
optional_device<generic_latch_8_device> m_soundlatch;
output_finder<2> m_led;
std::unique_ptr<uint8_t[]> m_ddenlovr_pixmap[8];
/* blitter (TODO: merge with the dynax.h, where possible) */
int m_extra_layers;
int m_ddenlovr_dest_layer;
int m_ddenlovr_blit_flip;
int m_ddenlovr_blit_x;
int m_ddenlovr_blit_y;
int m_ddenlovr_blit_address;
int m_ddenlovr_blit_pen;
int m_ddenlovr_blit_pen_mode;
int m_ddenlovr_blitter_irq_flag;
int m_ddenlovr_blitter_irq_enable;
int m_ddenlovr_rect_width;
int m_ddenlovr_rect_height;
int m_ddenlovr_clip_width;
int m_ddenlovr_clip_height;
int m_ddenlovr_line_length;
int m_ddenlovr_clip_ctrl;
int m_ddenlovr_clip_x;
int m_ddenlovr_clip_y;
int m_ddenlovr_scroll[8*2];
int m_ddenlovr_priority;
int m_ddenlovr_priority2;
int m_ddenlovr_bgcolor;
int m_ddenlovr_bgcolor2;
int m_ddenlovr_layer_enable;
int m_ddenlovr_layer_enable2;
int m_ddenlovr_palette_base[8];
int m_ddenlovr_palette_mask[8];
int m_ddenlovr_transparency_pen[8];
int m_ddenlovr_transparency_mask[8];
int m_ddenlovr_blit_latch;
int m_ddenlovr_blit_pen_mask; // not implemented
int m_ddenlovr_blit_rom_bits; // usually 8, 16 in hanakanz
const int *m_ddenlovr_blit_commands;
int m_ddenlovr_blit_regs[2];
/* ddenlovr misc (TODO: merge with dynax.h, where possible) */
uint8_t m_palram[0x200];
int m_okibank;
uint8_t m_prot_val;
uint16_t m_prot_16;
uint16_t m_quiz365_protection[2];
uint16_t m_mmpanic_leds; /* A led for each of the 9 buttons */
uint8_t m_funkyfig_lockout;
uint8_t m_romdata[2];
int m_palette_index;
uint8_t m_hginga_rombank;
uint8_t m_mjflove_irq_cause;
uint8_t m_daimyojn_palette_sel;
};
VIDEO_START_MEMBER(ddenlovr_state,ddenlovr)
@ -2386,7 +2389,7 @@ WRITE_LINE_MEMBER(ddenlovr_state::mmpanic_blitter_irq)
void ddenlovr_state::mmpanic_update_leds()
{
output().set_led_value(0, m_mmpanic_leds);
m_led[0] = m_mmpanic_leds;
}
/* leds 1-8 */
@ -2409,7 +2412,7 @@ WRITE8_MEMBER(ddenlovr_state::mmpanic_lockout_w)
{
machine().bookkeeping().coin_counter_w(0, (~data) & 0x01);
machine().bookkeeping().coin_lockout_w(0, (~data) & 0x02);
output().set_led_value(1, (~data) & 0x04);
m_led[1] = BIT(~data, 2);
}
}
@ -3896,7 +3899,7 @@ WRITE8_MEMBER(ddenlovr_state::mjgnight_coincounter_w)
{
m_prot_val = data;
output().set_led_value(0, data & 0x01); // led? 1 in-game, 0 in service mode / while booting
m_led[0] = BIT(data, 0); // led? 1 in-game, 0 in service mode / while booting
machine().bookkeeping().coin_counter_w(0, data & 0x04); // coin-out
machine().bookkeeping().coin_counter_w(1, data & 0x08); // coin-in
@ -9573,6 +9576,8 @@ INPUT_PORTS_END
MACHINE_START_MEMBER(ddenlovr_state,ddenlovr)
{
m_led.resolve();
save_item(NAME(m_input_sel));
save_item(NAME(m_dsw_sel));
save_item(NAME(m_keyb));

View File

@ -100,15 +100,21 @@ class didact_state : public driver_device
, m_lines{ 0, 0, 0, 0 }
, m_led(0)
, m_rs232(*this, "rs232")
, m_leds(*this, "led%u", 0U)
{ }
TIMER_DEVICE_CALLBACK_MEMBER(scan_artwork);
protected:
virtual void machine_start() override { m_leds.resolve(); }
required_ioport_array<5> m_io_lines;
uint8_t m_lines[4];
uint8_t m_reset;
uint8_t m_shift;
uint8_t m_led;
optional_device<rs232_port_device> m_rs232;
TIMER_DEVICE_CALLBACK_MEMBER(scan_artwork);
output_finder<2> m_leds;
};
@ -246,7 +252,7 @@ WRITE8_MEMBER( md6802_state::pia2_kbB_w )
WRITE_LINE_MEMBER( md6802_state::pia2_ca2_w )
{
LOG("--->%s(%02x) LED is connected through resisitor to +5v so logical 0 will lit it\n", FUNCNAME, state);
output().set_led_value(m_led, !state);
m_leds[m_led] = state ? 0 :1;
// Serial Out - needs debug/verification
m_rs232->write_txd(state);
@ -415,7 +421,7 @@ READ8_MEMBER( mp68a_state::pia2_kbB_r )
{
pb |= 0x80; // Set shift bit (PB7)
m_shift = 0; // Reset flip flop
output().set_led_value(m_led, m_shift);
m_leds[m_led] = m_shift ? 1 : 0;
LOG("SHIFT is released\n");
}
@ -550,7 +556,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(didact_state::scan_artwork)
{
LOG("RESET is pressed, resetting the CPU\n");
m_shift = 0;
output().set_led_value(m_led, m_shift); // For mp68a only
m_leds[m_led] = m_shift ? 1 : 0; // For mp68a only
if (m_reset == 0)
{
machine_reset();
@ -562,7 +568,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(didact_state::scan_artwork)
// Poll the artwork SHIFT/* key
LOG("%s", !m_shift ? "SHIFT is set\n" : "");
m_shift = 1;
output().set_led_value(m_led, m_shift); // For mp68a only
m_leds[m_led] = m_shift ? 1 : 0; // For mp68a only
}
else
{

View File

@ -301,9 +301,9 @@ WRITE32_MEMBER(djmain_state::light_ctrl_2_w)
{
output().set_value("left-ssr", !!(data & 0x08000000)); // SSR
output().set_value("right-ssr", !!(data & 0x08000000)); // SSR
output().set_led_value(0, data & 0x00010000); // 1P START
output().set_led_value(1, data & 0x00020000); // 2P START
output().set_led_value(2, data & 0x00040000); // EFFECT
m_led[0] = BIT(data, 16); // 1P START
m_led[1] = BIT(data, 17); // 2P START
m_led[2] = BIT(data, 18); // EFFECT
}
}
@ -1351,6 +1351,8 @@ void djmain_state::machine_start()
if (m_ata_user_password != nullptr)
hdd->set_user_password(m_ata_user_password);
m_led.resolve();
save_item(NAME(m_sndram_bank));
save_item(NAME(m_pending_vb_int));
save_item(NAME(m_v_ctrl));
@ -1364,9 +1366,9 @@ void djmain_state::machine_reset()
m_sndram_bank = 0;
/* reset LEDs */
output().set_led_value(0, 1);
output().set_led_value(1, 1);
output().set_led_value(2, 1);
m_led[0] = 1;
m_led[1] = 1;
m_led[2] = 1;
}

View File

@ -69,36 +69,9 @@ public:
, m_slot6(*this, "slot6")
, m_slot7(*this, "slot7")
, m_slot7a(*this, "slot7a")
, m_led(*this, "led%u", 0U)
{ }
required_device<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<upd7220_device> m_hgdc;
required_device<am9517a_device> m_dmac;
required_device<pit8253_device> m_pit;
required_device<i8272a_device> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<dmv_keyboard_device> m_keyboard;
required_device<speaker_sound_device> m_speaker;
required_shared_ptr<uint16_t> m_video_ram;
required_device<palette_device> m_palette;
required_memory_region m_ram;
required_memory_region m_bootrom;
required_memory_region m_chargen;
required_device<dmvcart_slot_device> m_slot1;
required_device<dmvcart_slot_device> m_slot2;
required_device<dmvcart_slot_device> m_slot2a;
required_device<dmvcart_slot_device> m_slot3;
required_device<dmvcart_slot_device> m_slot4;
required_device<dmvcart_slot_device> m_slot5;
required_device<dmvcart_slot_device> m_slot6;
required_device<dmvcart_slot_device> m_slot7;
required_device<dmvcart_slot_device> m_slot7a;
virtual void machine_start() override;
virtual void machine_reset() override;
void update_halt_line();
DECLARE_WRITE8_MEMBER(leds_w);
@ -168,6 +141,43 @@ public:
UPD7220_DISPLAY_PIXELS_MEMBER( hgdc_display_pixels );
UPD7220_DRAW_TEXT_LINE_MEMBER( hgdc_draw_text );
void dmv(machine_config &config);
void dmv_io(address_map &map);
void dmv_mem(address_map &map);
void upd7220_map(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
required_device<cpu_device> m_maincpu;
required_device<screen_device> m_screen;
required_device<upd7220_device> m_hgdc;
required_device<am9517a_device> m_dmac;
required_device<pit8253_device> m_pit;
required_device<i8272a_device> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<dmv_keyboard_device> m_keyboard;
required_device<speaker_sound_device> m_speaker;
required_shared_ptr<uint16_t> m_video_ram;
required_device<palette_device> m_palette;
required_memory_region m_ram;
required_memory_region m_bootrom;
required_memory_region m_chargen;
required_device<dmvcart_slot_device> m_slot1;
required_device<dmvcart_slot_device> m_slot2;
required_device<dmvcart_slot_device> m_slot2a;
required_device<dmvcart_slot_device> m_slot3;
required_device<dmvcart_slot_device> m_slot4;
required_device<dmvcart_slot_device> m_slot5;
required_device<dmvcart_slot_device> m_slot6;
required_device<dmvcart_slot_device> m_slot7;
required_device<dmvcart_slot_device> m_slot7a;
output_finder<9> m_led;
bool m_ramoutdis;
int m_switch16;
int m_thold7;
@ -180,10 +190,6 @@ public:
int m_floppy_motor;
int m_busint[8];
int m_irqs[8];
void dmv(machine_config &config);
void dmv_io(address_map &map);
void dmv_mem(address_map &map);
void upd7220_map(address_map &map);
};
WRITE8_MEMBER(dmv_state::tc_set_w)
@ -214,7 +220,7 @@ WRITE8_MEMBER(dmv_state::leds_w)
*/
for(int i=0; i<8; i++)
output().set_led_value(8-i, BIT(data, i));
m_led[8-i] = BIT(data, i);
}
READ8_MEMBER(dmv_state::ramsel_r)
@ -618,6 +624,7 @@ INPUT_PORTS_END
void dmv_state::machine_start()
{
m_led.resolve();
}
void dmv_state::machine_reset()

View File

@ -886,7 +886,7 @@ READ8_MEMBER(dynax_state::jantouki_blitter_busy_r)
WRITE8_MEMBER(dynax_state::jantouki_rombank_w)
{
membank("bank1")->set_entry(data & 0x0f);
output().set_led_value(0, data & 0x10); // maybe
m_led = BIT(data, 4); // maybe
}
void dynax_state::jantouki_io_map(address_map &map)
@ -4123,6 +4123,8 @@ INPUT_PORTS_END
MACHINE_START_MEMBER(dynax_state,dynax)
{
m_led.resolve();
m_blitter_irq_mask = 1;
m_blitter2_irq_mask = 1;

View File

@ -154,7 +154,7 @@ READ_LINE_MEMBER( elf2_state::ef4_r )
WRITE_LINE_MEMBER( elf2_state::q_w )
{
output().set_led_value(0, state);
m_led = state ? 1 : 0;
}
READ8_MEMBER( elf2_state::dma_r )
@ -202,6 +202,8 @@ void elf2_state::machine_start()
{
address_space &program = m_maincpu->space(AS_PROGRAM);
m_led.resolve();
/* initialize LED displays */
m_7segs.resolve();
m_led_l->rbi_w(1);

View File

@ -117,6 +117,11 @@
*
*************************************/
void eolith_state::machine_start()
{
m_led.resolve();
}
READ32_MEMBER(eolith_state::eolith_custom_r)
{
/*
@ -136,7 +141,7 @@ WRITE32_MEMBER(eolith_state::systemcontrol_w)
{
m_buffer = (data & 0x80) >> 7;
machine().bookkeeping().coin_counter_w(0, data & m_coin_counter_bit);
output().set_led_value(0, data & 1);
m_led = BIT(data, 0);
m_eepromoutport->write(data, 0xff);

View File

@ -178,7 +178,7 @@ WRITE_LINE_MEMBER( eti660_state::q_w )
m_cti->aoe_w(state);
/* PULSE led */
output().set_led_value(LED_PULSE, state);
m_led[LED_PULSE] = state ? 1 : 0;
/* tape output */
m_cassette->output(state ? 1.0 : -1.0);
@ -263,6 +263,8 @@ void eti660_state::machine_reset()
void eti660_state::machine_start()
{
m_led.resolve();
save_item(NAME(m_color_ram));
}

View File

@ -69,16 +69,16 @@ TIMER_DEVICE_CALLBACK_MEMBER(firetrk_state::firetrk_scanline)
WRITE8_MEMBER(firetrk_state::firetrk_output_w)
{
/* BIT0 => START1 LAMP */
output().set_led_value(0, !(data & 0x01));
m_led[0] = BIT(~data, 0);
/* BIT1 => START2 LAMP */
output().set_led_value(1, !(data & 0x02));
m_led[1]= BIT(~data, 1);
/* BIT2 => FLASH */
m_flash = data & 0x04;
/* BIT3 => TRACK LAMP */
output().set_led_value(3, !(data & 0x08));
m_led[3] = BIT(~data, 3);
/* BIT4 => ATTRACT */
m_discrete->write(space, FIRETRUCK_ATTRACT_EN, data & 0x10);
@ -86,7 +86,7 @@ WRITE8_MEMBER(firetrk_state::firetrk_output_w)
machine().bookkeeping().coin_lockout_w(1, !(data & 0x10));
/* BIT5 => START3 LAMP */
output().set_led_value(2, !(data & 0x20));
m_led[2] = BIT(~data, 5);
/* BIT6 => UNUSED */
@ -98,7 +98,7 @@ WRITE8_MEMBER(firetrk_state::firetrk_output_w)
WRITE8_MEMBER(firetrk_state::superbug_output_w)
{
/* BIT0 => START LAMP */
output().set_led_value(0, offset & 0x01);
m_led[0] = BIT(offset, 0);
/* BIT1 => ATTRACT */
m_discrete->write(space, SUPERBUG_ATTRACT_EN, offset & 0x02);
@ -109,17 +109,17 @@ WRITE8_MEMBER(firetrk_state::superbug_output_w)
m_flash = offset & 0x04;
/* BIT3 => TRACK LAMP */
output().set_led_value(1, offset & 0x08);
m_led[1] = BIT(offset, 3);
}
WRITE8_MEMBER(firetrk_state::montecar_output_1_w)
{
/* BIT0 => START LAMP */
output().set_led_value(0, !(data & 0x01));
m_led[0] = BIT(~data, 0);
/* BIT1 => TRACK LAMP */
output().set_led_value(1, !(data & 0x02));
m_led[1] = BIT(~data, 1);
/* BIT2 => ATTRACT */
m_discrete->write(space, MONTECAR_ATTRACT_INV, data & 0x04);

View File

@ -44,7 +44,8 @@ public:
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_outlatch(*this, "outlatch"),
m_playfield_ram(*this, "playfield_ram")
m_playfield_ram(*this, "playfield_ram"),
m_lamp(*this, "lamp0")
{ }
void flyball(machine_config &config);
@ -89,6 +90,8 @@ private:
/* memory pointers */
required_shared_ptr<uint8_t> m_playfield_ram;
output_finder<> m_lamp;
/* video-related */
tilemap_t *m_tmap;
uint8_t m_pitcher_vert;
@ -288,7 +291,7 @@ WRITE8_MEMBER(flyball_state::misc_w)
WRITE_LINE_MEMBER(flyball_state::lamp_w)
{
output().set_led_value(0, state);
m_lamp = state ? 1 : 0;
}
@ -431,6 +434,7 @@ void flyball_state::machine_start()
m_pot_assert_timer[i] = timer_alloc(TIMER_POT_ASSERT);
m_pot_clear_timer = timer_alloc(TIMER_POT_CLEAR);
m_quarter_timer = timer_alloc(TIMER_QUARTER);
m_lamp.resolve();
save_item(NAME(m_pitcher_vert));
save_item(NAME(m_pitcher_horz));

View File

@ -142,6 +142,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(foodf_state::scanline_update_timer)
void foodf_state::machine_start()
{
atarigen_state::machine_start();
m_led.resolve();
}
@ -170,8 +171,8 @@ WRITE8_MEMBER(foodf_state::digital_w)
if (!(data & 0x08))
video_int_ack_w(space,0,0);
output().set_led_value(0, (data >> 4) & 1);
output().set_led_value(1, (data >> 5) & 1);
m_led[0] = BIT(data, 4);
m_led[1] = BIT(data, 5);
machine().bookkeeping().coin_counter_w(0, (data >> 6) & 1);
machine().bookkeeping().coin_counter_w(1, (data >> 7) & 1);

View File

@ -1023,17 +1023,17 @@ WRITE8_MEMBER(funworld_state::funworld_lamp_a_w)
-x-- ---- Hopper Motor (inverted).
x--- ---- HOLD4 lamp.
*/
output().set_lamp_value(0, 1-((data >> 1) & 1)); /* Hold1 (inverted) */
output().set_lamp_value(2, 1-((data >> 1) & 1)); /* Hold3 (inverted, see pinouts) */
m_lamp[0] = BIT(~data, 1); /* Hold1 (inverted) */
m_lamp[2] = BIT(~data, 1); /* Hold3 (inverted, see pinouts) */
output().set_lamp_value(1, 1-((data >> 3) & 1)); /* Hold2 / Low (inverted) */
output().set_lamp_value(3, (data >> 7) & 1); /* Hold4 / High */
output().set_lamp_value(5, 1-((data >> 5) & 1)); /* Cancel / Collect (inverted) */
m_lamp[1] = BIT(~data, 3); /* Hold2 / Low (inverted) */
m_lamp[3] = BIT(data, 7); /* Hold4 / High */
m_lamp[5] = BIT(~data, 5); /* Cancel / Collect (inverted) */
machine().bookkeeping().coin_counter_w(0, data & 0x01); /* Credit In counter */
machine().bookkeeping().coin_counter_w(7, data & 0x04); /* Credit Out counter, mapped as coin 8 */
output().set_lamp_value(7, 1-((data >> 6) & 1)); /* Hopper Motor (inverted) */
m_lamp[7] = BIT(~data, 6); /* Hopper Motor (inverted) */
// popmessage("Lamps A: %02X", (data ^ 0xff));
}
@ -1047,8 +1047,8 @@ WRITE8_MEMBER(funworld_state::funworld_lamp_b_w)
---- -x-- Unknown (inverted).
xxxx x--- Unknown.
*/
output().set_lamp_value(4, (data >> 0) & 1); /* Hold5 / Bet */
output().set_lamp_value(6, (data >> 1) & 1); /* Start / Deal / Draw */
m_lamp[4] = BIT(data, 0); /* Hold5 / Bet */
m_lamp[6] = BIT(data, 1); /* Start / Deal / Draw */
// popmessage("Lamps B: %02X", data);
}

View File

@ -762,8 +762,8 @@ CUSTOM_INPUT_MEMBER(digdug_state::shifted_port_r){ return ioport((const char *)p
WRITE8_MEMBER(galaga_state::out_0)
{
output().set_led_value(1,data & 1);
output().set_led_value(0,data & 2);
m_led[1] = BIT(data, 0);
m_led[0] = BIT(data, 1);
machine().bookkeeping().coin_counter_w(1,~data & 4);
machine().bookkeeping().coin_counter_w(0,~data & 8);
}
@ -810,8 +810,9 @@ TIMER_CALLBACK_MEMBER(galaga_state::cpu3_interrupt_callback)
}
MACHINE_START_MEMBER(galaga_state,galaga)
void galaga_state::machine_start()
{
m_led.resolve();
/* create the interrupt timer */
m_cpu3_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(galaga_state::cpu3_interrupt_callback),this));
save_item(NAME(m_main_irq_mask));
@ -819,14 +820,14 @@ MACHINE_START_MEMBER(galaga_state,galaga)
save_item(NAME(m_sub2_nmi_mask));
}
MACHINE_RESET_MEMBER(galaga_state,galaga)
void galaga_state::machine_reset()
{
m_cpu3_interrupt_timer->adjust(m_screen->time_until_pos(64), 64);
}
MACHINE_RESET_MEMBER(xevious_state,battles)
{
MACHINE_RESET_CALL_MEMBER(galaga);
galaga_state::machine_reset();
battles_customio_init();
}
@ -1631,8 +1632,6 @@ MACHINE_CONFIG_START(bosco_state::bosco)
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START_OVERRIDE(bosco_state,galaga)
MCFG_MACHINE_RESET_OVERRIDE(bosco_state,galaga)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -1706,8 +1705,6 @@ MACHINE_CONFIG_START(galaga_state::galaga)
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START_OVERRIDE(galaga_state,galaga)
MCFG_MACHINE_RESET_OVERRIDE(galaga_state,galaga)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -1812,8 +1809,6 @@ MACHINE_CONFIG_START(xevious_state::xevious)
MCFG_WATCHDOG_VBLANK_INIT("screen", 8)
MCFG_QUANTUM_TIME(attotime::from_hz(60000)) /* 1000 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START_OVERRIDE(galaga_state,galaga)
MCFG_MACHINE_RESET_OVERRIDE(galaga_state,galaga)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@ -1929,8 +1924,6 @@ MACHINE_CONFIG_START(digdug_state::digdug)
MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */
MCFG_MACHINE_START_OVERRIDE(galaga_state,galaga)
MCFG_MACHINE_RESET_OVERRIDE(galaga_state,galaga)
MCFG_ATARIVGEAROM_ADD("earom")

View File

@ -720,7 +720,7 @@ WRITE8_MEMBER(galaxian_state::start_lamp_w)
{
/* offset 0 = 1P START LAMP */
/* offset 1 = 2P START LAMP */
output().set_led_value(offset, data & 1);
m_lamp[offset] = BIT(data, 0);
}

View File

@ -486,8 +486,8 @@ static const char *const gaplus_sample_names[] =
WRITE8_MEMBER(gaplus_state::out_lamps0)
{
output().set_led_value(0, data & 1);
output().set_led_value(1, data & 2);
m_lamp[0] = BIT(data, 0);
m_lamp[1] = BIT(data, 1);
machine().bookkeeping().coin_lockout_global_w(data & 4);
machine().bookkeeping().coin_counter_w(0, ~data & 8);
}
@ -499,6 +499,7 @@ WRITE8_MEMBER(gaplus_state::out_lamps1)
void gaplus_state::machine_start()
{
m_lamp.resolve();
m_namcoio0_run_timer = timer_alloc(TIMER_NAMCOIO0_RUN);
m_namcoio1_run_timer = timer_alloc(TIMER_NAMCOIO1_RUN);

View File

@ -86,13 +86,15 @@ class gei_state : public driver_device
{
public:
gei_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_dac(*this, "dac"),
m_ticket(*this, "ticket"),
m_screen(*this, "screen"),
m_signature(*this, "signature"),
m_rombank(*this, "rombank") { }
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_dac(*this, "dac")
, m_ticket(*this, "ticket")
, m_screen(*this, "screen")
, m_signature(*this, "signature")
, m_rombank(*this, "rombank")
, m_lamp(*this, "lamp%u", 0U)
{ }
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -138,6 +140,7 @@ public:
void sprtauth_map(address_map &map);
void suprpokr_map(address_map &map);
protected:
virtual void machine_start() override { m_lamp.resolve(); }
virtual void video_start() override;
private:
@ -157,6 +160,7 @@ private:
required_device<screen_device> m_screen;
optional_region_ptr<uint8_t> m_signature;
optional_memory_bank m_rombank;
output_finder<13> m_lamp;
};
@ -211,24 +215,24 @@ uint32_t gei_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
WRITE8_MEMBER(gei_state::lamps_w)
{
/* 5 button lamps */
output().set_led_value(0, BIT(data, 0));
output().set_led_value(1, BIT(data, 1));
output().set_led_value(2, BIT(data, 2));
output().set_led_value(3, BIT(data, 3));
output().set_led_value(4, BIT(data, 4));
m_lamp[0] = BIT(data, 0);
m_lamp[1] = BIT(data, 1);
m_lamp[2] = BIT(data, 2);
m_lamp[3] = BIT(data, 3);
m_lamp[4] = BIT(data, 4);
/* 3 button lamps for deal, cancel, stand in poker games;
lamp order verified in poker and selection self tests */
output().set_led_value(7, BIT(data, 5));
output().set_led_value(5, BIT(data, 6));
output().set_led_value(6, BIT(data, 7));
m_lamp[7] = BIT(data, 5);
m_lamp[5] = BIT(data, 6);
m_lamp[6] = BIT(data, 7);
}
WRITE8_MEMBER(gei_state::sound_w)
{
/* bit 3 - coin lockout, lamp10 in poker / lamp6 in trivia test modes */
machine().bookkeeping().coin_lockout_global_w(BIT(~data, 3));
output().set_led_value(9, BIT(data, 3));
m_lamp[9] = BIT(data, 3);
/* bit 5 - ticket out in trivia games */
if (m_ticket.found())
@ -246,13 +250,13 @@ WRITE8_MEMBER(gei_state::sound2_w)
/* bit 3,6 - coin lockout, lamp 10 + 11 in selection test mode */
machine().bookkeeping().coin_lockout_w(0, BIT(~data, 3));
machine().bookkeeping().coin_lockout_w(1, BIT(~data, 6));
output().set_led_value(9, BIT(data, 3));
output().set_led_value(10, BIT(data, 6));
m_lamp[9] = BIT(data, 3);
m_lamp[10] = BIT(data, 6);
/* bit 4,5 - lamps 12, 13 in selection test mode;
12 lights up if dsw maximum bet = 30 an bet > 15 or if dsw maximum bet = 10 an bet = 10 */
output().set_led_value(11, BIT(data, 4));
output().set_led_value(12, BIT(data, 5));
m_lamp[11] = BIT(data, 4);
m_lamp[12] = BIT(data, 5);
/* bit 7 goes directly to the sound amplifier */
m_dac->write(BIT(data, 7));
@ -261,13 +265,13 @@ WRITE8_MEMBER(gei_state::sound2_w)
WRITE8_MEMBER(gei_state::lamps2_w)
{
/* bit 4 - play/raise button lamp, lamp 9 in poker test mode */
output().set_led_value(8, BIT(data, 4));
m_lamp[8] = BIT(data, 4);
}
WRITE8_MEMBER(gei_state::nmi_w)
{
/* bit 4 - play/raise button lamp, lamp 9 in selection test mode */
output().set_led_value(8, BIT(data, 4));
m_lamp[8] = BIT(data, 4);
/* bit 6 enables NMI */
m_nmi_mask = data & 0x40;

View File

@ -1296,14 +1296,16 @@
class goldnpkr_state : public driver_device
{
public:
goldnpkr_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
goldnpkr_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_videoram(*this, "videoram"),
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
m_discrete(*this, "discrete"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
m_palette(*this, "palette"),
m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(goldnpkr_videoram_w);
DECLARE_WRITE8_MEMBER(goldnpkr_colorram_w);
@ -1377,7 +1379,10 @@ public:
void wildcrdb_mcu_map(address_map &map);
void witchcrd_falcon_map(address_map &map);
void witchcrd_map(address_map &map);
protected:
virtual void machine_start() override { m_lamp.resolve(); }
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
@ -1385,6 +1390,7 @@ protected:
optional_device<discrete_device> m_discrete;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
output_finder<5> m_lamp;
tilemap_t *m_bg_tilemap;
uint8_t m_mux_data;
@ -1394,8 +1400,8 @@ protected:
class blitz_state : public goldnpkr_state
{
public:
blitz_state(const machine_config &mconfig, device_type type, const char *tag)
: goldnpkr_state(mconfig, type, tag),
blitz_state(const machine_config &mconfig, device_type type, const char *tag) :
goldnpkr_state(mconfig, type, tag),
m_cpubank(*this, "cpubank"),
m_mcu(*this, "mcu"),
m_bankdev(*this, "bankdev"),
@ -1403,14 +1409,6 @@ public:
m_portc_data(0x0f)
{ }
required_region_ptr<uint8_t> m_cpubank;
required_device<m68705p_device> m_mcu;
required_device<address_map_bank_device> m_bankdev;
uint8_t m_cpubank_xor;
uint8_t m_portc_data;
DECLARE_READ8_MEMBER(cpubank_decrypt_r);
DECLARE_WRITE8_MEMBER(mcu_command_w);
DECLARE_WRITE8_MEMBER(mcu_portb_w);
@ -1418,6 +1416,15 @@ public:
void megadpkr(machine_config &config);
void megadpkr_banked_map(address_map &map);
void megadpkr_map(address_map &map);
private:
required_region_ptr<uint8_t> m_cpubank;
required_device<m68705p_device> m_mcu;
required_device<address_map_bank_device> m_bankdev;
uint8_t m_cpubank_xor;
uint8_t m_portc_data;
};
@ -1765,11 +1772,11 @@ WRITE8_MEMBER(goldnpkr_state::lamps_a_w)
*/
data = data ^ 0xff;
output().set_lamp_value(0, (data) & 1); /* Lamp 0 */
output().set_lamp_value(1, (data >> 1) & 1); /* Lamp 1 */
output().set_lamp_value(2, (data >> 2) & 1); /* Lamp 2 */
output().set_lamp_value(3, (data >> 3) & 1); /* Lamp 3 */
output().set_lamp_value(4, (data >> 4) & 1); /* Lamp 4 */
m_lamp[0] = BIT(data, 0); /* Lamp 0 */
m_lamp[1] = BIT(data, 1); /* Lamp 1 */
m_lamp[2] = BIT(data, 2); /* Lamp 2 */
m_lamp[3] = BIT(data, 3); /* Lamp 3 */
m_lamp[4] = BIT(data, 4); /* Lamp 4 */
machine().bookkeeping().coin_counter_w(0, data & 0x40); /* counter1 */
machine().bookkeeping().coin_counter_w(1, data & 0x80); /* counter2 */

View File

@ -303,28 +303,28 @@ WRITE8_MEMBER(goldstar_state::p1_lamps_w)
skill98 is like schery97 but doesn't activate bit 0 for stop
nfb96, roypok96 and nc96 sets are like schery97 but they don't activate bit 2 for select
*/
output().set_lamp_value(0, (data >> 0) & 1);
output().set_lamp_value(1, (data >> 1) & 1);
output().set_lamp_value(2, (data >> 2) & 1);
output().set_lamp_value(3, (data >> 3) & 1);
output().set_lamp_value(4, (data >> 4) & 1);
output().set_lamp_value(5, (data >> 5) & 1);
output().set_lamp_value(6, (data >> 6) & 1);
output().set_lamp_value(7, (data >> 7) & 1);
m_lamp[0] = BIT(data, 0);
m_lamp[1] = BIT(data, 1);
m_lamp[2] = BIT(data, 2);
m_lamp[3] = BIT(data, 3);
m_lamp[4] = BIT(data, 4);
m_lamp[5] = BIT(data, 5);
m_lamp[6] = BIT(data, 6);
m_lamp[7] = BIT(data, 7);
// popmessage("p1 lamps: %02X", data);
}
WRITE8_MEMBER(goldstar_state::p2_lamps_w)
{
output().set_lamp_value(8 + 0, (data >> 0) & 1);
output().set_lamp_value(8 + 1, (data >> 1) & 1);
output().set_lamp_value(8 + 2, (data >> 2) & 1);
output().set_lamp_value(8 + 3, (data >> 3) & 1);
output().set_lamp_value(8 + 4, (data >> 4) & 1);
output().set_lamp_value(8 + 5, (data >> 5) & 1);
output().set_lamp_value(8 + 6, (data >> 6) & 1);
output().set_lamp_value(8 + 7, (data >> 7) & 1);
m_lamp[8 + 0] = BIT(data, 0);
m_lamp[8 + 1] = BIT(data, 1);
m_lamp[8 + 2] = BIT(data, 2);
m_lamp[8 + 3] = BIT(data, 3);
m_lamp[8 + 4] = BIT(data, 4);
m_lamp[8 + 5] = BIT(data, 5);
m_lamp[8 + 6] = BIT(data, 6);
m_lamp[8 + 7] = BIT(data, 7);
// popmessage("p2 lamps: %02X", data);
}
@ -1203,12 +1203,12 @@ WRITE8_MEMBER(unkch_state::unkcm_0x02_w)
if (!m_vblank_irq_enable)
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
output().set_lamp_value(0, (data >> 0) & 1); /* Bet-A / Stop 2 */
output().set_lamp_value(1, (data >> 1) & 1); /* Start / Stop All */
output().set_lamp_value(2, (data >> 2) & 1); /* Info / Small / Stop 3 */
output().set_lamp_value(3, (data >> 3) & 1); /* Big */
output().set_lamp_value(4, (data >> 4) & 1); /* Bet-B / D-Up */
output().set_lamp_value(5, (data >> 5) & 1); /* Take / Stop 1 */
m_lamp[0] = BIT(data, 0); /* Bet-A / Stop 2 */
m_lamp[1] = BIT(data, 1); /* Start / Stop All */
m_lamp[2] = BIT(data, 2); /* Info / Small / Stop 3 */
m_lamp[3] = BIT(data, 3); /* Big */
m_lamp[4] = BIT(data, 4); /* Bet-B / D-Up */
m_lamp[5] = BIT(data, 5); /* Take / Stop 1 */
}
WRITE8_MEMBER(unkch_state::unkcm_0x03_w)

View File

@ -223,6 +223,7 @@ VBlank duration: 1/VSYNC * (16/256) = 1017.6 us
void gottlieb_state::machine_start()
{
m_led.resolve();
/* register for save states */
save_item(NAME(m_joystick_select));
save_item(NAME(m_track));
@ -327,9 +328,9 @@ WRITE8_MEMBER(gottlieb_state::reactor_output_w)
{
general_output_w(space, offset, data & ~0xe0);
output().set_led_value(0, data & 0x20);
output().set_led_value(1, data & 0x40);
output().set_led_value(2, data & 0x80);
m_led[0] = BIT(data, 5);
m_led[1] = BIT(data, 6);
m_led[2] = BIT(data, 7);
}
WRITE8_MEMBER(gottlieb_state::qbert_output_w)

View File

@ -361,6 +361,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, device_type type,
m_screen(*this, "screen"),
m_duartn68681(*this, "duartn68681"),
m_adc8(*this, "adc8"),
m_lamp(*this, "lamp%u", 0U),
m_hd34010_host_access(0),
m_msp_ram(*this, "msp_ram"),
m_dsk_ram(nullptr),

View File

@ -42,44 +42,21 @@ class igs009_state : public driver_device
{
public:
igs009_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_bg_scroll(*this, "bg_scroll"),
m_reel1_ram(*this, "reel1_ram"),
m_reel2_ram(*this, "reel2_ram"),
m_reel3_ram(*this, "reel3_ram"),
m_reel4_ram(*this, "reel4_ram"),
m_bg_scroll2(*this, "bg_scroll2"),
m_fg_tile_ram(*this, "fg_tile_ram"),
m_fg_color_ram(*this, "fg_color_ram") { }
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_bg_scroll;
required_shared_ptr<uint8_t> m_reel1_ram;
required_shared_ptr<uint8_t> m_reel2_ram;
required_shared_ptr<uint8_t> m_reel3_ram;
required_shared_ptr<uint8_t> m_reel4_ram;
required_shared_ptr<uint8_t> m_bg_scroll2;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
tilemap_t *m_reel1_tilemap;
tilemap_t *m_reel2_tilemap;
tilemap_t *m_reel3_tilemap;
tilemap_t *m_reel4_tilemap;
tilemap_t *m_fg_tilemap;
int m_video_enable;
int m_nmi_enable;
int m_hopper;
uint8_t m_out[3];
uint8_t m_igs_magic[2];
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
, m_bg_scroll(*this, "bg_scroll")
, m_reel1_ram(*this, "reel1_ram")
, m_reel2_ram(*this, "reel2_ram")
, m_reel3_ram(*this, "reel3_ram")
, m_reel4_ram(*this, "reel4_ram")
, m_bg_scroll2(*this, "bg_scroll2")
, m_fg_tile_ram(*this, "fg_tile_ram")
, m_fg_color_ram(*this, "fg_color_ram")
, m_led(*this, "led%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(reel1_ram_w);
DECLARE_WRITE8_MEMBER(reel2_ram_w);
@ -112,9 +89,6 @@ public:
void init_jingbell();
void init_jingbelli();
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_VIDEO_START(gp98);
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -123,6 +97,37 @@ public:
void gp98_portmap(address_map &map);
void jingbell_map(address_map &map);
void jingbell_portmap(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_bg_scroll;
required_shared_ptr<uint8_t> m_reel1_ram;
required_shared_ptr<uint8_t> m_reel2_ram;
required_shared_ptr<uint8_t> m_reel3_ram;
required_shared_ptr<uint8_t> m_reel4_ram;
required_shared_ptr<uint8_t> m_bg_scroll2;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
output_finder<7> m_led;
tilemap_t *m_reel1_tilemap;
tilemap_t *m_reel2_tilemap;
tilemap_t *m_reel3_tilemap;
tilemap_t *m_reel4_tilemap;
tilemap_t *m_fg_tilemap;
int m_video_enable;
int m_nmi_enable;
int m_hopper;
uint8_t m_out[3];
uint8_t m_igs_magic[2];
};
@ -403,7 +408,7 @@ WRITE8_MEMBER(igs009_state::nmi_and_coins_w)
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin out mech
output().set_led_value(6, data & 0x40); // led for coin out / m_hopper active
m_led[6] = BIT(data, 6); // led for coin out / m_hopper active
m_nmi_enable = data; // data & 0x80 // nmi enable?
@ -413,8 +418,8 @@ WRITE8_MEMBER(igs009_state::nmi_and_coins_w)
WRITE8_MEMBER(igs009_state::video_and_leds_w)
{
output().set_led_value(4, data & 0x01); // start?
output().set_led_value(5, data & 0x04); // l_bet?
m_led[4] = BIT(data, 0); // start?
m_led[5] = BIT(data, 2); // l_bet?
m_video_enable = data & 0x40;
m_hopper = (~data)& 0x80;
@ -425,10 +430,10 @@ WRITE8_MEMBER(igs009_state::video_and_leds_w)
WRITE8_MEMBER(igs009_state::leds_w)
{
output().set_led_value(0, data & 0x01); // stop_1
output().set_led_value(1, data & 0x02); // stop_2
output().set_led_value(2, data & 0x04); // stop_3
output().set_led_value(3, data & 0x08); // stop
m_led[0] = BIT(data, 0); // stop_1
m_led[1] = BIT(data, 1); // stop_2
m_led[2] = BIT(data, 2); // stop_3
m_led[3] = BIT(data, 3); // stop
// data & 0x10?
m_out[2] = data;
@ -796,6 +801,9 @@ GFXDECODE_END
void igs009_state::machine_start()
{
m_led.resolve();
save_item(NAME(m_video_enable));
save_item(NAME(m_nmi_enable));
save_item(NAME(m_hopper));

View File

@ -83,29 +83,17 @@ class igspoker_state : public driver_device
{
public:
igspoker_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_bg_tile_ram(*this, "bg_tile_ram"),
m_fg_tile_ram(*this, "fg_tile_ram"),
m_fg_color_ram(*this, "fg_color_ram"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"){ }
required_device<cpu_device> m_maincpu;
optional_shared_ptr<uint8_t> m_bg_tile_ram;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
int m_nmi_enable;
int m_bg_enable;
int m_hopper;
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
uint8_t m_out[3];
uint8_t m_protection_res;
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_bg_tile_ram(*this, "bg_tile_ram")
, m_fg_tile_ram(*this, "fg_tile_ram")
, m_fg_color_ram(*this, "fg_color_ram")
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
, m_led(*this, "led0")
, m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_READ8_MEMBER(igs_irqack_r);
DECLARE_WRITE8_MEMBER(igs_irqack_w);
@ -132,8 +120,6 @@ public:
void init_kungfu();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void machine_reset() override;
virtual void video_start() override;
DECLARE_VIDEO_START(cpokerpk);
uint32_t screen_update_igs_video(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
uint32_t screen_update_cpokerpk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@ -149,6 +135,28 @@ public:
void igspoker_io_map(address_map &map);
void igspoker_prg_map(address_map &map);
void number10_io_map(address_map &map);
protected:
virtual void machine_start() override { m_led.resolve(); m_lamp.resolve(); }
virtual void machine_reset() override;
virtual void video_start() override;
required_device<cpu_device> m_maincpu;
optional_shared_ptr<uint8_t> m_bg_tile_ram;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
output_finder<> m_led;
output_finder<7> m_lamp;
int m_nmi_enable;
int m_bg_enable;
int m_hopper;
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap;
uint8_t m_out[3];
uint8_t m_protection_res;
};
@ -265,7 +273,7 @@ WRITE8_MEMBER(igspoker_state::igs_nmi_and_coins_w)
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
output().set_led_value(6, data & 0x20); // led for coin m_out / m_hopper active
m_led = BIT(data, 5); // led for coin m_out / m_hopper active
m_nmi_enable = data & 0x80; // nmi enable?
#if VERBOSE
@ -303,12 +311,12 @@ WRITE8_MEMBER(igspoker_state::igs_lamps_w)
---x ---- Hold5 lamp.
xx-- ---- one pulse once bet amount allows start.
*/
output().set_lamp_value(1, (data >> 1) & 1); /* Lamp 1 - HOLD 1 */
output().set_lamp_value(2, (data >> 5) & 1); /* Lamp 2 - HOLD 2 */
output().set_lamp_value(3, (data >> 4) & 1); /* Lamp 3 - HOLD 3 */
output().set_lamp_value(4, (data >> 3) & 1); /* Lamp 4 - HOLD 4 */
output().set_lamp_value(5, (data >> 2) & 1); /* Lamp 5 - HOLD 5 */
output().set_lamp_value(6, (data & 1)); /* Lamp 6 - START */
m_lamp[1] = BIT(data, 1); /* Lamp 1 - HOLD 1 */
m_lamp[2] = BIT(data, 5); /* Lamp 2 - HOLD 2 */
m_lamp[3] = BIT(data, 4); /* Lamp 3 - HOLD 3 */
m_lamp[4] = BIT(data, 3); /* Lamp 4 - HOLD 4 */
m_lamp[5] = BIT(data, 2); /* Lamp 5 - HOLD 5 */
m_lamp[6] = BIT(data, 0); /* Lamp 6 - START */
m_hopper = (~data)& 0x80;

View File

@ -37,31 +37,19 @@ class isbc_state : public driver_device
{
public:
isbc_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_uart8251(*this, "uart8251"),
m_uart8274(*this, "uart8274"),
m_pic_0(*this, "pic_0"),
m_pic_1(*this, "pic_1"),
m_centronics(*this, "centronics"),
m_cent_status_in(*this, "cent_status_in"),
m_statuslatch(*this, "statuslatch"),
m_bios(*this, "user1"),
m_biosram(*this, "biosram")
{
}
required_device<cpu_device> m_maincpu;
optional_device<i8251_device> m_uart8251;
// optional_device<i8274_device> m_uart8274;
optional_device<i8274_new_device> m_uart8274;
required_device<pic8259_device> m_pic_0;
optional_device<pic8259_device> m_pic_1;
optional_device<centronics_device> m_centronics;
optional_device<input_buffer_device> m_cent_status_in;
optional_device<ls259_device> m_statuslatch;
optional_memory_region m_bios;
optional_shared_ptr<u16> m_biosram;
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_uart8251(*this, "uart8251")
, m_uart8274(*this, "uart8274")
, m_pic_0(*this, "pic_0")
, m_pic_1(*this, "pic_1")
, m_centronics(*this, "centronics")
, m_cent_status_in(*this, "cent_status_in")
, m_statuslatch(*this, "statuslatch")
, m_bios(*this, "user1")
, m_biosram(*this, "biosram")
, m_led(*this, "led%u", 0U)
{ }
DECLARE_WRITE_LINE_MEMBER(write_centronics_ack);
@ -99,7 +87,22 @@ public:
void rpc86_io(address_map &map);
void rpc86_mem(address_map &map);
protected:
void machine_reset() override;
virtual void machine_start() override { m_led.resolve(); }
virtual void machine_reset() override;
required_device<cpu_device> m_maincpu;
optional_device<i8251_device> m_uart8251;
// optional_device<i8274_device> m_uart8274;
optional_device<i8274_new_device> m_uart8274;
required_device<pic8259_device> m_pic_0;
optional_device<pic8259_device> m_pic_1;
optional_device<centronics_device> m_centronics;
optional_device<input_buffer_device> m_cent_status_in;
optional_device<ls259_device> m_statuslatch;
optional_memory_region m_bios;
optional_shared_ptr<u16> m_biosram;
output_finder<2> m_led;
private:
bool m_upperen;
offs_t m_megabyte_page;
@ -337,12 +340,12 @@ WRITE_LINE_MEMBER(isbc_state::bus_intr_out2_w)
WRITE_LINE_MEMBER(isbc_state::led_ds1_w)
{
machine().output().set_led_value(0, !state);
m_led[0] = state ? 0 : 1;
}
WRITE_LINE_MEMBER(isbc_state::led_ds3_w)
{
machine().output().set_led_value(1, !state);
m_led[1] = state ? 0 : 1;
}
WRITE_LINE_MEMBER(isbc_state::megabyte_select_w)

View File

@ -448,6 +448,7 @@ WRITE16_MEMBER(itech32_state::int1_ack_w)
void itech32_state::machine_start()
{
membank("soundbank")->configure_entries(0, 256, memregion("soundcpu")->base() + 0x10000, 0x4000);
m_led.resolve();
save_item(NAME(m_vint_state));
save_item(NAME(m_xint_state));
@ -741,9 +742,9 @@ WRITE8_MEMBER(itech32_state::drivedge_portb_out)
/* bit 4 controls the ticket dispenser */
/* bit 5 controls the coin counter */
/* bit 6 controls the diagnostic sound LED */
output().set_led_value(1, BIT(data, 0));
output().set_led_value(2, BIT(data, 1));
output().set_led_value(3, BIT(data, 2));
m_led[1] = BIT(data, 0);
m_led[2] = BIT(data, 1);
m_led[3] = BIT(data, 2);
m_ticket->motor_w(BIT(data, 4));
machine().bookkeeping().coin_counter_w(0, BIT(data, 5));
}
@ -751,7 +752,7 @@ WRITE8_MEMBER(itech32_state::drivedge_portb_out)
WRITE_LINE_MEMBER(itech32_state::drivedge_turbo_light)
{
output().set_led_value(0, state);
m_led[0] = state ? 1 : 0;
}

View File

@ -58,43 +58,21 @@ class jackie_state : public driver_device
{
public:
jackie_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this,"maincpu"),
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_bg_scroll2(*this, "bg_scroll2"),
m_bg_scroll(*this, "bg_scroll"),
m_reel1_ram(*this, "reel1_ram"),
m_reel2_ram(*this, "reel2_ram"),
m_reel3_ram(*this, "reel3_ram"),
m_fg_tile_ram(*this, "fg_tile_ram"),
m_fg_color_ram(*this, "fg_color_ram") { }
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_bg_scroll2;
required_shared_ptr<uint8_t> m_bg_scroll;
required_shared_ptr<uint8_t> m_reel1_ram;
required_shared_ptr<uint8_t> m_reel2_ram;
required_shared_ptr<uint8_t> m_reel3_ram;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
int m_exp_bank;
tilemap_t *m_fg_tilemap;
tilemap_t *m_reel1_tilemap;
tilemap_t *m_reel2_tilemap;
tilemap_t *m_reel3_tilemap;
int m_irq_enable;
int m_nmi_enable;
int m_bg_enable;
int m_hopper;
uint8_t m_out[3];
uint16_t m_unk_reg[3][5];
: driver_device(mconfig, type, tag)
, m_maincpu(*this,"maincpu")
, m_gfxdecode(*this, "gfxdecode")
, m_screen(*this, "screen")
, m_palette(*this, "palette")
, m_bg_scroll2(*this, "bg_scroll2")
, m_bg_scroll(*this, "bg_scroll")
, m_reel1_ram(*this, "reel1_ram")
, m_reel2_ram(*this, "reel2_ram")
, m_reel3_ram(*this, "reel3_ram")
, m_fg_tile_ram(*this, "fg_tile_ram")
, m_fg_color_ram(*this, "fg_color_ram")
, m_led(*this, "led")
, m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(fg_tile_w);
DECLARE_WRITE8_MEMBER(fg_color_w);
@ -126,15 +104,44 @@ public:
TILE_GET_INFO_MEMBER(get_reel3_tile_info);
void init_jackie();
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_DEVICE_CALLBACK_MEMBER(irq);
void jackie(machine_config &config);
void jackie_io_map(address_map &map);
void jackie_prg_map(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
virtual void video_start() override;
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
required_shared_ptr<uint8_t> m_bg_scroll2;
required_shared_ptr<uint8_t> m_bg_scroll;
required_shared_ptr<uint8_t> m_reel1_ram;
required_shared_ptr<uint8_t> m_reel2_ram;
required_shared_ptr<uint8_t> m_reel3_ram;
required_shared_ptr<uint8_t> m_fg_tile_ram;
required_shared_ptr<uint8_t> m_fg_color_ram;
output_finder<> m_led;
output_finder<7> m_lamp;
int m_exp_bank;
tilemap_t *m_fg_tilemap;
tilemap_t *m_reel1_tilemap;
tilemap_t *m_reel2_tilemap;
tilemap_t *m_reel3_tilemap;
int m_irq_enable;
int m_nmi_enable;
int m_bg_enable;
int m_hopper;
uint8_t m_out[3];
uint16_t m_unk_reg[3][5];
};
@ -271,6 +278,9 @@ uint32_t jackie_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
void jackie_state::machine_start()
{
m_led.resolve();
m_lamp.resolve();
save_item(NAME(m_exp_bank));
// save_item(NAME(m_irq_enable)); //always 1?
save_item(NAME(m_nmi_enable));
@ -330,7 +340,7 @@ WRITE8_MEMBER(jackie_state::nmi_and_coins_w)
machine().bookkeeping().coin_counter_w(2, data & 0x08); // key in
machine().bookkeeping().coin_counter_w(3, data & 0x10); // coin m_out mech
output().set_led_value(6, data & 0x20); // led for coin m_out / m_hopper active
m_led = BIT(data, 5); // led for coin m_out / m_hopper active
m_exp_bank = (data & 0x02) ? 1 : 0; // expram bank number
m_nmi_enable = data & 0x80; // nmi enable?
@ -352,12 +362,12 @@ WRITE8_MEMBER(jackie_state::lamps_w)
---- -x-- Hold5 lamp.
---- ---x Start lamp.
*/
output().set_lamp_value(1, (data >> 1) & 1); /* Lamp 1 - HOLD 1 */
output().set_lamp_value(2, (data >> 5) & 1); /* Lamp 2 - HOLD 2 */
output().set_lamp_value(3, (data >> 4) & 1); /* Lamp 3 - HOLD 3 */
output().set_lamp_value(4, (data >> 3) & 1); /* Lamp 4 - HOLD 4 */
output().set_lamp_value(5, (data >> 2) & 1); /* Lamp 5 - HOLD 5 */
output().set_lamp_value(6, (data & 1)); /* Lamp 6 - START */
m_lamp[1] = BIT(data, 1); /* Lamp 1 - HOLD 1 */
m_lamp[2] = BIT(data, 5); /* Lamp 2 - HOLD 2 */
m_lamp[3] = BIT(data, 4); /* Lamp 3 - HOLD 3 */
m_lamp[4] = BIT(data, 3); /* Lamp 4 - HOLD 4 */
m_lamp[5] = BIT(data, 2); /* Lamp 5 - HOLD 5 */
m_lamp[6] = BIT(data, 0); /* Lamp 6 - START */
m_hopper = (~data)& 0x80;

View File

@ -516,7 +516,7 @@ void jpmimpct_state::jpm_draw_lamps(int data, int lamp_strobe)
for (i=0; i<16; i++)
{
m_Lamps[16*(m_lamp_strobe+i)] = data & 1;
output().set_lamp_value((16*lamp_strobe)+i, (m_Lamps[(16*lamp_strobe)+i]));
m_lamp_output[(16*lamp_strobe)+i] = m_Lamps[(16*lamp_strobe)+i];
data = data >> 1;
}
}

View File

@ -207,12 +207,29 @@
class jubilee_state : public driver_device
{
public:
jubilee_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
jubilee_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_videoram(*this, "videoworkram"),
m_colorram(*this, "colorram"),
m_maincpu(*this, "maincpu"),
m_gfxdecode(*this, "gfxdecode") { }
m_gfxdecode(*this, "gfxdecode"),
m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(jubileep_videoram_w);
DECLARE_WRITE8_MEMBER(jubileep_colorram_w);
DECLARE_WRITE8_MEMBER(unk_w);
DECLARE_READ8_MEMBER(mux_port_r);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
uint32_t screen_update_jubileep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(jubileep_interrupt);
void jubileep(machine_config &config);
void jubileep_cru_map(address_map &map);
void jubileep_map(address_map &map);
protected:
virtual void machine_start() override { m_lamp.resolve(); }
virtual void video_start() override;
uint8_t mux_sel;
uint8_t muxlamps;
@ -220,19 +237,9 @@ public:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
tilemap_t *m_bg_tilemap;
DECLARE_WRITE8_MEMBER(jubileep_videoram_w);
DECLARE_WRITE8_MEMBER(jubileep_colorram_w);
DECLARE_WRITE8_MEMBER(unk_w);
DECLARE_READ8_MEMBER(mux_port_r);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
virtual void video_start() override;
uint32_t screen_update_jubileep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(jubileep_interrupt);
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
void jubileep(machine_config &config);
void jubileep_cru_map(address_map &map);
void jubileep_map(address_map &map);
output_finder<9> m_lamp;
};
@ -411,19 +418,19 @@ WRITE8_MEMBER(jubilee_state::unk_w)
{
if (muxlamps == 1)
{
output().set_lamp_value(0, (data & 1)); /* lamp */
m_lamp[0] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 0 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 0");
}
if (muxlamps == 2)
{
output().set_lamp_value(3, (data & 1)); /* lamp */
m_lamp[3] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 3 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 3");
}
if (muxlamps == 3)
{
output().set_lamp_value(6, (data & 1)); /* lamp */
m_lamp[6] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 6 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 6");
}
@ -433,19 +440,19 @@ WRITE8_MEMBER(jubilee_state::unk_w)
{
if (muxlamps == 1)
{
output().set_lamp_value(1, (data & 1)); /* lamp */
m_lamp[1] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 1 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 1");
}
if (muxlamps == 2)
{
output().set_lamp_value(4, (data & 1)); /* lamp */
m_lamp[4] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 4 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 4");
}
if (muxlamps == 3)
{
output().set_lamp_value(7, (data & 1)); /* lamp */
m_lamp[7] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 7 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 7");
}
@ -455,19 +462,19 @@ WRITE8_MEMBER(jubilee_state::unk_w)
{
if (muxlamps == 1)
{
output().set_lamp_value(2, (data & 1)); /* lamp */
m_lamp[2] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 2 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 2");
}
if (muxlamps == 2)
{
output().set_lamp_value(5, (data & 1)); /* lamp */
m_lamp[5] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 5 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 5");
}
if (muxlamps == 3)
{
output().set_lamp_value(8, (data & 1)); /* lamp */
m_lamp[8] = BIT(data, 0); /* lamp */
logerror("CRU: LAAAAAAMP 8 write to address %04x: %d\n", offset<<1, data & 1);
// popmessage("LAMP 8");
}

View File

@ -208,8 +208,8 @@
class kas89_state : public driver_device
{
public:
kas89_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
kas89_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_v9938(*this, "v9938"),
@ -222,9 +222,31 @@ public:
m_pl6(*this, "PL6"),
m_svc(*this, "SVC"),
m_dsw(*this, "DSW"),
m_unk(*this, "UNK")
m_unk(*this, "UNK"),
m_lamp(*this, "lamp%u", 0U)
{ }
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_READ8_MEMBER(mux_r);
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(sound_comm_w);
DECLARE_WRITE8_MEMBER(int_ack_w);
DECLARE_WRITE8_MEMBER(led_mux_data_w);
DECLARE_WRITE8_MEMBER(led_mux_select_w);
void init_kas89();
TIMER_DEVICE_CALLBACK_MEMBER(kas89_nmi_cb);
TIMER_DEVICE_CALLBACK_MEMBER(kas89_sound_nmi_cb);
void kas89(machine_config &config);
void audio_io(address_map &map);
void audio_map(address_map &map);
void kas89_io(address_map &map);
void kas89_map(address_map &map);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
uint8_t m_mux_data;
uint8_t m_main_nmi_enable;
@ -245,24 +267,7 @@ public:
required_ioport m_svc;
required_ioport m_dsw;
required_ioport m_unk;
DECLARE_WRITE8_MEMBER(mux_w);
DECLARE_READ8_MEMBER(mux_r);
DECLARE_WRITE8_MEMBER(control_w);
DECLARE_WRITE8_MEMBER(sound_comm_w);
DECLARE_WRITE8_MEMBER(int_ack_w);
DECLARE_WRITE8_MEMBER(led_mux_data_w);
DECLARE_WRITE8_MEMBER(led_mux_select_w);
void init_kas89();
virtual void machine_start() override;
virtual void machine_reset() override;
TIMER_DEVICE_CALLBACK_MEMBER(kas89_nmi_cb);
TIMER_DEVICE_CALLBACK_MEMBER(kas89_sound_nmi_cb);
void kas89(machine_config &config);
void audio_io(address_map &map);
void audio_map(address_map &map);
void kas89_io(address_map &map);
void kas89_map(address_map &map);
output_finder<37> m_lamp;
};
@ -272,7 +277,8 @@ public:
void kas89_state::machine_start()
{
output().set_lamp_value(37, 0); /* turning off the operator led */
m_lamp.resolve();
m_lamp[37] = 0; /* turning off the operator led */
}
void kas89_state::machine_reset()
@ -309,7 +315,7 @@ READ8_MEMBER(kas89_state::mux_r)
case 0x20: return m_pl6->read();
case 0x40:
{
output().set_lamp_value(37, 1 - ((m_svc->read() >> 5) & 1)); /* Operator Key LAMP */
m_lamp[37] = BIT(~m_svc->read(), 5); /* Operator Key LAMP */
return m_svc->read();
}
case 0x80: return m_dsw->read(); /* Polled at $162a through NMI routine */
@ -375,7 +381,7 @@ WRITE8_MEMBER(kas89_state::sound_comm_w)
uint8_t i;
for ( i = 0; i < 37; i++ )
{
output().set_lamp_value(i, 0); /* All roulette LEDs OFF */
m_lamp[i] = 0; /* All roulette LEDs OFF */
}
}
@ -421,7 +427,7 @@ WRITE8_MEMBER(kas89_state::led_mux_select_w)
uint8_t i;
for ( i = 0; i < 37; i++ )
{
output().set_lamp_value(i, 0); /* All LEDs OFF */
m_lamp[i] = 0; /* All LEDs OFF */
}
switch(data)
@ -430,69 +436,69 @@ WRITE8_MEMBER(kas89_state::led_mux_select_w)
{
for ( i = 0; i < 37; i++ )
{
output().set_lamp_value(i, 0); /* All LEDs OFF */
m_lamp[i] = 0; /* All LEDs OFF */
}
}
case 0x01:
{
output().set_lamp_value(11, (m_leds_mux_data >> 0) & 1); /* Number 11 LED */
output().set_lamp_value(36, (m_leds_mux_data >> 1) & 1); /* Number 36 LED */
output().set_lamp_value(13, (m_leds_mux_data >> 2) & 1); /* Number 13 LED */
output().set_lamp_value(27, (m_leds_mux_data >> 3) & 1); /* Number 27 LED */
output().set_lamp_value(06, (m_leds_mux_data >> 4) & 1); /* Number 6 LED */
output().set_lamp_value(34, (m_leds_mux_data >> 5) & 1); /* Number 34 LED */
output().set_lamp_value(17, (m_leds_mux_data >> 6) & 1); /* Number 17 LED */
output().set_lamp_value(25, (m_leds_mux_data >> 7) & 1); /* Number 25 LED */
m_lamp[11] = BIT(m_leds_mux_data, 0); /* Number 11 LED */
m_lamp[36] = BIT(m_leds_mux_data, 1); /* Number 36 LED */
m_lamp[13] = BIT(m_leds_mux_data, 2); /* Number 13 LED */
m_lamp[27] = BIT(m_leds_mux_data, 3); /* Number 27 LED */
m_lamp[06] = BIT(m_leds_mux_data, 4); /* Number 6 LED */
m_lamp[34] = BIT(m_leds_mux_data, 5); /* Number 34 LED */
m_lamp[17] = BIT(m_leds_mux_data, 6); /* Number 17 LED */
m_lamp[25] = BIT(m_leds_mux_data, 7); /* Number 25 LED */
break;
}
case 0x02:
{
output().set_lamp_value( 2, (m_leds_mux_data >> 0) & 1); /* Number 2 LED */
output().set_lamp_value(21, (m_leds_mux_data >> 1) & 1); /* Number 21 LED */
output().set_lamp_value( 4, (m_leds_mux_data >> 2) & 1); /* Number 4 LED */
output().set_lamp_value(19, (m_leds_mux_data >> 3) & 1); /* Number 19 LED */
output().set_lamp_value(15, (m_leds_mux_data >> 4) & 1); /* Number 15 LED */
output().set_lamp_value(32, (m_leds_mux_data >> 5) & 1); /* Number 32 LED */
output().set_lamp_value( 0, (m_leds_mux_data >> 6) & 1); /* Number 0 LED */
output().set_lamp_value(26, (m_leds_mux_data >> 7) & 1); /* Number 26 LED */
m_lamp[ 2] = BIT(m_leds_mux_data, 0); /* Number 2 LED */
m_lamp[21] = BIT(m_leds_mux_data, 1); /* Number 21 LED */
m_lamp[ 4] = BIT(m_leds_mux_data, 2); /* Number 4 LED */
m_lamp[19] = BIT(m_leds_mux_data, 3); /* Number 19 LED */
m_lamp[15] = BIT(m_leds_mux_data, 4); /* Number 15 LED */
m_lamp[32] = BIT(m_leds_mux_data, 5); /* Number 32 LED */
m_lamp[ 0] = BIT(m_leds_mux_data, 6); /* Number 0 LED */
m_lamp[26] = BIT(m_leds_mux_data, 7); /* Number 26 LED */
break;
}
case 0x04:
{
output().set_lamp_value( 3, (m_leds_mux_data >> 0) & 1); /* Number 3 LED */
output().set_lamp_value(35, (m_leds_mux_data >> 1) & 1); /* Number 35 LED */
output().set_lamp_value(12, (m_leds_mux_data >> 2) & 1); /* Number 12 LED */
output().set_lamp_value(28, (m_leds_mux_data >> 3) & 1); /* Number 28 LED */
output().set_lamp_value( 7, (m_leds_mux_data >> 4) & 1); /* Number 7 LED */
output().set_lamp_value(29, (m_leds_mux_data >> 5) & 1); /* Number 29 LED */
output().set_lamp_value(18, (m_leds_mux_data >> 6) & 1); /* Number 18 LED */
m_lamp[ 3] = BIT(m_leds_mux_data, 0); /* Number 3 LED */
m_lamp[35] = BIT(m_leds_mux_data, 1); /* Number 35 LED */
m_lamp[12] = BIT(m_leds_mux_data, 2); /* Number 12 LED */
m_lamp[28] = BIT(m_leds_mux_data, 3); /* Number 28 LED */
m_lamp[ 7] = BIT(m_leds_mux_data, 4); /* Number 7 LED */
m_lamp[29] = BIT(m_leds_mux_data, 5); /* Number 29 LED */
m_lamp[18] = BIT(m_leds_mux_data, 6); /* Number 18 LED */
break;
}
case 0x08:
{
output().set_lamp_value(22, (m_leds_mux_data >> 0) & 1); /* Number 22 LED */
output().set_lamp_value( 9, (m_leds_mux_data >> 1) & 1); /* Number 9 LED */
output().set_lamp_value(31, (m_leds_mux_data >> 2) & 1); /* Number 31 LED */
output().set_lamp_value(14, (m_leds_mux_data >> 3) & 1); /* Number 14 LED */
output().set_lamp_value(20, (m_leds_mux_data >> 4) & 1); /* Number 20 LED */
output().set_lamp_value( 1, (m_leds_mux_data >> 5) & 1); /* Number 1 LED */
output().set_lamp_value(33, (m_leds_mux_data >> 6) & 1); /* Number 33 LED */
m_lamp[22] = BIT(m_leds_mux_data, 0); /* Number 22 LED */
m_lamp[ 9] = BIT(m_leds_mux_data, 1); /* Number 9 LED */
m_lamp[31] = BIT(m_leds_mux_data, 2); /* Number 31 LED */
m_lamp[14] = BIT(m_leds_mux_data, 3); /* Number 14 LED */
m_lamp[20] = BIT(m_leds_mux_data, 4); /* Number 20 LED */
m_lamp[ 1] = BIT(m_leds_mux_data, 5); /* Number 1 LED */
m_lamp[33] = BIT(m_leds_mux_data, 6); /* Number 33 LED */
break;
}
case 0x10:
{
output().set_lamp_value(16, (m_leds_mux_data >> 0) & 1); /* Number 16 LED */
output().set_lamp_value(24, (m_leds_mux_data >> 1) & 1); /* Number 24 LED */
output().set_lamp_value( 5, (m_leds_mux_data >> 2) & 1); /* Number 5 LED */
output().set_lamp_value(10, (m_leds_mux_data >> 3) & 1); /* Number 10 LED */
output().set_lamp_value(23, (m_leds_mux_data >> 4) & 1); /* Number 23 LED */
output().set_lamp_value( 8, (m_leds_mux_data >> 5) & 1); /* Number 8 LED */
output().set_lamp_value(30, (m_leds_mux_data >> 6) & 1); /* Number 30 LED */
m_lamp[16] = BIT(m_leds_mux_data, 0); /* Number 16 LED */
m_lamp[24] = BIT(m_leds_mux_data, 1); /* Number 24 LED */
m_lamp[ 5] = BIT(m_leds_mux_data, 2); /* Number 5 LED */
m_lamp[10] = BIT(m_leds_mux_data, 3); /* Number 10 LED */
m_lamp[23] = BIT(m_leds_mux_data, 4); /* Number 23 LED */
m_lamp[ 8] = BIT(m_leds_mux_data, 5); /* Number 8 LED */
m_lamp[30] = BIT(m_leds_mux_data, 6); /* Number 30 LED */
break;
}
@ -500,7 +506,7 @@ WRITE8_MEMBER(kas89_state::led_mux_select_w)
{
for ( i = 0; i < 37; i++ )
{
output().set_lamp_value(i, 1); /* All LEDs ON */
m_lamp[i] = 1; /* All LEDs ON */
}
}
}

Some files were not shown because too many files have changed in this diff Show More