(MESS) pk8020.c: Reduce tagmap lookups (nw)

This commit is contained in:
Wilbert Pol 2013-02-08 21:16:01 +00:00
parent 2df53d0bd3
commit c3f9ddba8a
3 changed files with 354 additions and 337 deletions

View File

@ -14,12 +14,28 @@
#include "imagedev/cassette.h"
#include "sound/speaker.h"
#include "sound/wave.h"
#include "machine/ram.h"
class pk8020_state : public driver_device
{
public:
pk8020_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) { }
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_ppi8255_1(*this, "ppi8255_1")
, m_ppi8255_2(*this, "ppi8255_2")
, m_ppi8255_3(*this, "ppi8255_3")
, m_rs232(*this, "rs232")
, m_lan(*this, "lan")
, m_ram(*this, RAM_TAG)
, m_wd1793(*this, "wd1793")
, m_pit8253(*this, "pit8253")
, m_pic8259(*this, "pic8259")
, m_speaker(*this, SPEAKER_TAG)
, m_region_maincpu(*this, "maincpu")
, m_region_gfx1(*this, "gfx1")
{ }
UINT8 m_color;
UINT8 m_video_page;
@ -41,6 +57,7 @@ public:
DECLARE_WRITE8_MEMBER(gzu_w);
DECLARE_READ8_MEMBER(devices_r);
DECLARE_WRITE8_MEMBER(devices_w);
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
virtual void palette_init();
@ -55,6 +72,24 @@ public:
DECLARE_WRITE_LINE_MEMBER(pk8020_pit_out1);
DECLARE_WRITE_LINE_MEMBER(pk8020_pic_set_int_line);
IRQ_CALLBACK_MEMBER(pk8020_irq_callback);
protected:
required_device<cpu_device> m_maincpu;
required_device<i8255_device> m_ppi8255_1;
required_device<i8255_device> m_ppi8255_2;
required_device<i8255_device> m_ppi8255_3;
required_device<i8251_device> m_rs232;
required_device<i8251_device> m_lan;
required_device<ram_device> m_ram;
required_device<device_t> m_wd1793;
required_device<device_t> m_pit8253;
required_device<device_t> m_pic8259;
required_device<device_t> m_speaker;
required_memory_region m_region_maincpu;
required_memory_region m_region_gfx1;
ioport_port *m_io_port[16];
void pk8020_set_bank(UINT8 data);
};

File diff suppressed because it is too large Load Diff

View File

@ -18,8 +18,8 @@ void pk8020_state::video_start()
UINT32 pk8020_state::screen_update_pk8020(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int y, x, b, j;
UINT8 *gfx = memregion("gfx1")->base();
UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
UINT8 *gfx = m_region_gfx1->base();
UINT8 *ram = m_ram->pointer();
for (y = 0; y < 16; y++)
{