stfight: move ym2203 prescaler to driver init since cshootert doesn't need it

This commit is contained in:
hap 2021-04-24 18:07:22 +02:00
parent 054a467199
commit 272003ce8f
3 changed files with 7 additions and 20 deletions

View File

@ -246,7 +246,7 @@ TODO:
- handle transparency in text layer properly (how?) - handle transparency in text layer properly (how?)
- second bank of sf02 is this used? (probably NOT) - second bank of sf02 is this used? (probably NOT)
- empcity/stfight never writes the YM2203s' divider registers but it expects - empcity/stfight never writes the YM2203s' divider registers but it expects
0x2f, there's a workaround for it in machine_start 0x2f, there's a workaround for it in the driver init
- if empcity turns out to really be a bootleg, maybe it doesn't have an MCU, - if empcity turns out to really be a bootleg, maybe it doesn't have an MCU,
and instead does the ADPCM with the audiocpu? (see the driver notes above and instead does the ADPCM with the audiocpu? (see the driver notes above
mentioning an unused NMI handler) mentioning an unused NMI handler)
@ -1128,7 +1128,7 @@ ROM_END
// Note: Marked MACHINE_IMPERFECT_SOUND due to YM2203 clock issue // Note: Marked MACHINE_IMPERFECT_SOUND due to YM2203 clock issue
GAME( 1986, empcity, 0, stfight, stfight, stfight_state, init_empcity, ROT0, "Seibu Kaihatsu", "Empire City: 1931 (bootleg?)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, empcity, 0, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu", "Empire City: 1931 (bootleg?)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1986, empcityu, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Taito / Romstar license)", "Empire City: 1931 (US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // different title logo GAME( 1986, empcityu, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Taito / Romstar license)", "Empire City: 1931 (US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // different title logo
GAME( 1986, empcityj, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Taito license)", "Empire City: 1931 (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, empcityj, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Taito license)", "Empire City: 1931 (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1986, empcityi, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Eurobed license)", "Empire City: 1931 (Italy)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, empcityi, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Eurobed license)", "Empire City: 1931 (Italy)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
@ -1138,4 +1138,4 @@ GAME( 1986, stfighta, empcity, stfight, stfight, stfight_state, init_stfight,
GAME( 1986, stfightgb, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Tuning license)", "Street Fight (Germany - Benelux)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, stfightgb, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Tuning license)", "Street Fight (Germany - Benelux)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
// Cross Shooter uses the same base board, but different video board // Cross Shooter uses the same base board, but different video board
GAME( 1987, cshootert, airraid, cshooter, cshooter, stfight_state, init_cshooter, ROT270, "Seibu Kaihatsu (Taito license)", "Cross Shooter (2 PCB Stack)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1987, cshootert, airraid, cshooter, cshooter, stfight_state, empty_init, ROT270, "Seibu Kaihatsu (Taito license)", "Cross Shooter (2 PCB Stack)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )

View File

@ -42,8 +42,6 @@ public:
void cshooter(machine_config &config); void cshooter(machine_config &config);
void init_stfight(); void init_stfight();
void init_empcity();
void init_cshooter();
protected: protected:
enum enum

View File

@ -37,7 +37,7 @@ Encryption PAL 16R4 on CPU board
*/ */
void stfight_state::init_empcity() void stfight_state::init_stfight()
{ {
uint8_t *rom = memregion("maincpu")->base(); uint8_t *rom = memregion("maincpu")->base();
@ -62,15 +62,9 @@ void stfight_state::init_empcity()
( ~( ( src >> 6 ) ^ A ) & 0x01 ); ( ~( ( src >> 6 ) ^ A ) & 0x01 );
} }
} // Set clock prescaler FM:1/2 PSG:1/1
m_ym[0]->write(0, 0x2f);
void stfight_state::init_stfight() m_ym[1]->write(0, 0x2f);
{
init_empcity();
}
void stfight_state::init_cshooter()
{
} }
void stfight_state::machine_start() void stfight_state::machine_start()
@ -80,12 +74,7 @@ void stfight_state::machine_start()
m_int1_timer = timer_alloc(TIMER_STFIGHT_INTERRUPT_1); m_int1_timer = timer_alloc(TIMER_STFIGHT_INTERRUPT_1);
// Set clock prescaler FM:1/2 PSG:1/1
m_ym[0]->write(0, 0x2f);
m_ym[1]->write(0, 0x2f);
save_item(NAME(m_coin_state)); save_item(NAME(m_coin_state));
save_item(NAME(m_fm_data)); save_item(NAME(m_fm_data));
save_item(NAME(m_cpu_to_mcu_empty)); save_item(NAME(m_cpu_to_mcu_empty));