From d98c7ff663bfd57fbad4126a4f50065ba5348f34 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 9 Jun 2022 23:59:06 +1000 Subject: mbee: fixed unwanted L chrs for mbee -bios 1 --- src/devices/video/mc6845.cpp | 8 ++++++++ src/devices/video/mc6845.h | 1 + src/mame/video/mbee.cpp | 6 +++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp index 553839da2b1..a197869b4e8 100644 --- a/src/devices/video/mc6845.cpp +++ b/src/devices/video/mc6845.cpp @@ -1050,6 +1050,14 @@ void mc6845_device::assert_light_pen_input() } +// Microbee requires precise supplied light-pen address +void mc6845_device::assert_light_pen_input(u16 ma) +{ + m_light_pen_addr = ma; + m_light_pen_latched = true; +} + + void mc6845_device::set_hpixels_per_column(int hpixels_per_column) { /* validate arguments */ diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h index bfbf4715e96..1d8b61fa949 100644 --- a/src/devices/video/mc6845.h +++ b/src/devices/video/mc6845.h @@ -115,6 +115,7 @@ public: /* simulates the LO->HI clocking of the light pen pin (pin 3) */ void assert_light_pen_input(); + void assert_light_pen_input(u16); /* set number of pixels per video memory address */ void set_hpixels_per_column(int hpixels_per_column); diff --git a/src/mame/video/mbee.cpp b/src/mame/video/mbee.cpp index 4fffcf97f59..7df6556201e 100644 --- a/src/mame/video/mbee.cpp +++ b/src/mame/video/mbee.cpp @@ -140,8 +140,8 @@ void mbee_state::oldkb_matrix_r(u16 offs) { if (!BIT(m_features, 2)) { - u8 port = (offs >> 7) & 7; - u8 bit = (offs >> 4) & 7; + u8 port = BIT(offs, 7, 3); + u8 bit = BIT(offs, 4, 3); u8 extra = 0; u8 data = m_io_oldkb[port]->read(); bool keydown = BIT(data, bit); @@ -182,7 +182,7 @@ void mbee_state::oldkb_matrix_r(u16 offs) } if( keydown ) - m_crtc->assert_light_pen_input(); //lpen_strobe + m_crtc->assert_light_pen_input(offs); //lpen_strobe } } -- cgit v1.2.3