summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author braintro <briantro@users.noreply.github.com>2020-07-10 19:06:53 -0500
committer braintro <briantro@users.noreply.github.com>2020-07-10 19:06:53 -0500
commite26fb516d02462453310817aae0386185fd7615b (patch)
treee89c18f9f34fd517bf6ef6c69ebaa84d7c9c67b5
parent1fdd4cd212cccfcc14c7f23010119c9137e72469 (diff)
m72.cpp: Dumped the Image Fight (World) i8751 MCU. [Hammy, TeamEurope, The Dumping Union]
-rw-r--r--src/mame/drivers/m72.cpp53
-rw-r--r--src/mame/includes/m72.h6
-rw-r--r--src/mame/video/m72.cpp10
3 files changed, 17 insertions, 52 deletions
diff --git a/src/mame/drivers/m72.cpp b/src/mame/drivers/m72.cpp
index 22a7e314872..41e344f84b7 100644
--- a/src/mame/drivers/m72.cpp
+++ b/src/mame/drivers/m72.cpp
@@ -454,20 +454,12 @@ void m72_state::nspirit_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask)
if (ACCESSING_BITS_0_7 && (data & 0xff) < 9) m_audio->set_sample_start(a[data & 0xff]);
}
-void m72_state::imgfight_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask)
-{
- static const int a[7] = { 0x0000, 0x0020, 0x44e0, 0x98a0, 0xc820, 0xf7a0, 0x108c0 };
- if (ACCESSING_BITS_0_7 && (data & 0xff) < 7) m_audio->set_sample_start(a[data & 0xff]);
-}
-
void m72_state::loht_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask)
{
static const int a[7] = { 0x0000, 0x0020, 0, 0x2c40, 0x4320, 0x7120, 0xb200 };
if (ACCESSING_BITS_0_7 && (data & 0xff) < 7) m_audio->set_sample_start(a[data & 0xff]);
}
-
-
void m72_state::dbreedm72_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask)
{
static const int a[9] = { 0x00000, 0x00020, 0x02c40, 0x08160, 0x0c8c0, 0x0ffe0, 0x13000, 0x15820, 0x15f40 };
@@ -576,34 +568,15 @@ static const u8 nspirit_code[CODE_LEN] =
};
static const u8 nspirit_crc[CRC_LEN] = { 0xfe,0x94,0x6e,0x4e, 0xc8,0x33,0xa7,0x2d,
0xf2,0xa3,0xf9,0xe1, 0xa9,0x6c,0x02,0x95, 0x00,0x00 };
-/* Image Fight */
-static const u8 imgfight_code[CODE_LEN] =
-{
- 0x68,0x00,0xa0, // push 0a000h
- 0x1f, // pop ds
- 0xc6,0x06,0x38,0x38,0x50, // mov [3838h], byte 050h
- 0xc6,0x06,0x3a,0x38,0x49, // mov [383ah], byte 049h
- 0xc6,0x06,0x3c,0x38,0x43, // mov [383ch], byte 043h
- 0xc6,0x06,0x3e,0x38,0x4b, // mov [383eh], byte 04bh
- 0xc6,0x06,0x40,0x38,0x45, // mov [3840h], byte 045h
- 0xc6,0x06,0x42,0x38,0x54, // mov [3842h], byte 054h
- 0x68,0x00,0xb0, // push 0b000h
- 0x1f, // pop ds
- 0xc6,0x06,0x00,0x09,0x49^0xff, // mov [0900h], byte 049h
- 0xc6,0x06,0x00,0x0a,0x49^0xff, // mov [0a00h], byte 049h
- 0xc6,0x06,0x00,0x0b,0x49^0xff, // mov [0b00h], byte 049h
- 0xc6,0x06,0x20,0x09,0x49^0xff, // mov [0920h], byte 049h
- 0xc6,0x06,0x21,0x09,0x4d^0xff, // mov [0921h], byte 04dh
- 0xc6,0x06,0x22,0x09,0x41^0xff, // mov [0922h], byte 041h
- 0xc6,0x06,0x23,0x09,0x47^0xff, // mov [0923h], byte 047h
- 0x68,0x00,0xd0, // push 0d000h
- 0x1f, // pop ds
- 0xea,0x00,0x00,0x40,0x00 // jmp 0040:$0000
-};
+/*
+// these are for the world set where we have the mcu anyway...
+static const u8 imgfight_crc[CRC_LEN] = { 0xf8,0x91,0xc0,0x58, 0x04,0x33,0xb6,0xc5,
+ 0xbf,0x37,0x92,0x94, 0x00,0x00 };
// these are for the japan set where we have the mcu anyway...
static const u8 imgfightj_crc[CRC_LEN] = { 0x7e,0xcc,0xec,0x03, 0x04,0x33,0xb6,0xc5,
0xbf,0x37,0x92,0x94, 0x00,0x00 };
+*/
/* Dragon Breed */
static const u8 dbreedm72_code[CODE_LEN] =
@@ -674,12 +647,6 @@ void m72_state::init_nspirit()
m_maincpu->space(AS_IO).install_write_handler(0xc0, 0xc1, write16s_delegate(*this, FUNC(m72_state::nspirit_sample_trigger_w)));
}
-void m72_state::init_imgfight()
-{
- install_protection_handler(imgfight_code,imgfightj_crc);
- m_maincpu->space(AS_IO).install_write_handler(0xc0, 0xc1, write16s_delegate(*this, FUNC(m72_state::imgfight_sample_trigger_w)));
-}
-
void m72_state::init_dbreedm72()
{
install_protection_handler(dbreedm72_code,dbreedm72_crc);
@@ -2079,10 +2046,10 @@ void m72_state::kengo(machine_config &config)
subdevice<v35_device>("maincpu")->set_decryption_table(gunforce_decryption_table);
}
-void m72_state::imgfightj(machine_config &config)
+void m72_state::imgfight(machine_config &config)
{
m72_8751(config);
- MCFG_VIDEO_START_OVERRIDE(m72_state,imgfightj)
+ MCFG_VIDEO_START_OVERRIDE(m72_state,imgfight)
}
void m72_state::nspiritj(machine_config &config)
@@ -2712,7 +2679,7 @@ ROM_START( imgfight )
ROM_RELOAD( 0xc0000, 0x20000 )
ROM_REGION( 0x10000, "mcu", 0 ) /* i8751 microcontroller */
- ROM_LOAD( "if_c-pr-a.ic1", 0x00000, 0x01000, NO_DUMP )
+ ROM_LOAD( "if_c-pr-a.ic1", 0x00000, 0x01000, CRC(55f10458) SHA1(d520ec2b075c94d76d97e0105644ff96384b378c) ) /* i8751 MCU labeled IF C-PR-A */
ROM_REGION( 0x080000, "sprites", 0 )
ROM_LOAD( "if-c-00.ic53", 0x00000, 0x20000, CRC(745e6638) SHA1(43fb1f9da4190fea67eee3aee8caf4219becc21b) ) /* sprites */
@@ -4325,8 +4292,8 @@ GAME( 1987, mrheli, bchopper, mrheli, bchopper, m72_state, init_m
GAME( 1988, nspirit, 0, m72, nspirit, m72_state, init_nspirit, ROT0, "Irem", "Ninja Spirit (World)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // doesn't wait / check for japan warning string.. fails rom check if used with japanese mcu rom (World version?)
GAME( 1988, nspiritj, nspirit, nspiritj, nspirit, m72_state, init_m72_8751, ROT0, "Irem", "Saigo no Nindou (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
-GAME( 1988, imgfight, 0, m72, imgfight, m72_state, init_imgfight, ROT270, "Irem", "Image Fight (World)", MACHINE_SUPPORTS_SAVE ) // doesn't wait / check for japan warning string.. fails rom check if used with japanese mcu rom (World version?)
-GAME( 1988, imgfightj, imgfight, imgfightj, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, imgfight, 0, imgfight, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (World)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, imgfightj, imgfight, imgfight, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (Japan)", MACHINE_SUPPORTS_SAVE )
GAME( 1988, imgfightb, imgfight, imgfightb, imgfight, m72_state, init_m72_8751, ROT270, "Irem", "Image Fight (Japan, bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // uses an 80c31 MCU, which isn't hooked up correctly yet. Gives 'RAM NG 7' error
GAME( 1989, loht, 0, m72_8751, loht, m72_state, init_m72_8751, ROT0, "Irem", "Legend of Hero Tonma (World)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/m72.h b/src/mame/includes/m72.h
index 550b72e2fc5..939b4cc407e 100644
--- a/src/mame/includes/m72.h
+++ b/src/mame/includes/m72.h
@@ -84,7 +84,7 @@ public:
void rtype(machine_config &config);
void imgfightb(machine_config &config);
void lohtb(machine_config &config);
- void imgfightj(machine_config &config);
+ void imgfight(machine_config &config);
void mrheli(machine_config &config);
void nspiritj(machine_config &config);
@@ -94,7 +94,6 @@ public:
void init_m72_8751();
void init_dbreedm72();
void init_nspirit();
- void init_imgfight();
private:
required_device<cpu_device> m_maincpu;
@@ -172,7 +171,6 @@ private:
// game specific
void bchopper_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void nspirit_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0);
- void imgfight_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void loht_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void dbreedm72_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void dkgenm72_sample_trigger_w(offs_t offset, u16 data, u16 mem_mask = ~0);
@@ -192,7 +190,7 @@ private:
void machine_start() override;
void machine_reset() override;
DECLARE_VIDEO_START(m72);
- DECLARE_VIDEO_START(imgfightj);
+ DECLARE_VIDEO_START(imgfight);
DECLARE_VIDEO_START(mrheli);
DECLARE_VIDEO_START(nspiritj);
DECLARE_VIDEO_START(xmultipl);
diff --git a/src/mame/video/m72.cpp b/src/mame/video/m72.cpp
index d231f61d1ec..de40a07ec9a 100644
--- a/src/mame/video/m72.cpp
+++ b/src/mame/video/m72.cpp
@@ -106,7 +106,7 @@ VIDEO_START_MEMBER(m72_state,m72)
m_bg_tilemap->set_transmask(1,0x00ff,0xff00);
//m_bg_tilemap->set_transmask(2,0x0001,0xfffe);
- m_bg_tilemap->set_transmask(2,0x0007,0xfff8); // needed for lohtj japan warning to look correct
+ m_bg_tilemap->set_transmask(2,0x0007,0xfff8); // needed for lohtj Japan warning to look correct
memset(m_spriteram->buffer(),0,m_spriteram->bytes());
@@ -149,22 +149,22 @@ VIDEO_START_MEMBER(m72_state,hharry)
m_bg_tilemap->set_scrolldy(-128,16);
}
-VIDEO_START_MEMBER(m72_state,imgfightj)
+VIDEO_START_MEMBER(m72_state,imgfight)
{
VIDEO_START_CALL_MEMBER(m72);
- m_bg_tilemap->set_transmask(2,0xff00,0x00ff); // for japan message
+ m_bg_tilemap->set_transmask(2,0xff00,0x00ff); // for RAM/ROM & Japan message
}
VIDEO_START_MEMBER(m72_state,nspiritj)
{
VIDEO_START_CALL_MEMBER(m72);
- m_bg_tilemap->set_transmask(2,0x001f,0xffe0); // for japan message
+ m_bg_tilemap->set_transmask(2,0x001f,0xffe0); // for Japan message
}
VIDEO_START_MEMBER(m72_state,mrheli)
{
VIDEO_START_CALL_MEMBER(m72);
- m_bg_tilemap->set_transmask(2,0x00ff,0xff00); // for japan message
+ m_bg_tilemap->set_transmask(2,0x00ff,0xff00); // for Japan message
}