diff --git a/src/emu/screen.c b/src/emu/screen.c index c23c879f833..6d89664883e 100644 --- a/src/emu/screen.c +++ b/src/emu/screen.c @@ -275,6 +275,8 @@ void screen_device::device_start() // named 'palette'; finally, look for a global 'palette' at the root if (m_palette_tag != NULL) m_palette = siblingdevice(m_palette_tag); + if (m_palette == NULL) + m_palette = siblingdevice("palette"); if (m_palette == NULL) m_palette = subdevice("palette"); if (m_palette == NULL) diff --git a/src/mess/drivers/c65.c b/src/mess/drivers/c65.c index d6ad1585751..e1299c40245 100644 --- a/src/mess/drivers/c65.c +++ b/src/mess/drivers/c65.c @@ -564,6 +564,7 @@ static MACHINE_CONFIG_START( c65, c65_state ) MCFG_SCREEN_SIZE(525 * 2, 520 * 2) MCFG_SCREEN_VISIBLE_AREA(VIC6567_STARTVISIBLECOLUMNS ,(VIC6567_STARTVISIBLECOLUMNS + VIC6567_VISIBLECOLUMNS - 1) * 2, VIC6567_STARTVISIBLELINES, VIC6567_STARTVISIBLELINES + VIC6567_VISIBLELINES - 1) MCFG_SCREEN_UPDATE_DRIVER(c65_state, screen_update_c65) + MCFG_SCREEN_PALETTE("vic3:palette") MCFG_VIC3_ADD("vic3", c65_vic3_ntsc_intf) @@ -600,6 +601,7 @@ static MACHINE_CONFIG_DERIVED( c65pal, c65 ) MCFG_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE) MCFG_SCREEN_SIZE(625 * 2, 520 * 2) MCFG_SCREEN_VISIBLE_AREA(VIC6569_STARTVISIBLECOLUMNS, (VIC6569_STARTVISIBLECOLUMNS + VIC6569_VISIBLECOLUMNS - 1) * 2, VIC6569_STARTVISIBLELINES, VIC6569_STARTVISIBLELINES + VIC6569_VISIBLELINES - 1) + MCFG_SCREEN_PALETTE("vic3:palette") MCFG_DEVICE_REMOVE("vic3") MCFG_VIC3_ADD("vic3", c65_vic3_pal_intf) diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c index ed57cf5b10a..987e461b00e 100644 --- a/src/mess/drivers/msx.c +++ b/src/mess/drivers/msx.c @@ -1267,6 +1267,7 @@ static MACHINE_CONFIG_START( msx2p, msx_state ) MCFG_SCREEN_UPDATE_DEVICE("v9958", v9958_device, screen_update) MCFG_SCREEN_SIZE(MSX2_TOTAL_XRES_PIXELS, 262*2) MCFG_SCREEN_VISIBLE_AREA(MSX2_XBORDER_PIXELS - MSX2_VISIBLE_XBORDER_PIXELS, MSX2_TOTAL_XRES_PIXELS - MSX2_XBORDER_PIXELS + MSX2_VISIBLE_XBORDER_PIXELS - 1, MSX2_YBORDER_PIXELS - MSX2_VISIBLE_YBORDER_PIXELS, MSX2_TOTAL_YRES_PIXELS - MSX2_YBORDER_PIXELS + MSX2_VISIBLE_YBORDER_PIXELS - 1) + MCFG_SCREEN_PALETTE("v9958:palette") /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") diff --git a/src/mess/drivers/ngp.c b/src/mess/drivers/ngp.c index efe6d61abe3..5ffcfb91fba 100644 --- a/src/mess/drivers/ngp.c +++ b/src/mess/drivers/ngp.c @@ -839,6 +839,9 @@ static MACHINE_CONFIG_DERIVED( ngp, ngp_common ) MCFG_K1GE_ADD( "k1ge", XTAL_6_144MHz, "screen", WRITELINE( ngp_state, ngp_vblank_pin_w ), WRITELINE( ngp_state, ngp_hblank_pin_w ) ) + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_PALETTE("k1ge:palette") + MCFG_CARTSLOT_ADD("cart") MCFG_CARTSLOT_EXTENSION_LIST("bin,ngp,npc,ngc") MCFG_CARTSLOT_NOT_MANDATORY @@ -855,6 +858,9 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ngpc, ngp_common ) MCFG_K2GE_ADD( "k1ge", XTAL_6_144MHz, "screen", WRITELINE( ngp_state, ngp_vblank_pin_w ), WRITELINE( ngp_state, ngp_hblank_pin_w ) ) + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_PALETTE("k1ge:palette") + MCFG_CARTSLOT_ADD("cart") MCFG_CARTSLOT_EXTENSION_LIST("bin,ngp,npc,ngc") MCFG_CARTSLOT_NOT_MANDATORY diff --git a/src/mess/drivers/pce.c b/src/mess/drivers/pce.c index 29b5892a011..1760a3d7a05 100644 --- a/src/mess/drivers/pce.c +++ b/src/mess/drivers/pce.c @@ -380,6 +380,7 @@ static MACHINE_CONFIG_START( pce_common, pce_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK, HUC6260_WPF, 64, 64 + 1024 + 64, HUC6260_LPF, 18, 18 + 242) MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update ) + MCFG_SCREEN_PALETTE("huc6260:palette") MCFG_HUC6260_ADD( "huc6260", MAIN_CLOCK, pce_huc6260_config ) MCFG_HUC6270_ADD( "huc6270", pce_huc6270_config ) @@ -422,6 +423,7 @@ static MACHINE_CONFIG_START( sgx, pce_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(MAIN_CLOCK, HUC6260_WPF, 64, 64 + 1024 + 64, HUC6260_LPF, 18, 18 + 242) MCFG_SCREEN_UPDATE_DRIVER( pce_state, screen_update ) + MCFG_SCREEN_PALETTE("huc6260:palette") MCFG_HUC6260_ADD( "huc6260", MAIN_CLOCK, sgx_huc6260_config ) MCFG_HUC6270_ADD( "huc6270_0", sgx_huc6270_0_config ) diff --git a/src/mess/drivers/ti990_10.c b/src/mess/drivers/ti990_10.c index 368f0289e4d..a5f0d71caef 100644 --- a/src/mess/drivers/ti990_10.c +++ b/src/mess/drivers/ti990_10.c @@ -239,6 +239,7 @@ static MACHINE_CONFIG_START( ti990_10, ti990_10_state ) MCFG_SCREEN_SIZE(560, 280) MCFG_SCREEN_VISIBLE_AREA(0, 560-1, 0, /*250*/280-1) MCFG_SCREEN_UPDATE_DRIVER(ti990_10_state, screen_update_ti990_10) + MCFG_SCREEN_PALETTE("vdt911:palette") MCFG_VDT911_VIDEO_ADD("vdt911", vdt911_intf) diff --git a/src/mess/drivers/ti990_4.c b/src/mess/drivers/ti990_4.c index b8aae6e7151..10b35c7ce4c 100644 --- a/src/mess/drivers/ti990_4.c +++ b/src/mess/drivers/ti990_4.c @@ -350,9 +350,11 @@ static MACHINE_CONFIG_START( ti990_4, ti990_4_state ) #if VIDEO_911 MCFG_SCREEN_SIZE(560, 280) MCFG_SCREEN_VISIBLE_AREA(0, 560-1, 0, /*250*/280-1) + MCFG_SCREEN_PALETTE("vdt911:palette") #else MCFG_SCREEN_SIZE(640, 480) MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) + MCFG_SCREEN_PALETTE("asr733:palette") #endif #if VIDEO_911 diff --git a/src/mess/video/abc806.c b/src/mess/video/abc806.c index ef594cf034f..7d63c69d4bd 100644 --- a/src/mess/video/abc806.c +++ b/src/mess/video/abc806.c @@ -505,7 +505,7 @@ UINT32 abc806_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, screen.set_visible_area(0, 767, 0, 311); // clear screen - bitmap.fill(m_palette->black_pen(), cliprect); + bitmap.fill(rgb_t::black, cliprect); if (!m_txoff) { diff --git a/src/mess/video/isa_cga.c b/src/mess/video/isa_cga.c index 3912be5b37c..6a851ca98dd 100644 --- a/src/mess/video/isa_cga.c +++ b/src/mess/video/isa_cga.c @@ -709,6 +709,9 @@ isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type void isa8_cga_device::device_start() { + if (m_palette != NULL && !m_palette->started()) + throw device_missing_dependencies(); + set_isa_device(); m_vram = auto_alloc_array(machine(), UINT8, m_vram_size); m_update_row = NULL; @@ -843,7 +846,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -884,7 +887,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_comp_grey_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -924,7 +927,7 @@ static MC6845_UPDATE_ROW( cga_text_inten_alt_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -964,7 +967,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -1009,7 +1012,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_update_row_si ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -1062,7 +1065,7 @@ static MC6845_UPDATE_ROW( cga_text_blink_alt_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -1111,7 +1114,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bppl_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -1172,7 +1175,7 @@ static MC6845_UPDATE_ROW( cga_gfx_4bpph_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -1217,7 +1220,7 @@ static MC6845_UPDATE_ROW( cga_gfx_2bpp_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); int i; running_machine &machine = device->machine(); @@ -1254,7 +1257,7 @@ static MC6845_UPDATE_ROW( cga_gfx_1bpp_update_row ) isa8_cga_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); UINT8 fg = cga->m_color_select & 0x0F; int i; running_machine &machine = device->machine(); @@ -1724,7 +1727,7 @@ static MC6845_UPDATE_ROW( pc1512_gfx_4bpp_update_row ) isa8_cga_pc1512_device *cga = downcast(device->owner()); UINT8 *videoram = cga->m_vram + cga->m_start_offset; UINT32 *p = &bitmap.pix32(y); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = cga->m_palette->palette()->entry_list_raw(); UINT16 offset_base = ra << 13; int j; running_machine &machine = device->machine(); @@ -2088,7 +2091,7 @@ void isa8_wyse700_device::device_reset() UINT32 isa8_wyse700_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { if (m_control & 0x08) { - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = m_palette->palette()->entry_list_raw(); UINT8 fg = m_color_select & 0x0F; UINT32 addr = 0; for (int y = 0; y < 800; y++) { diff --git a/src/mess/video/isa_ega.c b/src/mess/video/isa_ega.c index b4a6ad0cd49..febb0e6e346 100644 --- a/src/mess/video/isa_ega.c +++ b/src/mess/video/isa_ega.c @@ -586,6 +586,9 @@ isa8_ega_device::isa8_ega_device(const machine_config &mconfig, device_type type void isa8_ega_device::device_start() { + if (m_palette != NULL && !m_palette->started()) + throw device_missing_dependencies(); + astring tempstring; set_isa_device(); diff --git a/src/mess/video/isa_mda.c b/src/mess/video/isa_mda.c index d000d32056e..4109771ce83 100644 --- a/src/mess/video/isa_mda.c +++ b/src/mess/video/isa_mda.c @@ -42,7 +42,6 @@ static const unsigned char mda_palette[4][3] = static MC6845_UPDATE_ROW( mda_update_row ); -#if 0 /* F4 Character Displayer */ static const gfx_layout pc_16_charlayout = { @@ -71,10 +70,9 @@ static const gfx_layout pc_8_charlayout = }; static GFXDECODE_START( pcmda ) - GFXDECODE_ENTRY( "mda:gfx1", 0x0000, pc_16_charlayout, 1, 1 ) - GFXDECODE_ENTRY( "mda:gfx1", 0x1000, pc_8_charlayout, 1, 1 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, pc_16_charlayout, 1, 1 ) + GFXDECODE_ENTRY( "gfx1", 0x1000, pc_8_charlayout, 1, 1 ) GFXDECODE_END -#endif static MC6845_INTERFACE( mc6845_mda_intf ) @@ -101,13 +99,13 @@ WRITE_LINE_MEMBER(isa8_mda_device::pc_cpu_line) MACHINE_CONFIG_FRAGMENT( pcvideo_mda ) MCFG_SCREEN_ADD( MDA_SCREEN_NAME, RASTER) MCFG_SCREEN_RAW_PARAMS(MDA_CLOCK, 882, 0, 720, 370, 0, 350 ) - MCFG_SCREEN_UPDATE_DEVICE( MDA_MC6845_NAME, mc6845_device, screen_update ) + MCFG_SCREEN_UPDATE_DEVICE( MDA_MC6845_NAME, mc6845_device, screen_update ) MCFG_PALETTE_ADD( "palette", 4 ) MCFG_MC6845_ADD( MDA_MC6845_NAME, MC6845, MDA_SCREEN_NAME, MDA_CLOCK/9, mc6845_mda_intf) - //MCFG_GFXDECODE_ADD("gfxdecode", pcmda) + MCFG_GFXDECODE_ADD("gfxdecode", pcmda) MCFG_DEVICE_ADD("lpt", PC_LPT, 0) MCFG_PC_LPT_IRQ_HANDLER(WRITELINE(isa8_mda_device, pc_cpu_line)) @@ -173,14 +171,17 @@ isa8_mda_device::isa8_mda_device(const machine_config &mconfig, device_type type void isa8_mda_device::device_start() { + if (m_palette != NULL && !m_palette->started()) + throw device_missing_dependencies(); + set_isa_device(); m_videoram = auto_alloc_array(machine(), UINT8, 0x1000); m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_mda_device::io_read), this ), write8_delegate( FUNC(isa8_mda_device::io_write), this ) ); m_isa->install_bank(0xb0000, 0xb0fff, 0, 0x07000, "bank_mda", m_videoram); /* Initialise the mda palette */ - for(int i = 0; i < (sizeof(mda_palette) / 3); i++) - m_palette->set_pen_color(i, mda_palette[i][0], mda_palette[i][1], mda_palette[i][2]); + for(int i = 0; i < 4; i++) + m_palette->set_pen_color(i, rgb_t(mda_palette[i][0], mda_palette[i][1], mda_palette[i][2])); } //------------------------------------------------- @@ -215,7 +216,7 @@ void isa8_mda_device::device_reset() static MC6845_UPDATE_ROW( mda_text_inten_update_row ) { isa8_mda_device *mda = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = mda->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; int i; @@ -289,7 +290,7 @@ static MC6845_UPDATE_ROW( mda_text_inten_update_row ) static MC6845_UPDATE_ROW( mda_text_blink_update_row ) { isa8_mda_device *mda = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = mda->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT16 chr_base = ( ra & 0x08 ) ? 0x800 | ( ra & 0x07 ) : ra; int i; @@ -511,11 +512,9 @@ static MC6845_INTERFACE( mc6845_hercules_intf ) NULL }; -#if 0 static GFXDECODE_START( pcherc ) - GFXDECODE_ENTRY( "hercules:gfx1", 0x0000, pc_16_charlayout, 1, 1 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, pc_16_charlayout, 1, 1 ) GFXDECODE_END -#endif MACHINE_CONFIG_FRAGMENT( pcvideo_hercules ) MCFG_SCREEN_ADD( HERCULES_SCREEN_NAME, RASTER) @@ -526,7 +525,7 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_hercules ) MCFG_MC6845_ADD( HERCULES_MC6845_NAME, MC6845, HERCULES_SCREEN_NAME, MDA_CLOCK/9, mc6845_hercules_intf) - //MCFG_GFXDECODE_ADD("gfxdecode", pcherc) + MCFG_GFXDECODE_ADD("gfxdecode", pcherc) MCFG_DEVICE_ADD("lpt", PC_LPT, 0) MCFG_PC_LPT_IRQ_HANDLER(WRITELINE(isa8_mda_device, pc_cpu_line)) @@ -581,6 +580,9 @@ isa8_hercules_device::isa8_hercules_device(const machine_config &mconfig, const void isa8_hercules_device::device_start() { + if (m_palette != NULL && !m_palette->started()) + throw device_missing_dependencies(); + m_videoram = auto_alloc_array(machine(), UINT8, 0x10000); set_isa_device(); m_isa->install_device(0x3b0, 0x3bf, 0, 0, read8_delegate( FUNC(isa8_hercules_device::io_read), this ), write8_delegate( FUNC(isa8_hercules_device::io_write), this ) ); @@ -614,7 +616,7 @@ void isa8_hercules_device::device_reset() static MC6845_UPDATE_ROW( hercules_gfx_update_row ) { isa8_hercules_device *herc = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = herc->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT16 gfx_base = ( ( herc->m_mode_control & 0x80 ) ? 0x8000 : 0x0000 ) | ( ( ra & 0x03 ) << 13 ); int i; diff --git a/src/mess/video/pc_t1t.c b/src/mess/video/pc_t1t.c index 40f09f42cdb..0d46675fe63 100644 --- a/src/mess/video/pc_t1t.c +++ b/src/mess/video/pc_t1t.c @@ -34,7 +34,8 @@ pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, co m_address_data_ff(0), m_display_enable(0), m_vsync(0), - m_palette_base(0) + m_palette_base(0), + m_palette(*this,"palette") { } @@ -182,7 +183,7 @@ PALETTE_INIT_MEMBER( pc_t1t_device, pcjr ) static MC6845_UPDATE_ROW( t1000_text_inten_update_row ) { pc_t1t_device *t1t = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = t1t->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); int i; @@ -216,7 +217,7 @@ static MC6845_UPDATE_ROW( t1000_text_inten_update_row ) static MC6845_UPDATE_ROW( t1000_text_blink_update_row ) { pc_t1t_device *t1t = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = t1t->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); int i; @@ -258,7 +259,7 @@ static MC6845_UPDATE_ROW( t1000_text_blink_update_row ) static MC6845_UPDATE_ROW( pcjx_text_update_row ) { pcvideo_pcjr_device *pcjx = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = pcjx->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); int i; @@ -300,7 +301,7 @@ static MC6845_UPDATE_ROW( pcjx_text_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_4bpp_update_row ) { pc_t1t_device *t1t = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = t1t->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT8 *vid = t1t->m_displayram + ( ra << 13 ); int i; @@ -328,7 +329,7 @@ static MC6845_UPDATE_ROW( t1000_gfx_4bpp_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_2bpp_update_row ) { pc_t1t_device *t1t = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = t1t->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT8 *vid = t1t->m_displayram + ( ra << 13 ); int i; @@ -356,7 +357,7 @@ static MC6845_UPDATE_ROW( t1000_gfx_2bpp_update_row ) static MC6845_UPDATE_ROW( pcjr_gfx_2bpp_high_update_row ) { pcvideo_pcjr_device *pcjr = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = pcjr->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT8 *vid = pcjr->m_displayram + ( ra << 13 ); int i; @@ -382,7 +383,7 @@ static MC6845_UPDATE_ROW( pcjr_gfx_2bpp_high_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row ) { pc_t1t_device *t1t = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = t1t->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT8 *vid = t1t->m_displayram + ( ra << 13 ); int i; @@ -410,7 +411,7 @@ static MC6845_UPDATE_ROW( t1000_gfx_2bpp_tga_update_row ) static MC6845_UPDATE_ROW( t1000_gfx_1bpp_update_row ) { pc_t1t_device *t1t = downcast(device->owner()); - const rgb_t *palette = bitmap.palette()->entry_list_raw(); + const rgb_t *palette = t1t->m_palette->palette()->entry_list_raw(); UINT32 *p = &bitmap.pix32(y); UINT8 *vid = t1t->m_displayram + ( ra << 13 ); UINT8 fg = t1t->m_palette_base + t1t->m_reg.data[0x11]; diff --git a/src/mess/video/pc_t1t.h b/src/mess/video/pc_t1t.h index f680139b498..8dd1b582b9e 100644 --- a/src/mess/video/pc_t1t.h +++ b/src/mess/video/pc_t1t.h @@ -71,6 +71,7 @@ public: int bank_r(void); DECLARE_READ8_MEMBER( read ); + required_device m_palette; }; class pcvideo_t1000_device : public pc_t1t_device