summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/nmk16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/nmk16.cpp')
-rw-r--r--src/mame/drivers/nmk16.cpp98
1 files changed, 82 insertions, 16 deletions
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index 728233e0b23..67e444714c5 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -1072,6 +1072,24 @@ void nmk16_state::tdragonb_map(address_map &map)
map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram");
}
+void nmk16_state::tdragonb2_map(address_map &map)
+{
+ map(0x000000, 0x03ffff).rom();
+ map(0x0b0000, 0x0bffff).ram().share("mainram");
+ map(0x0c0000, 0x0c0001).portr("IN0");
+ map(0x0c0002, 0x0c0003).portr("IN1");
+ map(0x0c0008, 0x0c0009).portr("DSW1"); // .w TODO oki banking?
+ map(0x0c000a, 0x0c000b).portr("DSW2");
+ //map(0x0c000e, 0x0c000f).r; TODO: what's this?
+ map(0x0c0015, 0x0c0015).w(FUNC(nmk16_state::flipscreen_w)); // Maybe
+ map(0x0c0019, 0x0c0019).w(FUNC(nmk16_state::tilebank_w)); // Tile Bank
+ map(0x0c001f, 0x0c001f).w("oki", FUNC(okim6295_device::write));
+ map(0x0c4000, 0x0c4007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff);
+ map(0x0c8000, 0x0c87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
+ map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0");
+ map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram");
+}
+
void nmk16_state::ssmissin_map(address_map &map)
{
map(0x000000, 0x03ffff).rom();
@@ -1195,11 +1213,11 @@ void nmk16_state::gunnailb_map(address_map &map)
map(0x080002, 0x080003).portr("IN1");
map(0x080008, 0x080009).portr("DSW1");
map(0x08000a, 0x08000b).portr("DSW2");
- // map(0x08000e, 0x08000f).nopr();
+ map(0x08000f, 0x08000f).r("soundlatch2", FUNC(generic_latch_8_device::read));
map(0x080015, 0x080015).w(FUNC(nmk16_state::flipscreen_w));
- // map(0x080016, 0x080017).noprw();
+ //map(0x080016, 0x080017).noprw();
map(0x080019, 0x080019).w(FUNC(nmk16_state::tilebank_w));
- // map(0x08001e, 0x08001f).nopw();
+ map(0x08001f, 0x08001f).w(m_soundlatch, FUNC(generic_latch_8_device::write));
map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x08c000, 0x08c1ff).writeonly().share("scrollram");
map(0x08c200, 0x08c3ff).writeonly().share("scrollramy");
@@ -1207,7 +1225,7 @@ void nmk16_state::gunnailb_map(address_map &map)
map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0");
map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram");
map(0x0f0000, 0x0fffff).ram().share("mainram");
- // map(0x194000, 0x194000)
+ map(0x194001, 0x194001).w(m_oki[0], FUNC(okim6295_device::write));
}
void nmk16_state::gunnailb_sound_map(address_map &map)
@@ -1220,10 +1238,10 @@ void nmk16_state::gunnailb_sound_map(address_map &map)
void nmk16_state::gunnailb_sound_io_map(address_map &map)
{
map.global_mask(0xff);
- //map(0x00, 0x00).w(FUNC(nmk16_state::macross2_sound_bank_w));
- //map(0x02, 0x03).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
- //map(0x04, 0x04).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
- //map(0x06, 0x06).r(m_soundlatch, FUNC(generic_latch_8_device::read));
+ map(0x00, 0x00).w(FUNC(nmk16_state::macross2_sound_bank_w));
+ map(0x02, 0x03).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
+ map(0x04, 0x04).noprw(); // since the bootleggers used the same audio CPU ROM as airbustr but a different Oki ROM, they connected the Oki to the main CPU
+ map(0x06, 0x06).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w("soundlatch2", FUNC(generic_latch_8_device::write));
}
void nmk16_state::macross2_map(address_map &map)
@@ -4546,6 +4564,28 @@ void nmk16_state::tdragonb(machine_config &config) // bootleg using Raiden so
seibu_sound.ym_write_callback().set("ymsnd", FUNC(ym3812_device::write));
}
+void nmk16_state::tdragonb2(machine_config &config)
+{
+ // basic machine hardware
+ M68000(config, m_maincpu, 10000000);
+ m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::tdragonb2_map);
+ set_hacky_interrupt_timing(config);
+
+ // video hardware
+ set_hacky_screen_lowres(config);
+ m_spritegen->set_colpri_callback(FUNC(nmk16_state::get_colour_4bit));
+ m_screen->set_screen_update(FUNC(nmk16_state::screen_update_macross));
+
+ GFXDECODE(config, m_gfxdecode, m_palette, gfx_macross);
+ PALETTE(config, m_palette).set_format(palette_device::RRRRGGGGBBBBRGBx, 1024);
+ MCFG_VIDEO_START_OVERRIDE(nmk16_state,macross)
+
+ // sound hardware
+ SPEAKER(config, "mono").front_center();
+
+ OKIM6295(config, "oki", 1320000, okim6295_device::PIN7_LOW).add_route(ALL_OUTPUTS, "mono", 0.40);
+}
+
void nmk16_state::tdragon(machine_config &config)
{
// basic machine hardware
@@ -4857,16 +4897,19 @@ void nmk16_state::gunnailb(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &nmk16_state::gunnailb_map);
- GENERIC_LATCH_8(config, m_soundlatch);
-
- Z80(config, m_audiocpu, 4000000); // 4 MHz ?
+ Z80(config, m_audiocpu, 6000000); // 6 MHz ?
m_audiocpu->set_addrmap(AS_PROGRAM, &nmk16_state::gunnailb_sound_map);
m_audiocpu->set_addrmap(AS_IO, &nmk16_state::gunnailb_sound_io_map);
- subdevice<ym2203_device>("ymsnd")->irq_handler().set_inputline(m_audiocpu, 0);
+ GENERIC_LATCH_8(config, m_soundlatch);
+ m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, INPUT_LINE_NMI);
- OKIM6295(config.replace(), m_oki[0], XTAL(16'000'000)/4, okim6295_device::PIN7_LOW); // no OKI banking
- m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.10);
+ GENERIC_LATCH_8(config, "soundlatch2");
+
+ subdevice<ym2203_device>("ymsnd")->irq_handler().set_inputline(m_audiocpu, INPUT_LINE_IRQ0);
+
+ OKIM6295(config.replace(), m_oki[0], 12000000 / 4, okim6295_device::PIN7_LOW); // no OKI banking
+ m_oki[0]->add_route(ALL_OUTPUTS, "mono", 0.80);
config.device_remove("nmk004");
config.device_remove("oki2");
@@ -6445,6 +6488,24 @@ ROM_START( tdragonb )
ROM_LOAD( "td_01.bin", 0x00000, 0x10000, CRC(f6f6c4bf) SHA1(ea4cf74d968e254ae47c16c2f4c2f4bc1a528808) )
ROM_END
+ROM_START( tdragonb2 )
+ ROM_REGION( 0x40000, "maincpu", 0 )
+ ROM_LOAD16_BYTE( "a4", 0x00000, 0x20000, CRC(0cd0581b) SHA1(334f0f04623dbef6ab0d647b2da9c49c56e998a5) )
+ ROM_LOAD16_BYTE( "a3", 0x00001, 0x20000, CRC(f9088e22) SHA1(71c5bcec280e36a72ae3c85a854c24bba55f0863) )
+
+ ROM_REGION( 0x20000, "fgtile", 0 )
+ ROM_LOAD( "1", 0x00000, 0x20000, CRC(fe365920) SHA1(7581931cb95cd5a8ed40e4f5385b533e3d19af22) )
+
+ ROM_REGION( 0x100000, "bgtile", 0 )
+ ROM_LOAD( "a2a205", 0x000000, 0x100000, CRC(d0bde826) SHA1(3b74d5fc88a4a9329e101ee72f393608d327d816) )
+
+ ROM_REGION( 0x100000, "sprites", 0 )
+ ROM_LOAD16_WORD_SWAP( "shinea2a2-04", 0x000000, 0x100000, CRC(3eedc2fe) SHA1(9f48986c231a8fbc07f2b39b2017d1e967b2ed3c) )
+
+ ROM_REGION( 0x80000, "oki", 0 )
+ ROM_LOAD( "shinea2a2-01", 0x00000, 0x80000, CRC(4556e717) SHA1(efdec7c989436f97e8f18b157bfd5f9da55b29ba) )
+ROM_END
+
ROM_START( ssmissin )
ROM_REGION( 0x40000, "maincpu", 0 )
ROM_LOAD16_BYTE( "ssm14.165", 0x00001, 0x20000, CRC(eda61b74) SHA1(6247682c27d2be7dff1fad407ccf86fe2a25f11c) )
@@ -8761,7 +8822,6 @@ GAME( 1991, hachamfp, hachamf, hachamf, hachamfp, nmk16_state, empty
GAME( 1992, macross, 0, macross, macross, nmk16_state, init_nmk, ROT270, "Banpresto", "Super Spacefortress Macross / Chou-Jikuu Yousai Macross", 0 )
GAME( 1993, gunnail, 0, gunnail, gunnail, nmk16_state, init_nmk, ROT270, "NMK / Tecmo", "GunNail (28th May. 1992)", 0 ) // Tecmo is displayed only when set to Japan
-GAME( 1992, gunnailb, gunnail, gunnailb, gunnail, nmk16_state, init_gunnailb, ROT270, "bootleg", "GunNail (bootleg)", MACHINE_NO_SOUND ) // different sound hardware not hooked up
GAME( 1992, gunnailp, gunnail, gunnail, gunnail, nmk16_state, init_nmk, ROT270, "NMK", "GunNail (location test)", 0 ) // still has the 28th May. 1992 string, so unlikely that was the release date for either version.
// a 1992 version of Gunnail exists, see https://www.youtube.com/watch?v=tf15Wz0zUiA 3:10; is this bootleg version 'gunnailb'?
@@ -8802,13 +8862,19 @@ GAME( 1997, tomagic, 0, tomagic, tomagic, nmk16_tomagic_stat
// these use the Seibu sound system (sound / music stolen from Raiden) rather than the bootleggers copying the nmk004
GAME( 1990, mustangb, mustang, mustangb, mustang, nmk16_state, empty_init, ROT0, "bootleg", "US AAF Mustang (bootleg, set 1)", 0 )
GAME( 1990, mustangb2, mustang, mustangb, mustang, nmk16_state, empty_init, ROT0, "bootleg (TAB Austria)", "US AAF Mustang (TAB Austria bootleg)", 0 ) // PCB and ROMs have TAB Austria stickers
-GAME( 1991, tdragonb, tdragon, tdragonb, tdragonb, nmk16_state, init_tdragonb, ROT270, "bootleg", "Thunder Dragon (bootleg)", 0 )
+GAME( 1991, tdragonb, tdragon, tdragonb, tdragonb, nmk16_state, init_tdragonb, ROT270, "bootleg", "Thunder Dragon (bootleg, set 1)", 0 )
GAME( 1992, strahljbl, strahl, strahljbl, strahljbl, nmk16_state, empty_init, ROT0, "bootleg", "Koutetsu Yousai Strahl (Japan, bootleg)", 0 )
// these are bootlegs with tharrier like sound hw
GAME( 1990, mustangb3, mustang, mustangb3, mustang, nmk16_state, empty_init, ROT0, "bootleg (Lettering)", "US AAF Mustang (Lettering bootleg)", 0 )
GAME( 1989, tharrierb, tharrier, tharrier, tharrier, nmk16_state, init_tharrier, ROT270, "bootleg (Lettering)", "Task Force Harrier (Lettering bootleg)", 0 )
+// bootleg with no audio CPU and only 1 Oki
+GAME( 1991, tdragonb2, tdragon, tdragonb2, tdragon, nmk16_state, empty_init, ROT270, "bootleg", "Thunder Dragon (bootleg, set 2)", MACHINE_NOT_WORKING ) // GFX and input problems. IRQs related?
+
+// bootleg with cloned airbustr sound hardware
+GAME( 1992, gunnailb, gunnail, gunnailb, gunnail, nmk16_state, init_gunnailb, ROT270, "bootleg", "GunNail (bootleg)", MACHINE_IMPERFECT_SOUND ) // crappy sound, unknown how much of it is incomplete emulation and how much bootleg quality
+
// these are from Comad, based on the Thunder Dragon code?
GAME( 1992, ssmissin, 0, ssmissin, ssmissin, nmk16_state, init_ssmissin, ROT270, "Comad", "S.S. Mission", MACHINE_NO_COCKTAIL )