diff options
| author | 2026-03-05 18:14:39 +0100 | |
|---|---|---|
| committer | 2026-03-05 18:14:48 +0100 | |
| commit | 443aa57c761aee60fc187288161b6b14398fb866 (patch) | |
| tree | 2552a50d4ab4309aa87e57b18067758de266796d | |
| parent | accda076b7e9abb148f8cf97eb336669ad05687b (diff) | |
battlex: set_flip_screen already marks tilemaps dirty, remove unneeded variable,
backfire: add data east to title to not confuse with tecmo version
| -rw-r--r-- | src/mame/dataeast/backfire.cpp | 4 | ||||
| -rw-r--r-- | src/mame/handheld/hh_hmcs40.cpp | 4 | ||||
| -rw-r--r-- | src/mame/omori/battlex.cpp | 41 |
3 files changed, 17 insertions, 32 deletions
diff --git a/src/mame/dataeast/backfire.cpp b/src/mame/dataeast/backfire.cpp index 539853481e6..e4f83044353 100644 --- a/src/mame/dataeast/backfire.cpp +++ b/src/mame/dataeast/backfire.cpp @@ -600,5 +600,5 @@ void backfire_state::init_backfire() } // anonymous namespace -GAME( 1995, backfire, 0, backfire, backfire, backfire_state, init_backfire, ROT0, "Data East Corporation", "Backfire! (Japan, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, backfirea, backfire, backfire, backfire, backfire_state, init_backfire, ROT0, "Data East Corporation", "Backfire! (Japan, set 2)", MACHINE_SUPPORTS_SAVE ) // defaults to wheel controls, must change to joystick to play +GAME( 1995, backfire, 0, backfire, backfire, backfire_state, init_backfire, ROT0, "Data East Corporation", "Backfire! (Data East, Japan, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, backfirea, backfire, backfire, backfire, backfire_state, init_backfire, ROT0, "Data East Corporation", "Backfire! (Data East, Japan, set 2)", MACHINE_SUPPORTS_SAVE ) // defaults to wheel controls, must change to joystick to play diff --git a/src/mame/handheld/hh_hmcs40.cpp b/src/mame/handheld/hh_hmcs40.cpp index c9094eacf68..38caa84182d 100644 --- a/src/mame/handheld/hh_hmcs40.cpp +++ b/src/mame/handheld/hh_hmcs40.cpp @@ -5391,8 +5391,8 @@ SYST( 1984, pairmtch, 0, 0, pairmtch, pairmtch, pairmtch_state, SYST( 1981, alnattck, 0, 0, alnattck, alnattck, alnattck_state, empty_init, "Coleco", "Alien Attack", MACHINE_SUPPORTS_SAVE ) SYST( 1982, cdkong, 0, 0, cdkong, cdkong, cdkong_state, empty_init, "Coleco", "Donkey Kong (Coleco)", MACHINE_SUPPORTS_SAVE ) SYST( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, cgalaxn_state, empty_init, "Coleco", "Galaxian (Coleco)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -SYST( 1981, cpacman, 0, 0, cpacman, cpacman, cpacman_state, empty_init, "Coleco", "Pac-Man (Coleco, rev. 29)", MACHINE_SUPPORTS_SAVE ) -SYST( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, cpacman_state, empty_init, "Coleco", "Pac-Man (Coleco, rev. 28)", MACHINE_SUPPORTS_SAVE ) +SYST( 1981, cpacman, 0, 0, cpacman, cpacman, cpacman_state, empty_init, "Coleco", "Pac-Man (Coleco, rev. 2)", MACHINE_SUPPORTS_SAVE ) +SYST( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, cpacman_state, empty_init, "Coleco", "Pac-Man (Coleco, rev. 1)", MACHINE_SUPPORTS_SAVE ) SYST( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, cmspacmn_state, empty_init, "Coleco", "Ms. Pac-Man (Coleco)", MACHINE_SUPPORTS_SAVE ) SYST( 1981, egalaxn2, 0, 0, egalaxn2, egalaxn2, egalaxn2_state, empty_init, "Entex", "Galaxian 2 (Entex)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/omori/battlex.cpp b/src/mame/omori/battlex.cpp index 89ff70feeb3..245d6a167dd 100644 --- a/src/mame/omori/battlex.cpp +++ b/src/mame/omori/battlex.cpp @@ -126,7 +126,7 @@ protected: tilemap_t *m_bg_tilemap = nullptr; - void io_map(address_map &map) ATTR_COLD; + virtual void io_map(address_map &map) ATTR_COLD; private: // video-related @@ -134,8 +134,6 @@ private: uint8_t m_scroll_msb = 0U; uint8_t m_starfield_enabled = 0U; - uint8_t m_in0_b4 = 0U; - void palette_w(offs_t offset, uint8_t data); void scroll_x_lsb_w(uint8_t data); void scroll_x_msb_w(uint8_t data); @@ -163,7 +161,7 @@ protected: private: TILE_GET_INFO_MEMBER(get_bg_tile_info); - void io_map(address_map &map) ATTR_COLD; + virtual void io_map(address_map &map) override ATTR_COLD; }; @@ -206,13 +204,8 @@ void battlex_state::videoram_w(offs_t offset, uint8_t data) void battlex_state::flipscreen_w(uint8_t data) { - m_starfield_enabled = data & 0x10; - - if (flip_screen() != (data >> 7)) - { - flip_screen_set(data & 0x80); - machine().tilemap().mark_all_dirty(); - } + m_starfield_enabled = BIT(data, 4); + flip_screen_set(BIT(data, 7)); } @@ -252,8 +245,8 @@ void battlex_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect { int sx = (source[0] & 0x7f) * 2 - (source[0] & 0x80) * 2; int sy = source[3]; - int const tile = source[2] ; // dodgeman has 0x100 sprites - int const color = source[1] & 0x07; // bits 3, 4, 5 also used during explosions + int const tile = source[2]; // dodgeman has 0x100 sprites + int const color = source[1] & 0x07; // bits 3, 4, 5 also used during explosions int flipy = source[1] & 0x80; int flipx = source[1] & 0x40; @@ -268,7 +261,6 @@ void battlex_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect gfx->transpen(bitmap, cliprect, tile, color, flipx, flipy, sx, sy, 0); source += 4; } - } uint32_t battlex_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -287,18 +279,15 @@ uint32_t battlex_state::screen_update(screen_device &screen, bitmap_ind16 &bitma INTERRUPT_GEN_MEMBER(battlex_state::interrupt) { - m_in0_b4 = 1; - device.execute().set_input_line(0, ASSERT_LINE); + m_maincpu->set_input_line(0, ASSERT_LINE); } ioport_value battlex_state::in0_b4_r() { - uint32_t ret = m_in0_b4; - if (m_in0_b4) - { + ioport_value ret = m_maincpu->input_line_state(0) ? 1 : 0; + + if (!machine().side_effects_disabled()) m_maincpu->set_input_line(0, CLEAR_LINE); - m_in0_b4 = 0; - } return ret; } @@ -464,7 +453,6 @@ void battlex_state::machine_start() save_item(NAME(m_scroll_lsb)); save_item(NAME(m_scroll_msb)); save_item(NAME(m_starfield_enabled)); - save_item(NAME(m_in0_b4)); } void battlex_state::machine_reset() @@ -472,13 +460,12 @@ void battlex_state::machine_reset() m_scroll_lsb = 0; m_scroll_msb = 0; m_starfield_enabled = 0; - m_in0_b4 = 0; } void battlex_state::battlex(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, XTAL(10'000'000) / 4 ); // divider not verified + Z80(config, m_maincpu, XTAL(10'000'000) / 4); // divider not verified m_maincpu->set_addrmap(AS_PROGRAM, &battlex_state::main_map); m_maincpu->set_addrmap(AS_IO, &battlex_state::io_map); m_maincpu->set_periodic_int(FUNC(battlex_state::interrupt), attotime::from_hz(400)); // controls game speed? @@ -497,16 +484,14 @@ void battlex_state::battlex(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - AY8910(config, "ay1", XTAL(10'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.40); // divider not verified + AY8910(config, "ay1", XTAL(10'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.40); // divider not verified } void dodgeman_state::dodgeman(machine_config &config) { battlex(config); - m_maincpu->set_addrmap(AS_IO, &dodgeman_state::io_map); - - AY8910(config, "ay2", XTAL(10'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.40); // divider not verified + AY8910(config, "ay2", XTAL(10'000'000) / 8).add_route(ALL_OUTPUTS, "mono", 0.40); // divider not verified } |
