Fixed all bitmap.palette() users to use m_palette instead (nw)

This commit is contained in:
Miodrag Milanovic 2014-03-15 12:08:24 +00:00
parent 7c01c1f0d6
commit 06b8fe3916
60 changed files with 230 additions and 133 deletions

View File

@ -186,7 +186,8 @@ const rom_entry *a2bus_aevm80_device::device_rom_region() const
a2bus_videx80_device::a2bus_videx80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_a2bus_card_interface(mconfig, *this),
m_crtc(*this, VIDEOTERM_MC6845_NAME)
m_crtc(*this, VIDEOTERM_MC6845_NAME),
m_palette(*this, ":palette")
{
}
@ -349,7 +350,7 @@ void a2bus_videx80_device::write_c800(address_space &space, UINT16 offset, UINT8
static MC6845_UPDATE_ROW( videoterm_update_row )
{
a2bus_videx80_device *vterm = downcast<a2bus_videx80_device *>(device->owner());
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = vterm->m_palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ra; //( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i;

View File

@ -50,6 +50,8 @@ protected:
private:
int m_rambank;
public:
required_device<palette_device> m_palette;
};
class a2bus_videoterm_device : public a2bus_videx80_device

View File

@ -255,7 +255,7 @@ static MC6845_UPDATE_ROW( grip_update_row )
static MC6845_UPDATE_ROW( grip5_update_row )
{
grip5_state *state = device->machine().driver_data<grip5_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int column, bit;
for (column = 0; column < x_count; column++)

View File

@ -276,6 +276,8 @@ static struct
size_t videoram_size;
UINT8 *videoram;
UINT8 is_superimpose;
palette_device *palette;
} cga;
@ -324,6 +326,7 @@ static int internal_pc_cga_video_start(running_machine &machine)
cga.config_input_port = machine.root_device().ioport(":pcvideo_cga_config" );
cga.palette = machine.device<palette_device>("palette");
return 0;
}
@ -482,7 +485,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -522,7 +525,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -561,7 +564,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -600,7 +603,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -644,7 +647,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row_si )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -696,7 +699,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -744,7 +747,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -804,7 +807,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -848,7 +851,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
int i;
running_machine &machine = device->machine();
@ -884,7 +887,7 @@ static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
UINT8 fg = cga.color_select & 0x0F;
int i;
running_machine &machine = device->machine();
@ -1462,7 +1465,7 @@ static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row )
{
UINT8 *videoram = cga.videoram;
UINT32 *p = &bitmap.pix32(y);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = cga.palette->palette()->entry_list_raw();
UINT16 offset_base = ra << 13;
int j;
running_machine &machine = device->machine();

View File

@ -55,7 +55,8 @@ public:
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_ay1(*this, "ay1"),
m_ay2(*this, "ay2")
m_ay2(*this, "ay2"),
m_palette(*this, "palette")
{
}
@ -79,6 +80,8 @@ public:
required_device<ay8910_device> m_ay2;
mc6845_device *m_mc6845;
device_t *m_n7751;
required_device<palette_device> m_palette;
DECLARE_READ8_MEMBER(unk_87_r);
DECLARE_WRITE8_MEMBER(unk_8a_w);
DECLARE_WRITE8_MEMBER(unk_8c_w);
@ -105,7 +108,7 @@ public:
static MC6845_UPDATE_ROW( update_row )
{
othello_state *state = device->machine().driver_data<othello_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int cx, x;
UINT32 data_address;
UINT32 tmp;

View File

@ -50,7 +50,8 @@ public:
m_floppy3(*this, "upd765a:3"),
m_video_ram(*this, "video_ram"),
m_ram(*this, RAM_TAG),
m_gfxdecode(*this, "gfxdecode")
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
@ -86,13 +87,14 @@ public:
DECLARE_FLOPPY_FORMATS( floppy_formats );
required_device<ram_device> m_ram;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
};
/* TODO */
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{
a5105_state *state = device->machine().driver_data<a5105_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int xi,gfx;
UINT8 pen;
@ -110,7 +112,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{
a5105_state *state = device->machine().driver_data<a5105_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int x;
int xi,yi;
int tile,color;

View File

@ -66,7 +66,8 @@ public:
, m_usart(*this, "usart")
, m_cass(*this, "cassette")
, m_beep(*this, "beeper")
, m_p_ram(*this, "main_ram")
, m_p_ram(*this, "main_ram"),
m_palette(*this, "palette")
{ }
DECLARE_READ8_MEMBER(port10_r);
@ -96,6 +97,8 @@ private:
required_device<cassette_image_device> m_cass;
required_device<beep_device> m_beep;
required_shared_ptr<UINT8> m_p_ram;
public:
required_device<palette_device> m_palette;
};
READ8_MEMBER( alphatro_state::port10_r )
@ -154,7 +157,7 @@ void alphatro_state::video_start()
static MC6845_UPDATE_ROW( alphatro_update_row )
{
alphatro_state *state = device->machine().driver_data<alphatro_state>();
const rgb_t *pens = bitmap.palette()->entry_list_raw();
const rgb_t *pens = state->m_palette->palette()->entry_list_raw();
bool palette = BIT(state->ioport("CONFIG")->read(), 5);
if (y==0) state->m_flashcnt++;
bool inv;

View File

@ -192,7 +192,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{
apc_state *state = device->machine().driver_data<apc_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int xi,yi,yi_trans;
int x;
UINT8 char_size;

View File

@ -92,7 +92,8 @@ public:
m_io_k3a0(*this, "K3a_0"),
m_io_k3b0(*this, "K3b_0"),
m_io_k0b(*this, "K0b"),
m_expansion(*this, "expansion"){ }
m_expansion(*this, "expansion"),
m_palette(*this, "palette"){ }
DECLARE_READ16_MEMBER(applix_inputs_r);
DECLARE_WRITE16_MEMBER(palette_w);
@ -194,6 +195,8 @@ private:
required_ioport m_io_k3b0;
required_ioport m_io_k0b;
required_shared_ptr<UINT16> m_expansion;
public:
required_device<palette_device> m_palette;
};
/*
@ -774,7 +777,7 @@ static MC6845_UPDATE_ROW( applix_update_row )
// Need to display a border colour.
// There is a monochrome mode, but no info found as yet.
applix_state *state = device->machine().driver_data<applix_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 i;
UINT16 chr,x;
UINT32 mem, vidbase = (state->m_video_latch & 15) << 14, *p = &bitmap.pix32(y);

View File

@ -116,7 +116,8 @@ public:
m_dsw(*this, "DSW"),
m_bankr(*this, "bankr"),
m_bankv(*this, "bankv"),
m_banka(*this, "banka")
m_banka(*this, "banka"),
m_palette(*this, "palette")
{
}
@ -164,6 +165,8 @@ private:
required_memory_bank m_bankr;
required_memory_bank m_bankv;
required_memory_bank m_banka;
public:
required_device<palette_device> m_palette;
};
/* Status port
@ -593,7 +596,7 @@ GFXDECODE_END
MC6845_UPDATE_ROW( bigbord2_update_row )
{
bigbord2_state *state = device->machine().driver_data<bigbord2_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx,inv;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -74,7 +74,8 @@ public:
m_cass(*this, "cassette"),
m_speaker(*this, "speaker"),
m_ym2203(*this, "ym2203"),
m_acia6850(*this, "acia6850")
m_acia6850(*this, "acia6850"),
m_palette(*this, "palette")
{
}
@ -152,6 +153,8 @@ private:
required_device<speaker_sound_device> m_speaker;
optional_device<ym2203_device> m_ym2203;
required_device<acia6850_device> m_acia6850;
public:
required_device<palette_device> m_palette;
};
#define mc6845_h_char_total (m_crtc_vreg[0])
@ -589,7 +592,7 @@ INPUT_PORTS_END
static MC6845_UPDATE_ROW( update_row )
{
bml3_state *state = device->machine().driver_data<bml3_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
// The MB-6890 has a 5-bit colour RAM region. The meaning of the bits are:
// 0: blue
// 1: red

View File

@ -92,7 +92,8 @@ public:
//m_cass(*this, "cassette"),
//m_wave(*this, WAVE_TAG),
//m_printer(*this, "centronics"),
m_crtc(*this, "crtc")
m_crtc(*this, "crtc"),
m_palette(*this, "palette")
//m_fdc(*this, "fdc")
{ }
@ -101,6 +102,7 @@ public:
//required_device<> m_wave;
//required_device<> m_printer;
required_device<mc6845_device> m_crtc;
required_device<palette_device> m_palette;
//optional_device<> m_fdc;
DECLARE_WRITE8_MEMBER(lynx48k_bank_w);
DECLARE_WRITE8_MEMBER(lynx128k_bank_w);
@ -383,8 +385,9 @@ PALETTE_INIT_MEMBER(camplynx_state, camplynx)
static MC6845_UPDATE_ROW( lynx48k_update_row )
{
camplynx_state *state = device->machine().driver_data<camplynx_state>();
UINT8 *RAM = device->machine().root_device().memregion("maincpu")->base();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 r,g,b;
UINT32 x, *p = &bitmap.pix32(y);
@ -407,8 +410,9 @@ static MC6845_UPDATE_ROW( lynx48k_update_row )
static MC6845_UPDATE_ROW( lynx128k_update_row )
{
camplynx_state *state = device->machine().driver_data<camplynx_state>();
UINT8 *RAM = device->machine().root_device().memregion("maincpu")->base();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 r,g,b;
UINT32 x, *p = &bitmap.pix32(y);

View File

@ -49,7 +49,8 @@ public:
m_maincpu(*this, "maincpu"),
m_crtc(*this, "crtc"),
m_speaker(*this, "speaker"),
m_ram(*this, "ram"){ }
m_ram(*this, "ram"),
m_palette(*this, "palette") { }
DECLARE_READ16_MEMBER( dim68k_duart_r );
DECLARE_READ16_MEMBER( dim68k_fdc_r );
@ -75,6 +76,7 @@ public:
required_device<mc6845_device> m_crtc;
required_device<speaker_sound_device> m_speaker;
required_shared_ptr<UINT16> m_ram;
required_device<palette_device> m_palette;
};
READ16_MEMBER( dim68k_state::dim68k_duart_r )
@ -225,7 +227,7 @@ void dim68k_state::video_start()
MC6845_UPDATE_ROW( dim68k_update_row )
{
dim68k_state *state = device->machine().driver_data<dim68k_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx,x,xx,inv;
UINT16 chr16=0x2020; // set to spaces if screen is off
UINT32 *p = &bitmap.pix32(y);

View File

@ -28,7 +28,8 @@ public:
m_fdc(*this, "upd765"),
m_floppy0(*this, "upd765:0:525dd"),
m_floppy1(*this, "upd765:1:525dd"),
m_video_ram(*this, "video_ram")
m_video_ram(*this, "video_ram"),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
@ -58,6 +59,7 @@ public:
required_shared_ptr<UINT8> m_video_ram;
int m_fdc_int_line;
required_device<palette_device> m_palette;
};
@ -151,7 +153,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{
dmv_state *state = device->machine().driver_data<dmv_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 * chargen = state->memregion("maincpu")->base() + 0x1000;
for( int x = 0; x < pitch; x++ )

View File

@ -32,7 +32,8 @@ public:
m_via_0(*this, VIA6522_0_TAG),
m_via_1(*this, VIA6522_1_TAG),
m_p_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu")
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette")
{
}
@ -44,6 +45,7 @@ public:
virtual void machine_reset();
virtual void video_start();
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
};
class ec65k_state : public driver_device
@ -125,7 +127,7 @@ void ec65_state::video_start()
static MC6845_UPDATE_ROW( ec65_update_row )
{
ec65_state *state = device->machine().driver_data<ec65_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx,inv;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -102,7 +102,7 @@ READ8_MEMBER(einstein_state::einstein_80col_ram_r)
static MC6845_UPDATE_ROW( einstein_6845_update_row )
{
einstein_state *einstein = device->machine().driver_data<einstein_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = einstein->m_palette->palette()->entry_list_raw();
UINT8 *data = einstein->m_region_gfx1->base();
UINT8 char_code, data_byte;
int i, x;

View File

@ -59,7 +59,8 @@ public:
m_crtc(*this, "crtc"),
m_ace(*this, "ins8250"),
m_beep(*this, "beeper"),
m_p_videoram(*this, "videoram")
m_p_videoram(*this, "videoram"),
m_palette(*this, "palette")
{
}
@ -72,6 +73,7 @@ public:
DECLARE_WRITE8_MEMBER(h19_c0_w);
DECLARE_WRITE8_MEMBER(h19_kbd_put);
required_shared_ptr<UINT8> m_p_videoram;
required_device<palette_device> m_palette;
UINT8 *m_p_chargen;
UINT8 m_term_data;
virtual void machine_reset();
@ -321,7 +323,7 @@ void h19_state::video_start()
static MC6845_UPDATE_ROW( h19_update_row )
{
h19_state *state = device->machine().driver_data<h19_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -16,10 +16,10 @@ class if800_state : public driver_device
public:
if800_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_hgdc(*this, "upd7220")
,
m_hgdc(*this, "upd7220"),
m_video_ram(*this, "video_ram"),
m_maincpu(*this, "maincpu") { }
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette") { }
required_device<upd7220_device> m_hgdc;
@ -27,12 +27,13 @@ public:
virtual void machine_start();
virtual void machine_reset();
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
};
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{
if800_state *state = device->machine().driver_data<if800_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int xi,gfx;
UINT8 pen;

View File

@ -19,12 +19,14 @@ public:
ipds_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_crtc(*this, "i8275")
m_crtc(*this, "i8275"),
m_palette(*this, "palette")
{
}
required_device<cpu_device> m_maincpu;
required_device<i8275_device> m_crtc;
required_device<palette_device> m_palette;
DECLARE_READ8_MEMBER(ipds_b0_r);
DECLARE_READ8_MEMBER(ipds_b1_r);
DECLARE_READ8_MEMBER(ipds_c0_r);
@ -81,7 +83,7 @@ static I8275_DISPLAY_PIXELS(ipds_display_pixels)
{
int i;
ipds_state *state = device->machine().driver_data<ipds_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *charmap = state->memregion("chargen")->base();
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;

View File

@ -36,7 +36,8 @@ public:
lola8a_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_cass(*this, "cassette")
, m_cass(*this, "cassette"),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
@ -55,6 +56,8 @@ public:
private:
UINT8 m_portb;
required_device<cassette_image_device> m_cass;
public:
required_device<palette_device> m_palette;
};
static ADDRESS_MAP_START(lola8a_mem, AS_PROGRAM, 8, lola8a_state)
@ -197,7 +200,7 @@ static MC6845_UPDATE_ROW( lola8a_update_row )
{
lola8a_state *state = device->machine().driver_data<lola8a_state>();
address_space &program = state->m_maincpu->space(AS_PROGRAM);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
for (int sx = 0; sx < x_count; sx++)
{

View File

@ -33,7 +33,8 @@ public:
driver_device(mconfig, type, tag),
m_p_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_acia(*this, "acia")
m_acia(*this, "acia"),
m_palette(*this, "palette")
{
}
@ -51,6 +52,8 @@ private:
UINT8 m_term_data;
required_device<z80_device> m_maincpu;
required_device<acia6850_device> m_acia;
public:
required_device<palette_device> m_palette;
};
static ADDRESS_MAP_START(mx2178_mem, AS_PROGRAM, 8, mx2178_state)
@ -101,7 +104,7 @@ static ASCII_KEYBOARD_INTERFACE( keyboard_intf )
static MC6845_UPDATE_ROW( update_row )
{
mx2178_state *state = device->machine().driver_data<mx2178_state>();
const rgb_t *pens = bitmap.palette()->entry_list_raw();
const rgb_t *pens = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -75,7 +75,8 @@ public:
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
, m_audio(*this, "sn1")
, m_rtc(*this, "rtc")
, m_rtc(*this, "rtc"),
m_palette(*this, "palette")
{ }
DECLARE_READ8_MEMBER(mycom_upper_r);
@ -117,6 +118,8 @@ private:
required_device<floppy_connector> m_floppy1;
required_device<sn76489_device> m_audio;
required_device<msm5832_device> m_rtc;
public:
required_device<palette_device> m_palette;
};
@ -130,7 +133,7 @@ void mycom_state::video_start()
static MC6845_UPDATE_ROW( mycom_update_row )
{
mycom_state *state = device->machine().driver_data<mycom_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx=0,z;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -148,7 +148,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{
mz3500_state *state = device->machine().driver_data<mz3500_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int x;
int xi,yi;
int tile;

View File

@ -16,11 +16,11 @@ class mz6500_state : public driver_device
public:
mz6500_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_hgdc(*this, "upd7220"),
m_fdc(*this, "upd765")
,
m_hgdc(*this, "upd7220"),
m_fdc(*this, "upd765"),
m_video_ram(*this, "video_ram"),
m_maincpu(*this, "maincpu") { }
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette") { }
required_device<upd7220_device> m_hgdc;
required_device<upd765a_device> m_fdc;
@ -32,12 +32,13 @@ public:
virtual void machine_reset();
virtual void video_start();
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
};
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{
mz6500_state *state = device->machine().driver_data<mz6500_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int gfx[3];
UINT8 i,pen;

View File

@ -21,13 +21,14 @@ class pasopia_state : public driver_device
public:
pasopia_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_ppi0(*this, "ppi8255_0"),
m_ppi1(*this, "ppi8255_1"),
m_ppi2(*this, "ppi8255_2"),
m_ctc(*this, "z80ctc"),
m_pio(*this, "z80pio"),
m_crtc(*this, "crtc")
m_maincpu(*this, "maincpu"),
m_ppi0(*this, "ppi8255_0"),
m_ppi1(*this, "ppi8255_1"),
m_ppi2(*this, "ppi8255_2"),
m_ctc(*this, "z80ctc"),
m_pio(*this, "z80pio"),
m_crtc(*this, "crtc"),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
@ -37,6 +38,7 @@ public:
required_device<z80ctc_device> m_ctc;
required_device<z80pio_device> m_pio;
required_device<mc6845_device> m_crtc;
required_device<palette_device> m_palette;
DECLARE_READ8_MEMBER(pasopia_romram_r);
DECLARE_WRITE8_MEMBER(pasopia_ram_w);
@ -86,7 +88,7 @@ void pasopia_state::video_start()
MC6845_UPDATE_ROW( pasopia_update_row )
{
pasopia_state *state = device->machine().driver_data<pasopia_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *m_p_chargen = state->memregion("chargen")->base();
UINT8 chr,gfx,fg=7,bg=0; // colours need to be determined
UINT16 mem,x;

View File

@ -794,7 +794,7 @@ UINT32 pc9801_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{
pc9801_state *state = device->machine().driver_data<pc9801_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int xi;
int res_x,res_y;
UINT8 pen;
@ -856,7 +856,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{
pc9801_state *state = device->machine().driver_data<pc9801_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int xi,yi;
int x;
UINT8 char_size;

View File

@ -48,11 +48,11 @@ class pyl601_state : public driver_device
public:
pyl601_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_speaker(*this, "speaker"),
m_fdc(*this, "upd765"),
m_ram(*this, RAM_TAG)
,
m_maincpu(*this, "maincpu") { }
m_speaker(*this, "speaker"),
m_fdc(*this, "upd765"),
m_ram(*this, RAM_TAG),
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette") { }
UINT8 m_rom_page;
UINT32 m_vdisk_addr;
@ -87,6 +87,7 @@ public:
INTERRUPT_GEN_MEMBER(pyl601_interrupt);
DECLARE_FLOPPY_FORMATS( floppy_formats );
required_device<cpu_device> m_maincpu;
required_device<palette_device> m_palette;
};
@ -385,7 +386,7 @@ void pyl601_state::video_start()
static MC6845_UPDATE_ROW( pyl601_update_row )
{
pyl601_state *state = device->machine().driver_data<pyl601_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *charrom = state->memregion("chargen")->base();
int column, bit, i;
@ -428,7 +429,7 @@ static MC6845_UPDATE_ROW( pyl601_update_row )
static MC6845_UPDATE_ROW( pyl601a_update_row )
{
pyl601_state *state = device->machine().driver_data<pyl601_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *charrom = state->memregion("chargen")->base();
int column, bit, i;

View File

@ -154,7 +154,7 @@ public:
static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
{
qx10_state *state = device->machine().driver_data<qx10_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int xi,gfx[3];
UINT8 pen;
@ -184,7 +184,7 @@ static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
{
qx10_state *state = device->machine().driver_data<qx10_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int x;
int xi,yi;
int tile;

View File

@ -53,7 +53,8 @@ public:
m_line2(*this, "LINE2"),
m_line3(*this, "LINE3"),
m_line4(*this, "LINE4"),
m_maincpu(*this, "maincpu")
m_maincpu(*this, "maincpu"),
m_palette(*this, "palette")
{
}
@ -86,6 +87,8 @@ private:
required_ioport m_line3;
required_ioport m_line4;
required_device<cpu_device> m_maincpu;
public:
required_device<palette_device> m_palette;
};
static const UINT8 MHB2501[] = {
@ -407,7 +410,7 @@ UINT32 sapi1_state::screen_update_sapi3(screen_device &screen, bitmap_ind16 &bit
static MC6845_UPDATE_ROW( update_row )
{
sapi1_state *state = device->machine().driver_data<sapi1_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx,inv;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -28,13 +28,15 @@ public:
m_maincpu(*this, "maincpu"),
m_uart(*this, "i8251"),
m_ppi(*this, "i8255"),
m_crtc(*this, "i8275")
m_crtc(*this, "i8275"),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
required_device<i8251_device> m_uart;
required_device<i8255_device> m_ppi;
required_device<i8275_device> m_crtc;
required_device<palette_device> m_palette;
DECLARE_WRITE8_MEMBER(sm1800_8255_portb_w);
DECLARE_WRITE8_MEMBER(sm1800_8255_portc_w);
DECLARE_READ8_MEMBER(sm1800_8255_porta_r);
@ -88,7 +90,7 @@ static I8275_DISPLAY_PIXELS(sm1800_display_pixels)
{
int i;
sm1800_state *state = device->machine().driver_data<sm1800_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *charmap = state->memregion("chargen")->base();
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp)

View File

@ -76,7 +76,8 @@ public:
m_floppy0(*this, "fdc:0"),
m_beep(*this, "beeper"),
m_maincpu(*this, "maincpu"),
m_acia(*this, "acia")
m_acia(*this, "acia"),
m_palette(*this, "palette")
{
}
@ -105,6 +106,8 @@ private:
optional_device<beep_device> m_beep;
required_device<cpu_device> m_maincpu;
required_device<acia6850_device> m_acia;
public:
required_device<palette_device> m_palette;
};
@ -206,7 +209,7 @@ WRITE8_MEMBER( tavernie_state::ds_w )
static MC6845_UPDATE_ROW( update_row )
{
tavernie_state *state = device->machine().driver_data<tavernie_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx=0;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -394,7 +394,7 @@ INPUT_PORTS_END
UINT32 tiki100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
UINT16 addr = (m_scroll << 7);
int sx, y, pixel, mode = (m_mode >> 4) & 0x03;

View File

@ -84,7 +84,7 @@ static I8275_DISPLAY_PIXELS(tim100_display_pixels)
{
tim100_state *state = device->machine().driver_data<tim100_state>();
int i;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *charmap = state->memregion("chargen")->base();
UINT8 pixels = charmap[(linecount & 15) + (charcode << 4)];
if (vsp)

View File

@ -513,7 +513,7 @@ void tvc_state::machine_reset()
static MC6845_UPDATE_ROW( tvc_update_row )
{
tvc_state *state = device->machine().driver_data<tvc_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
UINT8 *vram = state->memregion("vram")->base() + ((state->m_vram_bank & 0x30)<<10);
UINT16 offset = ((ma*4 + ra*0x40) & 0x3fff);

View File

@ -54,7 +54,8 @@ public:
m_maincpu(*this, "maincpu"),
m_pit(*this, "pit"),
m_dma(*this, "dma"),
m_uart(*this, "uart")
m_uart(*this, "uart"),
m_palette(*this, "palette")
{
}
@ -82,6 +83,8 @@ private:
required_device<pit8253_device> m_pit;
required_device<i8257_device> m_dma;
required_device<i8251_device> m_uart;
public:
required_device<palette_device> m_palette;
};
static ADDRESS_MAP_START( unior_mem, AS_PROGRAM, 8, unior_state )
@ -256,7 +259,7 @@ WRITE8_MEMBER( unior_state::scroll_w )
static I8275_DISPLAY_PIXELS(display_pixels)
{
unior_state *state = device->machine().driver_data<unior_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 gfx = state->m_p_chargen[(linecount & 7) | (charcode << 3)];
if (vsp)
gfx = 0;

View File

@ -75,7 +75,8 @@ public:
m_floppy0(*this, "fdc:0"),
m_speaker(*this, "speaker"),
m_acia0(*this, "acia0"),
m_acia1(*this, "acia1")
m_acia1(*this, "acia1"),
m_palette(*this, "palette")
{
}
@ -107,6 +108,8 @@ private:
required_device<speaker_sound_device> m_speaker;
required_device<acia6850_device> m_acia0;
required_device<acia6850_device> m_acia1;
public:
required_device<palette_device> m_palette;
};
@ -168,7 +171,7 @@ GFXDECODE_END
MC6845_UPDATE_ROW( v6809_update_row )
{
v6809_state *state = device->machine().driver_data<v6809_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -268,7 +268,7 @@ static MC6845_UPDATE_ROW( victor9k_update_row )
{
victor9k_state *state = device->machine().driver_data<victor9k_state>();
address_space &program = state->m_maincpu->space(AS_PROGRAM);
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
if (BIT(ma, 13))
{

View File

@ -57,7 +57,8 @@ public:
m_crtc(*this, "crtc"),
m_fdc (*this, "fdc"),
m_floppy0(*this, "fdc:0"),
m_floppy1(*this, "fdc:1")
m_floppy1(*this, "fdc:1"),
m_palette(*this, "palette")
{
}
@ -95,6 +96,8 @@ private:
required_device<fd1793_t> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
public:
required_device<palette_device> m_palette;
};
static ADDRESS_MAP_START( zorba_mem, AS_PROGRAM, 8, zorba_state )
@ -259,7 +262,7 @@ static I8275_DISPLAY_PIXELS( zorba_update_chr )
{
int i;
zorba_state *state = device->machine().driver_data<zorba_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 gfx = state->m_p_chargen[(linecount & 15) + (charcode << 4)];
if (vsp)

View File

@ -39,7 +39,8 @@ public:
m_maincpu(*this, "maincpu"),
m_crtc(*this, "crtc"),
m_8250(*this, "ins8250"),
m_beep(*this, "beeper")
m_beep(*this, "beeper"),
m_palette(*this, "palette")
{
}
@ -59,6 +60,8 @@ private:
required_device<mc6845_device> m_crtc;
required_device<ins8250_device> m_8250;
required_device<beep_device> m_beep;
public:
required_device<palette_device> m_palette;
};
@ -214,7 +217,7 @@ void zrt80_state::video_start()
static MC6845_UPDATE_ROW( zrt80_update_row )
{
zrt80_state *state = device->machine().driver_data<zrt80_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx,inv;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);

View File

@ -62,7 +62,8 @@ public:
m_ACCCON_IRR(CLEAR_LINE),
m_via_system_irq(CLEAR_LINE),
m_via_user_irq(CLEAR_LINE),
m_acia_irq(CLEAR_LINE)
m_acia_irq(CLEAR_LINE),
m_palette(*this, "palette")
{
}
@ -404,6 +405,7 @@ public: // HACK FOR MC6845
void BBC_Cassette_motor(unsigned char status);
void bbc_update_fdq_int(int state);
unsigned int calculate_video_address(int ma,int ra);
required_device<palette_device> m_palette;
};

View File

@ -90,7 +90,8 @@ public:
m_mc6845(*this, "crtc"),
m_videoram(*this, "videoram"),
m_maincpu(*this, "maincpu"),
m_ram(*this, RAM_TAG) { }
m_ram(*this, RAM_TAG),
m_palette(*this, "palette") { }
required_device<mc6845_device> m_mc6845;
required_shared_ptr<UINT8> m_videoram;
@ -210,6 +211,7 @@ public:
void dgn_beta_frame_interrupt (int data);
void dgn_beta_line_interrupt (int data);
required_device<ram_device> m_ram;
required_device<palette_device> m_palette;
};

View File

@ -151,6 +151,7 @@ protected:
required_ioport m_buttons;
required_ioport m_config;
optional_ioport m_80column_dips;
public:
optional_device<palette_device> m_palette;
void einstein_scan_keyboard();

View File

@ -32,7 +32,8 @@ public:
m_floppy0(*this, "fdc:0"),
m_floppy1(*this, "fdc:1"),
m_crtc(*this, "crtc"),
m_beep(*this, "beeper")
m_beep(*this, "beeper"),
m_palette(*this, "palette")
{}
DECLARE_WRITE_LINE_MEMBER(write_centronics_busy);
@ -102,6 +103,8 @@ private:
required_device<floppy_connector> m_floppy1;
optional_device<mc6845_device> m_crtc;
required_device<beep_device> m_beep;
public:
required_device<palette_device> m_palette;
};

View File

@ -97,7 +97,8 @@ public:
m_pic(*this, PIC8259_TAG),
m_fdc(*this, FDC_TAG),
m_speaker(*this, "speaker"),
m_ram(*this, RAM_TAG)
m_ram(*this, RAM_TAG),
m_palette(*this, "palette")
{
}
@ -110,6 +111,7 @@ public:
required_device<fd1793_device> m_fdc;
required_device<speaker_sound_device> m_speaker;
required_device<ram_device> m_ram;
required_device<palette_device> m_palette;
//DECLARE_READ8_MEMBER(pic8259_r);
//DECLARE_WRITE8_MEMBER(pic8259_w);
//DECLARE_READ8_MEMBER(mbc55x_disk_r);

View File

@ -76,7 +76,8 @@ public:
m_io_x12(*this, "X12"),
m_io_x13(*this, "X13"),
m_io_x14(*this, "X14"),
m_screen(*this, "screen") { }
m_screen(*this, "screen"),
m_palette(*this, "palette") { }
DECLARE_WRITE8_MEMBER( mbee_04_w );
DECLARE_WRITE8_MEMBER( mbee_06_w );
@ -220,6 +221,8 @@ private:
optional_ioport m_io_x13;
optional_ioport m_io_x14;
required_device<screen_device> m_screen;
public:
required_device<palette_device> m_palette;
void machine_reset_common_disk();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);

View File

@ -32,7 +32,8 @@ public:
m_isabus(*this, "isa"),
m_speaker(*this, "speaker"),
m_cassette(*this, "cassette"),
m_ram(*this, RAM_TAG) { }
m_ram(*this, RAM_TAG),
m_palette(*this, "palette") { }
required_device<cpu_device> m_maincpu;
required_device<pic8259_device> m_pic8259;
@ -93,7 +94,7 @@ public:
DECLARE_WRITE8_MEMBER(p1_ppi2_porta_w);
DECLARE_WRITE8_MEMBER(p1_ppi2_portb_w);
DECLARE_READ8_MEMBER(p1_ppi2_portc_r);
required_device<palette_device> m_palette;
const char *m_cputag;
};

View File

@ -46,7 +46,8 @@ public:
m_io_cline4(*this, "CLINE4"),
m_io_cline5(*this, "CLINE5"),
m_io_cline6(*this, "CLINE6"),
m_io_cline7(*this, "CLINE7") { }
m_io_cline7(*this, "CLINE7"),
m_palette(*this, "palette") { }
virtual void video_start();
@ -105,8 +106,10 @@ protected:
optional_ioport m_io_cline6;
optional_ioport m_io_cline7;
void radio86_init_keyboard();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
void radio86_init_keyboard();
public:
required_device<palette_device> m_palette;
};

View File

@ -142,8 +142,9 @@ protected:
required_ioport m_line10;
required_ioport m_joysticks;
required_ioport m_buttons;
public:
optional_device<palette_device> m_palette;
protected:
void svi318_set_banks();
void svi318_80col_init();
void svi318_vdp_interrupt(int i);

View File

@ -86,7 +86,8 @@ public:
m_ram(*this, RAM_TAG),
m_sound(*this, "custom"),
m_cassette(*this, "cassette"),
m_centronics(*this, CENTRONICS_TAG)
m_centronics(*this, CENTRONICS_TAG),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
@ -94,6 +95,7 @@ public:
required_device<tvc_sound_device> m_sound;
required_device<cassette_image_device> m_cassette;
required_device<centronics_device> m_centronics;
required_device<palette_device> m_palette;
void machine_start();
void machine_reset();

View File

@ -92,7 +92,8 @@ public:
m_lms(0),
m_brdy(1),
m_sync(1),
m_gcrerr(0)
m_gcrerr(0),
m_palette(*this, "palette")
{ }
required_device<cpu_device> m_maincpu;
@ -213,6 +214,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(mux_serial_b_w);
DECLARE_WRITE_LINE_MEMBER(mux_serial_a_w);
IRQ_CALLBACK_MEMBER(victor9k_irq_callback);
required_device<palette_device> m_palette;
};
#endif

View File

@ -326,7 +326,7 @@ READ8_MEMBER(svi318_state::svi318_fdc_irqdrq_r)
MC6845_UPDATE_ROW( svi806_crtc6845_update_row )
{
svi318_state *state = device->machine().driver_data<svi318_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
int i;
for( i = 0; i < x_count; i++ )

View File

@ -165,7 +165,7 @@ WRITE8_MEMBER(bbc_state::bbc_videoULA_w)
static MC6845_UPDATE_ROW( vid_update_row )
{
bbc_state *state = device->machine().driver_data<bbc_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
if (state->m_videoULA_teletext_normal_select)
{

View File

@ -99,7 +99,7 @@ the access to the video memory is unclear to me at the moment.
static MC6845_UPDATE_ROW( dgnbeta_update_row )
{
dgn_beta_state *state = device->machine().driver_data<dgn_beta_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 *videoram = state->m_videoram;
UINT32 *p = &bitmap.pix32(y);
int i;

View File

@ -137,7 +137,7 @@ UINT32 kaypro_state::screen_update_kaypro2x(screen_device &screen, bitmap_rgb32
MC6845_UPDATE_ROW( kaypro2x_update_row )
{
kaypro_state *state = device->machine().driver_data<kaypro_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
UINT16 x;
UINT8 gfx,fg,bg;

View File

@ -90,7 +90,7 @@ static void video_debug(running_machine &machine, int ref, int params, const cha
static MC6845_UPDATE_ROW( vid_update_row )
{
mbc55x_state *mstate = device->machine().driver_data<mbc55x_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = mstate->m_palette->palette()->entry_list_raw();
UINT8 *ram = &mstate->m_ram->pointer()[0];
UINT8 *red = &mstate->m_video_mem[RED_PLANE_OFFSET];

View File

@ -418,7 +418,7 @@ MC6845_ON_UPDATE_ADDR_CHANGED( mbee256_update_addr )
MC6845_UPDATE_ROW( mbee_update_row )
{
mbee_state *state = device->machine().driver_data<mbee_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);
@ -457,7 +457,7 @@ MC6845_UPDATE_ROW( mbee_update_row )
MC6845_UPDATE_ROW( mbeeic_update_row )
{
mbee_state *state = device->machine().driver_data<mbee_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,gfx,fg,bg;
UINT16 mem,x,col;
UINT16 colourm = (state->m_08 & 0x0e) << 7;
@ -501,7 +501,7 @@ MC6845_UPDATE_ROW( mbeeic_update_row )
MC6845_UPDATE_ROW( mbeeppc_update_row )
{
mbee_state *state = device->machine().driver_data<mbee_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 gfx,fg,bg;
UINT16 mem,x,col,chr;
UINT32 *p = &bitmap.pix32(y);

View File

@ -64,6 +64,8 @@ static struct {
UINT8 hsync;
UINT8 *videoram;
palette_device *palette;
} aga;
@ -124,7 +126,7 @@ static WRITE_LINE_DEVICE_HANDLER( aga_vsync_changed ) {
/* colors need fixing in the mda_text_* functions ! */
static MC6845_UPDATE_ROW( mda_text_inten_update_row ) {
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
@ -185,7 +187,7 @@ static MC6845_UPDATE_ROW( mda_text_inten_update_row ) {
static MC6845_UPDATE_ROW( mda_text_blink_update_row ) {
UINT8 *videoram = aga.videoram;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra;
int i;
@ -246,7 +248,7 @@ static MC6845_UPDATE_ROW( mda_text_blink_update_row ) {
static MC6845_UPDATE_ROW( cga_text_inten_update_row ) {
UINT8 *videoram = aga.videoram;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
int i;
@ -275,7 +277,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row ) {
}
static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) {
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y);
int i;
@ -304,7 +306,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) {
}
static MC6845_UPDATE_ROW( cga_text_blink_update_row ) {
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y);
int i;
@ -337,7 +339,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row ) {
}
static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) {
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y);
int i;
@ -372,7 +374,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) {
}
static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) {
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT8 *videoram = aga.videoram;
UINT32 *p = &bitmap.pix32(y);
int i;
@ -398,7 +400,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) {
static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) {
UINT8 *videoram = aga.videoram;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
int i;
@ -431,7 +433,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) {
static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) {
UINT8 *videoram = aga.videoram;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
int i;
@ -456,7 +458,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) {
static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) {
UINT8 *videoram = aga.videoram;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = aga.palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(y);
UINT8 fg = aga.cga_color_select & 0x0F;
int i;
@ -719,6 +721,7 @@ VIDEO_START( pc_aga )
aga.mda_chr_gen = machine.root_device().memregion("gfx1")->base() + 0x1000;
aga.cga_chr_gen = machine.root_device().memregion("gfx1")->base();
aga.videoram = auto_alloc_array(machine, UINT8, 0x10000);
aga.palette = machine.device<palette_device>(":palette");
}
VIDEO_START( pc200 )
@ -750,6 +753,7 @@ VIDEO_START( pc200 )
aga.mda_chr_gen = machine.root_device().memregion("gfx1")->base();
aga.cga_chr_gen = machine.root_device().memregion("gfx1")->base() + 0x1000;
aga.videoram = auto_alloc_array(machine, UINT8, 0x10000);
aga.palette = machine.device<palette_device>(":palette");
memset(aga.videoram, 0, sizeof(UINT8) * 0x10000);
}

View File

@ -184,7 +184,7 @@ void p1_state::set_palette_luts(void)
POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row )
{
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(ra);
UINT16 odd, offset;
int i;
@ -211,7 +211,7 @@ POISK1_UPDATE_ROW( p1_state::cga_gfx_2bpp_update_row )
POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row )
{
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(ra);
UINT8 fg = 15, bg = BG_COLOR(m_video.color_select_68);
UINT16 odd, offset;
@ -243,7 +243,7 @@ POISK1_UPDATE_ROW( p1_state::cga_gfx_1bpp_update_row )
POISK1_UPDATE_ROW( p1_state::poisk1_gfx_1bpp_update_row )
{
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = m_palette->palette()->entry_list_raw();
UINT32 *p = &bitmap.pix32(ra);
UINT8 fg, bg = BG_COLOR(m_video.color_select_68);
UINT16 odd, offset;

View File

@ -15,7 +15,7 @@ I8275_DISPLAY_PIXELS(radio86_display_pixels)
{
radio86_state *state = device->machine().driver_data<radio86_state>();
int i;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap;
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) {
@ -37,7 +37,7 @@ I8275_DISPLAY_PIXELS(mikrosha_display_pixels)
{
radio86_state *state = device->machine().driver_data<radio86_state>();
int i;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap + (state->m_mikrosha_font_page & 1) * 0x400;
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) {
@ -58,7 +58,7 @@ I8275_DISPLAY_PIXELS(apogee_display_pixels)
{
radio86_state *state = device->machine().driver_data<radio86_state>();
int i;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap + (gpa & 1) * 0x400;
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) {
@ -79,7 +79,7 @@ I8275_DISPLAY_PIXELS(partner_display_pixels)
{
radio86_state *state = device->machine().driver_data<radio86_state>();
int i;
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
const UINT8 *charmap = state->m_charmap + 0x400 * (gpa * 2 + hlgt);
UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
if (vsp) {

View File

@ -389,7 +389,7 @@ UINT32 super80_state::screen_update_super80v(screen_device &screen, bitmap_rgb32
MC6845_UPDATE_ROW( super80v_update_row )
{
super80_state *state = device->machine().driver_data<super80_state>();
const rgb_t *palette = bitmap.palette()->entry_list_raw();
const rgb_t *palette = state->m_palette->palette()->entry_list_raw();
UINT8 chr,col,gfx,fg,bg=0;
UINT16 mem,x;
UINT32 *p = &bitmap.pix32(y);