Previous 15994 Revisions Next

r11885 Thursday 9th June, 2011 at 20:49:57 UTC by Sandro Ronco
[PCE220] Hooked up the beeper. (no whatsnew)
[src/mess/drivers]pce220.c

src/mess/drivers/pce220.c
r11884r11885
1919#include "emu.h"
2020#include "cpu/z80/z80.h"
2121#include "machine/ram.h"
22#include "sound/beep.h"
2223#include "rendlay.h"
2324
2425// Interrupt flags
r11884r11885
3233   pce220_state(const machine_config &mconfig, device_type type, const char *tag)
3334      : driver_device(mconfig, type, tag),
3435        m_maincpu(*this, "maincpu"),
35        m_ram(*this, RAM_TAG)
36        m_ram(*this, RAM_TAG),
37        m_beep(*this, BEEPER_TAG)
3638      { }
3739
3840   required_device<cpu_device> m_maincpu;
3941   required_device<device_t> m_ram;
42   required_device<device_t> m_beep;
4043
4144   // HD61202 LCD controller
4245   UINT8 m_lcd_index_row;
r11884r11885
6669   DECLARE_WRITE8_MEMBER( timer_w );
6770   DECLARE_READ8_MEMBER( port15_r );
6871   DECLARE_READ8_MEMBER( port18_r );
72   DECLARE_WRITE8_MEMBER( port18_w );
6973   DECLARE_READ8_MEMBER( port1f_r );
7074   DECLARE_WRITE8_MEMBER( kb_matrix_w );
7175   DECLARE_READ8_MEMBER( kb_r );
r11884r11885
211215   return 0;
212216}
213217
218WRITE8_MEMBER( pce220_state::port18_w )
219{
220   beep_set_state(m_beep, BIT(data, 7));
221}
222
214223READ8_MEMBER( pce220_state::port1f_r )
215224{
216225   /*
r11884r11885
302311   AM_RANGE(0x15, 0x15) AM_READ(port15_r) AM_WRITENOP
303312   AM_RANGE(0x16, 0x16) AM_READWRITE(irq_status_r, irq_ack_w)
304313   AM_RANGE(0x17, 0x17) AM_WRITE(irq_mask_w)
305   AM_RANGE(0x18, 0x18) AM_READ(port18_r) AM_WRITENOP
314   AM_RANGE(0x18, 0x18) AM_READWRITE(port18_r, port18_w)
306315   AM_RANGE(0x19, 0x19) AM_READWRITE(rom_bank_r, rom_bank_w)
307316   AM_RANGE(0x1a, 0x1a) AM_WRITENOP //cleared on BASIC init
308317   AM_RANGE(0x1b, 0x1b) AM_WRITE(ram_bank_w)
r11884r11885
508517   MCFG_PALETTE_INIT(pce220)
509518   MCFG_DEFAULT_LAYOUT(layout_lcd)
510519
520   /* sound hardware */
521   MCFG_SPEAKER_STANDARD_MONO("mono")
522   MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0)
523   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
524
511525   MCFG_TIMER_ADD_PERIODIC("pce220_timer", pce220_timer_callback, attotime::from_msec(468))
512526
513527   /* internal ram */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team