mirror of
https://github.com/holub/mame
synced 2025-07-06 10:29:38 +03:00
cinemat: further cleanup/separation - no longer needs a selector member or start overrides (nw)
This commit is contained in:
parent
4d3566cfa7
commit
35fa407372
@ -377,56 +377,56 @@ static const char *const sundance_sample_names[] =
|
||||
nullptr
|
||||
};
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::sundance_sound0_w)
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound0_w)
|
||||
{
|
||||
/* bong - falling edge */
|
||||
if (!state)
|
||||
m_samples->start(0, 0);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::sundance_sound1_w)
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound1_w)
|
||||
{
|
||||
/* whoosh - falling edge */
|
||||
if (!state)
|
||||
m_samples->start(1, 1);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::sundance_sound2_w)
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound2_w)
|
||||
{
|
||||
/* explosion - falling edge */
|
||||
if (!state)
|
||||
m_samples->start(2, 2);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::sundance_sound3_w)
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound3_w)
|
||||
{
|
||||
/* ping - falling edge */
|
||||
if (!state)
|
||||
m_samples->start(3, 3);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::sundance_sound4_w)
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound4_w)
|
||||
{
|
||||
/* ping - falling edge */
|
||||
if (!state)
|
||||
m_samples->start(4, 4);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::sundance_sound7_w)
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::sundance_sound7_w)
|
||||
{
|
||||
/* hatch - falling edge */
|
||||
if (!state)
|
||||
m_samples->start(5, 5);
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::sundance_sound)
|
||||
MACHINE_CONFIG_START(cinemat_16level_state::sundance_sound)
|
||||
MCFG_DEVICE_MODIFY("outlatch")
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, cinemat_state, sundance_sound0_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, cinemat_state, sundance_sound1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, cinemat_state, sundance_sound2_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, cinemat_state, sundance_sound3_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, cinemat_state, sundance_sound4_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, cinemat_state, sundance_sound7_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, cinemat_16level_state, sundance_sound0_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, cinemat_16level_state, sundance_sound1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, cinemat_16level_state, sundance_sound2_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, cinemat_16level_state, sundance_sound3_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, cinemat_16level_state, sundance_sound4_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, cinemat_16level_state, sundance_sound7_w))
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
@ -924,14 +924,14 @@ static const char *const solarq_sample_names[] =
|
||||
nullptr
|
||||
};
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::solarq_sound4_w)
|
||||
WRITE_LINE_MEMBER(cinemat_64level_state::solarq_sound4_w)
|
||||
{
|
||||
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
|
||||
if (state)
|
||||
m_current_shift = ((m_current_shift >> 1) & 0x7fff) | (m_outlatch->q7_r() << 15);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::solarq_sound1_w)
|
||||
WRITE_LINE_MEMBER(cinemat_64level_state::solarq_sound1_w)
|
||||
{
|
||||
/* execute on the rising edge of bit 0x02 */
|
||||
if (state)
|
||||
@ -994,7 +994,7 @@ WRITE_LINE_MEMBER(cinemat_state::solarq_sound1_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::solarq_sound0_w)
|
||||
WRITE_LINE_MEMBER(cinemat_64level_state::solarq_sound0_w)
|
||||
{
|
||||
/* clock music data on the rising edge of bit 0x01 */
|
||||
if (state)
|
||||
@ -1020,11 +1020,11 @@ WRITE_LINE_MEMBER(cinemat_state::solarq_sound0_w)
|
||||
}
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::solarq_sound)
|
||||
MACHINE_CONFIG_START(cinemat_64level_state::solarq_sound)
|
||||
MCFG_DEVICE_MODIFY("outlatch")
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, cinemat_state, solarq_sound0_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, cinemat_state, solarq_sound1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, cinemat_state, solarq_sound4_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, cinemat_64level_state, solarq_sound0_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, cinemat_64level_state, solarq_sound1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, cinemat_64level_state, solarq_sound4_w))
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
@ -1060,14 +1060,14 @@ static const char *const boxingb_sample_names[] =
|
||||
nullptr
|
||||
};
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::boxingb_sound4_w)
|
||||
WRITE_LINE_MEMBER(cinemat_color_state::boxingb_sound4_w)
|
||||
{
|
||||
/* on the rising edge of bit 0x10, clock bit 0x80 into the shift register */
|
||||
if (state)
|
||||
m_current_shift = ((m_current_shift >> 1) & 0x7fff) | (m_outlatch->q7_r() << 15);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::boxingb_sound1_w)
|
||||
WRITE_LINE_MEMBER(cinemat_color_state::boxingb_sound1_w)
|
||||
{
|
||||
/* execute on the rising edge of bit 0x02 */
|
||||
if (state)
|
||||
@ -1114,7 +1114,7 @@ WRITE_LINE_MEMBER(cinemat_state::boxingb_sound1_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::boxingb_sound0_w)
|
||||
WRITE_LINE_MEMBER(cinemat_color_state::boxingb_sound0_w)
|
||||
{
|
||||
/* clock music data on the rising edge of bit 0x01 */
|
||||
if (state)
|
||||
@ -1144,27 +1144,27 @@ WRITE_LINE_MEMBER(cinemat_state::boxingb_sound0_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::boxingb_sound2_w)
|
||||
WRITE_LINE_MEMBER(cinemat_color_state::boxingb_sound2_w)
|
||||
{
|
||||
/* bounce - rising edge */
|
||||
if (state)
|
||||
m_samples->start(10, 10);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::boxingb_sound3_w)
|
||||
WRITE_LINE_MEMBER(cinemat_color_state::boxingb_sound3_w)
|
||||
{
|
||||
/* bell - falling edge */
|
||||
if (state)
|
||||
m_samples->start(11, 11);
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::boxingb_sound)
|
||||
MACHINE_CONFIG_START(cinemat_color_state::boxingb_sound)
|
||||
MCFG_DEVICE_MODIFY("outlatch")
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, cinemat_state, boxingb_sound0_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, cinemat_state, boxingb_sound1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, cinemat_state, boxingb_sound2_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, cinemat_state, boxingb_sound3_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, cinemat_state, boxingb_sound4_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(WRITELINE(*this, cinemat_color_state, boxingb_sound0_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(WRITELINE(*this, cinemat_color_state, boxingb_sound1_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(WRITELINE(*this, cinemat_color_state, boxingb_sound2_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(WRITELINE(*this, cinemat_color_state, boxingb_sound3_w))
|
||||
MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(*this, cinemat_color_state, boxingb_sound4_w))
|
||||
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
|
@ -229,7 +229,7 @@ static const struct
|
||||
};
|
||||
|
||||
|
||||
READ8_MEMBER(cinemat_state::sundance_inputs_r)
|
||||
READ8_MEMBER(cinemat_16level_state::sundance_inputs_r)
|
||||
{
|
||||
/* handle special keys first */
|
||||
if (sundance_port_map[offset].portname)
|
||||
@ -246,7 +246,7 @@ READ8_MEMBER(cinemat_state::sundance_inputs_r)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
READ8_MEMBER(cinemat_state::boxingb_dial_r)
|
||||
READ8_MEMBER(cinemat_color_state::boxingb_dial_r)
|
||||
{
|
||||
int value = ioport("DIAL")->read();
|
||||
if (!m_mux_select) offset += 4;
|
||||
@ -1067,10 +1067,9 @@ MACHINE_CONFIG_START(cinemat_state::starhawk)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::sundance)
|
||||
MACHINE_CONFIG_START(cinemat_16level_state::sundance)
|
||||
cinemat_jmi_8k(config);
|
||||
sundance_sound(config);
|
||||
MCFG_VIDEO_START_OVERRIDE(cinemat_state,cinemat_16level)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1107,19 +1106,17 @@ MACHINE_CONFIG_START(cinemat_state::starcas)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::solarq)
|
||||
MACHINE_CONFIG_START(cinemat_64level_state::solarq)
|
||||
cinemat_jmi_16k(config);
|
||||
solarq_sound(config);
|
||||
MCFG_VIDEO_START_OVERRIDE(cinemat_state,cinemat_64level)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::boxingb)
|
||||
MACHINE_CONFIG_START(cinemat_color_state::boxingb)
|
||||
cinemat_jmi_32k(config);
|
||||
boxingb_sound(config);
|
||||
MCFG_SCREEN_MODIFY("screen")
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 1024, 0, 788)
|
||||
MCFG_VIDEO_START_OVERRIDE(cinemat_state,cinemat_color)
|
||||
|
||||
MCFG_DEVICE_MODIFY("outlatch")
|
||||
MCFG_ADDRESSABLE_LATCH_Q7_OUT_CB(WRITELINE(*this, cinemat_state, mux_select_w))
|
||||
@ -1134,10 +1131,9 @@ MACHINE_CONFIG_START(cinemat_state::wotw)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
MACHINE_CONFIG_START(cinemat_state::wotwc)
|
||||
MACHINE_CONFIG_START(cinemat_color_state::wotwc)
|
||||
cinemat_jmi_16k(config);
|
||||
wotw_sound(config);
|
||||
MCFG_VIDEO_START_OVERRIDE(cinemat_state,cinemat_color)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -1473,15 +1469,15 @@ void cinemat_state::init_speedfrk()
|
||||
}
|
||||
|
||||
|
||||
void cinemat_state::init_sundance()
|
||||
void cinemat_16level_state::init_sundance()
|
||||
{
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x00, 0x0f, read8_delegate(FUNC(cinemat_state::sundance_inputs_r),this));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x00, 0x0f, read8_delegate(FUNC(cinemat_16level_state::sundance_inputs_r),this));
|
||||
}
|
||||
|
||||
|
||||
void cinemat_state::init_boxingb()
|
||||
void cinemat_color_state::init_boxingb()
|
||||
{
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x0c, 0x0f, read8_delegate(FUNC(cinemat_state::boxingb_dial_r),this));
|
||||
m_maincpu->space(AS_IO).install_read_handler(0x0c, 0x0f, read8_delegate(FUNC(cinemat_color_state::boxingb_dial_r),this));
|
||||
}
|
||||
|
||||
|
||||
@ -1498,27 +1494,27 @@ void qb3_state::init_qb3()
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1977, spacewar, 0, spacewar, spacewar, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Space Wars", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1978, spaceshp, spacewar, spacewar, spaceshp, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Sega license)", "Space Ship", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1979, barrier, 0, barrier, barrier, cinemat_state, empty_init, ORIENTATION_FLIP_X ^ ROT270, "Cinematronics (Vectorbeam license)", "Barrier", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_barrier ) // developed by Cinematronics, then (when they noticed it wasn't going to be a successful game) sold to Vectorbeam, and ultimately back in the hands of Cinematronics again after they bought the dying company Vectorbeam
|
||||
GAME( 1979, speedfrk, 0, speedfrk, speedfrk, cinemat_state, init_speedfrk, ORIENTATION_FLIP_Y, "Vectorbeam", "Speed Freak", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, starhawk, 0, starhawk, starhawk, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Hawk", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1979, sundance, 0, sundance, sundance, cinemat_state, init_sundance, ORIENTATION_FLIP_X ^ ROT270, "Cinematronics", "Sundance", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_sundance )
|
||||
GAMEL( 1979, tailg, 0, tailg, tailg, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Tailgunner", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_tailg )
|
||||
GAME( 1979, warrior, 0, warrior, warrior, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Vectorbeam", "Warrior", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1980, armora, 0, armora, armora, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Armor Attack", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_armora )
|
||||
GAMEL( 1980, armorap, armora, armora, armora, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Armor Attack (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_armora )
|
||||
GAMEL( 1980, armorar, armora, armora, armora, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Rock-Ola license)", "Armor Attack (Rock-Ola)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_armora )
|
||||
GAME( 1980, ripoff, 0, ripoff, ripoff, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Rip Off", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1980, starcas, 0, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (version 3)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, starcas1, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (older)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, starcasp, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, starcase, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Mottoeis license)", "Star Castle (Mottoeis)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, stellcas, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "bootleg (Elettronolo)", "Stellar Castle (Elettronolo)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1981, spaceftr, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Zaccaria license)", "Space Fortress (Zaccaria)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1981, solarq, 0, solarq, solarq, cinemat_state, empty_init, ORIENTATION_FLIP_Y ^ ORIENTATION_FLIP_X, "Cinematronics", "Solar Quest", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_solarq )
|
||||
GAME( 1981, boxingb, 0, boxingb, boxingb, cinemat_state, init_boxingb, ORIENTATION_FLIP_Y, "Cinematronics", "Boxing Bugs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1981, wotw, 0, wotw, wotw, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "War of the Worlds", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_wotw )
|
||||
GAME( 1981, wotwc, wotw, wotwc, wotw, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "War of the Worlds (color)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1982, demon, 0, demon, demon, demon_state, empty_init, ORIENTATION_FLIP_Y, "Rock-Ola", "Demon", MACHINE_SUPPORTS_SAVE, layout_demon )
|
||||
GAME( 1982, qb3, 0, qb3, qb3, qb3_state, init_qb3, ORIENTATION_FLIP_Y, "Rock-Ola", "QB-3 (prototype)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1977, spacewar, 0, spacewar, spacewar, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Space Wars", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1978, spaceshp, spacewar, spacewar, spaceshp, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Sega license)", "Space Ship", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1979, barrier, 0, barrier, barrier, cinemat_state, empty_init, ORIENTATION_FLIP_X ^ ROT270, "Cinematronics (Vectorbeam license)", "Barrier", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_barrier ) // developed by Cinematronics, then (when they noticed it wasn't going to be a successful game) sold to Vectorbeam, and ultimately back in the hands of Cinematronics again after they bought the dying company Vectorbeam
|
||||
GAME( 1979, speedfrk, 0, speedfrk, speedfrk, cinemat_state, init_speedfrk, ORIENTATION_FLIP_Y, "Vectorbeam", "Speed Freak", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1979, starhawk, 0, starhawk, starhawk, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Hawk", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1979, sundance, 0, sundance, sundance, cinemat_16level_state, init_sundance, ORIENTATION_FLIP_X ^ ROT270, "Cinematronics", "Sundance", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_sundance )
|
||||
GAMEL( 1979, tailg, 0, tailg, tailg, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Tailgunner", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_tailg )
|
||||
GAME( 1979, warrior, 0, warrior, warrior, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Vectorbeam", "Warrior", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1980, armora, 0, armora, armora, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Armor Attack", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_armora )
|
||||
GAMEL( 1980, armorap, armora, armora, armora, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Armor Attack (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_armora )
|
||||
GAMEL( 1980, armorar, armora, armora, armora, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Rock-Ola license)", "Armor Attack (Rock-Ola)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_armora )
|
||||
GAME( 1980, ripoff, 0, ripoff, ripoff, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Rip Off", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1980, starcas, 0, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (version 3)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, starcas1, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (older)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, starcasp, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "Star Castle (prototype)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, starcase, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Mottoeis license)", "Star Castle (Mottoeis)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1980, stellcas, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "bootleg (Elettronolo)", "Stellar Castle (Elettronolo)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1981, spaceftr, starcas, starcas, starcas, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics (Zaccaria license)", "Space Fortress (Zaccaria)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_starcas )
|
||||
GAMEL( 1981, solarq, 0, solarq, solarq, cinemat_64level_state, empty_init, ORIENTATION_FLIP_Y ^ ORIENTATION_FLIP_X, "Cinematronics", "Solar Quest", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_solarq )
|
||||
GAME( 1981, boxingb, 0, boxingb, boxingb, cinemat_color_state, init_boxingb, ORIENTATION_FLIP_Y, "Cinematronics", "Boxing Bugs", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1981, wotw, 0, wotw, wotw, cinemat_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "War of the Worlds", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_wotw )
|
||||
GAME( 1981, wotwc, wotw, wotwc, wotw, cinemat_color_state, empty_init, ORIENTATION_FLIP_Y, "Cinematronics", "War of the Worlds (color)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
|
||||
GAMEL( 1982, demon, 0, demon, demon, demon_state, empty_init, ORIENTATION_FLIP_Y, "Rock-Ola", "Demon", MACHINE_SUPPORTS_SAVE, layout_demon )
|
||||
GAME( 1982, qb3, 0, qb3, qb3, qb3_state, init_qb3, ORIENTATION_FLIP_Y, "Rock-Ola", "QB-3 (prototype)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -62,13 +62,10 @@ public:
|
||||
uint32_t m_last_shift2;
|
||||
uint32_t m_current_pitch;
|
||||
uint32_t m_last_frame;
|
||||
float m_target_volume;
|
||||
float m_current_volume;
|
||||
uint8_t m_coin_detected;
|
||||
uint8_t m_coin_last_reset;
|
||||
uint8_t m_mux_select;
|
||||
int m_gear;
|
||||
int m_color_mode;
|
||||
rgb_t m_vector_color;
|
||||
int16_t m_lastx;
|
||||
int16_t m_lasty;
|
||||
@ -80,25 +77,30 @@ public:
|
||||
WRITE_LINE_MEMBER(mux_select_w);
|
||||
DECLARE_READ8_MEMBER(speedfrk_wheel_r);
|
||||
DECLARE_READ8_MEMBER(speedfrk_gear_r);
|
||||
DECLARE_READ8_MEMBER(sundance_inputs_r);
|
||||
DECLARE_READ8_MEMBER(boxingb_dial_r);
|
||||
virtual DECLARE_WRITE_LINE_MEMBER(vector_control_w);
|
||||
DECLARE_READ8_MEMBER(joystick_read);
|
||||
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
|
||||
void init_speedfrk();
|
||||
void init_boxingb();
|
||||
void init_sundance();
|
||||
uint32_t screen_update_cinemat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_spacewar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void cinemat_vector_callback(int16_t sx, int16_t sy, int16_t ex, int16_t ey, uint8_t shift);
|
||||
void ripoff(machine_config &config);
|
||||
void wotw(machine_config &config);
|
||||
void speedfrk(machine_config &config);
|
||||
void starcas(machine_config &config);
|
||||
void spacewar(machine_config &config);
|
||||
void tailg(machine_config &config);
|
||||
void warrior(machine_config &config);
|
||||
void starhawk(machine_config &config);
|
||||
void barrier(machine_config &config);
|
||||
void armora(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
virtual void sound_start() override;
|
||||
virtual void sound_reset() override;
|
||||
virtual void video_start() override;
|
||||
DECLARE_VIDEO_START(cinemat_16level);
|
||||
DECLARE_VIDEO_START(cinemat_64level);
|
||||
DECLARE_VIDEO_START(cinemat_color);
|
||||
uint32_t screen_update_cinemat(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
uint32_t screen_update_spacewar(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
void cinemat_vector_callback(int16_t sx, int16_t sy, int16_t ex, int16_t ey, uint8_t shift);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(spacewar_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(spacewar_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(spacewar_sound2_w);
|
||||
@ -116,12 +118,6 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(starhawk_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(starhawk_sound4_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(starhawk_sound7_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound4_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound7_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(tailg_sound_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(warrior_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(warrior_sound1_w);
|
||||
@ -143,58 +139,103 @@ public:
|
||||
DECLARE_WRITE_LINE_MEMBER(starcas_sound2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(starcas_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(starcas_sound4_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(solarq_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(solarq_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(solarq_sound4_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound4_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(wotw_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(wotw_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(wotw_sound2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(wotw_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(wotw_sound4_w);
|
||||
|
||||
void cinemat_nojmi_4k(machine_config &config);
|
||||
void cinemat_jmi_4k(machine_config &config);
|
||||
void cinemat_nojmi_8k(machine_config &config);
|
||||
void cinemat_jmi_8k(machine_config &config);
|
||||
void cinemat_jmi_16k(machine_config &config);
|
||||
void cinemat_jmi_32k(machine_config &config);
|
||||
void ripoff(machine_config &config);
|
||||
void wotwc(machine_config &config);
|
||||
void wotw(machine_config &config);
|
||||
void boxingb(machine_config &config);
|
||||
void speedfrk(machine_config &config);
|
||||
void sundance(machine_config &config);
|
||||
void starcas(machine_config &config);
|
||||
void spacewar(machine_config &config);
|
||||
void solarq(machine_config &config);
|
||||
void tailg(machine_config &config);
|
||||
void warrior(machine_config &config);
|
||||
void starhawk(machine_config &config);
|
||||
void barrier(machine_config &config);
|
||||
void armora(machine_config &config);
|
||||
|
||||
void spacewar_sound(machine_config &config);
|
||||
void barrier_sound(machine_config &config);
|
||||
void speedfrk_sound(machine_config &config);
|
||||
void starhawk_sound(machine_config &config);
|
||||
void sundance_sound(machine_config &config);
|
||||
void tailg_sound(machine_config &config);
|
||||
void warrior_sound(machine_config &config);
|
||||
void armora_sound(machine_config &config);
|
||||
void ripoff_sound(machine_config &config);
|
||||
void starcas_sound(machine_config &config);
|
||||
void solarq_sound(machine_config &config);
|
||||
void boxingb_sound(machine_config &config);
|
||||
void wotw_sound(machine_config &config);
|
||||
void data_map(address_map &map);
|
||||
void io_map(address_map &map);
|
||||
void program_map_16k(address_map &map);
|
||||
void program_map_32k(address_map &map);
|
||||
|
||||
void program_map_4k(address_map &map);
|
||||
void program_map_8k(address_map &map);
|
||||
void program_map_16k(address_map &map);
|
||||
void program_map_32k(address_map &map);
|
||||
void data_map(address_map &map);
|
||||
void io_map(address_map &map);
|
||||
};
|
||||
|
||||
|
||||
class cinemat_16level_state : public cinemat_state
|
||||
{
|
||||
public:
|
||||
using cinemat_state::cinemat_state;
|
||||
|
||||
void init_sundance();
|
||||
|
||||
void sundance(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual DECLARE_WRITE_LINE_MEMBER(vector_control_w) override;
|
||||
DECLARE_READ8_MEMBER(sundance_inputs_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound4_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(sundance_sound7_w);
|
||||
|
||||
void sundance_sound(machine_config &config);
|
||||
};
|
||||
|
||||
|
||||
class cinemat_64level_state : public cinemat_state
|
||||
{
|
||||
public:
|
||||
using cinemat_state::cinemat_state;
|
||||
|
||||
void solarq(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual DECLARE_WRITE_LINE_MEMBER(vector_control_w) override;
|
||||
DECLARE_WRITE_LINE_MEMBER(solarq_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(solarq_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(solarq_sound4_w);
|
||||
|
||||
void solarq_sound(machine_config &config);
|
||||
|
||||
private:
|
||||
float m_target_volume;
|
||||
float m_current_volume;
|
||||
};
|
||||
|
||||
|
||||
class cinemat_color_state : public cinemat_state
|
||||
{
|
||||
public:
|
||||
using cinemat_state::cinemat_state;
|
||||
|
||||
void init_boxingb();
|
||||
|
||||
void boxingb(machine_config &config);
|
||||
void wotwc(machine_config &config);
|
||||
|
||||
protected:
|
||||
virtual DECLARE_WRITE_LINE_MEMBER(vector_control_w) override;
|
||||
DECLARE_READ8_MEMBER(boxingb_dial_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound0_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound1_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound2_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound3_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(boxingb_sound4_w);
|
||||
|
||||
void boxingb_sound(machine_config &config);
|
||||
};
|
||||
|
||||
|
||||
|
@ -7,26 +7,9 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/ccpu/ccpu.h"
|
||||
#include "includes/cinemat.h"
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Constants
|
||||
*
|
||||
*************************************/
|
||||
|
||||
enum
|
||||
{
|
||||
COLOR_BILEVEL,
|
||||
COLOR_16LEVEL,
|
||||
COLOR_64LEVEL,
|
||||
COLOR_RGB
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Vector rendering
|
||||
@ -70,55 +53,52 @@ void cinemat_state::cinemat_vector_callback(int16_t sx, int16_t sy, int16_t ex,
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_state::vector_control_w)
|
||||
{
|
||||
// TODO: turn this into a virtual method and just override for each type
|
||||
int r, g, b, i;
|
||||
cpu_device *cpu = m_maincpu;
|
||||
/* color is either bright or dim, selected by the value sent to the port */
|
||||
m_vector_color = state ? rgb_t(0x80,0x80,0x80) : rgb_t(0xff,0xff,0xff);
|
||||
}
|
||||
|
||||
switch (m_color_mode)
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_16level_state::vector_control_w)
|
||||
{
|
||||
/* on the rising edge of the data value, latch bits 0-3 of the */
|
||||
/* X register as the intensity */
|
||||
if (state)
|
||||
{
|
||||
case COLOR_BILEVEL:
|
||||
/* color is either bright or dim, selected by the value sent to the port */
|
||||
m_vector_color = state ? rgb_t(0x80,0x80,0x80) : rgb_t(0xff,0xff,0xff);
|
||||
break;
|
||||
int xval = m_maincpu->state_int(ccpu_cpu_device::CCPU_X) & 0x0f;
|
||||
int i = (xval + 1) * 255 / 16;
|
||||
m_vector_color = rgb_t(i,i,i);
|
||||
}
|
||||
}
|
||||
|
||||
case COLOR_16LEVEL:
|
||||
/* on the rising edge of the data value, latch bits 0-3 of the */
|
||||
/* X register as the intensity */
|
||||
if (state)
|
||||
{
|
||||
int xval = cpu->state_int(ccpu_cpu_device::CCPU_X) & 0x0f;
|
||||
i = (xval + 1) * 255 / 16;
|
||||
m_vector_color = rgb_t(i,i,i);
|
||||
}
|
||||
break;
|
||||
|
||||
case COLOR_64LEVEL:
|
||||
/* on the rising edge of the data value, latch bits 2-7 of the */
|
||||
/* X register as the intensity */
|
||||
if (state)
|
||||
{
|
||||
int xval = cpu->state_int(ccpu_cpu_device::CCPU_X);
|
||||
xval = (~xval >> 2) & 0x3f;
|
||||
i = (xval + 1) * 255 / 64;
|
||||
m_vector_color = rgb_t(i,i,i);
|
||||
}
|
||||
break;
|
||||
WRITE_LINE_MEMBER(cinemat_64level_state::vector_control_w)
|
||||
{
|
||||
/* on the rising edge of the data value, latch bits 2-7 of the */
|
||||
/* X register as the intensity */
|
||||
if (state)
|
||||
{
|
||||
int xval = m_maincpu->state_int(ccpu_cpu_device::CCPU_X);
|
||||
xval = (~xval >> 2) & 0x3f;
|
||||
int i = (xval + 1) * 255 / 64;
|
||||
m_vector_color = rgb_t(i, i, i);
|
||||
}
|
||||
}
|
||||
|
||||
case COLOR_RGB:
|
||||
/* on the rising edge of the data value, latch the X register */
|
||||
/* as 4-4-4 BGR values */
|
||||
if (state)
|
||||
{
|
||||
int xval = cpu->state_int(ccpu_cpu_device::CCPU_X);
|
||||
r = (~xval >> 0) & 0x0f;
|
||||
r = r * 255 / 15;
|
||||
g = (~xval >> 4) & 0x0f;
|
||||
g = g * 255 / 15;
|
||||
b = (~xval >> 8) & 0x0f;
|
||||
b = b * 255 / 15;
|
||||
m_vector_color = rgb_t(r,g,b);
|
||||
}
|
||||
break;
|
||||
|
||||
WRITE_LINE_MEMBER(cinemat_color_state::vector_control_w)
|
||||
{
|
||||
/* on the rising edge of the data value, latch the X register */
|
||||
/* as 4-4-4 BGR values */
|
||||
if (state)
|
||||
{
|
||||
int xval = m_maincpu->state_int(ccpu_cpu_device::CCPU_X);
|
||||
int r = (~xval >> 0) & 0x0f;
|
||||
r = r * 255 / 15;
|
||||
int g = (~xval >> 4) & 0x0f;
|
||||
g = g * 255 / 15;
|
||||
int b = (~xval >> 8) & 0x0f;
|
||||
b = b * 255 / 15;
|
||||
m_vector_color = rgb_t(r,g,b);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,37 +136,6 @@ WRITE_LINE_MEMBER(qb3_state::vector_control_w)
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Video startup
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void cinemat_state::video_start()
|
||||
{
|
||||
m_color_mode = COLOR_BILEVEL;
|
||||
}
|
||||
|
||||
|
||||
VIDEO_START_MEMBER(cinemat_state,cinemat_16level)
|
||||
{
|
||||
m_color_mode = COLOR_16LEVEL;
|
||||
}
|
||||
|
||||
|
||||
VIDEO_START_MEMBER(cinemat_state,cinemat_64level)
|
||||
{
|
||||
m_color_mode = COLOR_64LEVEL;
|
||||
}
|
||||
|
||||
|
||||
VIDEO_START_MEMBER(cinemat_state,cinemat_color)
|
||||
{
|
||||
m_color_mode = COLOR_RGB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* End-of-frame
|
||||
|
Loading…
Reference in New Issue
Block a user