diff options
Diffstat (limited to 'src/mame/drivers/bfm_sc4.cpp')
-rw-r--r-- | src/mame/drivers/bfm_sc4.cpp | 563 |
1 files changed, 293 insertions, 270 deletions
diff --git a/src/mame/drivers/bfm_sc4.cpp b/src/mame/drivers/bfm_sc4.cpp index a2b76aa8766..bb27a646049 100644 --- a/src/mame/drivers/bfm_sc4.cpp +++ b/src/mame/drivers/bfm_sc4.cpp @@ -733,16 +733,16 @@ void sc4_state::bfm_sc4_68307_porta_w(address_space &space, bool dedicated, uint { m_reel12_latch = data; - if(m_reel1) + if(m_reel[0]) { - m_reel1->update( data &0x0f); - awp_draw_reel(machine(),"reel1", *m_reel1); + m_reel[0]->update( data &0x0f); + awp_draw_reel(machine(),"reel1", *m_reel[0]); } - if (m_reel2) + if (m_reel[1]) { - m_reel2->update((data>>4)&0x0f); - awp_draw_reel(machine(),"reel2", *m_reel2); + m_reel[1]->update((data>>4)&0x0f); + awp_draw_reel(machine(),"reel2", *m_reel[1]); } } @@ -750,10 +750,10 @@ WRITE8_MEMBER( sc4_state::bfm_sc4_reel3_w ) { m_reel3_latch = data; - if(m_reel3) + if(m_reel[2]) { - m_reel3->update( data &0x0f); - awp_draw_reel(machine(),"reel3", *m_reel3); + m_reel[2]->update( data &0x0f); + awp_draw_reel(machine(),"reel3", *m_reel[2]); } } @@ -761,10 +761,10 @@ WRITE8_MEMBER( sc4_state::bfm_sc4_reel4_w ) { m_reel4_latch = data; - if(m_reel4) + if(m_reel[3]) { - m_reel4->update( data &0x0f); - awp_draw_reel(machine(),"reel4", *m_reel4); + m_reel[3]->update( data &0x0f); + awp_draw_reel(machine(),"reel4", *m_reel[3]); } } @@ -856,16 +856,16 @@ WRITE8_MEMBER(sc4_state::bfm_sc4_duart_output_w) // logerror("bfm_sc4_duart_output_w\n"); m_reel56_latch = data; - if(m_reel5) + if(m_reel[4]) { - m_reel5->update( data &0x0f); - awp_draw_reel(machine(),"reel5", *m_reel5); + m_reel[4]->update( data &0x0f); + awp_draw_reel(machine(),"reel5", *m_reel[4]); } - if (m_reel6) + if (m_reel[5]) { - m_reel6->update((data>>4)&0x0f); - awp_draw_reel(machine(),"reel6", *m_reel6); + m_reel[5]->update((data>>4)&0x0f); + awp_draw_reel(machine(),"reel6", *m_reel[5]); } } @@ -920,329 +920,350 @@ MACHINE_CONFIG_START(sc4_state::sc4_common) MACHINE_CONFIG_END //Standard 6 reels all connected -MACHINE_CONFIG_START(sc4_state::sc4) +void sc4_state::sc4(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //Standard 3 reels -MACHINE_CONFIG_START(sc4_state::sc4_3reel) +void sc4_state::sc4_3reel(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); -MACHINE_CONFIG_END +} //Standard 4 reels -MACHINE_CONFIG_START(sc4_state::sc4_4reel) +void sc4_state::sc4_4reel(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); +} //4 reels, with the last connected to RL4 not RL3 -MACHINE_CONFIG_START(sc4_state::sc4_4reel_alt) +void sc4_state::sc4_4reel_alt(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); +} //Standard 5 reels -MACHINE_CONFIG_START(sc4_state::sc4_5reel) +void sc4_state::sc4_5reel(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); +} //5 reels, with RL4 skipped -MACHINE_CONFIG_START(sc4_state::sc4_5reel_alt) +void sc4_state::sc4_5reel_alt(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); -MACHINE_CONFIG_END +} //6 reels, last 200 steps -MACHINE_CONFIG_START(sc4_state::sc4_200_std) +void sc4_state::sc4_200_std(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //6 reels, last 200 steps -MACHINE_CONFIG_START(sc4_state::sc4_200_alt) +void sc4_state::sc4_200_alt(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //6 reels, RL4 200 steps -MACHINE_CONFIG_START(sc4_state::sc4_200_alta) +void sc4_state::sc4_200_alta(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //6 reels, 3 48 step, 3 200 step -MACHINE_CONFIG_START(sc4_state::sc4_200_altb) +void sc4_state::sc4_200_altb(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //5 reels, last one 200 steps -MACHINE_CONFIG_START(sc4_state::sc4_200_5r) +void sc4_state::sc4_200_5r(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); +} //5 reels, last one 200 steps, RL4 skipped -MACHINE_CONFIG_START(sc4_state::sc4_200_5ra) +void sc4_state::sc4_200_5ra(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //5 reels, last one 200 steps, RL5 skipped -MACHINE_CONFIG_START(sc4_state::sc4_200_5rb) +void sc4_state::sc4_200_5rb(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + + REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //5 reels, RL5 200 steps, RL4 skipped -MACHINE_CONFIG_START(sc4_state::sc4_200_5rc) +void sc4_state::sc4_200_5rc(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + + REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); + REEL(config, m_reel[5], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} //4 reels, last one 200 steps -MACHINE_CONFIG_START(sc4_state::sc4_200_4r) +void sc4_state::sc4_200_4r(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); +} //4 reels, last one 200 steps, RL4 skipped -MACHINE_CONFIG_START(sc4_state::sc4_200_4ra) +void sc4_state::sc4_200_4ra(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[4], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); +} //4 reels, last one 200 steps, RL4,5 skipped -MACHINE_CONFIG_START(sc4_state::sc4_200_4rb) +void sc4_state::sc4_200_4rb(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); - MCFG_DEVICE_ADD("reel6", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel6_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[5], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[5]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<5>)); +} -MACHINE_CONFIG_START(sc4_state::sc4_4reel_200) +void sc4_state::sc4_4reel_200(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); +} -MACHINE_CONFIG_START(sc4_state::sc4_3reel_200) +void sc4_state::sc4_3reel_200(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); +} -MACHINE_CONFIG_START(sc4_state::sc4_3reel_200_48) +void sc4_state::sc4_3reel_200_48(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 1, 3, 0x09, 4) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) -MACHINE_CONFIG_END + REEL(config, m_reel[0], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_200STEP_REEL, 12, 24, 0x09, 7, 200*2); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 1, 3, 0x09, 4); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); +} -MACHINE_CONFIG_START(sc4_state::sc4_no_reels) +void sc4_state::sc4_no_reels(machine_config &config) +{ sc4_common(config); -MACHINE_CONFIG_END +} void sc4_adder4_state::machine_start() { @@ -1251,32 +1272,34 @@ void sc4_adder4_state::machine_start() m_adder4ram = make_unique_clear<uint32_t[]>(0x10000); } -MACHINE_CONFIG_START(sc4_adder4_state::sc4_adder4) +void sc4_adder4_state::sc4_adder4(machine_config &config) +{ sc4_common(config); - MCFG_DEVICE_ADD("adder4", M68340, 25175000) // 68340 (CPU32 core) - MCFG_DEVICE_PROGRAM_MAP(sc4_adder4_map) -MACHINE_CONFIG_END + M68340(config, m_adder4cpu, 25175000); // 68340 (CPU32 core) + m_adder4cpu->set_addrmap(AS_PROGRAM, &sc4_adder4_state::sc4_adder4_map); +} -MACHINE_CONFIG_START(sc4_state::sc4dmd) +void sc4_state::sc4dmd(machine_config &config) +{ sc4_common(config); /* video hardware */ //config.set_default_layout(layout_sc4_dmd); - MCFG_DEVICE_ADD("dm01", BFM_DM01, 0) - MCFG_BFM_DM01_BUSY_CB(WRITELINE(*this, sc4_state, bfmdm01_busy)) - - MCFG_DEVICE_ADD("reel1", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel1_optic_cb)) - MCFG_DEVICE_ADD("reel2", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel2_optic_cb)) - MCFG_DEVICE_ADD("reel3", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel3_optic_cb)) - MCFG_DEVICE_ADD("reel4", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel4_optic_cb)) - MCFG_DEVICE_ADD("reel5", REEL, STARPOINT_48STEP_REEL, 16, 24, 0x09, 7) - MCFG_STEPPER_OPTIC_CALLBACK(WRITELINE(*this, sc4_state, reel5_optic_cb)) -MACHINE_CONFIG_END + BFM_DM01(config, m_dm01, 0); + m_dm01->busy_callback().set(FUNC(sc4_state::bfmdm01_busy)); + + REEL(config, m_reel[0], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[0]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<0>)); + REEL(config, m_reel[1], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[1]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<1>)); + REEL(config, m_reel[2], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[2]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<2>)); + REEL(config, m_reel[3], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[3]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<3>)); + REEL(config, m_reel[4], STARPOINT_48STEP_REEL, 16, 24, 0x09, 7); + m_reel[4]->optic_handler().set(FUNC(sc4_state::reel_optic_cb<4>)); +} INPUT_PORTS_START( sc4_raw ) // completley unmapped, but named inputs for all the ports, used for testing. PORT_START("IN-0") |