diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index a7d66747bed..020cd04bd0b 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -2943,6 +2943,7 @@ files { MAME_DIR .. "src/mame/video/xevious.cpp", MAME_DIR .. "src/mame/drivers/galaxian.cpp", MAME_DIR .. "src/mame/includes/galaxian.h", + MAME_DIR .. "src/mame/drivers/galaxian_rockclim.cpp", MAME_DIR .. "src/mame/audio/galaxian.cpp", MAME_DIR .. "src/mame/audio/galaxian.h", MAME_DIR .. "src/mame/video/galaxian.cpp", diff --git a/src/mame/drivers/galaxian_rockclim.cpp b/src/mame/drivers/galaxian_rockclim.cpp new file mode 100644 index 00000000000..ce2330efaa4 --- /dev/null +++ b/src/mame/drivers/galaxian_rockclim.cpp @@ -0,0 +1,293 @@ +// license:BSD-3-Clause +// copyright-holders:Tomasz Slanina, David Haywood + +#include "emu.h" +#include "includes/galaxian.h" + +namespace { + +class galaxian_rockclim_state : public galaxian_state +{ +public: + galaxian_rockclim_state(const machine_config &mconfig, device_type type, const char *tag) + : galaxian_state(mconfig, type, tag) + , m_rockclim_videoram(*this,"rockclim_vram") + , m_gfxdecode2(*this,"gfxdecode2") + , m_palette2(*this,"palette2") + { } + + void rockclim(machine_config &config); + + void init_rockclim(); + +protected: + virtual void video_start() override; + +private: + void rockclim_map(address_map &map); + + void rockclim_palette(palette_device &palette) const; + void rockclim_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect); + void rockclim_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color); + void rockclim_videoram_w(offs_t offset, uint8_t data); + void rockclim_scroll_w(offs_t offset, uint8_t data); + uint8_t rockclim_videoram_r(offs_t offset); + TILE_GET_INFO_MEMBER(rockclim_get_tile_info); + + uint16_t m_rockclim_v; + uint16_t m_rockclim_h; + + tilemap_t *m_rockclim_tilemap; + required_shared_ptr m_rockclim_videoram; + required_device m_gfxdecode2; + required_device m_palette2; +}; + +void galaxian_rockclim_state::rockclim_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + m_rockclim_tilemap->draw(*m_screen, bitmap, cliprect, 0,0); +} + +void galaxian_rockclim_state::rockclim_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color) +{ + if ((*code & 0x30) == 0x20) + { + if (m_gfxbank[2] & 1) + { + int bank = (((m_gfxbank[0] & 1) << 5) | ((m_gfxbank[1] & 1) << 4)); + *code = (0x40 + bank) | (*code & 0x0f); + } + } +} + +uint8_t galaxian_rockclim_state::rockclim_videoram_r(offs_t offset) +{ + return m_rockclim_videoram[offset]; +} + +void galaxian_rockclim_state::rockclim_videoram_w(offs_t offset, uint8_t data) +{ + m_rockclim_videoram[offset] = data; + m_rockclim_tilemap->mark_tile_dirty(offset); +} + +void galaxian_rockclim_state::rockclim_scroll_w(offs_t offset, uint8_t data) +{ + switch (offset & 3) + { + case 0: m_rockclim_h = (m_rockclim_h & 0xff00) | data; m_rockclim_tilemap->set_scrollx(0, m_rockclim_h * m_x_scale); break; + case 1: m_rockclim_h = (m_rockclim_h & 0x00ff) | (data << 8); m_rockclim_tilemap->set_scrollx(0, m_rockclim_h * m_x_scale); break; + case 2: m_rockclim_v = (m_rockclim_v & 0xff00) | data; m_rockclim_tilemap->set_scrolly(0, m_rockclim_v); break; + case 3: m_rockclim_v = (m_rockclim_v & 0x00ff) | (data << 8); m_rockclim_tilemap->set_scrolly(0, m_rockclim_v); break; + } +} + +void galaxian_rockclim_state::video_start() +{ + galaxian_state::video_start(); + + m_rockclim_tilemap = &machine().tilemap().create(*m_gfxdecode2, tilemap_get_info_delegate(*this, FUNC(galaxian_rockclim_state::rockclim_get_tile_info)), TILEMAP_SCAN_ROWS,8 * m_x_scale,8,64,32); + m_rockclim_v = m_rockclim_h = 0; + save_item(NAME(m_rockclim_v)); + save_item(NAME(m_rockclim_h)); +} + +TILE_GET_INFO_MEMBER(galaxian_rockclim_state::rockclim_get_tile_info) +{ + uint16_t code = m_rockclim_videoram[tile_index]; + tileinfo.set(0, code, 0, 0); +} + +void galaxian_rockclim_state::rockclim_map(address_map &map) +{ + galaxian_state::mooncrst_map(map); + + map(0x4000, 0x47ff).rw(FUNC(galaxian_rockclim_state::rockclim_videoram_r), FUNC(galaxian_rockclim_state::rockclim_videoram_w)).share("rockclim_vram");//4800 - 4803 = bg scroll ? + map(0x4800, 0x4803).w(FUNC(galaxian_rockclim_state::rockclim_scroll_w)); + map(0x5000, 0x53ff).ram(); + map(0x5800, 0x5800).portr("IN3"); + map(0x6000, 0x7fff).rom(); + map(0x8800, 0x8800).portr("IN4"); +} + + +// verified from Z80 code +static INPUT_PORTS_START( rockclim ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) // only adds 1 credit if "Coin Slots" is set to 1 + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) + + 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_JOYSTICKLEFT_LEFT ) PORT_8WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPSETTING( 0x00, "30000" ) + PORT_DIPSETTING( 0x40, "50000" ) + PORT_DIPNAME( 0x80, 0x00, "Coin Slots" ) + PORT_DIPSETTING( 0x80, "1" ) + PORT_DIPSETTING( 0x00, "2" ) + + PORT_START("IN3") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL + + PORT_START("IN2") + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x03, "6" ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT ) + PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN4") + PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 8C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 7C_1C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C ) ) + PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 8C_1C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 7C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x70, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) + PORT_DIPSETTING( 0x80, DEF_STR( 1C_8C ) ) +INPUT_PORTS_END + +static const gfx_layout rockclim_charlayout = +{ + 8,8, + RGN_FRAC(1,2), + 4, + { 4, 0, RGN_FRAC(1,2)+4, RGN_FRAC(1,2) }, + { 3, 2, 1, 0,11 ,10, 9, 8 }, + { 0*8*2, 1*8*2, 2*8*2, 3*8*2, 4*8*2, 5*8*2, 6*8*2, 7*8*2 }, + 8*8*2 +}; + +static GFXDECODE_START( gfx_rockclim ) + GFXDECODE_SCALE("bg_gfx", 0x0000, rockclim_charlayout, 0, 1, GALAXIAN_XSCALE,1) +GFXDECODE_END + + +void galaxian_rockclim_state::rockclim_palette(palette_device &palette) const +{ + const uint8_t *color_prom = memregion("bg_proms")->base(); + + // first, the character/sprite palette + int const len = memregion("bg_proms")->bytes(); + for (int i = 0; i < len; i++) + { + int bit0, bit1, bit2; + + // red component + bit0 = BIT(*color_prom, 0); + bit1 = BIT(*color_prom, 1); + bit2 = BIT(*color_prom, 2); + int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + // green component + bit0 = BIT(*color_prom, 3); + bit1 = BIT(*color_prom, 4); + bit2 = BIT(*color_prom, 5); + int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + // blue component + bit0 = BIT(*color_prom, 6); + bit1 = BIT(*color_prom, 7); + int const b = 0x4f * bit0 + 0xa8 * bit1; + + palette.set_pen_color(i, r, g, b); + color_prom++; + } +} + +void galaxian_rockclim_state::rockclim(machine_config &config) +{ + galaxian_state::mooncrst(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &galaxian_rockclim_state::rockclim_map); + + // video hardware + GFXDECODE(config, m_gfxdecode2, m_palette2, gfx_rockclim); + PALETTE(config, m_palette2, FUNC(galaxian_rockclim_state::rockclim_palette), 32); +} + + +ROM_START( rockclim ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "lc01.a1", 0x0000, 0x1000, CRC(8601ae8d) SHA1(6e0c3b34ce5e6879ce7a116c5c2660889a68320d) ) + ROM_LOAD( "lc02.a2", 0x1000, 0x1000, CRC(2dde9d4c) SHA1(7e343113116b94894558819a7f77f77e4e952da7) ) + ROM_LOAD( "lc03.a3", 0x2000, 0x1000, CRC(82c48a67) SHA1(abf95062eb5c9bd4bb3c9b9af59396a4ca6905d8) ) + ROM_LOAD( "lc04.a4", 0x3000, 0x1000, CRC(7cd3a04a) SHA1(756c12288e120e6f761b266b91920d17cab6926c) ) + ROM_LOAD( "lc05.a5", 0x6000, 0x1000, CRC(5e542149) SHA1(425a5a8769c3fa0887db8ff04e2a4f32f18d2679) ) + ROM_LOAD( "lc06.a6", 0x7000, 0x1000, CRC(b2bdca64) SHA1(e72e63725164c922816dda90ac964a94062eab1b) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "lc08.a9", 0x0000, 0x800, CRC(7f18e1ef) SHA1(2a160b994708ec0f06774dde3ec613af7e3f32c6) ) + ROM_LOAD( "lc07.a7", 0x0800, 0x800, CRC(f18b50ac) SHA1(a2328eb55882a09403cae1a497c611b494649cac) ) + ROM_LOAD( "lc10.c9", 0x1000, 0x800, CRC(dec5781b) SHA1(b6277fc890d153db24bd48293780cf239a6aa0e7) ) + ROM_LOAD( "lc09.c7", 0x1800, 0x800, CRC(06c0b5de) SHA1(561cf99a6be03205c7bc5fd15d4d51ee4d6d164b) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "lc11.f4", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) + + ROM_REGION( 0x2000, "bg_gfx", 0 ) + ROM_LOAD( "lc13.g5", 0x0000, 0x1000, CRC(19475f2b) SHA1(5d42aa45a7b519dacdecd3d2edbfee6971693034) ) + ROM_LOAD( "lc14.g7", 0x1000, 0x1000, CRC(cc96d1db) SHA1(9713b47b723a5d8837f2a8e8c43e46dc41a62e5b) ) + + ROM_REGION( 0x0020, "bg_proms", 0 ) + ROM_LOAD( "lc12.e9", 0x0000, 0x0020, CRC(f6e76547) SHA1(c9ea78d1876156561b3bbf327d7e0299e1d9fd4a) ) +ROM_END + +void galaxian_rockclim_state::init_rockclim() +{ + galaxian_state::init_mooncrsu(); + + m_extend_sprite_info_ptr = extend_sprite_info_delegate(&galaxian_rockclim_state::rockclim_extend_sprite_info, this); + m_draw_background_ptr = draw_background_delegate(&galaxian_rockclim_state::rockclim_draw_background, this); +} + +} // Anonymous namespace + +GAME( 1981, rockclim, 0, rockclim, rockclim, galaxian_rockclim_state, init_rockclim, ROT180, "Taito", "Rock Climber", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp index e14330fd20e..bf3a57b050c 100644 --- a/src/mame/drivers/galaxold.cpp +++ b/src/mame/drivers/galaxold.cpp @@ -184,37 +184,6 @@ void galaxold_state::hustlerb3_map(address_map &map) } -void galaxold_state::rockclim_map(address_map &map) -{ - map(0x0000, 0x3fff).rom(); - map(0x4000, 0x47ff).rw(FUNC(galaxold_state::rockclim_videoram_r), FUNC(galaxold_state::rockclim_videoram_w)).share("rockclim_vram");//4800 - 4803 = bg scroll ? - map(0x4800, 0x4803).w(FUNC(galaxold_state::rockclim_scroll_w)); - map(0x5000, 0x53ff).ram(); //? - map(0x5800, 0x5800).portr("IN2"); - map(0x6000, 0x7fff).rom(); - map(0x8000, 0x87ff).ram(); - map(0x8800, 0x8800).portr("DSW1"); - map(0x9000, 0x93ff).ram().w(FUNC(galaxold_state::galaxold_videoram_w)).share("videoram"); - map(0x9400, 0x97ff).r(FUNC(galaxold_state::galaxold_videoram_r)); - map(0x9800, 0x983f).ram().w(FUNC(galaxold_state::galaxold_attributesram_w)).share("attributesram"); - map(0x9840, 0x985f).ram().share("spriteram"); - map(0x9860, 0x987f).ram().share("bulletsram"); - map(0x9880, 0x98ff).ram(); - map(0xa000, 0xa000).portr("IN0"); - map(0xa000, 0xa002).w(FUNC(galaxold_state::galaxold_gfxbank_w));// a002 - sprite bank - map(0xa003, 0xa003).w(FUNC(galaxold_state::galaxold_coin_counter_w)); - map(0xa004, 0xa007).w("cust", FUNC(galaxian_sound_device::lfo_freq_w)); - map(0xa800, 0xa800).portr("IN1"); - map(0xa800, 0xa802).w("cust", FUNC(galaxian_sound_device::background_enable_w)); - map(0xa803, 0xa803).w("cust", FUNC(galaxian_sound_device::noise_enable_w)); - map(0xa805, 0xa805).w("cust", FUNC(galaxian_sound_device::fire_enable_w)); - map(0xa806, 0xa807).w("cust", FUNC(galaxian_sound_device::vol_w)); - map(0xb000, 0xb000).portr("DSW0").w(FUNC(galaxold_state::galaxold_nmi_enable_w)); - map(0xb006, 0xb006).w(FUNC(galaxold_state::galaxold_flip_screen_x_w)); - map(0xb007, 0xb007).w(FUNC(galaxold_state::galaxold_flip_screen_y_w)); - map(0xb800, 0xb800).r("watchdog", FUNC(watchdog_timer_device::reset_r)); - map(0xb800, 0xb800).w("cust", FUNC(galaxian_sound_device::pitch_w)); -} void galaxold_state::scramblb_map(address_map &map) @@ -779,90 +748,6 @@ static INPUT_PORTS_START( froggerv ) INPUT_PORTS_END -// verified from Z80 code -static INPUT_PORTS_START( rockclim ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) // only adds 1 credit if "Coin Slots" is set to 1 - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) - - 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_JOYSTICKLEFT_LEFT ) PORT_8WAY - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "30000" ) - PORT_DIPSETTING( 0x40, "50000" ) - PORT_DIPNAME( 0x80, 0x00, "Coin Slots" ) - PORT_DIPSETTING( 0x80, "1" ) - PORT_DIPSETTING( 0x00, "2" ) - - PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL - - PORT_START("DSW0") - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT ) - PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 8C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 7C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 6C_1C ) ) - PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) ) - PORT_DIPSETTING( 0x05, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x06, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x07, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0f, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0e, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0d, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0c, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0x0b, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0a, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x09, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_8C ) ) - PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 9C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 8C_1C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 7C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 6C_1C ) ) - PORT_DIPSETTING( 0x40, DEF_STR( 5C_1C ) ) - PORT_DIPSETTING( 0x50, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x60, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x70, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0xf0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0xe0, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0xd0, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0xc0, DEF_STR( 1C_4C ) ) - PORT_DIPSETTING( 0xb0, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0xa0, DEF_STR( 1C_6C ) ) - PORT_DIPSETTING( 0x90, DEF_STR( 1C_7C ) ) - PORT_DIPSETTING( 0x80, DEF_STR( 1C_8C ) ) -INPUT_PORTS_END // verified from Z80 code @@ -1622,22 +1507,6 @@ static const gfx_layout _4in1_spritelayout = 32*8 }; -static const gfx_layout rockclim_charlayout = -{ - 8,8, - 256, - 4,//? - { 4, 0,4096*8+4,4096*8 }, - { 3, 2, 1, 0,11 ,10, 9, 8 }, - { 0*8*2, 1*8*2, 2*8*2, 3*8*2, 4*8*2, 5*8*2, 6*8*2, 7*8*2 }, - 8*8*2 -}; - -static GFXDECODE_START( gfx_rockclim ) - GFXDECODE_ENTRY( "gfx1", 0x0000, galaxold_charlayout, 32, 8 ) - GFXDECODE_ENTRY( "gfx1", 0x0000, galaxold_spritelayout, 32, 8 ) - GFXDECODE_ENTRY( "gfx2", 0x0000, rockclim_charlayout, 0, 1 ) -GFXDECODE_END static GFXDECODE_START( gfx_galaxian ) GFXDECODE_ENTRY( "gfx1", 0x0000, galaxold_charlayout, 0, 8 ) @@ -1835,21 +1704,6 @@ void galaxold_state::dkongjrmc(machine_config &config) } -void galaxold_state::rockclim(machine_config &config) -{ - mooncrst(config); - - // basic machine hardware - m_maincpu->set_addrmap(AS_PROGRAM, &galaxold_state::rockclim_map); - m_gfxdecode->set_info(gfx_rockclim); - - // video hardware - MCFG_VIDEO_START_OVERRIDE(galaxold_state,rockclim) - m_palette->set_entries(64+64+2); // 64 colors only, but still uses bullets so we need to keep the palette big - m_palette->set_init(FUNC(galaxold_state::rockclim_palette)); - - m_screen->set_size(64*8, 32*8); -} void galaxold_state::drivfrcg(machine_config &config) @@ -1871,7 +1725,7 @@ void galaxold_state::drivfrcg(machine_config &config) m_screen->set_palette(m_palette); m_screen->screen_vblank().set_inputline(m_maincpu, 0, ASSERT_LINE); - PALETTE(config, m_palette, FUNC(galaxold_state::rockclim_palette), 64); + PALETTE(config, m_palette, FUNC(galaxold_state::s2650_palette), 64); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gmgalax); @@ -1932,7 +1786,7 @@ void galaxold_state::racknrol(machine_config &config) // video hardware GFXDECODE(config, m_gfxdecode, m_palette, gfx_galaxian); - PALETTE(config, m_palette, FUNC(galaxold_state::rockclim_palette), 32); + PALETTE(config, m_palette, FUNC(galaxold_state::s2650_palette), 32); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); @@ -1959,7 +1813,7 @@ void galaxold_state::hexpoola(machine_config &config) maincpu.intack_handler().set(FUNC(galaxold_state::hunchbkg_intack)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_galaxian); - PALETTE(config, m_palette, FUNC(galaxold_state::rockclim_palette), 32); + PALETTE(config, m_palette, FUNC(galaxold_state::s2650_palette), 32); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); @@ -2043,30 +1897,6 @@ ROM_START( froggerv ) ROM_END -ROM_START( rockclim ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "lc01.a1", 0x0000, 0x1000, CRC(8601ae8d) SHA1(6e0c3b34ce5e6879ce7a116c5c2660889a68320d) ) - ROM_LOAD( "lc02.a2", 0x1000, 0x1000, CRC(2dde9d4c) SHA1(7e343113116b94894558819a7f77f77e4e952da7) ) - ROM_LOAD( "lc03.a3", 0x2000, 0x1000, CRC(82c48a67) SHA1(abf95062eb5c9bd4bb3c9b9af59396a4ca6905d8) ) - ROM_LOAD( "lc04.a4", 0x3000, 0x1000, CRC(7cd3a04a) SHA1(756c12288e120e6f761b266b91920d17cab6926c) ) - ROM_LOAD( "lc05.a5", 0x6000, 0x1000, CRC(5e542149) SHA1(425a5a8769c3fa0887db8ff04e2a4f32f18d2679) ) - ROM_LOAD( "lc06.a6", 0x7000, 0x1000, CRC(b2bdca64) SHA1(e72e63725164c922816dda90ac964a94062eab1b) ) - - ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "lc08.a9", 0x0000, 0x800, CRC(7f18e1ef) SHA1(2a160b994708ec0f06774dde3ec613af7e3f32c6) ) - ROM_LOAD( "lc07.a7", 0x0800, 0x800, CRC(f18b50ac) SHA1(a2328eb55882a09403cae1a497c611b494649cac) ) - ROM_LOAD( "lc10.c9", 0x1000, 0x800, CRC(dec5781b) SHA1(b6277fc890d153db24bd48293780cf239a6aa0e7) ) - ROM_LOAD( "lc09.c7", 0x1800, 0x800, CRC(06c0b5de) SHA1(561cf99a6be03205c7bc5fd15d4d51ee4d6d164b) ) - - ROM_REGION( 0x2000, "gfx2", 0 ) - ROM_LOAD( "lc13.g5", 0x0000, 0x1000, CRC(19475f2b) SHA1(5d42aa45a7b519dacdecd3d2edbfee6971693034) ) - ROM_LOAD( "lc14.g7", 0x1000, 0x1000, CRC(cc96d1db) SHA1(9713b47b723a5d8837f2a8e8c43e46dc41a62e5b) ) - - ROM_REGION( 0x0040, "proms", 0 ) - ROM_LOAD( "lc12.e9", 0x0000, 0x0020, CRC(f6e76547) SHA1(c9ea78d1876156561b3bbf327d7e0299e1d9fd4a) ) - ROM_LOAD( "lc11.f4", 0x0020, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) ) -ROM_END - ROM_START( scramblb ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -2654,7 +2484,6 @@ ROM_END // Z80 games // YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY, FULLNAME, FLAGS GAME( 1981, vpool, hustler, mooncrst, vpool, galaxold_state, empty_init, ROT90, "bootleg", "Video Pool (bootleg on Moon Cresta hardware)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1981, rockclim, 0, rockclim, rockclim, galaxold_state, empty_init, ROT180, "Taito", "Rock Climber", MACHINE_SUPPORTS_SAVE ) GAME( 1981, scramblb, scramble, scramblb, scramblb, galaxold_state, empty_init, ROT90, "bootleg", "Scramble (bootleg on Galaxian hardware)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1981, scramb2, scramble, scramb2, scramb2, galaxold_state, empty_init, ROT90, "bootleg", "Scramble (bootleg, set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1981, scramb3, scramble, scramb3, scramb2, galaxold_state, empty_init, ROT90, "bootleg", "Scramble (bootleg, set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h index 20dc8b3dd81..cf2f7b61b64 100644 --- a/src/mame/includes/galaxold.h +++ b/src/mame/includes/galaxold.h @@ -46,7 +46,6 @@ public: , m_spriteram2(*this,"spriteram2") , m_attributesram(*this,"attributesram") , m_bulletsram(*this,"bulletsram") - , m_rockclim_videoram(*this,"rockclim_vram") , m_racknrol_tiles_bank(*this,"racknrol_tbank") , m_leds(*this, "led%u", 0U) , m_leftclip(2) @@ -67,14 +66,12 @@ public: optional_shared_ptr m_spriteram2; required_shared_ptr m_attributesram; optional_shared_ptr m_bulletsram; - optional_shared_ptr m_rockclim_videoram; optional_shared_ptr m_racknrol_tiles_bank; output_finder<2> m_leds; int m_irq_line; uint8_t m__4in1_bank; tilemap_t *m_bg_tilemap; - tilemap_t *m_rockclim_tilemap; int m_spriteram2_present; uint8_t m_gfxbank[5]; uint8_t m_flipscreen_x; @@ -98,8 +95,6 @@ public: uint8_t m_background_green; uint8_t m_background_blue; void (galaxold_state::*m_draw_background)(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); /* function to call to draw the background */ - uint16_t m_rockclim_v; - uint16_t m_rockclim_h; int m_dambustr_bg_split_line; int m_dambustr_bg_color_1; int m_dambustr_bg_color_2; @@ -147,9 +142,6 @@ public: void galaxold_stars_enable_w(uint8_t data); void darkplnt_bullet_color_w(uint8_t data); void galaxold_gfxbank_w(offs_t offset, uint8_t data); - void rockclim_videoram_w(offs_t offset, uint8_t data); - void rockclim_scroll_w(offs_t offset, uint8_t data); - uint8_t rockclim_videoram_r(offs_t offset); void dambustr_bg_split_line_w(uint8_t data); void dambustr_bg_color_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback); @@ -167,14 +159,13 @@ public: TILE_GET_INFO_MEMBER(racknrol_get_tile_info); TILE_GET_INFO_MEMBER(dambustr_get_tile_info2); TILE_GET_INFO_MEMBER(get_tile_info); - TILE_GET_INFO_MEMBER(rockclim_get_tile_info); TILE_GET_INFO_MEMBER(harem_get_tile_info); DECLARE_MACHINE_RESET(galaxold); DECLARE_MACHINE_RESET(hunchbkg); void galaxold_palette(palette_device &palette); - void rockclim_palette(palette_device &palette) const; + void s2650_palette(palette_device &palette) const; void scrambold_palette(palette_device &palette); void stratgyx_palette(palette_device &palette); void darkplnt_palette(palette_device &palette) const; @@ -193,7 +184,6 @@ public: DECLARE_VIDEO_START(pisces); DECLARE_VIDEO_START(dkongjrm); DECLARE_VIDEO_START(dkongjrmc); - DECLARE_VIDEO_START(rockclim); DECLARE_VIDEO_START(galaxold_plain); DECLARE_VIDEO_START(ckongs); DECLARE_VIDEO_START(darkplnt); @@ -219,8 +209,6 @@ public: void video_start_common(); void pisces_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); void mooncrst_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); - void rockclim_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void rockclim_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); void harem_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs); void mooncrst_modify_charcode(uint16_t *code, uint8_t x); void pisces_modify_charcode(uint16_t *code, uint8_t x); @@ -275,7 +263,6 @@ public: void dkongjrmc(machine_config &config); void bullsdrtg(machine_config &config); void drivfrcg(machine_config &config); - void rockclim(machine_config &config); void scramblb(machine_config &config); void scramb2(machine_config &config); void scramb3(machine_config &config); @@ -297,7 +284,6 @@ public: void mooncrst_map(address_map &map); void racknrol_map(address_map &map); void racknrol_io(address_map &map); - void rockclim_map(address_map &map); void scramb_common_map(address_map &map); void scramb2_map(address_map &map); void scramb3_map(address_map &map); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f653ce197b0..0602dd3ec60 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -14558,6 +14558,9 @@ zerotimeu // hack zigzagb // (c) 1982 LAX (bootleg) zigzagb2 // (c) 1982 LAX (bootleg) +@source:galaxian_rockclim.cpp +rockclim // (c)1981 Taito + @source:galaxold.cpp 4in1 // (c) 1981 Armenia / Food and Fun bullsdrtg // 1985 Senko @@ -14575,7 +14578,6 @@ hunchbgb // bootleg hunchbkg // (c) 1983 Century hustlerb3 // bootleg racknrol // (c) 1986 Status (Shinkia license) (Senko Kit) -rockclim // (c)1981 Taito scramb2 // bootleg scramb3 // bootleg scramblb // bootleg diff --git a/src/mame/video/galaxold.cpp b/src/mame/video/galaxold.cpp index cf112754580..2f198f8319e 100644 --- a/src/mame/video/galaxold.cpp +++ b/src/mame/video/galaxold.cpp @@ -111,7 +111,7 @@ void galaxold_state::stratgyx_palette(palette_device &palette) } } -void galaxold_state::rockclim_palette(palette_device &palette) const +void galaxold_state::s2650_palette(palette_device &palette) const { const uint8_t *color_prom = memregion("proms")->base(); @@ -568,36 +568,8 @@ VIDEO_START_MEMBER(galaxold_state,mooncrst) m_modify_spritecode = &galaxold_state::mooncrst_modify_spritecode; } -void galaxold_state::rockclim_draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - m_rockclim_tilemap->draw(screen, bitmap, cliprect, 0,0); -} -void galaxold_state::rockclim_modify_spritecode(uint8_t *spriteram, int *code, int *flipx, int *flipy, int offs) -{ - if ((*code & 0x30) == 0x20) - { - if (m_gfxbank[2] & 1) - { - int bank = (((m_gfxbank[0] & 1) << 5) | ((m_gfxbank[1] & 1) << 4)); - *code = (0x40 + bank) | (*code & 0x0f); - } - } -} -VIDEO_START_MEMBER(galaxold_state,rockclim) -{ - VIDEO_START_CALL_MEMBER(galaxold); - m_rockclim_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(galaxold_state::rockclim_get_tile_info)), TILEMAP_SCAN_ROWS,8,8,64,32); - - m_draw_background = &galaxold_state::rockclim_draw_background; - m_modify_charcode = &galaxold_state::mooncrst_modify_charcode; - m_modify_spritecode = &galaxold_state::rockclim_modify_spritecode; - - m_rockclim_v = m_rockclim_h = 0; - save_item(NAME(m_rockclim_v)); - save_item(NAME(m_rockclim_h)); -} TILE_GET_INFO_MEMBER(galaxold_state::drivfrcg_get_tile_info) { @@ -884,31 +856,6 @@ void galaxold_state::galaxold_gfxbank_w(offs_t offset, uint8_t data) } } -void galaxold_state::rockclim_videoram_w(offs_t offset, uint8_t data) -{ - m_rockclim_videoram[offset] = data; - m_rockclim_tilemap->mark_tile_dirty(offset); -} - -void galaxold_state::rockclim_scroll_w(offs_t offset, uint8_t data) -{ - switch(offset&3) - { - case 0: m_rockclim_h=(m_rockclim_h&0xff00)|data;m_rockclim_tilemap ->set_scrollx(0, m_rockclim_h );break; - case 1: m_rockclim_h=(m_rockclim_h&0xff)|(data<<8);m_rockclim_tilemap ->set_scrollx(0, m_rockclim_h );break; - case 2: m_rockclim_v=(m_rockclim_v&0xff00)|data;m_rockclim_tilemap ->set_scrolly(0, m_rockclim_v );break; - case 3: m_rockclim_v=(m_rockclim_v&0xff)|(data<<8);m_rockclim_tilemap ->set_scrolly(0, m_rockclim_v );break; - } - -} - - -uint8_t galaxold_state::rockclim_videoram_r(offs_t offset) -{ - return m_rockclim_videoram[offset]; -} - - void galaxold_state::dambustr_bg_split_line_w(uint8_t data) { m_dambustr_bg_split_line = data; @@ -1567,11 +1514,6 @@ TILE_GET_INFO_MEMBER(galaxold_state::get_tile_info) tileinfo.set(0, code, color, 0); } -TILE_GET_INFO_MEMBER(galaxold_state::rockclim_get_tile_info) -{ - uint16_t code = m_rockclim_videoram[tile_index]; - tileinfo.set(2, code, 0, 0); -} void galaxold_state::draw_bullets_common(bitmap_ind16 &bitmap, const rectangle &cliprect) {