From 895956c5dd143be9ae6ff5d8eb9a550c025b9e26 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Tue, 3 Apr 2018 18:56:25 +0200 Subject: jungsub (galaxian.cpp): apply mooncrst decoding, game boots. Verified inputs. TODO: GFX problems, sound , where are the DSWs read? (nw) --- src/mame/drivers/galaxian.cpp | 90 +++++++++++++++++++++++++++++++++++++++--- src/mame/drivers/giclassic.cpp | 2 +- src/mame/includes/galaxian.h | 2 + 3 files changed, 88 insertions(+), 6 deletions(-) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 5874c91647b..57fbf650afb 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -1784,7 +1784,7 @@ void galaxian_state::spactrai_map(address_map &map) map(0x0000, 0x01ff).rom(); map(0x0200, 0x05ff).ram(); // this sits over ROM, does the 0x400 bytes of ROM underneath bank or appear elsewhere? map(0x0600, 0x11ff).rom(); - map(0x1200, 0x15ff).ram().ram().w(this, FUNC(galaxian_state::galaxian_videoram_w)).share("videoram"); // see above comment + map(0x1200, 0x15ff).ram().w(this, FUNC(galaxian_state::galaxian_videoram_w)).share("videoram"); // see above comment map(0x1600, 0x4fff).rom(); // cleared on startup @@ -1809,7 +1809,7 @@ void galaxian_state::spactrai_map(address_map &map) map(0x7000, 0x7000).portr("IN2"); map(0x7800, 0x7800).r("watchdog", FUNC(watchdog_timer_device::reset_r)); - map(0xfe00, 0xfeff).ram().ram().w(this, FUNC(galaxian_state::galaxian_objram_w)).share("spriteram"); + map(0xfe00, 0xfeff).ram().w(this, FUNC(galaxian_state::galaxian_objram_w)).share("spriteram"); } @@ -1841,8 +1841,8 @@ void galaxian_state::anteatergg_map(address_map &map) galaxian_map_discrete(map); map(0x0000, 0x3fff).rom(); map(0x4000, 0x4fff).ram(); - map(0x5000, 0x53ff).ram().ram().w(this, FUNC(galaxian_state::galaxian_videoram_w)).share("videoram"); - map(0x5800, 0x58ff).ram().ram().w(this, FUNC(galaxian_state::galaxian_objram_w)).share("spriteram"); + map(0x5000, 0x53ff).ram().w(this, FUNC(galaxian_state::galaxian_videoram_w)).share("videoram"); + map(0x5800, 0x58ff).ram().w(this, FUNC(galaxian_state::galaxian_objram_w)).share("spriteram"); // AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0400) AM_RAM map(0x6000, 0x6000).mirror(0x07ff).portr("IN0"); // AM_RANGE(0x6000, 0x6001) AM_MIRROR(0x07f8) AM_WRITE(start_lamp_w) @@ -1857,6 +1857,25 @@ void galaxian_state::anteatergg_map(address_map &map) map(0x7800, 0x7800).r("watchdog", FUNC(watchdog_timer_device::reset_r)); } +void galaxian_state::jungsub_map(address_map &map) // TODO: preliminary +{ + map.unmap_value_high(); + map(0x0000, 0x3fff).rom(); + map(0x4000, 0x4fff).ram(); + map(0x5000, 0x53ff).ram().w(this, FUNC(galaxian_state::galaxian_videoram_w)).share("videoram"); + map(0x5800, 0x58ff).ram().w(this, FUNC(galaxian_state::galaxian_objram_w)).share("spriteram"); // but also at 0x5900-059ff and 0x5a00-5aff? + map(0x6000, 0x6000).mirror(0x07ff).portr("IN0"); // seems ok + map(0x6000, 0x6001).mirror(0x07f8).w(this, FUNC(galaxian_state::start_lamp_w)); + map(0x6002, 0x6002).mirror(0x07f8).w(this, FUNC(galaxian_state::coin_lock_w)); + map(0x6003, 0x6003).mirror(0x07f8).w(this, FUNC(galaxian_state::coin_count_0_w)); + map(0x6800, 0x6800).mirror(0x07ff).portr("IN1"); // seems ok + map(0x7001, 0x7001).mirror(0x07f8).w(this, FUNC(galaxian_state::irq_enable_w)); // seems ok + map(0x7006, 0x7006).mirror(0x07f8).w(this, FUNC(galaxian_state::galaxian_flip_screen_x_w)); // seems ok + map(0x7007, 0x7007).mirror(0x07f8).w(this, FUNC(galaxian_state::galaxian_flip_screen_y_w)); // seems ok + map(0x7800, 0x7800).r("watchdog", FUNC(watchdog_timer_device::reset_r)); // seems ok + map(0x7800, 0x7800).nopw(); // always 0xff? +} + /* map derived from schematics */ void galaxian_state::frogger_map(address_map &map) { @@ -4650,6 +4669,53 @@ static INPUT_PORTS_START( scramble ) PORT_BIT( 0xff, 0x00, IPT_UNUSED ) INPUT_PORTS_END +static INPUT_PORTS_START( jungsub ) // TODO: hook up and verify dip-switches + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + + PORT_START("IN2") + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 4C_3C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) + PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x18, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 4C_3C ) ) + PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) + PORT_DIPNAME( 0x80, 0x80, "Test (255 lives)" ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END static INPUT_PORTS_START( strfbomb ) PORT_INCLUDE(scramble) @@ -6153,6 +6219,18 @@ MACHINE_CONFIG_START(galaxian_state::scramble) MCFG_I8255_OUT_PORTC_CB(WRITE8(galaxian_state, scramble_protection_w)) MACHINE_CONFIG_END +MACHINE_CONFIG_START(galaxian_state::jungsub) + galaxian_base(config); + konami_sound_1x_ay8910(config); + + /* alternate memory map */ + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(jungsub_map) + + MCFG_CPU_MODIFY("audiocpu") + MCFG_CPU_PROGRAM_MAP(checkman_sound_map) + MCFG_CPU_IO_MAP(checkman_sound_portmap) +MACHINE_CONFIG_END MACHINE_CONFIG_START(galaxian_state::explorer) galaxian_base(config); @@ -7514,6 +7592,8 @@ DRIVER_INIT_MEMBER(galaxian_state,jungsub) /* todo, decrypt program rom */ // seems slightly address dependent based on text strings + decode_mooncrst(0x4000, memregion("maincpu")->base()); + /* video extensions */ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr); } @@ -12311,7 +12391,7 @@ GAME( 1981, atlantis, 0, theend, atlantis, galaxian_state, atlan GAME( 1981, atlantis2, atlantis, theend, atlantis, galaxian_state, atlantis, ROT90, "Comsoft", "Battle of Atlantis (set 2)", MACHINE_SUPPORTS_SAVE ) // Konami L-1200-2 base board with custom Subelectro 113 rom board -GAME( 1981, jungsub, jungler, scramble, scramble, galaxian_state, jungsub, ROT90, "bootleg (Subelectro)", "Jungler (Subelectro, bootleg on Scramble hardware)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1981, jungsub, jungler, jungsub, jungsub, galaxian_state, jungsub, ROT90, "bootleg (Subelectro)", "Jungler (Subelectro, bootleg on Scramble hardware)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // mostly works, bad GFX ROM causes lots of glitches /* Scorpion hardware; based on Scramble but with a 3rd AY-8910 and a speech chip */ GAME( 1982, scorpion, 0, scorpion, scorpion, galaxian_state, scorpion, ROT90, "Zaccaria", "Scorpion (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE) diff --git a/src/mame/drivers/giclassic.cpp b/src/mame/drivers/giclassic.cpp index 8919f06cbe2..c38f32a9842 100644 --- a/src/mame/drivers/giclassic.cpp +++ b/src/mame/drivers/giclassic.cpp @@ -270,7 +270,7 @@ void giclassicsvr_state::server_main(address_map &map) map(0x000000, 0x07ffff).rom().region("maincpu", 0); map(0x080000, 0x08ffff).ram(); map(0x090000, 0x093fff).ram(); - map(0x100000, 0x107fff).ram().ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); + map(0x100000, 0x107fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x180000, 0x183fff).ram(); map(0x280000, 0x281fff).ram().rw(m_k056832, FUNC(k056832_device::ram_word_r), FUNC(k056832_device::ram_word_w)); map(0x300000, 0x300007).w(m_k055673, FUNC(k055673_device::k053246_word_w)); // SPRITES diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h index f45a32bf512..69c496424e5 100644 --- a/src/mame/includes/galaxian.h +++ b/src/mame/includes/galaxian.h @@ -373,6 +373,7 @@ public: void amigo2(machine_config &config); void zigzag(machine_config &config); void checkman(machine_config &config); + void jungsub(machine_config &config); void galaxian_audio(machine_config &config); void mooncrst_audio(machine_config &config); void amigo2_map(address_map &map); @@ -393,6 +394,7 @@ public: void galaxian_map_base(address_map &map); void galaxian_map_discrete(address_map &map); void jumpbug_map(address_map &map); + void jungsub_map(address_map &map); void kingball_sound_map(address_map &map); void kingball_sound_portmap(address_map &map); void konami_sound_map(address_map &map); -- cgit v1.2.3