PALETTE_INIT_MEMBER(gunsmoke_state, gunsmoke) { const UINT8 *color_prom = memregion("proms")->base(); int i; /* create a lookup table for the palette */ for (i = 0; i < 0x100; i++) { int r = pal4bit(color_prom[i + 0x000]); int g = pal4bit(color_prom[i + 0x100]); int b = pal4bit(color_prom[i + 0x200]); palette.set_indirect_color(i, rgb_t(r, g, b)); } /* color_prom now points to the beginning of the lookup table */ color_prom += 0x300; /* characters use colors 0x40-0x4f */ for (i = 0; i < 0x80; i++) { UINT8 ctabentry = color_prom[i] | 0x40; palette.set_pen_indirect(i, ctabentry); } /* background tiles use colors 0-0x3f */ for (i = 0x100; i < 0x200; i++) { UINT8 ctabentry = color_prom[i] | ((color_prom[i + 0x100] & 0x03) << 4); palette.set_pen_indirect(i - 0x80, ctabentry); } /* sprites use colors 0x80-0xff */ for (i = 0x300; i < 0x400; i++) { UINT8 ctabentry = color_prom[i] | ((color_prom[i + 0x100] & 0x07) << 4) | 0x80; palette.set_pen_indirect(i - 0x180, ctabentry); } }
/* guess: use the same resistor values as Crazy Climber (needs checking on the real HW) */ PALETTE_INIT_MEMBER(nightgal_state, nightgal) { const uint8_t *color_prom = memregion("proms")->base(); static const int resistances_rg[3] = { 1000, 470, 220 }; static const int resistances_b [2] = { 470, 220 }; double weights_rg[3], weights_b[2]; int i; /* compute the color output resistor weights */ compute_resistor_weights(0, 255, -1.0, 3, resistances_rg, weights_rg, 0, 0, 2, resistances_b, weights_b, 0, 0, 0, nullptr, nullptr, 0, 0); for (i = 0; i < palette.entries(); i++) { int bit0, bit1, bit2; int r, g, b; /* red component */ bit0 = BIT(color_prom[i], 0); bit1 = BIT(color_prom[i], 1); bit2 = BIT(color_prom[i], 2); r = combine_3_weights(weights_rg, bit0, bit1, bit2); /* green component */ bit0 = BIT(color_prom[i], 3); bit1 = BIT(color_prom[i], 4); bit2 = BIT(color_prom[i], 5); g = combine_3_weights(weights_rg, bit0, bit1, bit2); /* blue component */ bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); b = combine_2_weights(weights_b, bit0, bit1); palette.set_pen_color(i, rgb_t(r, g, b)); } }
void tc0110pcr_device::restore_colors() { int i, color, r = 0, g = 0, b = 0; for (i = 0; i < (256 * 16); i++) { color = m_ram[i]; switch (m_type) { case 0x00: { r = pal5bit(color >> 0); g = pal5bit(color >> 5); b = pal5bit(color >> 10); break; } case 0x01: { b = pal5bit(color >> 0); g = pal5bit(color >> 5); r = pal5bit(color >> 10); break; } case 0x02: { r = pal4bit(color >> 0); g = pal4bit(color >> 4); b = pal4bit(color >> 8); break; } } m_palette->set_pen_color(i, rgb_t(r, g, b)); } }
void kontest_state::kontest_palette(palette_device &palette) const { const uint8_t *color_prom = memregion("proms")->base(); for (int i = 0; i < 0x20; ++i) { int bit0, bit1, bit2; bit0 = 0; bit1 = BIT(color_prom[i], 6); bit2 = BIT(color_prom[i], 7); int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; bit0 = BIT(color_prom[i], 3); bit1 = BIT(color_prom[i], 4); bit2 = BIT(color_prom[i], 5); int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; bit0 = BIT(color_prom[i], 0); bit1 = BIT(color_prom[i], 1); bit2 = BIT(color_prom[i], 2); int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; palette.set_pen_color(i, rgb_t(r, g, b)); } }
PALETTE_INIT_MEMBER(equites_state,splndrbt) { const UINT8 *color_prom = memregion("proms")->base(); int i; for (i = 0; i < 0x100; i++) palette.set_indirect_color(i, rgb_t(pal4bit(color_prom[i]), pal4bit(color_prom[i + 0x100]), pal4bit(color_prom[i + 0x200]))); for (i = 0; i < 0x100; i++) palette.set_pen_indirect(i, i); // point to the bg CLUT color_prom += 0x300; for (i = 0; i < 0x80; i++) palette.set_pen_indirect(i + 0x100, color_prom[i] + 0x10); // point to the sprite CLUT color_prom += 0x100; for (i = 0; i < 0x100; i++) palette.set_pen_indirect(i + 0x180, color_prom[i]); }
static void dview_draw_vsb(DView *dv) { int vt; int ts; //int sz = SLIDER_SIZE; int sz; rectangle r; adjustment *sb = &dv->vsb; dview_get_rect(dv, RECT_DVIEW_VSB, r); dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, r.height() - HSB_HEIGHT, VSB_WIDTH, HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00)); dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, 0, VSB_WIDTH, HSB_HEIGHT, rgb_t(0xff, 0xff, 0x00, 0x00)); ts = r.height() - 2 * HSB_HEIGHT; sz = (ts * (sb->page_size)) / (sb->upper - sb->lower); ts = ts - sz; vt = (ts * (sb->value - sb->lower)) / (sb->upper - sb->lower - sb->page_size) + sz / 2 + HSB_HEIGHT; dview_draw_outlined_box(dv, RECT_DVIEW_VSB, 0, vt - sz / 2, VSB_WIDTH, sz, rgb_t(0xff, 0xff, 0x00, 0x00)); }
PALETTE_INIT_MEMBER(olibochu_state, olibochu) { const UINT8 *color_prom = memregion("proms")->base(); int i; for (i = 0; i < palette.entries(); i++) { UINT8 pen; int bit0, bit1, bit2, r, g, b; if (i < 0x100) /* characters */ pen = (color_prom[0x020 + (i - 0x000)] & 0x0f) | 0x10; else /* sprites */ pen = (color_prom[0x120 + (i - 0x100)] & 0x0f) | 0x00; /* red component */ bit0 = BIT(color_prom[pen], 0); bit1 = BIT(color_prom[pen], 1); bit2 = BIT(color_prom[pen], 2); r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; /* green component */ bit0 = BIT(color_prom[pen], 3); bit1 = BIT(color_prom[pen], 4); bit2 = BIT(color_prom[pen], 5); g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; /* blue component */ bit0 = BIT(color_prom[pen], 6); bit1 = BIT(color_prom[pen], 7); b = 0x4f * bit0 + 0xa8 * bit1; palette.set_pen_color(i, rgb_t(r, g, b)); } }
// guess: use the same resistor values as Crazy Climber (needs checking on the real hardware) void jangou_state::jangou_palette(palette_device &palette) const { uint8_t const *const color_prom = memregion("proms")->base(); static constexpr int resistances_rg[3] = { 1000, 470, 220 }; static constexpr int resistances_b [2] = { 470, 220 }; // compute the color output resistor weights double weights_rg[3], weights_b[2]; compute_resistor_weights(0, 255, -1.0, 3, resistances_rg, weights_rg, 0, 0, 2, resistances_b, weights_b, 0, 0, 0, nullptr, nullptr, 0, 0); for (int i = 0;i < palette.entries(); i++) { int bit0, bit1, bit2; // red component bit0 = BIT(color_prom[i], 0); bit1 = BIT(color_prom[i], 1); bit2 = BIT(color_prom[i], 2); int const r = combine_weights(weights_rg, bit0, bit1, bit2); // green component bit0 = BIT(color_prom[i], 3); bit1 = BIT(color_prom[i], 4); bit2 = BIT(color_prom[i], 5); int const g = combine_weights(weights_rg, bit0, bit1, bit2); // blue component bit0 = BIT(color_prom[i], 6); bit1 = BIT(color_prom[i], 7); int const b = combine_weights(weights_b, bit0, bit1); palette.set_pen_color(i, rgb_t(r, g, b)); } }
INLINE void map_attr_to_fg_bg(unsigned char attr, rgb_t *fg, rgb_t *bg) { *bg = rgb_t(0xff,0xff,0xff,0xff); *fg = rgb_t(0xff,0x00,0x00,0x00); if(attr & DCA_ANCILLARY) *bg = rgb_t(0xff,0xe0,0xe0,0xe0); if(attr & DCA_SELECTED) { *bg = rgb_t(0xff,0xff,0x80,0x80); } if(attr & DCA_CURRENT) { *bg = rgb_t(0xff,0xff,0xff,0x00); } if(attr & DCA_CHANGED) { *fg = rgb_t(0xff,0xff,0x00,0x00); } if(attr & DCA_INVALID) { *fg = rgb_t(0xff,0x00,0x00,0xff); } if(attr & DCA_DISABLED) { *fg = rgb_t(fg->a(), (fg->r() + bg->r()) >> 1, (fg->g() + bg->g()) >> 1, (fg->b() + bg->b()) >> 1); }
PALETTE_INIT_MEMBER(sprint4_state, sprint4) { palette.set_indirect_color(0, rgb_t(0x00, 0x00, 0x00)); /* black */ palette.set_indirect_color(1, rgb_t(0xfc, 0xdf, 0x80)); /* peach */ palette.set_indirect_color(2, rgb_t(0xf0, 0x00, 0xf0)); /* violet */ palette.set_indirect_color(3, rgb_t(0x00, 0xf0, 0x0f)); /* green */ palette.set_indirect_color(4, rgb_t(0x30, 0x4f, 0xff)); /* blue */ palette.set_indirect_color(5, rgb_t(0xff, 0xff, 0xff)); /* white */ palette.set_pen_indirect(0, 0); palette.set_pen_indirect(2, 0); palette.set_pen_indirect(4, 0); palette.set_pen_indirect(6, 0); palette.set_pen_indirect(8, 0); palette.set_pen_indirect(1, 1); palette.set_pen_indirect(3, 2); palette.set_pen_indirect(5, 3); palette.set_pen_indirect(7, 4); palette.set_pen_indirect(9, 5); }
void nc_state::video_start() { } #if 0 /* two colours */ static const unsigned short nc_colour_table[NC_NUM_COLOURS] = { 0, 1,2,3 }; #endif /* black/white */ static const rgb_t nc_palette[NC_NUM_COLOURS] = { rgb_t(0x060, 0x060, 0x060), rgb_t(0x000, 0x000, 0x000), rgb_t(0x080, 0x0a0, 0x060), rgb_t(0x000, 0x000, 0x000) }; /* Initialise the palette */ PALETTE_INIT_MEMBER(nc_state, nc) { palette.set_pen_colors(0, nc_palette, ARRAY_LENGTH(nc_palette)); } void nc_state::nc200_video_set_backlight(int state) {
/* Input ports */ static INPUT_PORTS_START( tim100 ) INPUT_PORTS_END static DEVICE_INPUT_DEFAULTS_START( tim100 ) DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 ) DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 ) DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 ) DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_ODD ) DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 ) DEVICE_INPUT_DEFAULTS_END static const rgb_t tim100_palette[3] = { rgb_t(0x00, 0x00, 0x00), // black rgb_t(0xa0, 0xa0, 0xa0), // white rgb_t(0xff, 0xff, 0xff) // highlight }; void tim100_state::machine_start() { m_charmap = memregion("chargen")->base(); m_palette->set_pen_colors(0, tim100_palette, ARRAY_LENGTH(tim100_palette)); } const gfx_layout tim100_charlayout = { 12, 16, /* 8x16 characters */ 256, /* 128 characters */ 1, /* 1 bits per pixel */
PORT_START("keyb_special") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12) INPUT_PORTS_END // this is an apple II palette; it seems more likely the // actual laser3000 has a digital RGB palette... static const rgb_t laser3k_palette[] = { rgb_t::black, rgb_t(0xE3, 0x1E, 0x60), /* Dark Red */ rgb_t(0x60, 0x4E, 0xBD), /* Dark Blue */ rgb_t(0xFF, 0x44, 0xFD), /* Purple */ rgb_t(0x00, 0xA3, 0x60), /* Dark Green */ rgb_t(0x9C, 0x9C, 0x9C), /* Dark Gray */ rgb_t(0x14, 0xCF, 0xFD), /* Medium Blue */ rgb_t(0xD0, 0xC3, 0xFF), /* Light Blue */ rgb_t(0x60, 0x72, 0x03), /* Brown */ rgb_t(0xFF, 0x6A, 0x3C), /* Orange */ rgb_t(0x9C, 0x9C, 0x9C), /* Light Grey */ rgb_t(0xFF, 0xA0, 0xD0), /* Pink */ rgb_t(0x14, 0xF5, 0x3C), /* Light Green */ rgb_t(0xD0, 0xDD, 0x8D), /* Yellow */ rgb_t(0x72, 0xFF, 0xD0), /* Aquamarine */ rgb_t(0xFF, 0xFF, 0xFF) /* White */ };
void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) { ui_manager &mui = machine().ui(); float maxwidth = origx2 - origx1; float width; std::string driver; if (issoft) driver = m_swinfo->longname; else driver = m_driver->description; mui.draw_text_full(container, driver.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(origx2 - origx1, width); // compute our bounds float x1 = 0.5f - 0.5f * maxwidth; float x2 = x1 + maxwidth; float y1 = origy1 - top; float y2 = origy1 - 2.0f * UI_BOX_TB_BORDER - mui.get_line_height(); // draw a box mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); // take off the borders x1 += UI_BOX_LR_BORDER; x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; mui.draw_text_full(container, driver.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // take off the borders x1 -= UI_BOX_LR_BORDER; x2 += UI_BOX_LR_BORDER; y1 -= UI_BOX_TB_BORDER; maxwidth = 0; for (auto & elem : m_items_list) { mui.draw_text_full(container, elem.label.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); maxwidth += width; } float space = (1.0f - maxwidth) / (m_items_list.size() * 2); // compute our bounds y1 = y2 + UI_BOX_TB_BORDER; y2 += mui.get_line_height() + 2.0f * UI_BOX_TB_BORDER; // draw a box mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); // take off the borders x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; // draw the text within it int x = 0; for (auto & elem : m_items_list) { x1 += space; rgb_t fcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0x00) : UI_TEXT_COLOR; rgb_t bcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR; mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, DRAW_NONE, fcolor, bcolor, &width, nullptr); if (bcolor != UI_TEXT_BG_COLOR) mui.draw_textured_box(container, x1 - (space / 2), y1, x1 + width + (space / 2), y2, bcolor, rgb_t(255, 43, 43, 43), hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, DRAW_NORMAL, fcolor, bcolor, &width, nullptr); x1 += width + space; ++x; } // bottom std::string revision; revision.assign(_("Revision: ")).append(m_items_list[actual].revision); mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(origx2 - origx1, width); // compute our bounds x1 = 0.5f - 0.5f * maxwidth; x2 = x1 + maxwidth; y1 = origy2 + UI_BOX_TB_BORDER; y2 = origy2 + bottom; // draw a box mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); // take off the borders x1 += UI_BOX_LR_BORDER; x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; // draw the text within it mui.draw_text_full(container, revision.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); }
m_prn_output = auto_bitmap_ind16_alloc(machine(),PCW_PRINTER_WIDTH,PCW_PRINTER_HEIGHT); m_prn_output->fill(1, rect); } #if 0 /* two colours */ static const unsigned short pcw_colour_table[PCW_NUM_COLOURS] = { 0, 1 }; #endif /* black/white */ static const rgb_t pcw_palette[PCW_NUM_COLOURS] = { rgb_t(0x000, 0x000, 0x000), rgb_t(0x0ff, 0x0ff, 0x0ff) }; /* Initialise the palette */ PALETTE_INIT_MEMBER(pcw_state, pcw) { palette.set_pen_colors(0, pcw_palette, ARRAY_LENGTH(pcw_palette)); } /*************************************************************************** Draw the game screen in the given bitmap_ind16. Do NOT call osd_update_display() from this function, it will be called by the main emulation engine. ***************************************************************************/
PALETTE_INIT_MEMBER(tamag1_state, tama) { palette.set_pen_color(0, rgb_t(0xf1, 0xf0, 0xf9)); // background palette.set_pen_color(1, rgb_t(0x3c, 0x38, 0x38)); // lcd pixel }
PALETTE_INIT_MEMBER(d110_state, d110) { palette.set_pen_color(0, rgb_t(0, 255, 0)); palette.set_pen_color(1, rgb_t(0, 0, 0)); }
PALETTE_INIT_MEMBER(dday_state, dday) { const UINT8 *color_prom = memregion("proms")->base(); int i; palette.set_shadow_factor(1.0 / 8); /* create a lookup table for the palette */ for (i = 0; i < 0x100; i++) { int r = pal4bit(color_prom[i + 0x000]); int g = pal4bit(color_prom[i + 0x100]); int b = pal4bit(color_prom[i + 0x200]); palette.set_indirect_color(i, rgb_t(r, g, b)); } for (i = 0; i < 0x100; i++) palette.set_pen_indirect(i, i); /* HACK!!! This table is handgenerated, but it matches the screenshot. I have no clue how it really works */ palette.set_pen_indirect(0*8+0+0, 0x00); palette.set_pen_indirect(0*8+0+1, 0x01); palette.set_pen_indirect(0*8+0+2, 0x15); palette.set_pen_indirect(0*8+0+3, 0x02); palette.set_pen_indirect(0*8+4+0, 0x00); palette.set_pen_indirect(0*8+4+1, 0x01); palette.set_pen_indirect(0*8+4+2, 0x15); palette.set_pen_indirect(0*8+4+3, 0x02); palette.set_pen_indirect(1*8+0+0, 0x04); palette.set_pen_indirect(1*8+0+1, 0x05); palette.set_pen_indirect(1*8+0+2, 0x03); palette.set_pen_indirect(1*8+0+3, 0x07); palette.set_pen_indirect(1*8+4+0, 0x04); palette.set_pen_indirect(1*8+4+1, 0x05); palette.set_pen_indirect(1*8+4+2, 0x03); palette.set_pen_indirect(1*8+4+3, 0x07); palette.set_pen_indirect(2*8+0+0, 0x08); palette.set_pen_indirect(2*8+0+1, 0x15); palette.set_pen_indirect(2*8+0+2, 0x0a); palette.set_pen_indirect(2*8+0+3, 0x03); palette.set_pen_indirect(2*8+4+0, 0x08); palette.set_pen_indirect(2*8+4+1, 0x15); palette.set_pen_indirect(2*8+4+2, 0x0a); palette.set_pen_indirect(2*8+4+3, 0x03); palette.set_pen_indirect(3*8+0+0, 0x08); palette.set_pen_indirect(3*8+0+1, 0x15); palette.set_pen_indirect(3*8+0+2, 0x0a); palette.set_pen_indirect(3*8+0+3, 0x03); palette.set_pen_indirect(3*8+4+0, 0x08); palette.set_pen_indirect(3*8+4+1, 0x15); palette.set_pen_indirect(3*8+4+2, 0x0a); palette.set_pen_indirect(3*8+4+3, 0x03); palette.set_pen_indirect(4*8+0+0, 0x10); palette.set_pen_indirect(4*8+0+1, 0x11); palette.set_pen_indirect(4*8+0+2, 0x12); palette.set_pen_indirect(4*8+0+3, 0x07); palette.set_pen_indirect(4*8+4+0, 0x10); palette.set_pen_indirect(4*8+4+1, 0x11); palette.set_pen_indirect(4*8+4+2, 0x12); palette.set_pen_indirect(4*8+4+3, 0x07); palette.set_pen_indirect(5*8+0+0, 0x1d); palette.set_pen_indirect(5*8+0+1, 0x15); palette.set_pen_indirect(5*8+0+2, 0x16); palette.set_pen_indirect(5*8+0+3, 0x1b); palette.set_pen_indirect(5*8+4+0, 0x1d); palette.set_pen_indirect(5*8+4+1, 0x15); palette.set_pen_indirect(5*8+4+2, 0x16); palette.set_pen_indirect(5*8+4+3, 0x1b); palette.set_pen_indirect(6*8+0+0, 0x1d); palette.set_pen_indirect(6*8+0+1, 0x15); palette.set_pen_indirect(6*8+0+2, 0x1a); palette.set_pen_indirect(6*8+0+3, 0x1b); palette.set_pen_indirect(6*8+4+0, 0x1d); palette.set_pen_indirect(6*8+4+1, 0x15); palette.set_pen_indirect(6*8+4+2, 0x1a); palette.set_pen_indirect(6*8+4+3, 0x1b); palette.set_pen_indirect(7*8+0+0, 0x1d); palette.set_pen_indirect(7*8+0+1, 0x02); palette.set_pen_indirect(7*8+0+2, 0x04); palette.set_pen_indirect(7*8+0+3, 0x1b); palette.set_pen_indirect(7*8+4+0, 0x1d); palette.set_pen_indirect(7*8+4+1, 0x02); palette.set_pen_indirect(7*8+4+2, 0x04); palette.set_pen_indirect(7*8+4+3, 0x1b); }
PALETTE_INIT_MEMBER(prestige_state, prestige) { palette.set_pen_color(0, rgb_t(39, 108, 51)); palette.set_pen_color(1, rgb_t(16, 37, 84)); }
PALETTE_INIT_MEMBER(hunter2_state, hunter2) { palette.set_pen_color(0, rgb_t(138, 146, 148)); palette.set_pen_color(1, rgb_t(92, 83, 88)); }
PALETTE_INIT_MEMBER(pc8401a_state,pc8401a) { palette.set_pen_color(0, rgb_t(39, 108, 51)); palette.set_pen_color(1, rgb_t(16, 37, 84)); }
PORT_CONFNAME( 0x01, 0x01, "Autorun on Quickload") PORT_CONFSETTING( 0x00, DEF_STR(No)) PORT_CONFSETTING( 0x01, DEF_STR(Yes)) // PORT_CONFNAME( 0x08, 0x08, "Cassette Speaker") // PORT_CONFSETTING( 0x08, DEF_STR(On)) // PORT_CONFSETTING( 0x00, DEF_STR(Off)) INPUT_PORTS_END /*************************************************************************** PALETTE ***************************************************************************/ static const UINT32 vtech1_palette_mono[] = { rgb_t(131, 131, 131), rgb_t(211, 211, 211), rgb_t(29, 29, 29), rgb_t(76, 76, 76), rgb_t(213, 213, 213), rgb_t(167, 167, 167), rgb_t(105, 105, 105), rgb_t(136, 136, 136), rgb_t(0, 0, 0), rgb_t(131, 131, 131), rgb_t(0, 0, 0), rgb_t(213, 213, 213), rgb_t(37, 37, 37), rgb_t(133, 133, 133), rgb_t(28, 28, 28), rgb_t(193, 193, 193)
GFXDECODE_END PALETTE_INIT_MEMBER(dragrace_state, dragrace) { palette.set_pen_color(0, rgb_t(0xFF, 0xFF, 0xFF)); /* 2 color tiles */ palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); palette.set_pen_color(2, rgb_t(0x00, 0x00, 0x00)); palette.set_pen_color(3, rgb_t(0xFF, 0xFF, 0xFF)); palette.set_pen_color(4, rgb_t(0x00, 0x00, 0x00)); palette.set_pen_color(5, rgb_t(0x00, 0x00, 0x00)); palette.set_pen_color(6, rgb_t(0xFF, 0xFF, 0xFF)); palette.set_pen_color(7, rgb_t(0xFF, 0xFF, 0xFF)); palette.set_pen_color(8, rgb_t(0xFF, 0xFF, 0xFF)); /* 4 color tiles */ palette.set_pen_color(9, rgb_t(0xB0, 0xB0, 0xB0)); palette.set_pen_color(10,rgb_t(0x5F, 0x5F, 0x5F)); palette.set_pen_color(11,rgb_t(0x00, 0x00, 0x00)); palette.set_pen_color(12,rgb_t(0xFF, 0xFF, 0xFF)); palette.set_pen_color(13,rgb_t(0x5F, 0x5F, 0x5F)); palette.set_pen_color(14,rgb_t(0xB0, 0xB0, 0xB0)); palette.set_pen_color(15,rgb_t(0x00, 0x00, 0x00)); }
PALETTE_INIT_MEMBER(fb01_state, fb01) { palette.set_pen_color(0, rgb_t(30, 0, 0)); palette.set_pen_color(1, rgb_t(150, 0, 0)); }
PALETTE_INIT_MEMBER(kc85_state,kc85) { palette.set_pen_color(0, rgb_t(138, 146, 148)); palette.set_pen_color(1, rgb_t(92, 83, 88)); }
PALETTE_INIT_MEMBER(atarifb_state, atarifb) { /* chars */ palette.set_pen_color(0, rgb_t(0xff,0xff,0xff)); /* white */ palette.set_pen_color(1, rgb_t(0x00,0x00,0x00)); /* black */ /* sprites */ palette.set_pen_color(2, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */ palette.set_pen_color(3, rgb_t(0xff,0xff,0xff)); /* white */ palette.set_pen_color(4, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */ palette.set_pen_color(5, rgb_t(0x00,0x00,0x00)); /* black */ /* sprite masks */ palette.set_pen_color(6, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */ palette.set_pen_color(7, rgb_t(0x80,0x80,0x80)); /* grey */ palette.set_pen_color(8, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */ palette.set_pen_color(9, rgb_t(0x00,0x00,0x00)); /* black */ palette.set_pen_color(10, rgb_t(0x40,0x40,0x40)); /* dark grey (?) - used in Soccer only */ palette.set_pen_color(11, rgb_t(0xff,0xff,0xff)); /* white */ }
PALETTE_INIT_MEMBER(m52_state, m52) { const UINT8 *color_prom = memregion("proms")->base(); const UINT8 *char_pal = color_prom + 0x000; const UINT8 *back_pal = color_prom + 0x200; const UINT8 *sprite_pal = color_prom + 0x220; const UINT8 *sprite_table = color_prom + 0x240; static const int resistances_3[3] = { 1000, 470, 220 }; static const int resistances_2[2] = { 470, 220 }; double weights_r[3], weights_g[3], weights_b[3], scale; int i; /* compute palette information for characters/backgrounds */ scale = compute_resistor_weights(0, 255, -1.0, 3, resistances_3, weights_r, 0, 0, 3, resistances_3, weights_g, 0, 0, 2, resistances_2, weights_b, 0, 0); /* character palette */ for (i = 0; i < 512; i++) { UINT8 promval = char_pal[i]; int r = combine_3_weights(weights_r, BIT(promval,0), BIT(promval,1), BIT(promval,2)); int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5)); int b = combine_2_weights(weights_b, BIT(promval,6), BIT(promval,7)); palette.set_indirect_color(i, rgb_t(r,g,b)); } /* background palette */ for (i = 0; i < 32; i++) { UINT8 promval = back_pal[i]; int r = combine_3_weights(weights_r, BIT(promval,0), BIT(promval,1), BIT(promval,2)); int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5)); int b = combine_2_weights(weights_b, BIT(promval,6), BIT(promval,7)); palette.set_indirect_color(512+i, rgb_t(r,g,b)); } /* compute palette information for sprites */ compute_resistor_weights(0, 255, scale, 2, resistances_2, weights_r, 470, 0, 3, resistances_3, weights_g, 470, 0, 3, resistances_3, weights_b, 470, 0); /* sprite palette */ for (i = 0; i < 32; i++) { UINT8 promval = sprite_pal[i]; int r = combine_2_weights(weights_r, BIT(promval,6), BIT(promval,7)); int g = combine_3_weights(weights_g, BIT(promval,3), BIT(promval,4), BIT(promval,5)); int b = combine_3_weights(weights_b, BIT(promval,0), BIT(promval,1), BIT(promval,2)); palette.set_indirect_color(512 + 32 + i, rgb_t(r,g,b)); } /* character lookup table */ for (i = 0; i < 512; i++) palette.set_pen_indirect(i, i); /* sprite lookup table */ for (i = 0; i < 16 * 4; i++) { UINT8 promval = sprite_table[(i & 3) | ((i & ~3) << 1)]; palette.set_pen_indirect(512 + i, 512 + 32 + promval); } /* background */ /* the palette is a 32x8 PROM with many colors repeated. The address of */ /* the colors to pick is as follows: */ /* xbb00: mountains */ /* 0xxbb: hills */ /* 1xxbb: city */ palette.set_pen_indirect(512+16*4+0*4+0, 512); palette.set_pen_indirect(512+16*4+0*4+1, 512+4); palette.set_pen_indirect(512+16*4+0*4+2, 512+8); palette.set_pen_indirect(512+16*4+0*4+3, 512+12); palette.set_pen_indirect(512+16*4+1*4+0, 512); palette.set_pen_indirect(512+16*4+1*4+1, 512+1); palette.set_pen_indirect(512+16*4+1*4+2, 512+2); palette.set_pen_indirect(512+16*4+1*4+3, 512+3); palette.set_pen_indirect(512+16*4+2*4+0, 512); palette.set_pen_indirect(512+16*4+2*4+1, 512+16+1); palette.set_pen_indirect(512+16*4+2*4+2, 512+16+2); palette.set_pen_indirect(512+16*4+2*4+3, 512+16+3); }
//************************************************************************** // MACROS / CONSTANTS //************************************************************************** #define LOG 0 // low resolution palette static const int ZX8301_COLOR_MODE4[] = { 0, 2, 4, 7 }; static const rgb_t PALETTE_ZX8301[] = { rgb_t(0x00, 0x00, 0x00), // black rgb_t(0x00, 0x00, 0xff), // blue rgb_t(0xff, 0x00, 0x00), // red rgb_t(0xff, 0x00, 0xff), // magenta rgb_t(0x00, 0xff, 0x00), // green rgb_t(0x00, 0xff, 0xff), // cyan rgb_t(0xff, 0xff, 0x00), // yellow rgb_t(0xff, 0xff, 0xff) // white }; //************************************************************************** // GLOBAL VARIABLES //**************************************************************************
PALETTE_INIT_MEMBER(ti630_state, ti630) { palette.set_pen_color(0, rgb_t(138, 146, 148)); palette.set_pen_color(1, rgb_t(92, 83, 88)); }
m_old_control_keys = control_keys; } /* apexc video emulation. Since the APEXC has no video display, we display the control panel. Additionnally, We display one page of teletyper output. */ static const rgb_t apexc_palette[] = { rgb_t::white, rgb_t::black, rgb_t(255, 0, 0), rgb_t(50, 0, 0) }; #if 0 static const unsigned short apexc_colortable[] = { 0, 1 }; #endif #define APEXC_PALETTE_SIZE ARRAY_LENGTH(apexc_palette) #define APEXC_COLORTABLE_SIZE sizeof(apexc_colortable)/2 enum {