From c8339e8d0e6c54fdd2fcd2d04088aa3896932895 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 14 Dec 2022 01:11:16 +0100 Subject: tehkanwc: remove unneeded trampoline for writing leds --- src/mame/tecmo/tehkanwc.cpp | 17 +++++++++++++++++ src/mame/tecmo/tehkanwc.h | 3 --- src/mame/tecmo/tehkanwc_v.cpp | 43 ++----------------------------------------- 3 files changed, 19 insertions(+), 44 deletions(-) diff --git a/src/mame/tecmo/tehkanwc.cpp b/src/mame/tecmo/tehkanwc.cpp index fe25c5a289e..f79efd88c3d 100644 --- a/src/mame/tecmo/tehkanwc.cpp +++ b/src/mame/tecmo/tehkanwc.cpp @@ -96,6 +96,7 @@ void tehkanwc_state::machine_start() save_item(NAME(m_track1)); save_item(NAME(m_msm_data_offs)); save_item(NAME(m_toggle)); + save_item(NAME(m_scroll_x)); m_digits.resolve(); } @@ -140,6 +141,22 @@ void tehkanwc_state::track_1_reset_w(offs_t offset, uint8_t data) } +/* + Gridiron Fight has a LED display on the control panel, to let each player + choose the formation without letting the other know. +*/ + +void tehkanwc_state::gridiron_led0_w(uint8_t data) +{ + m_digits[0] = (data & 0x80) ? (data & 0x7f) : 0; +} + +void tehkanwc_state::gridiron_led1_w(uint8_t data) +{ + m_digits[1] = (data & 0x80) ? (data & 0x7f) : 0; +} + + uint8_t tehkanwc_state::teedoff_unk_r() { logerror("%s: teedoff_unk_r\n", machine().describe_context()); diff --git a/src/mame/tecmo/tehkanwc.h b/src/mame/tecmo/tehkanwc.h index c2c677bd9c5..ea683659968 100644 --- a/src/mame/tecmo/tehkanwc.h +++ b/src/mame/tecmo/tehkanwc.h @@ -59,8 +59,6 @@ private: int m_msm_data_offs = 0; int m_toggle = 0; uint8_t m_scroll_x[2]{}; - uint8_t m_led0 = 0; - uint8_t m_led1 = 0; tilemap_t *m_bg_tilemap = nullptr; tilemap_t *m_fg_tilemap = nullptr; @@ -92,7 +90,6 @@ private: TILE_GET_INFO_MEMBER(get_fg_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t led,int player); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); void shared_mem(address_map &map); diff --git a/src/mame/tecmo/tehkanwc_v.cpp b/src/mame/tecmo/tehkanwc_v.cpp index 09299c6ebfa..5b7b24bca8b 100644 --- a/src/mame/tecmo/tehkanwc_v.cpp +++ b/src/mame/tecmo/tehkanwc_v.cpp @@ -55,14 +55,6 @@ void tehkanwc_state::flipscreen_y_w(uint8_t data) flip_screen_y_set(data & 0x40); } -void tehkanwc_state::gridiron_led0_w(uint8_t data) -{ - m_led0 = data; -} -void tehkanwc_state::gridiron_led1_w(uint8_t data) -{ - m_led1 = data; -} TILE_GET_INFO_MEMBER(tehkanwc_state::get_bg_tile_info) { @@ -98,35 +90,6 @@ void tehkanwc_state::video_start() TILEMAP_SCAN_ROWS, 8, 8, 32, 32); m_fg_tilemap->set_transparent_pen(0); - - save_item(NAME(m_scroll_x)); - save_item(NAME(m_led0)); - save_item(NAME(m_led1)); -} - -/* - Gridiron Fight has a LED display on the control panel, to let each player - choose the formation without letting the other know. - - ---0--- - | | - 5 1 - | | - ---6--- - | | - 4 2 - | | - ---3--- - - bit 7 = enable (0 = display off) - */ - -void tehkanwc_state::gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t led, int player) -{ - if (led & 0x80) - m_digits[player] = led & 0x7f; - else - m_digits[player] = 0; } void tehkanwc_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -153,8 +116,7 @@ void tehkanwc_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec flipy = !flipy; } - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, - code, color, flipx, flipy, sx, sy, 0); + m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx, sy, 0); } } @@ -165,7 +127,6 @@ uint32_t tehkanwc_state::screen_update(screen_device &screen, bitmap_ind16 &bitm m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); draw_sprites(bitmap, cliprect); m_fg_tilemap->draw(screen, bitmap, cliprect, 1, 0); - gridiron_draw_led(bitmap, cliprect, m_led0, 0); - gridiron_draw_led(bitmap, cliprect, m_led1, 1); + return 0; } -- cgit v1.2.3