Previous 15994 Revisions Next

r10892 Monday 21st March, 2011 at 14:25:12 UTC by Robbbert
[A5105] Added keyclick beeper.
[src/mess/drivers]a5105.c

src/mess/drivers/a5105.c
r10891r10892
1515#include "video/upd7220.h"
1616#include "imagedev/cassette.h"
1717#include "sound/wave.h"
18#include "sound/beep.h"
1819
1920
2021class a5105_state : public driver_device
r10891r10892
2223public:
2324   a5105_state(running_machine &machine, const driver_device_config_base &config)
2425      : driver_device(machine, config),
25        m_hgdc(*this, "upd7220"),
26        m_cass(*this, "cassette")
26      m_hgdc(*this, "upd7220"),
27      m_cass(*this, "cassette"),
28        m_beep(*this, "beep")
2729      { }
2830
2931   required_device<device_t> m_hgdc;
3032   required_device<device_t> m_cass;
33   required_device<device_t> m_beep;
3134
3235   virtual void video_start();
3336   virtual bool screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect);
r10891r10892
181184      break;
182185
183186   case 6:
184      //keyclick - a beeper?
187      beep_set_state(state->m_beep, BIT(data, 0));
185188      break;
186189   }
187190}
r10891r10892
353356
354357static MACHINE_RESET(a5105)
355358{
359   a5105_state *state = machine->driver_data<a5105_state>();
356360   address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);
357361   a5105_ab_w(space, 0, 9); // turn motor off
362   beep_set_frequency(state->m_beep, 500);
358363}
359364
360365
r10891r10892
444449   MCFG_PALETTE_LENGTH(16)
445450   MCFG_PALETTE_INIT(gdc)
446451
452   /* sound hardware */
447453   MCFG_SPEAKER_STANDARD_MONO("mono")
448454   MCFG_SOUND_WAVE_ADD("wave", "cassette")
449455   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
456   MCFG_SOUND_ADD("beep", BEEP, 0)
457   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
450458
459   /* Devices */
451460   MCFG_UPD7220_ADD("upd7220", XTAL_4MHz, hgdc_intf, upd7220_map) //unknown clock
452461   MCFG_CASSETTE_ADD( "cassette", default_cassette_config )
453462MACHINE_CONFIG_END

Previous 15994 Revisions Next


© 1998-2018 The MESS Team