Skip to content

Commit

Permalink
wy85: Add beeper
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrhacker committed Sep 17, 2024
1 parent 3170abd commit e885371
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/devices/bus/wysekbd/wysegakb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ ioport_constructor wy85_keyboard_device::device_input_ports() const

u8 wy85_keyboard_device::wysekbd_get_id()
{
// Apparently doesn't have an ID
return 0xff;
// Original LSTTL version definitely lacks an ID; gate array version has this ID according to https://geekhack.org/index.php?topic=51079.0
return 0x60 ^ 0xff;
}


Expand Down
11 changes: 10 additions & 1 deletion src/mame/wyse/wy85.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
#include "cpu/mcs51/mcs51.h"
#include "machine/er1400.h"
#include "machine/mc68681.h"
#include "sound/beep.h"
#include "video/scn2674.h"
#include "screen.h"
#include "speaker.h"


namespace {
Expand All @@ -32,6 +34,7 @@ class wy85_state : public driver_device
, m_kybd(*this, "kybd")
, m_pvtc(*this, "pvtc")
, m_duart(*this, "duart")
, m_beeper(*this, "beeper")
, m_comm(*this, "comm")
, m_pr(*this, "pr")
, m_chargen(*this, "chargen")
Expand Down Expand Up @@ -82,6 +85,7 @@ class wy85_state : public driver_device
required_device<wyse_keyboard_port_device> m_kybd;
required_device<scn2672_device> m_pvtc;
required_device<scn2681_device> m_duart;
required_device<beep_device> m_beeper;
required_device<rs232_port_device> m_comm;
required_device<rs232_port_device> m_pr;

Expand Down Expand Up @@ -229,6 +233,8 @@ void wy85_state::p1_w(u8 data)
m_pr->write_rts(BIT(data, 3));

m_clr_rb = !BIT(data, 1);

m_beeper->set_state(BIT(data, 5));
}

u8 wy85_state::p3_r()
Expand Down Expand Up @@ -342,6 +348,9 @@ void wy85_state::wy85(machine_config &config)
m_duart->outport_cb().set(FUNC(wy85_state::duart_op_w));
m_duart->irq_cb().set_inputline(m_maincpu, MCS51_INT1_LINE);

SPEAKER(config, "speaker").front_center();
BEEP(config, m_beeper, 1000).add_route(ALL_OUTPUTS, "speaker", 0.10); // FIXME: not accurate; actually uses same circuit as WY-50 with 74LS14 Schmitt triggers and discrete components

RS232_PORT(config, m_comm, default_rs232_devices, nullptr); // RS423 port, also RS232 compatible
m_comm->rxd_handler().set(m_duart, FUNC(scn2681_device::rx_a_w));
m_comm->cts_handler().set(m_duart, FUNC(scn2681_device::ip0_w));
Expand Down Expand Up @@ -369,4 +378,4 @@ ROM_END
} // anonymous namespace


COMP(1985, wy85, 0, 0, wy85, wy85, wy85_state, empty_init, "Wyse Technology", "WY-85", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND)
COMP(1985, wy85, 0, 0, wy85, wy85, wy85_state, empty_init, "Wyse Technology", "WY-85", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND)

0 comments on commit e885371

Please sign in to comment.