galaxian.cpp: Miscellaneous configuration cleanups and corrections (nw)

- 555 star blinking timer is only present on Scramble, Super Cobra and similar hardware
- Explorer (Sidam) uses two AY-3-8912 (and no 555 timer)
- Add the (first) two 8255 PPIs only in konami_base, and stop removing and readding these in derivative configurations
This commit is contained in:
AJR 2017-09-02 17:12:47 -04:00
parent fe810ad8b5
commit 91af13496b
3 changed files with 35 additions and 81 deletions

View File

@ -5703,9 +5703,6 @@ static MACHINE_CONFIG_START( galaxian_base )
MCFG_SCREEN_UPDATE_DRIVER(galaxian_state, screen_update_galaxian)
/* blinking frequency is determined by 555 counter with Ra=100k, Rb=10k, C=10uF */
MCFG_TIMER_DRIVER_ADD_PERIODIC("stars", galaxian_state, galaxian_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001))
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("speaker")
MACHINE_CONFIG_END
@ -5727,6 +5724,13 @@ static MACHINE_CONFIG_DERIVED( konami_base, galaxian_base )
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_1_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( scramble_base, konami_base )
MCFG_FRAGMENT_ADD(konami_sound_2x_ay8910)
/* blinking frequency is determined by 555 counter with Ra=100k, Rb=10k, C=10uF */
MCFG_TIMER_DRIVER_ADD_PERIODIC("stars", galaxian_state, scramble_stars_blink_timer, PERIOD_OF_555_ASTABLE(100000, 10000, 0.00001))
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( konami_sound_1x_ay8910 )
@ -6048,43 +6052,24 @@ static MACHINE_CONFIG_DERIVED( turpins, turtles )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( theend, galaxian_base )
static MACHINE_CONFIG_DERIVED( theend, konami_base )
MCFG_FRAGMENT_ADD(konami_sound_2x_ay8910)
/* alternate memory map */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(theend_map)
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
MCFG_DEVICE_MODIFY("ppi8255_0")
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, theend_coin_counter_w))
MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("soundlatch", generic_latch_8_device, write))
MCFG_I8255_OUT_PORTB_CB(WRITE8(galaxian_state, konami_sound_control_w))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN3"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_1_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( scramble, galaxian_base )
MCFG_FRAGMENT_ADD(konami_sound_2x_ay8910)
static MACHINE_CONFIG_DERIVED( scramble, scramble_base )
/* alternate memory map */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(theend_map)
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_0_w))
MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("soundlatch", generic_latch_8_device, write))
MCFG_I8255_OUT_PORTB_CB(WRITE8(galaxian_state, konami_sound_control_w))
MCFG_DEVICE_MODIFY("ppi8255_1")
MCFG_I8255_IN_PORTC_CB(READ8(galaxian_state, scramble_protection_r))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, scramble_protection_w))
MACHINE_CONFIG_END
@ -6103,17 +6088,17 @@ static MACHINE_CONFIG_DERIVED( explorer, galaxian_base )
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
/* sound hardware */
MCFG_SOUND_ADD("8910.0", AY8910, KONAMI_SOUND_CLOCK/8)
/* sound hardware is a pair of AY-3-8912 */
MCFG_SOUND_ADD("8910.0", AY8912, KONAMI_SOUND_CLOCK/8)
MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, explorer_sound_latch_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MCFG_SOUND_ADD("8910.1", AY8910, KONAMI_SOUND_CLOCK/8)
MCFG_SOUND_ADD("8910.1", AY8912, KONAMI_SOUND_CLOCK/8)
MCFG_AY8910_PORT_A_READ_CB(READ8(galaxian_state, konami_sound_timer_r))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( takeoff, explorer ) // takeoff shares the same main map as explorer, but uses only an AY8912 for sound.
static MACHINE_CONFIG_DERIVED( takeoff, explorer ) // takeoff shares the same main map as explorer, but uses only one AY8912 for sound.
MCFG_SOUND_MODIFY("maincpu")
MCFG_DEVICE_CLOCK(XTAL_12MHz / 8) // XTAL verified, divider not verified
@ -6133,20 +6118,12 @@ static MACHINE_CONFIG_DERIVED( takeoff, explorer ) // takeoff shares the same ma
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 0.25)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( scorpion, theend )
static MACHINE_CONFIG_DERIVED( scorpion, scramble_base )
/* alternate memory map */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(theend_map)
MCFG_DEVICE_REMOVE("ppi8255_0")
MCFG_DEVICE_REMOVE("ppi8255_1")
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_0_w))
MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("soundlatch", generic_latch_8_device, write))
MCFG_I8255_OUT_PORTB_CB(WRITE8(galaxian_state, konami_sound_control_w))
MCFG_DEVICE_MODIFY("ppi8255_1")
MCFG_I8255_IN_PORTC_CB(READ8(galaxian_state, scorpion_protection_r))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, scorpion_protection_w))
@ -6161,9 +6138,7 @@ static MACHINE_CONFIG_DERIVED( scorpion, theend )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sfx, galaxian_base )
MCFG_FRAGMENT_ADD(konami_sound_2x_ay8910)
static MACHINE_CONFIG_DERIVED( sfx, scramble_base )
MCFG_DEVICE_REMOVE("watchdog")
/* alternate memory map */
@ -6175,18 +6150,6 @@ static MACHINE_CONFIG_DERIVED( sfx, galaxian_base )
MCFG_CPU_PROGRAM_MAP(sfx_sample_map)
MCFG_CPU_IO_MAP(sfx_sample_portmap)
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_0_w))
MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("soundlatch", generic_latch_8_device, write))
MCFG_I8255_OUT_PORTB_CB(WRITE8(galaxian_state, konami_sound_control_w))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN3"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_1_w))
MCFG_DEVICE_ADD("ppi8255_2", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(DEVREAD8("soundlatch2", generic_latch_8_device, read))
@ -6210,11 +6173,9 @@ static MACHINE_CONFIG_DERIVED( monsterz, sfx )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(monsterz_map)
MCFG_DEVICE_REMOVE("ppi8255_1")
MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
MCFG_DEVICE_MODIFY("ppi8255_1")
MCFG_I8255_OUT_PORTA_CB(WRITE8(galaxian_state, monsterz_porta_1_w))
MCFG_I8255_OUT_PORTB_CB(WRITE8(galaxian_state, monsterz_portb_1_w))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN3"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, monsterz_portc_1_w))
/* there are likely other differences too, but those can wait until after protection is sorted out */
@ -6222,9 +6183,7 @@ static MACHINE_CONFIG_DERIVED( monsterz, sfx )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( scobra, konami_base )
MCFG_FRAGMENT_ADD(konami_sound_2x_ay8910)
static MACHINE_CONFIG_DERIVED( scobra, scramble_base )
/* alternate memory map */
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(scobra_map)
@ -6335,21 +6294,9 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( moonwar, scobra )
MCFG_DEVICE_REMOVE("ppi8255_0")
MCFG_DEVICE_REMOVE("ppi8255_1")
MCFG_DEVICE_ADD("ppi8255_0", I8255A, 0)
MCFG_I8255_IN_PORTA_CB(IOPORT("IN0"))
MCFG_I8255_IN_PORTB_CB(IOPORT("IN1"))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN2"))
MCFG_DEVICE_MODIFY("ppi8255_0")
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, moonwar_port_select_w))
MCFG_DEVICE_ADD("ppi8255_1", I8255A, 0)
MCFG_I8255_OUT_PORTA_CB(DEVWRITE8("soundlatch", generic_latch_8_device, write))
MCFG_I8255_OUT_PORTB_CB(WRITE8(galaxian_state, konami_sound_control_w))
MCFG_I8255_IN_PORTC_CB(IOPORT("IN3"))
MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, konami_portc_1_w))
MCFG_PALETTE_MODIFY("palette")
MCFG_PALETTE_INIT_OWNER(galaxian_state,moonwar) // bullets are less yellow
MACHINE_CONFIG_END
@ -7210,6 +7157,12 @@ DRIVER_INIT_MEMBER(galaxian_state,scramble)
common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
}
DRIVER_INIT_MEMBER(galaxian_state,explorer)
{
// not sure how stars work here, but there is definitely no 555 timer
common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
}
DRIVER_INIT_MEMBER(galaxian_state,mandinga)
{
DRIVER_INIT_CALL(scramble);
@ -12153,13 +12106,13 @@ GAME( 1982, mandinga, amidar, scramble, amidars, galaxian_state, mandi
/* The End/Scramble based hardware */
GAME( 1980, theend, 0, theend, theend, galaxian_state, theend, ROT90, "Konami", "The End", MACHINE_SUPPORTS_SAVE )
GAME( 1980, theends, theend, theend, theend, galaxian_state, theend, ROT90, "Konami (Stern Electronics license)", "The End (Stern Electronics)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, takeoff, theend, takeoff, explorer, galaxian_state, scramble, ROT90, "bootleg (Sidam)", "Take Off (bootleg of The End)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // tempo is way too fast
GAME( 1980, takeoff, theend, takeoff, explorer, galaxian_state, explorer, ROT90, "bootleg (Sidam)", "Take Off (bootleg of The End)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // tempo is way too fast
GAME( 1981, scramble, 0, scramble, scramble, galaxian_state, scramble, ROT90, "Konami", "Scramble", MACHINE_SUPPORTS_SAVE )
GAME( 1981, scrambles, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "Konami (Stern Electronics license)", "Scramble (Stern Electronics set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, scrambles2, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "Konami (Stern Electronics license)", "Scramble (Stern Electronics set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, strfbomb, scramble, scramble, strfbomb, galaxian_state, scramble, ROT90, "bootleg (Omni)", "Strafe Bomb (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, explorer, scramble, explorer, explorer, galaxian_state, scramble, ROT90, "bootleg (Sidam)", "Explorer (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, explorer, scramble, explorer, explorer, galaxian_state, explorer, ROT90, "bootleg (Sidam)", "Explorer (bootleg of Scramble)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, scramblebf, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Karateco)", "Scramble (Karateco, French bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, scrambp, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Billport S.A.)", "Impacto (Billport S.A., Spanish bootleg of Scramble)", MACHINE_SUPPORTS_SAVE ) // similar to the Karateco set above
GAME( 1981, scramce, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Centromatic S.A.)", "Scramble (Centromatic S.A., Spanish bootleg)", MACHINE_SUPPORTS_SAVE ) // similar to above

View File

@ -243,6 +243,7 @@ public:
DECLARE_DRIVER_INIT(thepitm);
DECLARE_DRIVER_INIT(theend);
DECLARE_DRIVER_INIT(scramble);
DECLARE_DRIVER_INIT(explorer);
DECLARE_DRIVER_INIT(mandinga);
DECLARE_DRIVER_INIT(sfx);
DECLARE_DRIVER_INIT(atlantis);
@ -275,7 +276,7 @@ public:
INTERRUPT_GEN_MEMBER(interrupt_gen);
INTERRUPT_GEN_MEMBER(fakechange_interrupt_gen);
TIMER_DEVICE_CALLBACK_MEMBER(checkmaj_irq0_gen);
TIMER_DEVICE_CALLBACK_MEMBER(galaxian_stars_blink_timer);
TIMER_DEVICE_CALLBACK_MEMBER(scramble_stars_blink_timer);
TIMER_DEVICE_CALLBACK_MEMBER(timefgtr_scanline);
void state_save_register();
void sprites_draw(bitmap_rgb32 &bitmap, const rectangle &cliprect, const uint8_t *spritebase);

View File

@ -846,7 +846,7 @@ void galaxian_state::stars_update_origin()
*
*************************************/
TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::galaxian_stars_blink_timer)
TIMER_DEVICE_CALLBACK_MEMBER(galaxian_state::scramble_stars_blink_timer)
{
m_stars_blink_state++;
}