From c4e70ae92320b86b456ea0d71faa257dac18e53d Mon Sep 17 00:00:00 2001 From: DavidHaywood <28625134+DavidHaywood@users.noreply.github.com> Date: Wed, 10 Mar 2021 15:34:27 +0000 Subject: midzeus.cpp - turn off hardcoded 'in video driver' debugging keys by default, it's a common source of confusion. --- src/mame/includes/midzeus.h | 3 +++ src/mame/video/midzeus.cpp | 36 ++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/mame/includes/midzeus.h b/src/mame/includes/midzeus.h index 07c3ea11870..9dd11f433e3 100644 --- a/src/mame/includes/midzeus.h +++ b/src/mame/includes/midzeus.h @@ -87,6 +87,9 @@ public: m_digits(*this, "digit%u", 0U) { } + // turn on for hardcoded video debugging inputs + static constexpr bool DEBUG_KEYS = false; + //static constexpr XTAL CPU_CLOCK = XTAL(60'000'000); static constexpr int BEAM_DY = 3; static constexpr int BEAM_DX = 3; diff --git a/src/mame/video/midzeus.cpp b/src/mame/video/midzeus.cpp index 555beb10995..0ae0d8c0233 100644 --- a/src/mame/video/midzeus.cpp +++ b/src/mame/video/midzeus.cpp @@ -274,21 +274,7 @@ uint32_t midzeus_state::screen_update(screen_device &screen, bitmap_ind16 &bitma { m_poly->wait("VIDEO_UPDATE"); - /* normal update case */ - if (!machine().input().code_pressed(KEYCODE_V)) - { - const void *base = waveram1_ptr_from_expanded_addr(m_zeusbase[0xcc]); - int xoffs = screen.visible_area().min_x; - for (int y = cliprect.min_y; y <= cliprect.max_y; y++) - { - uint16_t *const dest = &bitmap.pix(y); - for (int x = cliprect.min_x; x <= cliprect.max_x; x++) - dest[x] = WAVERAM_READPIX(base, y, x - xoffs) & 0x7fff; - } - } - - /* waveram drawing case */ - else + if (DEBUG_KEYS && machine().input().code_pressed(KEYCODE_V)) /* waveram drawing case */ { const void *base; @@ -309,8 +295,21 @@ uint32_t midzeus_state::screen_update(screen_device &screen, bitmap_ind16 &bitma dest[x] = (tex << 8) | tex; } } + popmessage("offs = %06X", m_yoffs << 12); } + else /* normal update case */ + { + const void *base = waveram1_ptr_from_expanded_addr(m_zeusbase[0xcc]); + int xoffs = screen.visible_area().min_x; + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + uint16_t *const dest = &bitmap.pix(y); + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + dest[x] = WAVERAM_READPIX(base, y, x - xoffs) & 0x7fff; + } + } + return 0; } @@ -699,7 +698,12 @@ void midzeus_state::zeus_register_update(offs_t offset) case 0xcc: m_screen->update_partial(m_screen->vpos()); - m_log_fifo = machine().input().code_pressed(KEYCODE_L); + + if (DEBUG_KEYS) + m_log_fifo = machine().input().code_pressed(KEYCODE_L); + else + m_log_fifo = 0; + break; case 0xe0: -- cgit v1.2.3