src/mess/drivers/pce220.c
| r11884 | r11885 | |
| 19 | 19 | #include "emu.h" |
| 20 | 20 | #include "cpu/z80/z80.h" |
| 21 | 21 | #include "machine/ram.h" |
| 22 | #include "sound/beep.h" |
| 22 | 23 | #include "rendlay.h" |
| 23 | 24 | |
| 24 | 25 | // Interrupt flags |
| r11884 | r11885 | |
| 32 | 33 | pce220_state(const machine_config &mconfig, device_type type, const char *tag) |
| 33 | 34 | : driver_device(mconfig, type, tag), |
| 34 | 35 | m_maincpu(*this, "maincpu"), |
| 35 | | m_ram(*this, RAM_TAG) |
| 36 | m_ram(*this, RAM_TAG), |
| 37 | m_beep(*this, BEEPER_TAG) |
| 36 | 38 | { } |
| 37 | 39 | |
| 38 | 40 | required_device<cpu_device> m_maincpu; |
| 39 | 41 | required_device<device_t> m_ram; |
| 42 | required_device<device_t> m_beep; |
| 40 | 43 | |
| 41 | 44 | // HD61202 LCD controller |
| 42 | 45 | UINT8 m_lcd_index_row; |
| r11884 | r11885 | |
| 66 | 69 | DECLARE_WRITE8_MEMBER( timer_w ); |
| 67 | 70 | DECLARE_READ8_MEMBER( port15_r ); |
| 68 | 71 | DECLARE_READ8_MEMBER( port18_r ); |
| 72 | DECLARE_WRITE8_MEMBER( port18_w ); |
| 69 | 73 | DECLARE_READ8_MEMBER( port1f_r ); |
| 70 | 74 | DECLARE_WRITE8_MEMBER( kb_matrix_w ); |
| 71 | 75 | DECLARE_READ8_MEMBER( kb_r ); |
| r11884 | r11885 | |
| 211 | 215 | return 0; |
| 212 | 216 | } |
| 213 | 217 | |
| 218 | WRITE8_MEMBER( pce220_state::port18_w ) |
| 219 | { |
| 220 | beep_set_state(m_beep, BIT(data, 7)); |
| 221 | } |
| 222 | |
| 214 | 223 | READ8_MEMBER( pce220_state::port1f_r ) |
| 215 | 224 | { |
| 216 | 225 | /* |
| r11884 | r11885 | |
| 302 | 311 | AM_RANGE(0x15, 0x15) AM_READ(port15_r) AM_WRITENOP |
| 303 | 312 | AM_RANGE(0x16, 0x16) AM_READWRITE(irq_status_r, irq_ack_w) |
| 304 | 313 | 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) |
| 306 | 315 | AM_RANGE(0x19, 0x19) AM_READWRITE(rom_bank_r, rom_bank_w) |
| 307 | 316 | AM_RANGE(0x1a, 0x1a) AM_WRITENOP //cleared on BASIC init |
| 308 | 317 | AM_RANGE(0x1b, 0x1b) AM_WRITE(ram_bank_w) |
| r11884 | r11885 | |
| 508 | 517 | MCFG_PALETTE_INIT(pce220) |
| 509 | 518 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 510 | 519 | |
| 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 | |
| 511 | 525 | MCFG_TIMER_ADD_PERIODIC("pce220_timer", pce220_timer_callback, attotime::from_msec(468)) |
| 512 | 526 | |
| 513 | 527 | /* internal ram */ |