Previous 15994 Revisions Next

r15608 Sunday 15th July, 2012 at 23:53:04 UTC by Jonathan Gevaryahu
Fix vt100 to use beep instead of speaker. Some work still needs to be done to beep.c since the phase needs to be reset in such a way that keyclicks work consistently, in addition to beeps. [Lord Nightmare]
[src/mess/drivers]vt100.c

src/mess/drivers/vt100.c
r15607r15608
1515#include "emu.h"
1616#include "cpu/i8085/i8085.h"
1717#include "cpu/z80/z80.h"
18#include "sound/speaker.h"
18#include "sound/beep.h"
1919#include "video/vtvideo.h"
2020#include "vt100.lh"
2121
r15607r15608
2727      : driver_device(mconfig, type, tag),
2828   m_maincpu(*this, "maincpu"),
2929   m_crtc(*this, "vt100_video"),
30   m_speaker(*this, SPEAKER_TAG)
30   m_speaker(*this, BEEPER_TAG)
3131   ,
3232      m_p_ram(*this, "p_ram"){ }
3333
r15607r15608
131131
132132WRITE8_MEMBER( vt100_state::vt100_keyboard_w )
133133{
134   beep_set_frequency( m_speaker, 786 ); // 7.945us per serial clock = ~125865.324hz, / 160 clocks per char = ~ 786 hz
134135   output_set_value("online_led",BIT(data, 5) ? 0 : 1);
135136   output_set_value("local_led", BIT(data, 5));
136137   output_set_value("locked_led",BIT(data, 4) ? 0 : 1);
r15607r15608
139140   output_set_value("l3_led", BIT(data, 1) ? 0 : 1);
140141   output_set_value("l4_led", BIT(data, 0) ? 0 : 1);
141142   m_key_scan = BIT(data, 6);
142   speaker_level_w(m_speaker, BIT(data, 7));
143   beep_set_state( m_speaker, BIT(data, 7));
143144}
144145
145146READ8_MEMBER( vt100_state::vt100_keyboard_r )
r15607r15608
426427
427428   /* audio hardware */
428429   MCFG_SPEAKER_STANDARD_MONO("mono")
429   MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
430   MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0)
430431   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
431432
432433   MCFG_TIMER_ADD_PERIODIC("keyboard_timer", keyboard_callback, attotime::from_hz(800))

Previous 15994 Revisions Next


© 1998-2018 The MESS Team