From 7732ef852495bdd68fb1310d3f01840feafc0f9b Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 1 Nov 2015 04:41:05 +1100 Subject: [PATCH] osborne1: better beeper handling (will improve software trying to play 1-bit audio) --- src/mame/drivers/osborne1.c | 5 +++++ src/mame/machine/osborne1.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mame/drivers/osborne1.c b/src/mame/drivers/osborne1.c index dca15ad78bc..704e4588e08 100644 --- a/src/mame/drivers/osborne1.c +++ b/src/mame/drivers/osborne1.c @@ -54,6 +54,10 @@ the correct rates). MAME's bitbanger seems to be able to accept the ACIA output at this rate, but the ACIA screws up when consuming data from MAME's bitbanger. +Schematics specify a WD1793 floppy controller, but we're using the Fujitsu +equivalent MB8877 here. Is it known that the original machines used one or +the other exclusively? In any case MAME emulates them identically. + ***************************************************************************/ #include "includes/osborne1.h" @@ -178,6 +182,7 @@ static INPUT_PORTS_START( osborne1 ) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("CNF") + PORT_BIT(0xF8, IP_ACTIVE_LOW, IPT_UNUSED) PORT_CONFNAME(0x06, 0x00, "Serial Speed") PORT_CONFSETTING(0x00, "300/1200") PORT_CONFSETTING(0x02, "600/2400") diff --git a/src/mame/machine/osborne1.c b/src/mame/machine/osborne1.c index 50d5ea15130..139d96ac621 100644 --- a/src/mame/machine/osborne1.c +++ b/src/mame/machine/osborne1.c @@ -212,7 +212,7 @@ WRITE8_MEMBER( osborne1_state::video_pia_port_a_w ) WRITE8_MEMBER( osborne1_state::video_pia_port_b_w ) { - m_beep_state = BIT(data, 5); + m_speaker->level_w((BIT(data, 5) && m_beep_state) ? 1 : 0); if (BIT(data, 6)) { @@ -367,11 +367,12 @@ TIMER_CALLBACK_MEMBER(osborne1_state::video_callback) { int const y = machine().first_screen()->vpos(); UINT8 const ra = y % 10; + UINT8 const port_b = m_pia1->b_output(); // Check for start/end of visible area and clear/set CA1 on video PIA if (y == 0) { - m_scroll_y = m_pia1->b_output() & 0x1F; + m_scroll_y = port_b & 0x1F; m_pia1->ca1_w(0); } else if (y == 240) @@ -434,7 +435,8 @@ TIMER_CALLBACK_MEMBER(osborne1_state::video_callback) } // The beeper is gated so it's active four out of every ten scanlines - m_speaker->level_w((m_beep_state && (ra & 0x04)) ? 1 : 0); + m_beep_state = (ra & 0x04) ? 1 : 0; + m_speaker->level_w((BIT(port_b, 5) && m_beep_state) ? 1 : 0); // Check reset key if necessary - it affects NMI if (!m_ub6a_q)