mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
osborne1: better beeper handling (will improve software trying to play 1-bit audio)
This commit is contained in:
parent
7a85ac5adc
commit
7732ef8524
@ -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")
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user