trunk/src/mess/machine/sapi1.c
| r20814 | r20815 | |
| 26 | 26 | READ8_MEMBER( sapi1_state::sapi1_keyboard_r ) |
| 27 | 27 | { |
| 28 | 28 | UINT8 key = 0xff; |
| 29 | | if (BIT(m_keyboard_mask, 0)) { key &= ioport("LINE0")->read(); } |
| 30 | | if (BIT(m_keyboard_mask, 1)) { key &= ioport("LINE1")->read(); } |
| 31 | | if (BIT(m_keyboard_mask, 2)) { key &= ioport("LINE2")->read(); } |
| 32 | | if (BIT(m_keyboard_mask, 3)) { key &= ioport("LINE3")->read(); } |
| 33 | | if (BIT(m_keyboard_mask, 4)) { key &= ioport("LINE4")->read(); } |
| 29 | if (BIT(m_keyboard_mask, 0)) { key &= m_line0->read(); } |
| 30 | if (BIT(m_keyboard_mask, 1)) { key &= m_line1->read(); } |
| 31 | if (BIT(m_keyboard_mask, 2)) { key &= m_line2->read(); } |
| 32 | if (BIT(m_keyboard_mask, 3)) { key &= m_line3->read(); } |
| 33 | if (BIT(m_keyboard_mask, 4)) { key &= m_line4->read(); } |
| 34 | 34 | return key; |
| 35 | 35 | } |
| 36 | 36 | |
| r20814 | r20815 | |
| 43 | 43 | MACHINE_RESET_MEMBER(sapi1_state,sapizps3) |
| 44 | 44 | { |
| 45 | 45 | m_keyboard_mask = 0; |
| 46 | | membank("bank1")->set_entry(1); |
| 46 | m_bank1->set_entry(1); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | DRIVER_INIT_MEMBER(sapi1_state,sapizps3) |
| 50 | 50 | { |
| 51 | 51 | UINT8 *RAM = memregion("maincpu")->base(); |
| 52 | | membank("bank1")->configure_entries(0, 2, &RAM[0x0000], 0xf800); |
| 52 | m_bank1->configure_entries(0, 2, &RAM[0x0000], 0xf800); |
| 53 | 53 | } |
trunk/src/mess/includes/sapi1.h
| r20814 | r20815 | |
| 19 | 19 | { |
| 20 | 20 | public: |
| 21 | 21 | sapi1_state(const machine_config &mconfig, device_type type, const char *tag) |
| 22 | | : driver_device(mconfig, type, tag) , |
| 23 | | m_sapi_video_ram(*this, "sapi_video_ram"){ } |
| 22 | : driver_device(mconfig, type, tag) |
| 23 | , m_sapi_video_ram(*this, "sapi_video_ram") |
| 24 | , m_bank1(*this, "bank1") |
| 25 | , m_line0(*this, "LINE0") |
| 26 | , m_line1(*this, "LINE1") |
| 27 | , m_line2(*this, "LINE2") |
| 28 | , m_line3(*this, "LINE3") |
| 29 | , m_line4(*this, "LINE4") |
| 30 | { } |
| 24 | 31 | |
| 25 | 32 | required_shared_ptr<UINT8> m_sapi_video_ram; |
| 26 | 33 | UINT8 m_keyboard_mask; |
| r20814 | r20815 | |
| 44 | 51 | DECLARE_VIDEO_START(sapizps3); |
| 45 | 52 | UINT32 screen_update_sapi1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 46 | 53 | UINT32 screen_update_sapizps3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | |
| 55 | protected: |
| 56 | required_memory_bank m_bank1; |
| 57 | required_ioport m_line0; |
| 58 | required_ioport m_line1; |
| 59 | required_ioport m_line2; |
| 60 | required_ioport m_line3; |
| 61 | required_ioport m_line4; |
| 47 | 62 | }; |
| 48 | 63 | |
| 49 | 64 | #endif |