summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/stfight.c32
-rw-r--r--src/mame/includes/stfight.h1
-rw-r--r--src/mame/machine/stfight.c21
3 files changed, 45 insertions, 9 deletions
diff --git a/src/mame/drivers/stfight.c b/src/mame/drivers/stfight.c
index 81fadc39ede..e69852331d0 100644
--- a/src/mame/drivers/stfight.c
+++ b/src/mame/drivers/stfight.c
@@ -218,8 +218,8 @@ conventional RAM. See the memory map for sprite data format.
****************************************************************************
TODO:
-- MCU is identical between Empire City and Cross Shooter, I guess it's coinage
- related.
+- MCU is identical between Empire City and Cross Shooter, it's ADPCM and
+ perhaps coinage related too.
- palette is incorporated - fix!!!
- handle transparency in text layer properly (how?)
- second bank of sf02 is this used? (probably NOT)
@@ -263,6 +263,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( cshooter_cpu1_map, AS_PROGRAM, 8, stfight_state )
/* wants 0xff at PC=0x9a otherwise it won't boot, MCU related? */
AM_RANGE(0x0007, 0x0007) AM_READ(cshooter_mcu_unk1_r)
+ AM_RANGE(0xc500, 0xc500) AM_WRITE(cshooter_fm_w) /* play fm sound */
AM_RANGE(0xc801, 0xc801) AM_WRITE(stfight_bank_w)
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_text_w) AM_SHARE("tx_vram")
AM_RANGE(0xe000, 0xfdff) AM_RAM
@@ -533,8 +534,10 @@ static MACHINE_CONFIG_START( stfight, stfight_state )
MCFG_CPU_PROGRAM_MAP(cpu2_map)
MCFG_CPU_PERIODIC_INT_DRIVER(stfight_state, irq0_line_hold, 120)
- MCFG_QUANTUM_TIME(attotime::from_hz(600))
+ MCFG_CPU_ADD("mcu", M68705, 6000000) /* 6 MHz? */
+ MCFG_CPU_PROGRAM_MAP(cshooter_mcu_map)
+ MCFG_QUANTUM_TIME(attotime::from_hz(600))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
@@ -580,9 +583,6 @@ static MACHINE_CONFIG_DERIVED( cshooter, stfight )
MCFG_QUANTUM_TIME(attotime::from_hz(600))
- MCFG_CPU_ADD("mcu", M68705, 6000000) /* 6 MHz? */
- MCFG_CPU_PROGRAM_MAP(cshooter_mcu_map)
-
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(stfight_state, screen_update_cshooter)
@@ -660,6 +660,10 @@ ROM_START( empcityu )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
ROM_LOAD( "ec_04.rom", 0x0000, 0x8000, CRC(aa3e7d1e) SHA1(da350384d55f011253d19ce17fc327cd2604257f) )
+ // not hooked up yet, what's it for, coinage?
+ ROM_REGION( 0x0800, "mcu", 0 )
+ ROM_LOAD( "empirecity_68705.bin", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) )
+
ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */
ROM_LOAD( "vid.2p", 0x0000, 0x2000, CRC(15593793) SHA1(ac9ca8a0aa0ce3810f45aa41e74d4946ecced245) )
@@ -714,6 +718,10 @@ ROM_START( empcityj )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
ROM_LOAD( "ec_04.rom", 0x0000, 0x8000, CRC(aa3e7d1e) SHA1(da350384d55f011253d19ce17fc327cd2604257f) )
+ // not hooked up yet, what's it for, coinage?
+ ROM_REGION( 0x0800, "mcu", 0 )
+ ROM_LOAD( "empirecity_68705.bin", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) )
+
ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */
ROM_LOAD( "sf17.bin", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) )
@@ -765,6 +773,10 @@ ROM_START( stfight )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
ROM_LOAD( "sf03.bin", 0x0000, 0x8000, CRC(6a8cb7a6) SHA1(dc123cc48d3623752b78e7c23dd8d2f5adf84f92) )
+ // not hooked up yet, what's it for, coinage?
+ ROM_REGION( 0x0800, "mcu", 0 )
+ ROM_LOAD( "empirecity_68705.bin", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) )
+
ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */
ROM_LOAD( "sf17.bin", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) )
@@ -818,6 +830,10 @@ ROM_START( stfighta )
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
ROM_LOAD( "sf03.bin", 0x0000, 0x8000, CRC(6a8cb7a6) SHA1(dc123cc48d3623752b78e7c23dd8d2f5adf84f92) )
+ // not hooked up yet, what's it for, coinage?
+ ROM_REGION( 0x0800, "mcu", 0 )
+ ROM_LOAD( "empirecity_68705.bin", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) )
+
ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */
ROM_LOAD( "sf17.bin", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) )
@@ -869,6 +885,10 @@ ROM_START( empcityi ) // very similar to above set
ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the second CPU */
ROM_LOAD( "sf03.bin", 0x0000, 0x8000, CRC(6a8cb7a6) SHA1(dc123cc48d3623752b78e7c23dd8d2f5adf84f92) )
+ // not hooked up yet, what's it for, coinage?
+ ROM_REGION( 0x0800, "mcu", 0 )
+ ROM_LOAD( "empirecity_68705.bin", 0x0000, 0x0800, CRC(182f7616) SHA1(38b4f23a559ae13f8ca1b974407a2a40fc52879f) )
+
ROM_REGION( 0x02000, "gfx1", 0 ) /* character data */
ROM_LOAD( "sf17.bin", 0x0000, 0x2000, CRC(1b3706b5) SHA1(61f069329a7a836523ffc8cce915b0d0129fd896) )
diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h
index fab3a50b24f..79f22ef60a6 100644
--- a/src/mame/includes/stfight.h
+++ b/src/mame/includes/stfight.h
@@ -45,6 +45,7 @@ public:
DECLARE_WRITE8_MEMBER(stfight_coin_w);
DECLARE_WRITE8_MEMBER(stfight_e800_w);
DECLARE_WRITE8_MEMBER(stfight_fm_w);
+ DECLARE_WRITE8_MEMBER(cshooter_fm_w);
DECLARE_READ8_MEMBER(stfight_fm_r);
DECLARE_WRITE8_MEMBER(stfight_bank_w);
DECLARE_WRITE8_MEMBER(stfight_text_char_w);
diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c
index cf0393754a2..04c030e15df 100644
--- a/src/mame/machine/stfight.c
+++ b/src/mame/machine/stfight.c
@@ -245,6 +245,11 @@ WRITE8_MEMBER(stfight_state::stfight_adpcm_control_w)
m_adpcm_data_end = sampleLimits[data+1];
}
+ m_mcu->set_input_line(0, HOLD_LINE);
+ m_from_main = data;
+ m_main_sent = 1;
+// m_maincpu->set_input_line(INPUT_LINE_NMI,PULSE_LINE);
+
m_msm->reset_w(BIT(data, 3));
}
@@ -262,6 +267,11 @@ WRITE8_MEMBER(stfight_state::stfight_fm_w)
m_fm_data = 0x80 ^ data;
}
+WRITE8_MEMBER(stfight_state::cshooter_fm_w)
+{
+ m_fm_data = data;
+}
+
READ8_MEMBER(stfight_state::stfight_fm_r)
{
int data = m_fm_data;
@@ -307,6 +317,8 @@ READ8_MEMBER(stfight_state::cshooter_68705_port_a_r)
WRITE8_MEMBER(stfight_state::cshooter_68705_port_a_w)
{
+ // ADPCM start offset goes there
+ // TODO: where's end offset?
m_portA_out = data;
}
@@ -339,10 +351,13 @@ WRITE8_MEMBER(stfight_state::cshooter_68705_port_b_w)
}
if ((m_ddrB & 0x20) && (data & 0x20) && (~m_portB_out & 0x20))
{
- m_portA_in = m_from_main;
+ //printf("bit 5\n");
+ m_portB_in = m_from_main;
- //if (m_main_sent)
- // m_mcu->set_input_line(0, CLEAR_LINE);
+ if (m_main_sent)
+ {
+ //m_mcu->set_input_line(0, CLEAR_LINE);
+ }
m_main_sent = 0;
}