summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2021-04-24 18:07:22 +0200
committer hap <happppp@users.noreply.github.com>2021-04-24 18:07:33 +0200
commit272003ce8f887c743c5640d007094a736ab70a0b (patch)
tree6d8156b42e699e967ac093d7f54c09bce1c3fafc /src
parent054a467199a9514d0936d934c300b1e05cc608a8 (diff)
stfight: move ym2203 prescaler to driver init since cshootert doesn't need it
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/stfight.cpp6
-rw-r--r--src/mame/includes/stfight.h2
-rw-r--r--src/mame/machine/stfight.cpp19
3 files changed, 7 insertions, 20 deletions
diff --git a/src/mame/drivers/stfight.cpp b/src/mame/drivers/stfight.cpp
index 3ac62b09f74..69762699dcc 100644
--- a/src/mame/drivers/stfight.cpp
+++ b/src/mame/drivers/stfight.cpp
@@ -246,7 +246,7 @@ TODO:
- handle transparency in text layer properly (how?)
- second bank of sf02 is this used? (probably NOT)
- 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,
and instead does the ADPCM with the audiocpu? (see the driver notes above
mentioning an unused NMI handler)
@@ -1128,7 +1128,7 @@ ROM_END
// 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, 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 )
@@ -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 )
// 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 )
diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h
index 57f8600dca9..8435e099ec6 100644
--- a/src/mame/includes/stfight.h
+++ b/src/mame/includes/stfight.h
@@ -42,8 +42,6 @@ public:
void cshooter(machine_config &config);
void init_stfight();
- void init_empcity();
- void init_cshooter();
protected:
enum
diff --git a/src/mame/machine/stfight.cpp b/src/mame/machine/stfight.cpp
index cb8d0d848ef..e3f3d01a193 100644
--- a/src/mame/machine/stfight.cpp
+++ b/src/mame/machine/stfight.cpp
@@ -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();
@@ -62,15 +62,9 @@ void stfight_state::init_empcity()
( ~( ( src >> 6 ) ^ A ) & 0x01 );
}
-}
-
-void stfight_state::init_stfight()
-{
- init_empcity();
-}
-
-void stfight_state::init_cshooter()
-{
+ // Set clock prescaler FM:1/2 PSG:1/1
+ m_ym[0]->write(0, 0x2f);
+ m_ym[1]->write(0, 0x2f);
}
void stfight_state::machine_start()
@@ -80,12 +74,7 @@ void stfight_state::machine_start()
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_fm_data));
save_item(NAME(m_cpu_to_mcu_empty));