Previous 199869 Revisions Next

r20815 Thursday 7th February, 2013 at 21:02:50 UTC by Wilbert Pol
(MESS) sapi1.c: Tagmap cleanups (nw)
[src/mess/drivers]sapi1.c
[src/mess/includes]sapi1.h
[src/mess/machine]sapi1.c

trunk/src/mess/drivers/sapi1.c
r20814r20815
2727/* switch out the rom shadow */
2828WRITE8_MEMBER( sapi1_state::sapi3_00_w )
2929{
30   membank("bank1")->set_entry(0);
30   m_bank1->set_entry(0);
3131}
3232
3333READ8_MEMBER( sapi1_state::sapi2_keyboard_status_r)
trunk/src/mess/machine/sapi1.c
r20814r20815
2626READ8_MEMBER( sapi1_state::sapi1_keyboard_r )
2727{
2828   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(); }
3434   return key;
3535}
3636
r20814r20815
4343MACHINE_RESET_MEMBER(sapi1_state,sapizps3)
4444{
4545   m_keyboard_mask = 0;
46   membank("bank1")->set_entry(1);
46   m_bank1->set_entry(1);
4747}
4848
4949DRIVER_INIT_MEMBER(sapi1_state,sapizps3)
5050{
5151   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);
5353}
trunk/src/mess/includes/sapi1.h
r20814r20815
1919{
2020public:
2121   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   { }
2431
2532   required_shared_ptr<UINT8> m_sapi_video_ram;
2633   UINT8 m_keyboard_mask;
r20814r20815
4451   DECLARE_VIDEO_START(sapizps3);
4552   UINT32 screen_update_sapi1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
4653   UINT32 screen_update_sapizps3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
54
55protected:
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;
4762};
4863
4964#endif

Previous 199869 Revisions Next


© 1997-2024 The MAME Team