Previous 199869 Revisions Next

r17840 Wednesday 12th September, 2012 at 17:09:38 UTC by Curt Coder
(MESS) Death to palettes. (nw)
[src/emu/sound]cdp1864.c cdp1864.h cdp1869.c cdp1869.h
[src/emu/video]cdp1861.c cdp1861.h cdp1862.c cdp1862.h crt9021.c crt9021.h generic.c generic.h upd3301.c upd3301.h
[src/mess/drivers]cosmicos.c elf.c eti660.c pc8001.c ql.c studio2.c tandy2k.c tmc2000e.c vip.c
[src/mess/includes]abc80.h abc80x.h cgc7900.h comx35.h newbrain.h pc1512.h tandy2k.h tmc1800.h vip.h
[src/mess/machine]comx_eb.c comx_eb.h comxexp.c comxexp.h vip_exp.c vip_exp.h vp575.c vp575.h vp590.c vp590.h wangpc_lvc.c wangpc_lvc.h wangpc_mvc.c
[src/mess/video]abc1600.c abc80.c abc800.c abc802.c abc806.c cgc7900.c comx35.c newbrain.c pc1512.c tmc1800.c uv201.c uv201.h zx8301.c zx8301.h

trunk/src/emu/video/upd3301.c
r17839r17840
615615//  update_screen -
616616//-------------------------------------------------
617617
618UINT32 upd3301_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
618UINT32 upd3301_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
619619{
620620   if (m_status & STATUS_VE)
621621   {
trunk/src/emu/video/upd3301.h
r17839r17840
6666
6767// ======================> upd3301_display_pixels_func
6868
69typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_ind16 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa);
70#define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_ind16 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)
69typedef void (*upd3301_display_pixels_func)(device_t *device, bitmap_rgb32 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa);
70#define UPD3301_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_rgb32 &bitmap, int y, int sx, UINT8 cc, UINT8 lc, int hlgt, int rvv, int vsp, int sl0, int sl12, int csr, int gpa)
7171
7272
7373// ======================> upd3301_interface
r17839r17840
103103   DECLARE_READ_LINE_MEMBER( hrtc_r );
104104   DECLARE_READ_LINE_MEMBER( vrtc_r );
105105
106   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
106   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
107107
108108protected:
109109    // device-level overrides
r17839r17840
136136   screen_device *m_screen;
137137
138138   // screen drawing
139   bitmap_ind16 *m_bitmap;      // bitmap
139   bitmap_rgb32 *m_bitmap;      // bitmap
140140   int m_y;                  // current scanline
141141   int m_hrtc;                  // horizontal retrace
142142   int m_vrtc;                  // vertical retrace
trunk/src/emu/video/cdp1862.c
r17839r17840
6666      g = (i & 1) ? luma : 0;
6767      b = (i & 2) ? luma : 0;
6868
69      palette_set_color_rgb(machine(), i, r, g, b);
69      m_palette[i] = MAKE_RGB(r, g, b);
7070   }
7171}
7272
r17839r17840
171171         color = (gd << 2) | (bd << 1) | rd;
172172      }
173173
174      m_bitmap.pix16(y, sx + x) = color;
174      m_bitmap.pix32(y, sx + x) = m_palette[color];
175175
176176      data <<= 1;
177177   }
r17839r17840
213213//  screen_update -
214214//-------------------------------------------------
215215
216UINT32 cdp1862_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
216UINT32 cdp1862_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
217217{
218218   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
219   m_bitmap.fill(CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8, cliprect);
219
220   m_bitmap.fill(m_palette[CDP1862_BACKGROUND_COLOR_SEQUENCE[m_bgcolor] + 8], cliprect);
221   
220222   return 0;
221223}
trunk/src/emu/video/cdp1862.h
r17839r17840
9494   DECLARE_WRITE_LINE_MEMBER( bkg_w );
9595   DECLARE_WRITE_LINE_MEMBER( con_w );
9696
97   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
97   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
9898
9999protected:
100100    // device-level overrides
r17839r17840
110110   devcb_resolved_read_line   m_in_gd_func;
111111
112112   screen_device *m_screen;      // screen
113   bitmap_ind16 m_bitmap;            // bitmap
113   bitmap_rgb32 m_bitmap;         // bitmap
114114
115   rgb_t m_palette[16];
115116   int m_bgcolor;               // background color
116117   int m_con;                  // color on
117118};
trunk/src/emu/video/crt9021.c
r17839r17840
222222//  screen_update - update screen
223223//-------------------------------------------------
224224
225UINT32 crt9021_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
225UINT32 crt9021_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
226226{
227227   return 0;
228228}
trunk/src/emu/video/crt9021.h
r17839r17840
8888   DECLARE_WRITE_LINE_MEMBER( retbl_w );
8989   DECLARE_WRITE_LINE_MEMBER( vsync_w );
9090
91   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
91   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
9292
9393protected:
9494    // device-level overrides
trunk/src/emu/video/generic.c
r17839r17840
125125   palette_set_color(machine,1,RGB_WHITE); /* white */
126126}
127127
128const rgb_t RGB_MONOCHROME_WHITE[] =
129{
130   RGB_BLACK,
131   RGB_WHITE
132};
128133
134
129135/*-------------------------------------------------
130136    monochrome_amber - 2-color black & amber
131137-------------------------------------------------*/
r17839r17840
136142   palette_set_color_rgb(machine, 1, 0xf7, 0xaa, 0x00); /* amber */
137143}
138144
145const rgb_t RGB_MONOCHROME_AMBER[] =
146{
147   RGB_BLACK,
148   MAKE_RGB(0xf7, 0xaa, 0x00)
149};
139150
151
140152/*-------------------------------------------------
141153    monochrome_green - 2-color black & green
142154-------------------------------------------------*/
r17839r17840
147159   palette_set_color_rgb(machine, 1, 0x00, 0xff, 0x00); /* green */
148160}
149161
162const rgb_t RGB_MONOCHROME_GREEN[] =
163{
164   RGB_BLACK,
165   MAKE_RGB(0x00, 0xff, 0x00)
166};
150167
168
151169/*-------------------------------------------------
170    monochrome_yellow - 2-color black & yellow
171-------------------------------------------------*/
172
173const rgb_t RGB_MONOCHROME_YELLOW[] =
174{
175   RGB_BLACK,
176   MAKE_RGB(0xff, 0xff, 0x00)
177};
178
179
180/*-------------------------------------------------
152181    RRRR_GGGG_BBBB - standard 4-4-4 palette,
153182    assuming the commonly used resistor values:
154183
trunk/src/emu/video/generic.h
r17839r17840
4646PALETTE_INIT( BBBBB_GGGGG_RRRRR );
4747PALETTE_INIT( RRRRR_GGGGGG_BBBBB );
4848
49extern const rgb_t RGB_MONOCHROME_WHITE[];
50extern const rgb_t RGB_MONOCHROME_AMBER[];
51extern const rgb_t RGB_MONOCHROME_GREEN[];
52extern const rgb_t RGB_MONOCHROME_YELLOW[];
4953
5054#endif   /* __VIDEO_GENERIC_H__ */
trunk/src/emu/video/cdp1861.c
r17839r17840
214214   for (x = 0; x < 8; x++)
215215   {
216216      int color = BIT(data, 7);
217      m_bitmap.pix16(y, sx + x) = color;
217      m_bitmap.pix32(y, sx + x) = RGB_MONOCHROME_WHITE[color];
218218      data <<= 1;
219219   }
220220}
r17839r17840
251251//  screen_update -
252252//-------------------------------------------------
253253
254UINT32 cdp1861_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
254UINT32 cdp1861_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
255255{
256256   if (m_disp)
257257   {
r17839r17840
259259   }
260260   else
261261   {
262      bitmap.fill(get_black_pen(machine()), cliprect);
262      bitmap.fill(RGB_BLACK, cliprect);
263263   }
264264   return 0;
265265}
trunk/src/emu/video/cdp1861.h
r17839r17840
113113   DECLARE_WRITE_LINE_MEMBER( disp_on_w );
114114   DECLARE_WRITE_LINE_MEMBER( disp_off_w );
115115
116   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
116   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
117117
118118protected:
119119    // device-level overrides
r17839r17840
132132   devcb_resolved_write_line   m_out_efx_func;
133133
134134   screen_device *m_screen;      // screen
135   bitmap_ind16 m_bitmap;            // bitmap
135   bitmap_rgb32 m_bitmap;         // bitmap
136136
137137   int m_disp;                  // display enabled
138138   int m_dispon;               // display on latch
trunk/src/emu/sound/cdp1869.c
r17839r17840
461461
462462   for (i = 0; i < 8; i++)
463463   {
464      palette_set_color(machine(), i, get_rgb(i, i, 15));
464      m_palette[i] = get_rgb(i, i, 15);
465465   }
466466
467467   // tone-on-tone display (CFC=1)
r17839r17840
469469   {
470470      for (int l = 0; l < 8; l++)
471471      {
472         palette_set_color(machine(), i, get_rgb(i, c, l));
472         m_palette[i] = get_rgb(i, c, l);
473473         i++;
474474      }
475475   }
r17839r17840
544544//  draw_line - draw character line
545545//-------------------------------------------------
546546
547void cdp1869_device::draw_line(bitmap_ind16 &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color)
547void cdp1869_device::draw_line(bitmap_rgb32 &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color)
548548{
549549   int i;
550550
r17839r17840
554554   {
555555      if (data & 0x80)
556556      {
557         bitmap.pix16(y, x) = color;
557         bitmap.pix32(y, x) = m_palette[color];
558558
559559         if (!m_fresvert)
560560         {
561            bitmap.pix16(y + 1, x) = color;
561            bitmap.pix32(y + 1, x) = m_palette[color];
562562         }
563563
564564         if (!m_freshorz)
565565         {
566            bitmap.pix16(y, x + 1) = color;
566            bitmap.pix32(y, x + 1) = m_palette[color];
567567
568568            if (!m_fresvert)
569569            {
570               bitmap.pix16(y + 1, x + 1) = color;
570               bitmap.pix32(y + 1, x + 1) = m_palette[color];
571571            }
572572         }
573573      }
r17839r17840
588588//  draw_char - draw character
589589//-------------------------------------------------
590590
591void cdp1869_device::draw_char(bitmap_ind16 &bitmap, const rectangle &rect, int x, int y, UINT16 pma)
591void cdp1869_device::draw_char(bitmap_rgb32 &bitmap, const rectangle &rect, int x, int y, UINT16 pma)
592592{
593593   UINT8 pmd = read_page_ram_byte(pma);
594594
r17839r17840
912912//  update_screen - update screen
913913//-------------------------------------------------
914914
915UINT32 cdp1869_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
915UINT32 cdp1869_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
916916{
917917   rectangle screen_rect, outer;
918918
trunk/src/emu/sound/cdp1869.h
r17839r17840
145145#define MCFG_CDP1869_SCREEN_PAL_ADD(_cdptag, _tag, _clock) \
146146   MCFG_SCREEN_ADD(_tag, RASTER) \
147147   MCFG_SCREEN_UPDATE_DEVICE(_cdptag, cdp1869_device, screen_update) \
148   MCFG_SCREEN_RAW_PARAMS(_clock, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_PAL, CDP1869_SCANLINE_VBLANK_END_PAL, CDP1869_SCANLINE_VBLANK_START_PAL) \
149   MCFG_PALETTE_LENGTH(8+64)
148   MCFG_SCREEN_RAW_PARAMS(_clock, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_PAL, CDP1869_SCANLINE_VBLANK_END_PAL, CDP1869_SCANLINE_VBLANK_START_PAL)
150149
151150#define MCFG_CDP1869_SCREEN_NTSC_ADD(_cdptag, _tag, _clock) \
152151   MCFG_SCREEN_ADD(_tag, RASTER) \
153152   MCFG_SCREEN_UPDATE_DEVICE(_cdptag, cdp1869_device, screen_update) \
154   MCFG_SCREEN_RAW_PARAMS(_clock, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_NTSC, CDP1869_SCANLINE_VBLANK_END_NTSC, CDP1869_SCANLINE_VBLANK_START_NTSC) \
155   MCFG_PALETTE_LENGTH(8+64)
153   MCFG_SCREEN_RAW_PARAMS(_clock, CDP1869_SCREEN_WIDTH, CDP1869_HBLANK_END, CDP1869_HBLANK_START, CDP1869_TOTAL_SCANLINES_NTSC, CDP1869_SCANLINE_VBLANK_END_NTSC, CDP1869_SCANLINE_VBLANK_START_NTSC)
156154
157155#define CDP1869_INTERFACE(_name) \
158156   const cdp1869_interface (_name) =
r17839r17840
231229   DECLARE_READ_LINE_MEMBER( predisplay_r );
232230   DECLARE_READ_LINE_MEMBER( pal_ntsc_r );
233231
234   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
232   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
235233
236234protected:
237235    // device-level overrides
r17839r17840
260258   inline int get_pen(int ccb0, int ccb1, int pcb);
261259
262260   void initialize_palette();
263   void draw_line(bitmap_ind16 &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color);
264   void draw_char(bitmap_ind16 &bitmap, const rectangle &rect, int x, int y, UINT16 pma);
261   void draw_line(bitmap_rgb32 &bitmap, const rectangle &rect, int x, int y, UINT8 data, int color);
262   void draw_char(bitmap_rgb32 &bitmap, const rectangle &rect, int x, int y, UINT16 pma);
265263
266264private:
267265   devcb_resolved_read_line      m_in_pal_ntsc_func;
r17839r17840
276274   sound_stream *m_stream;
277275
278276   // video state
277   rgb_t m_palette[8+64];
279278   int m_prd;                  // predisplay
280279   int m_dispoff;               // display off
281280   int m_fresvert;               // full resolution vertical
trunk/src/emu/sound/cdp1864.c
r17839r17840
8383      int g = (i & 1) ? luma : 0;
8484      int b = (i & 2) ? luma : 0;
8585
86      palette_set_color_rgb(machine(), i, r, g, b);
86      m_palette[i] = MAKE_RGB(r, g, b);
8787   }
8888}
8989
r17839r17840
422422         color = (gdata << 2) | (bdata << 1) | rdata;
423423      }
424424
425      m_bitmap.pix16(y, sx + x) = color;
425      m_bitmap.pix32(y, sx + x) = m_palette[color];
426426
427427      data <<= 1;
428428   }
r17839r17840
470470//  update_screen -
471471//-------------------------------------------------
472472
473UINT32 cdp1864_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
473UINT32 cdp1864_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
474474{
475475   if (m_disp)
476476   {
trunk/src/emu/sound/cdp1864.h
r17839r17840
155155   DECLARE_WRITE_LINE_MEMBER( aoe_w );
156156   DECLARE_WRITE_LINE_MEMBER( evs_w );
157157
158   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
158   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
159159
160160protected:
161161    // device-level overrides
r17839r17840
186186
187187   cpu_device *m_cpu;
188188   screen_device *m_screen;      // screen
189   bitmap_ind16 m_bitmap;            // bitmap
189   bitmap_rgb32 m_bitmap;         // bitmap
190190   sound_stream *m_stream;         // sound output
191191
192192   // video state
193   rgb_t m_palette[16];
193194   int m_disp;                  // display on
194195   int m_dmaout;               // DMA request active
195196   int m_bgcolor;               // background color
trunk/src/mess/machine/wangpc_lvc.c
r17839r17840
5454
5555void wangpc_lvc_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
5656{
57   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
58
5957   offs_t scroll_y = (((m_scroll >> 8) + 0x15) & 0xff) * 0x80;
6058
6159   if (OPTION_80_COL)
r17839r17840
7270
7371               if (column == cursor_x) color = 0x03;
7472
75               bitmap.pix32(y, x) = palette[color];
73               bitmap.pix32(y, x) = m_palette[color];
7674
7775               data <<= 1;
7876           }
r17839r17840
9492
9593               if (column == cursor_x) color = 0x03;
9694
97               bitmap.pix32(y, x) = palette[color];
95               bitmap.pix32(y, x) = m_palette[color];
9896
9997               data <<= 1;
10098           }
r17839r17840
146144   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
147145   MCFG_SCREEN_REFRESH_RATE(60)
148146
149   MCFG_PALETTE_LENGTH(16)
150
151147   MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, XTAL_14_31818MHz/16, crtc_intf)
152148MACHINE_CONFIG_END
153149
r17839r17840
351347            int g = BIT(data, 7) ? (i ? 0xff : 0x80) : 0;
352348            int b = BIT(data, 3) ? (i ? 0xff : 0x80) : 0;
353349
354            palette_set_color_rgb(machine(), index, r, g, b);
350            m_palette[index] = MAKE_RGB(r, g, b);
355351         }
356352         break;
357353
trunk/src/mess/machine/wangpc_lvc.h
r17839r17840
5757   // internal state
5858   required_device<mc6845_device> m_crtc;
5959
60   rgb_t m_palette[16];
6061   UINT16 *m_video_ram;
6162   UINT8 m_option;
6263   UINT16 m_scroll;
trunk/src/mess/machine/wangpc_mvc.c
r17839r17840
4747#define ATTR_SUBSCRIPT      BIT(attr, 6)
4848#define ATTR_SUPERSCRIPT   BIT(attr, 7)
4949
50static const rgb_t PALETTE[] =
51{
52   RGB_BLACK,
53   MAKE_RGB(0x00, 0x80, 0x00),
54   MAKE_RGB(0x00, 0xff, 0x00)
55};
5056
5157
58
5259//**************************************************************************
5360//  DEVICE DEFINITIONS
5461//**************************************************************************
r17839r17840
6269
6370void wangpc_mvc_device::crtc_update_row(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
6471{
65   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
66
6772   for (int sx = 0; sx < 50; sx++)
6873   {
6974      offs_t addr = (y * 50) + sx;
r17839r17840
7479         int x = (sx * 16) + bit;
7580         int color = BIT(data, 15);
7681
77         bitmap.pix32(y, x) = palette[color];
82         bitmap.pix32(y, x) = PALETTE[color];
7883
7984         data <<= 1;
8085      }
r17839r17840
110115         int color = ((BIT(data, 9) & !ATTR_BLANK) ^ ATTR_REVERSE);
111116
112117         if ((color | bitmap.pix32(y, x)) & ATTR_BOLD) color = 2;
113         if (color) bitmap.pix32(y, x) = palette[color];
118         if (color) bitmap.pix32(y, x) = PALETTE[color];
114119
115120         data <<= 1;
116121      }
r17839r17840
159164   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
160165   MCFG_SCREEN_REFRESH_RATE(60)
161166
162   MCFG_PALETTE_LENGTH(3)
163
164167   MCFG_MC6845_ADD(MC6845_TAG, MC6845_1, XTAL_14_31818MHz/16, crtc_intf)
165168MACHINE_CONFIG_END
166169
r17839r17840
223226   m_char_ram = auto_alloc_array(machine(), UINT16, CHAR_RAM_SIZE);
224227   m_bitmap_ram = auto_alloc_array(machine(), UINT16, BITMAP_RAM_SIZE);
225228
226   // initialize palette
227   palette_set_color_rgb(machine(), 0, 0, 0, 0);
228   palette_set_color_rgb(machine(), 1, 0, 0x80, 0);
229   palette_set_color_rgb(machine(), 2, 0, 0xff, 0);
230
231229   // state saving
232230   save_pointer(NAME(m_video_ram), VIDEO_RAM_SIZE);
233231   save_pointer(NAME(m_char_ram), CHAR_RAM_SIZE);
trunk/src/mess/machine/comxexp.c
r17839r17840
205205}
206206
207207
208//-------------------------------------------------
209//  screen_update -
210//-------------------------------------------------
211
212UINT32 comx_expansion_slot_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
213{
214   bool value = false;
215
216   if (m_card != NULL)
217   {
218      value = m_card->comx_screen_update(screen, bitmap, cliprect);
219   }
220
221   return value;
222}
223
224
225208WRITE_LINE_MEMBER( comx_expansion_slot_device::int_w ) { m_out_int_func(state); }
226209WRITE_LINE_MEMBER( comx_expansion_slot_device::ef4_w ) { m_out_ef4_func(state); }
227210WRITE_LINE_MEMBER( comx_expansion_slot_device::wait_w ) { m_out_wait_func(state); }
trunk/src/mess/machine/comxexp.h
r17839r17840
148148   virtual UINT8 comx_io_r(offs_t offset) { return 0; };
149149   virtual void comx_io_w(offs_t offset, UINT8 data) { };
150150
151   // video
152   virtual UINT32 comx_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return false; }
153
154151   comx_expansion_slot_device *m_slot;
155152};
156153
trunk/src/mess/machine/vip_exp.c
r17839r17840
210210//  screen_update -
211211//-------------------------------------------------
212212
213UINT32 vip_expansion_slot_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
213UINT32 vip_expansion_slot_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
214214{
215215   bool value = false;
216216
trunk/src/mess/machine/vip_exp.h
r17839r17840
9898   void io_w(address_space &space, offs_t offset, UINT8 data);
9999   UINT8 dma_r(address_space &space, offs_t offset);
100100   void dma_w(address_space &space, offs_t offset, UINT8 data);
101   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
101   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
102102   DECLARE_READ_LINE_MEMBER( ef1_r );
103103   DECLARE_READ_LINE_MEMBER( ef3_r );
104104   DECLARE_READ_LINE_MEMBER( ef4_r );
r17839r17840
146146   virtual UINT8 vip_dma_r(address_space &space, offs_t offset) { return 0xff; };
147147   virtual void vip_dma_w(address_space &space, offs_t offset, UINT8 data) { };
148148
149   virtual UINT32 vip_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; }
149   virtual UINT32 vip_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; }
150150
151151   virtual int vip_ef1_r() { return CLEAR_LINE; }
152152   virtual int vip_ef3_r() { return CLEAR_LINE; }
trunk/src/mess/machine/vp590.c
r17839r17840
241241//  vip_screen_update - screen update
242242//-------------------------------------------------
243243
244UINT32 vp590_device::vip_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
244UINT32 vp590_device::vip_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
245245{
246246   m_cgc->screen_update(screen, bitmap, cliprect);
247247
trunk/src/mess/machine/vp590.h
r17839r17840
5050   virtual void vip_program_w(address_space &space, offs_t offset, UINT8 data, int cdef, int *minh);
5151   virtual void vip_io_w(address_space &space, offs_t offset, UINT8 data);
5252   virtual void vip_dma_w(address_space &space, offs_t offset, UINT8 data);
53   virtual UINT32 vip_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
53   virtual UINT32 vip_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
5454   virtual int vip_ef3_r();
5555   virtual int vip_ef4_r();
5656
trunk/src/mess/machine/vp575.c
r17839r17840
249249//  vip_screen_update - screen update
250250//-------------------------------------------------
251251
252UINT32 vp575_device::vip_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
252UINT32 vp575_device::vip_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
253253{
254254   UINT32 data = 0;
255255
trunk/src/mess/machine/vp575.h
r17839r17840
7272   virtual void vip_io_w(address_space &space, offs_t offset, UINT8 data);
7373   virtual UINT8 vip_dma_r(address_space &space, offs_t offset);
7474   virtual void vip_dma_w(address_space &space, offs_t offset, UINT8 data);
75   virtual UINT32 vip_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
75   virtual UINT32 vip_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7676   virtual int vip_ef1_r();
7777   virtual int vip_ef3_r();
7878   virtual int vip_ef4_r();
trunk/src/mess/machine/comx_eb.c
r17839r17840
383383      }
384384   }
385385}
386
387
388//-------------------------------------------------
389//  comx_screen_update - screen update
390//-------------------------------------------------
391
392UINT32 comx_eb_device::comx_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
393{
394   bool value = false;
395
396   for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
397   {
398      if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL)
399      {
400         m_expansion_slot[slot]->screen_update(screen, bitmap, cliprect);
401      }
402   }
403
404   return value;
405}
trunk/src/mess/machine/comx_eb.h
r17839r17840
6666   virtual void comx_mwr_w(offs_t offset, UINT8 data);
6767   virtual UINT8 comx_io_r(offs_t offset);
6868   virtual void comx_io_w(offs_t offset, UINT8 data);
69   virtual UINT32 comx_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7069
7170private:
7271   UINT8 *m_rom;            // program ROM
trunk/src/mess/includes/vip.h
r17839r17840
5656   virtual void machine_start();
5757   virtual void machine_reset();
5858
59   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
59   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
6060
6161   void update_interrupts();
6262
trunk/src/mess/includes/pc1512.h
r17839r17840
111111   int get_display_mode(UINT8 mode);
112112   offs_t get_char_rom_offset();
113113   int get_color(UINT8 data);
114   void draw_alpha(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
115   void draw_graphics_1(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
116   void draw_graphics_2(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
114   void draw_alpha(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
115   void draw_graphics_1(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
116   void draw_graphics_2(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param);
117117
118118   DECLARE_READ8_MEMBER( video_ram_r );
119119   DECLARE_WRITE8_MEMBER( video_ram_w );
trunk/src/mess/includes/abc80.h
r17839r17840
100100   virtual void machine_start();
101101
102102   virtual void video_start();
103   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
103   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
104104
105   void update_screen(bitmap_ind16 &bitmap, const rectangle &cliprect);
105   void update_screen(bitmap_rgb32 &bitmap, const rectangle &cliprect);
106106
107107   void scan_keyboard();
108108
trunk/src/mess/includes/cgc7900.h
r17839r17840
4949   virtual void machine_reset();
5050
5151   virtual void video_start();
52   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
52   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
5353
5454   DECLARE_READ16_MEMBER( keyboard_r );
5555   DECLARE_WRITE16_MEMBER( keyboard_w );
r17839r17840
6464   DECLARE_READ16_MEMBER( sync_r );
6565
6666   void update_clut();
67   void draw_bitmap(screen_device *screen, bitmap_ind16 &bitmap);
68   void draw_overlay(screen_device *screen, bitmap_ind16 &bitmap);
67   void draw_bitmap(screen_device *screen, bitmap_rgb32 &bitmap);
68   void draw_overlay(screen_device *screen, bitmap_rgb32 &bitmap);
6969
7070   /* interrupt state */
7171   UINT16 m_int_mask;
7272
7373   /* video state */
74   rgb_t m_clut[256];
7475   required_shared_ptr<UINT16> m_chrom_ram;
7576   required_shared_ptr<UINT16> m_plane_ram;
7677   required_shared_ptr<UINT16> m_clut_ram;
trunk/src/mess/includes/abc80x.h
r17839r17840
187187        m_trom(*this, SAA5052_TAG)
188188   { }
189189
190   required_device<device_t> m_trom;
190   required_device<saa5050_device> m_trom;
191191
192192   DECLARE_DRIVER_INIT(driver_init);
193193
trunk/src/mess/includes/tmc1800.h
r17839r17840
3838   virtual void machine_start();
3939   virtual void machine_reset();
4040
41   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
42
4341   DECLARE_WRITE8_MEMBER( keylatch_w );
4442   DECLARE_READ8_MEMBER( dispon_r );
4543   DECLARE_WRITE8_MEMBER( dispoff_w );
r17839r17840
6866   virtual void machine_start();
6967   virtual void machine_reset();
7068
71   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
69   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7270
7371   DECLARE_WRITE8_MEMBER( keylatch_w );
7472   DECLARE_READ_LINE_MEMBER( clear_r );
r17839r17840
9997   virtual void machine_start();
10098   virtual void machine_reset();
10199
102   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
103
104100   DECLARE_WRITE8_MEMBER( keylatch_w );
105101   DECLARE_WRITE8_MEMBER( bankswitch_w );
106102   DECLARE_READ_LINE_MEMBER( clear_r );
r17839r17840
147143   virtual void machine_start();
148144   virtual void machine_reset();
149145
150   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
151
152146   enum
153147   {
154148      TIMER_ID_EF4
trunk/src/mess/includes/newbrain.h
r17839r17840
7575   virtual void machine_reset();
7676
7777   virtual void video_start();
78   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
78   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7979
8080   enum
8181   {
r17839r17840
113113   void tvram_w(UINT8 data, int a6);
114114   inline int get_reset_t();
115115   inline int get_pwrup_t();
116   void screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect);
116   void screen_update(bitmap_rgb32 &bitmap, const rectangle &cliprect);
117117
118118   // processor state
119119   int m_pwrup;         // power up
trunk/src/mess/includes/comx35.h
r17839r17840
6363   virtual void machine_reset();
6464
6565   virtual void video_start();
66   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6766
6867   enum
6968   {
trunk/src/mess/includes/tandy2k.h
r17839r17840
8181
8282   virtual void machine_start();
8383
84   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
84   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
8585
8686   void speaker_update();
8787   void dma_request(int line, int state);
trunk/src/mess/video/pc1512.c
r17839r17840
99#define LOG 0
1010
1111
12static const rgb_t PALETTE[] =
13{
14   RGB_BLACK,
15   MAKE_RGB(0x00, 0x00, 0xaa),
16   MAKE_RGB(0x00, 0xaa, 0x00),
17   MAKE_RGB(0x00, 0xaa, 0xaa),
18   MAKE_RGB(0xaa, 0x00, 0x00),
19   MAKE_RGB(0xaa, 0x00, 0xaa),
20   MAKE_RGB(0xaa, 0x55, 0x00),
21   MAKE_RGB(0xaa, 0xaa, 0xaa),
22   MAKE_RGB(0x55, 0x55, 0x55),
23   MAKE_RGB(0x55, 0x55, 0xff),
24   MAKE_RGB(0x55, 0xff, 0x55),
25   MAKE_RGB(0x55, 0xff, 0xff),
26   MAKE_RGB(0xff, 0x55, 0x55),
27   MAKE_RGB(0xff, 0x55, 0xff),
28   MAKE_RGB(0xff, 0xff, 0x55),
29   RGB_WHITE
30};
31
1232static const int PALETTE_0[] = { 0, 3, 5, 7 };
1333static const int PALETTE_1[] = { 0, 2, 4, 6 };
1434static const int PALETTE_2[] = { 0, 3, 4, 7 };
r17839r17840
4363
4464
4565//**************************************************************************
46//  PALETTE
47//**************************************************************************
48
49//-------------------------------------------------
50//  PALETTE_INIT( pc1512 )
51//-------------------------------------------------
52
53static PALETTE_INIT( pc1512 )
54{
55   palette_set_color_rgb(machine,  0, 0x00, 0x00, 0x00);
56   palette_set_color_rgb(machine,  1, 0x00, 0x00, 0xaa);
57   palette_set_color_rgb(machine,  2, 0x00, 0xaa, 0x00);
58   palette_set_color_rgb(machine,  3, 0x00, 0xaa, 0xaa);
59   palette_set_color_rgb(machine,  4, 0xaa, 0x00, 0x00);
60   palette_set_color_rgb(machine,  5, 0xaa, 0x00, 0xaa);
61   palette_set_color_rgb(machine,  6, 0xaa, 0x55, 0x00);
62   palette_set_color_rgb(machine,  7, 0xaa, 0xaa, 0xaa);
63   palette_set_color_rgb(machine,  8, 0x55, 0x55, 0x55);
64   palette_set_color_rgb(machine,  9, 0x55, 0x55, 0xff);
65   palette_set_color_rgb(machine, 10, 0x55, 0xff, 0x55);
66   palette_set_color_rgb(machine, 11, 0x55, 0xff, 0xff);
67   palette_set_color_rgb(machine, 12, 0xff, 0x55, 0x55);
68   palette_set_color_rgb(machine, 13, 0xff, 0x55, 0xff);
69   palette_set_color_rgb(machine, 14, 0xff, 0xff, 0x55);
70   palette_set_color_rgb(machine, 15, 0xff, 0xff, 0xff);
71}
72
73
74
75//**************************************************************************
7666//  VIDEO RAM ACCESS
7767//**************************************************************************
7868
r17839r17840
403393   return ((ioport("LK")->read() >> 5) & 0x03) << 11;
404394}
405395
406void pc1512_state::draw_alpha(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
396void pc1512_state::draw_alpha(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
407397{
408398   offs_t char_rom_offset = get_char_rom_offset();
409   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
410399   UINT32 *p = &bitmap.pix32(y + VFP_HIRES, HFP_HIRES);
411400
412401   if (get_display_mode(m_vdu_mode) == ALPHA_40)
r17839r17840
443432      {
444433         int color = BIT(data, 7) ? fg : bg;
445434
446         *p = palette[color]; p++;
435         *p = PALETTE[color]; p++;
447436
448437         data <<= 1;
449438      }
r17839r17840
473462   return color;
474463};
475464
476void pc1512_state::draw_graphics_1(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
465void pc1512_state::draw_graphics_1(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
477466{
478467   if (y > 199) return;
479468
480469   UINT32 *p = &bitmap.pix32(y + VFP_LORES, HFP_LORES);
481   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
482470
483471   for (int column = 0; column < x_count; column++)
484472   {
r17839r17840
488476
489477      for (int x = 0; x < 8; x++)
490478      {
491         *p = palette[get_color((BIT(b, 15) << 1) | BIT(b, 14))]; p++;
479         *p = PALETTE[get_color((BIT(b, 15) << 1) | BIT(b, 14))]; p++;
492480         b <<= 2;
493481      }
494482   }
495483}
496484
497void pc1512_state::draw_graphics_2(mc6845_device *device, bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
485void pc1512_state::draw_graphics_2(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT16 ma, UINT8 ra, UINT16 y, UINT8 x_count, INT8 cursor_x, void *param)
498486{
499487   if (y > 199) return;
500488
501489   UINT32 *p = &bitmap.pix32(y + VFP_HIRES, HFP_HIRES);
502   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
503490
504491   for (int column = 0; column < x_count; column++)
505492   {
r17839r17840
512499
513500      for (int x = 0; x < 16; x++)
514501      {
515         *p = palette[(BIT(i, 15) << 3) | (BIT(r, 15) << 2) | (BIT(g, 15) << 1) | BIT(b, 15)]; p++;
502         *p = PALETTE[(BIT(i, 15) << 3) | (BIT(r, 15) << 2) | (BIT(g, 15) << 1) | BIT(b, 15)]; p++;
516503         i <<= 1; r <<= 1; g <<= 1; b <<= 1;
517504      }
518505   }
r17839r17840
526513   {
527514   case ALPHA_40:
528515   case ALPHA_80:
529      state->draw_alpha(device, bitmap, cliprect, ma, ra, y, x_count, cursor_x, param);
516      state->draw_alpha(bitmap, cliprect, ma, ra, y, x_count, cursor_x, param);
530517      break;
531518
532519   case GRAPHICS_1:
533      state->draw_graphics_1(device, bitmap, cliprect, ma, ra, y, x_count, cursor_x, param);
520      state->draw_graphics_1(bitmap, cliprect, ma, ra, y, x_count, cursor_x, param);
534521      break;
535522
536523   case GRAPHICS_2:
537      state->draw_graphics_2(device, bitmap, cliprect, ma, ra, y, x_count, cursor_x, param);
524      state->draw_graphics_2(bitmap, cliprect, ma, ra, y, x_count, cursor_x, param);
538525      break;
539526   }
540527}
r17839r17840
574561
575562UINT32 pc1512_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
576563{
577   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
578564   if (m_vdu_mode & MODE_ENABLE_VIDEO)
579565   {
580566      m_blink_ctr++;
r17839r17840
608594      case ALPHA_40:
609595      case ALPHA_80:
610596      case GRAPHICS_1:
611         bitmap.fill(palette[m_vdu_color & 0x0f], cliprect);
597         bitmap.fill(PALETTE[m_vdu_color & 0x0f], cliprect);
612598         break;
613599
614600      case GRAPHICS_2:
615         bitmap.fill(palette[m_vdu_border & 0x0f], cliprect);
601         bitmap.fill(PALETTE[m_vdu_border & 0x0f], cliprect);
616602         break;
617603      }
618604
r17839r17840
620606   }
621607   else
622608   {
623      bitmap.fill(palette[0], cliprect);
609      bitmap.fill(RGB_BLACK, cliprect);
624610   }
625611
626612   return 0;
r17839r17840
639625   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
640626   MCFG_SCREEN_REFRESH_RATE(50)
641627
642   MCFG_PALETTE_LENGTH(16)
643   MCFG_PALETTE_INIT(pc1512)
644
645628   MCFG_MC6845_ADD(AMS40041_TAG, AMS40041, XTAL_28_63636MHz/32, crtc_intf)
646629MACHINE_CONFIG_END
trunk/src/mess/video/abc800.c
r17839r17840
229229//**************************************************************************
230230
231231//-------------------------------------------------
232//  PALETTE_INIT( abc800m )
233//-------------------------------------------------
234
235static PALETTE_INIT( abc800m )
236{
237   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00); // black
238   palette_set_color_rgb(machine, 1, 0xff, 0xff, 0x00); // yellow
239}
240
241
242//-------------------------------------------------
243232//  hr_update - high resolution screen update
244233//-------------------------------------------------
245234
246235void abc800m_state::hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect)
247236{
248   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
249237   UINT16 addr = 0;
250238
251239   for (int y = m_hrs + VERTICAL_PORCH_HACK; y < MIN(cliprect.max_y + 1, m_hrs + VERTICAL_PORCH_HACK + 240); y++)
r17839r17840
261249            UINT16 fgctl_addr = ((m_fgctl & 0x7f) << 2) | ((data >> 6) & 0x03);
262250            int color = (m_fgctl_prom[fgctl_addr] & 0x07) ? 1 : 0;
263251
264            bitmap.pix32(y, x++) = palette[color];
265            bitmap.pix32(y, x++) = palette[color];
252            bitmap.pix32(y, x++) = RGB_MONOCHROME_YELLOW[color];
253            bitmap.pix32(y, x++) = RGB_MONOCHROME_YELLOW[color];
266254
267255            data <<= 2;
268256         }
r17839r17840
278266static MC6845_UPDATE_ROW( abc800m_update_row )
279267{
280268   abc800m_state *state = device->machine().driver_data<abc800m_state>();
281   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
282269
283270   int column;
284271
r17839r17840
307294
308295         if (BIT(data, 7))
309296         {
310            bitmap.pix32(y, x) = palette[1];
297            bitmap.pix32(y, x) = RGB_MONOCHROME_YELLOW[1];
311298         }
312299
313300         data <<= 1;
r17839r17840
374361   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
375362   MCFG_SCREEN_SIZE(768, 312)
376363   MCFG_SCREEN_VISIBLE_AREA(0,768-1, 0, 312-1)
377
378   MCFG_PALETTE_LENGTH(2)
379   MCFG_PALETTE_INIT(abc800m)
380364MACHINE_CONFIG_END
trunk/src/mess/video/abc80.c
r17839r17840
3939//  update_screen -
4040//-------------------------------------------------
4141
42void abc80_state::update_screen(bitmap_ind16 &bitmap, const rectangle &cliprect)
42void abc80_state::update_screen(bitmap_rgb32 &bitmap, const rectangle &cliprect)
4343{
4444   int c = 0;
4545   int r = 0;
r17839r17840
135135            color ^= (cursor & m_blink);
136136            color &= blank;
137137
138            bitmap.pix16(y, x) = color;
138            bitmap.pix32(y, x) = RGB_MONOCHROME_WHITE[color];
139139
140140            data <<= 1;
141141         }
r17839r17840
199199//  SCREEN_UPDATE_IND16( abc80 )
200200//-------------------------------------------------
201201
202UINT32 abc80_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
202UINT32 abc80_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
203203{
204204   update_screen(bitmap, cliprect);
205205
r17839r17840
217217
218218   MCFG_GFXDECODE(abc80)
219219
220   MCFG_PALETTE_LENGTH(2)
221   MCFG_PALETTE_INIT(black_and_white)
222
223220   MCFG_SCREEN_RAW_PARAMS(XTAL_11_9808MHz/2, ABC80_HTOTAL, ABC80_HBEND, ABC80_HBSTART, ABC80_VTOTAL, ABC80_VBEND, ABC80_VBSTART)
224221MACHINE_CONFIG_END
trunk/src/mess/video/cgc7900.c
r17839r17840
2222#define OVERLAY_CURSOR_BLINK      BIT(m_roll_overlay[0], 12)
2323#define OVERLAY_CHARACTER_BLINK      BIT(m_roll_overlay[0], 11)
2424
25static const rgb_t PALETTE[] =
26{
27   RGB_BLACK,
28   MAKE_RGB(0x00, 0x00, 0xff),
29   MAKE_RGB(0x00, 0xff, 0x00),
30   MAKE_RGB(0x00, 0xff, 0xff),
31   MAKE_RGB(0xff, 0x00, 0x00),
32   MAKE_RGB(0xff, 0x00, 0xff),
33   MAKE_RGB(0xff, 0xff, 0x00),
34   RGB_WHITE
35};
36
2537/***************************************************************************
2638    READ/WRITE HANDLERS
2739***************************************************************************/
r17839r17840
101113      UINT8 g = (data >> 8) & 0xff;
102114      UINT8 r = (data >> 16) & 0xff;
103115
104      palette_set_color_rgb(machine(), i + 8, r, g, b);
116      m_clut[i] = MAKE_RGB(r, g, b);
105117   }
106118}
107119
r17839r17840
109121    draw_bitmap - draw bitmap image
110122-------------------------------------------------*/
111123
112void cgc7900_state::draw_bitmap(screen_device *screen, bitmap_ind16 &bitmap)
124void cgc7900_state::draw_bitmap(screen_device *screen, bitmap_rgb32 &bitmap)
113125{
114126}
115127
r17839r17840
117129    draw_overlay - draw text overlay
118130-------------------------------------------------*/
119131
120void cgc7900_state::draw_overlay(screen_device *screen, bitmap_ind16 &bitmap)
132void cgc7900_state::draw_overlay(screen_device *screen, bitmap_rgb32 &bitmap)
121133{
122134   for (int y = 0; y < 768; y++)
123135   {
r17839r17840
138150            {
139151               if (!OVERLAY_CURSOR_BLINK || m_blink)
140152               {
141                  bitmap.pix16(y, (sx * 8) + x) = 7;
153                  bitmap.pix32(y, (sx * 8) + x) = PALETTE[7];
142154               }
143155            }
144156            else
145157            {
146158               if (BIT(data, x) && (!OVERLAY_CHARACTER_BLINK || m_blink))
147159               {
148                  if (OVERLAY_VF) bitmap.pix16(y, (sx * 8) + x) = fg;
160                  if (OVERLAY_VF) bitmap.pix32(y, (sx * 8) + x) = PALETTE[fg];
149161               }
150162               else
151163               {
152                  if (OVERLAY_VB) bitmap.pix16(y, (sx * 8) + x) = bg;
164                  if (OVERLAY_VB) bitmap.pix32(y, (sx * 8) + x) = PALETTE[bg];
153165               }
154166            }
155167         }
r17839r17840
169181}
170182
171183/*-------------------------------------------------
172    PALETTE_INIT( cgc7900 )
173-------------------------------------------------*/
174
175static PALETTE_INIT( cgc7900 )
176{
177   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00 );
178   palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff );
179   palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00 );
180   palette_set_color_rgb(machine, 3, 0x00, 0xff, 0xff );
181   palette_set_color_rgb(machine, 4, 0xff, 0x00, 0x00 );
182   palette_set_color_rgb(machine, 5, 0xff, 0x00, 0xff );
183   palette_set_color_rgb(machine, 6, 0xff, 0xff, 0x00 );
184   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff );
185}
186
187/*-------------------------------------------------
188184    VIDEO_START( cgc7900 )
189185-------------------------------------------------*/
190186
r17839r17840
198194    SCREEN_UPDATE_IND16( cgc7900 )
199195-------------------------------------------------*/
200196
201UINT32 cgc7900_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
197UINT32 cgc7900_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
202198{
203199   update_clut();
204200   draw_bitmap(&screen, bitmap);
r17839r17840
248244
249245   MCFG_GFXDECODE(cgc7900)
250246
251   MCFG_PALETTE_LENGTH(8+256) /* 8 overlay colors + 256 bitmap colors */
252   MCFG_PALETTE_INIT(cgc7900)
253
254247   MCFG_TIMER_ADD_PERIODIC("blink", blink_tick, attotime::from_hz(XTAL_28_48MHz/7500000))
255248MACHINE_CONFIG_END
trunk/src/mess/video/zx8301.c
r17839r17840
3333static const int ZX8301_COLOR_MODE4[] = { 0, 2, 4, 7 };
3434
3535
36static const rgb_t PALETTE[] =
37{
38   MAKE_RGB(0x00, 0x00, 0x00), // black
39   MAKE_RGB(0x00, 0x00, 0xff), // blue
40   MAKE_RGB(0xff, 0x00, 0x00), // red
41   MAKE_RGB(0xff, 0x00, 0xff), // magenta
42   MAKE_RGB(0x00, 0xff, 0x00), // green
43   MAKE_RGB(0x00, 0xff, 0xff), // cyan
44   MAKE_RGB(0xff, 0xff, 0x00), // yellow
45   MAKE_RGB(0xff, 0xff, 0xff) // white
46};
3647
48
49
3750//**************************************************************************
3851//  GLOBAL VARIABLES
3952//**************************************************************************
r17839r17840
254267//  draw_line_mode4 - draw mode 4 line
255268//-------------------------------------------------
256269
257void zx8301_device::draw_line_mode4(bitmap_ind16 &bitmap, int y, UINT16 da)
270void zx8301_device::draw_line_mode4(bitmap_rgb32 &bitmap, int y, UINT16 da)
258271{
259272   int x = 0;
260273
r17839r17840
269282         int green = BIT(byte_high, 7);
270283         int color = (green << 1) | red;
271284
272         bitmap.pix16(y, x++) = ZX8301_COLOR_MODE4[color];
285         bitmap.pix32(y, x++) = PALETTE[ZX8301_COLOR_MODE4[color]];
273286
274287         byte_high <<= 1;
275288         byte_low <<= 1;
r17839r17840
282295//  draw_line_mode8 - draw mode 8 line
283296//-------------------------------------------------
284297
285void zx8301_device::draw_line_mode8(bitmap_ind16 &bitmap, int y, UINT16 da)
298void zx8301_device::draw_line_mode8(bitmap_rgb32 &bitmap, int y, UINT16 da)
286299{
287300   int x = 0;
288301
r17839r17840
305318            color = 0;
306319         }
307320
308         bitmap.pix16(y, x++) = color;
309         bitmap.pix16(y, x++) = color;
321         bitmap.pix32(y, x++) = PALETTE[color];
322         bitmap.pix32(y, x++) = PALETTE[color];
310323
311324         byte_high <<= 2;
312325         byte_low <<= 2;
r17839r17840
316329
317330
318331//-------------------------------------------------
319//  update_screen -
332//  screen_update -
320333//-------------------------------------------------
321334
322void zx8301_device::update_screen(bitmap_ind16 &bitmap, const rectangle &cliprect)
335UINT32 zx8301_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
323336{
324337   if (!m_dispoff)
325338   {
r17839r17840
341354   }
342355   else
343356   {
344      bitmap.fill(get_black_pen(machine()), cliprect);
357      bitmap.fill(RGB_BLACK, cliprect);
345358   }
359
360   return 0;
346361}
trunk/src/mess/video/uv201.c
r17839r17840
8181   ((_y >= cliprect.min_y) && (_y <= cliprect.max_y))
8282
8383#define DRAW_PIXEL(_scanline, _dot) \
84   if (IS_VISIBLE(_scanline)) bitmap.pix16((_scanline), HSYNC_WIDTH + HFP_WIDTH + _dot) = pixel;
84   if (IS_VISIBLE(_scanline)) bitmap.pix32((_scanline), HSYNC_WIDTH + HFP_WIDTH + _dot) = m_palette[pixel];
8585
8686
8787
r17839r17840
239239         onvalue = onhiintensity;
240240      }
241241
242      palette_set_color_rgb(machine(), offset + 0, offvalue, offvalue, offvalue); // black
243      palette_set_color_rgb(machine(), offset + 1, onvalue, offvalue, offvalue); // red
244      palette_set_color_rgb(machine(), offset + 2, offvalue, onvalue, offvalue); // green
245      palette_set_color_rgb(machine(), offset + 3, onvalue, onvalue, offvalue); // red-green
246      palette_set_color_rgb(machine(), offset + 4, offvalue, offvalue, onvalue); // blue
247      palette_set_color_rgb(machine(), offset + 5, onvalue, offvalue, onvalue); // red-blue
248      palette_set_color_rgb(machine(), offset + 6, offvalue, onvalue, onvalue); // green-blue
249      palette_set_color_rgb(machine(), offset + 7, onvalue, onvalue, onvalue); // white
242      m_palette[offset + 0] = MAKE_RGB(offvalue, offvalue, offvalue); // black
243      m_palette[offset + 1] = MAKE_RGB(onvalue, offvalue, offvalue); // red
244      m_palette[offset + 2] = MAKE_RGB(offvalue, onvalue, offvalue); // green
245      m_palette[offset + 3] = MAKE_RGB(onvalue, onvalue, offvalue); // red-green
246      m_palette[offset + 4] = MAKE_RGB(offvalue, offvalue, onvalue); // blue
247      m_palette[offset + 5] = MAKE_RGB(onvalue, offvalue, onvalue); // red-blue
248      m_palette[offset + 6] = MAKE_RGB(offvalue, onvalue, onvalue); // green-blue
249      m_palette[offset + 7] = MAKE_RGB(onvalue, onvalue, onvalue); // white
250250   }
251251}
252252
r17839r17840
496496//  screen_update -
497497//-------------------------------------------------
498498
499UINT32 uv201_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
499UINT32 uv201_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
500500{
501501   bitmap.fill(get_black_pen(machine()), cliprect);
502502
trunk/src/mess/video/zx8301.h
r17839r17840
8888    DECLARE_READ8_MEMBER( data_r );
8989    DECLARE_WRITE8_MEMBER( data_w );
9090
91   void update_screen(bitmap_ind16 &bitmap, const rectangle &cliprect);
91   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
9292
9393protected:
9494    // device-level overrides
r17839r17840
105105   inline UINT8 readbyte(offs_t address);
106106   inline void writebyte(offs_t address, UINT8 data);
107107
108   void draw_line_mode4(bitmap_ind16 &bitmap, int y, UINT16 da);
109   void draw_line_mode8(bitmap_ind16 &bitmap, int y, UINT16 da);
108   void draw_line_mode4(bitmap_rgb32 &bitmap, int y, UINT16 da);
109   void draw_line_mode8(bitmap_rgb32 &bitmap, int y, UINT16 da);
110110
111111private:
112112   static const device_timer_id TIMER_VSYNC = 0;
trunk/src/mess/video/uv201.h
r17839r17840
7070   MCFG_DEVICE_CONFIG(_config) \
7171    MCFG_SCREEN_ADD(_screen_tag, RASTER) \
7272   MCFG_SCREEN_UPDATE_DEVICE(_tag, uv201_device, screen_update) \
73   MCFG_SCREEN_RAW_PARAMS(_clock, 232, 18, 232, 262, 21, 262) \
74    MCFG_PALETTE_LENGTH(32)
73   MCFG_SCREEN_RAW_PARAMS(_clock, 232, 18, 232, 262, 21, 262)
7574
7675
7776#define UV201_INTERFACE(name) \
r17839r17840
110109    DECLARE_WRITE_LINE_MEMBER( ext_int_w );
111110    DECLARE_READ_LINE_MEMBER( kbd_r );
112111
113   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
112   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
114113
115114protected:
116115    // device-level overrides
r17839r17840
140139
141140   screen_device *m_screen;
142141
142   rgb_t m_palette[32];
143143   UINT8 m_ram[0x90];
144144   UINT8 m_y_int;
145145   UINT8 m_fmod;
trunk/src/mess/video/tmc1800.c
r17839r17840
7373
7474/* OSM-200 */
7575
76UINT32 osc1000b_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
76UINT32 osc1000b_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
7777{
7878   return 0;
7979}
r17839r17840
8282
8383MACHINE_CONFIG_FRAGMENT( tmc1800_video )
8484   MCFG_CDP1861_SCREEN_ADD(CDP1861_TAG, SCREEN_TAG, XTAL_1_75MHz)
85
86   MCFG_PALETTE_LENGTH(2)
87   MCFG_PALETTE_INIT(black_and_white)
88
8985   MCFG_CDP1861_ADD(CDP1861_TAG, XTAL_1_75MHz, tmc1800_cdp1861_intf)
9086MACHINE_CONFIG_END
9187
r17839r17840
9591   MCFG_SCREEN_REFRESH_RATE(50)
9692   MCFG_SCREEN_SIZE(320, 200)
9793   MCFG_SCREEN_VISIBLE_AREA(0, 319, 0, 199)
98
99   MCFG_PALETTE_LENGTH(2)
100   MCFG_PALETTE_INIT(black_and_white)
10194MACHINE_CONFIG_END
10295
10396MACHINE_CONFIG_FRAGMENT( tmc2000_video )
10497   MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL_1_75MHz)
10598   MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
10699
107   MCFG_PALETTE_LENGTH(8+8)
108
109100   MCFG_SPEAKER_STANDARD_MONO("mono")
110101   MCFG_CDP1864_ADD(CDP1864_TAG, XTAL_1_75MHz, tmc2000_cdp1864_intf)
111102   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
r17839r17840
115106   MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL_1_75MHz)
116107   MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
117108
118   MCFG_PALETTE_LENGTH(8+8)
119
120109   MCFG_SPEAKER_STANDARD_MONO("mono")
121110   MCFG_CDP1864_ADD(CDP1864_TAG, XTAL_1_75MHz, nano_cdp1864_intf)
122111   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
trunk/src/mess/video/newbrain.c
r17839r17840
1313   save_item(NAME(m_segment_data));
1414}
1515
16void newbrain_state::screen_update(bitmap_ind16 &bitmap, const rectangle &cliprect)
16void newbrain_state::screen_update(bitmap_rgb32 &bitmap, const rectangle &cliprect)
1717{
1818   address_space *program = m_maincpu->space(AS_PROGRAM);
1919
r17839r17840
6767         {
6868            int color = BIT(charrom_data, 7) ^ rv;
6969
70            bitmap.pix16(y, x++) = color;
70            bitmap.pix32(y, x++) = RGB_MONOCHROME_WHITE[color];
7171
7272            if (columns == 40)
7373            {
74               bitmap.pix16(y, x++) = color;
74               bitmap.pix32(y, x++) = RGB_MONOCHROME_WHITE[color];
7575            }
7676
7777            charrom_data <<= 1;
r17839r17840
101101   }
102102}
103103
104UINT32 newbrain_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
104UINT32 newbrain_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
105105{
106106   if (m_enrg1 & NEWBRAIN_ENRG1_TVP)
107107   {
r17839r17840
109109   }
110110   else
111111   {
112      bitmap.fill(get_black_pen(machine()), cliprect);
112      bitmap.fill(RGB_BLACK, cliprect);
113113   }
114114
115115   return 0;
r17839r17840
126126   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
127127   MCFG_SCREEN_SIZE(640, 250)
128128   MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 249)
129
130   MCFG_PALETTE_LENGTH(2)
131   MCFG_PALETTE_INIT(black_and_white)
132129MACHINE_CONFIG_END
trunk/src/mess/video/comx35.c
r17839r17840
109109   save_pointer(NAME(m_charram), COMX35_CHARRAM_SIZE);
110110}
111111
112UINT32 comx35_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
113{
114   if (screen.width() == CDP1869_SCREEN_WIDTH)
115   {
116      m_vis->screen_update(screen, bitmap, cliprect);
117   }
118   else
119   {
120      m_expansion->screen_update(screen, bitmap, cliprect);
121   }
122
123   return 0;
124}
125
126112/* Machine Drivers */
127113
128114MACHINE_CONFIG_FRAGMENT( comx35_pal_video )
trunk/src/mess/video/abc802.c
r17839r17840
6161    */
6262
6363   abc802_state *state =  device->machine().driver_data<abc802_state>();
64   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
6564
6665   int rf = 0, rc = 0, rg = 0;
6766
r17839r17840
134133               int x = HORIZONTAL_PORCH_HACK + ((column + 3) * ABC800_CHAR_WIDTH) + bit;
135134               int color = BIT(data, 7) ^ ri;
136135
137               bitmap.pix32(y, x) = palette[color];
136               bitmap.pix32(y, x) = RGB_MONOCHROME_AMBER[color];
138137
139138               data <<= 1;
140139            }
r17839r17840
146145               int x = HORIZONTAL_PORCH_HACK + ((column + 3) * ABC800_CHAR_WIDTH) + (bit << 1);
147146               int color = BIT(data, 7) ^ ri;
148147
149               bitmap.pix32(y, x) = palette[color];
150               bitmap.pix32(y, x + 1) = palette[color];
148               bitmap.pix32(y, x) = RGB_MONOCHROME_AMBER[color];
149               bitmap.pix32(y, x + 1) = RGB_MONOCHROME_AMBER[color];
151150
152151               data <<= 1;
153152            }
r17839r17840
249248   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
250249   MCFG_SCREEN_SIZE(768, 312)
251250   MCFG_SCREEN_VISIBLE_AREA(0,768-1, 0, 312-1)
252
253   MCFG_PALETTE_LENGTH(2)
254   MCFG_PALETTE_INIT(monochrome_amber)
255251MACHINE_CONFIG_END
trunk/src/mess/video/abc806.c
r17839r17840
2424#define VERTICAL_PORCH_HACK      27
2525
2626
27
28//-------------------------------------------------
29//  PALETTE_INIT( abc806 )
30//-------------------------------------------------
31
32static PALETTE_INIT( abc806 )
27static const rgb_t PALETTE[] =
3328{
34   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00); // black
35   palette_set_color_rgb(machine, 1, 0xff, 0x00, 0x00); // red
36   palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); // green
37   palette_set_color_rgb(machine, 3, 0xff, 0xff, 0x00); // yellow
38   palette_set_color_rgb(machine, 4, 0x00, 0x00, 0xff); // blue
39   palette_set_color_rgb(machine, 5, 0xff, 0x00, 0xff); // magenta
40   palette_set_color_rgb(machine, 6, 0x00, 0xff, 0xff); // cyan
41   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff); // white
42}
29   RGB_BLACK, // black
30   MAKE_RGB(0xff, 0x00, 0x00), // red
31   MAKE_RGB(0x00, 0xff, 0x00), // green
32   MAKE_RGB(0xff, 0xff, 0x00), // yellow
33   MAKE_RGB(0x00, 0x00, 0xff), // blue
34   MAKE_RGB(0xff, 0x00, 0xff), // magenta
35   MAKE_RGB(0x00, 0xff, 0xff), // cyan
36   RGB_WHITE // white
37};
4338
4439
4540//-------------------------------------------------
r17839r17840
242237static MC6845_UPDATE_ROW( abc806_update_row )
243238{
244239   abc806_state *state = device->machine().driver_data<abc806_state>();
245   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
246240
247241//  UINT8 old_data = 0xff;
248242   int fg_color = 7;
r17839r17840
333327      {
334328         int color = BIT(chargen_data, 7) ? fg_color : bg_color;
335329
336         bitmap.pix32(y, x++) = palette[color];
330         bitmap.pix32(y, x++) = PALETTE[color];
337331
338332         if (e5 || e6)
339333         {
340            bitmap.pix32(y, x++) = palette[color];
334            bitmap.pix32(y, x++) = PALETTE[color];
341335         }
342336
343337         chargen_data <<= 1;
r17839r17840
436430
437431void abc806_state::hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect)
438432{
439   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
440433   UINT32 addr = (m_hrs & 0x0f) << 15;
441434
442435   for (int y = m_sync + VERTICAL_PORCH_HACK; y < MIN(cliprect.max_y + 1, m_sync + VERTICAL_PORCH_HACK + 240); y++)
r17839r17840
450443         {
451444            int x = HORIZONTAL_PORCH_HACK + (ABC800_CHAR_WIDTH * 4) - 16 + (sx * 4) + pixel;
452445
453            if (BIT(dot, 15) || bitmap.pix32(y, x) == palette[0])
446            if (BIT(dot, 15) || (bitmap.pix32(y, x) == RGB_BLACK))
454447            {
455               bitmap.pix32(y, x) = palette[(dot >> 12) & 0x07];
448               bitmap.pix32(y, x) = PALETTE[(dot >> 12) & 0x07];
456449            }
457450
458451            dot <<= 4;
r17839r17840
547540   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
548541   MCFG_SCREEN_SIZE(768, 312)
549542   MCFG_SCREEN_VISIBLE_AREA(0, 768-1, 0, 312-1)
550
551   MCFG_PALETTE_LENGTH(8)
552
553   MCFG_PALETTE_INIT(abc806)
554543MACHINE_CONFIG_END
trunk/src/mess/video/abc1600.c
r17839r17840
991991{
992992   if (y > 0x3ff) return;
993993
994   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
995994   int x = HFP;
996995
997996   for (int column = 0; column < x_count; column += 2)
r17839r17840
10071006         {
10081007            int color = (BIT(data, 15) ^ PIX_POL) & !BLANK;
10091008
1010            bitmap.pix32(y + VFP, x++) = palette[color];
1009            bitmap.pix32(y + VFP, x++) = RGB_MONOCHROME_GREEN[color];
10111010
10121011            data <<= 1;
10131012         }
r17839r17840
11241123   MCFG_SCREEN_UPDATE_DRIVER(abc1600_state, screen_update)
11251124    MCFG_SCREEN_SIZE(958, 1067)
11261125    MCFG_SCREEN_VISIBLE_AREA(0, 958-1, 0, 1067-1)
1127    MCFG_PALETTE_LENGTH(2)
1128    MCFG_PALETTE_INIT(monochrome_green)
1126
11291127   MCFG_MC6845_ADD(SY6845E_TAG, SY6845E, XTAL_64MHz/32, crtc_intf)
11301128MACHINE_CONFIG_END
trunk/src/mess/drivers/vip.c
r17839r17840
555555   DEVCB_DRIVER_LINE_MEMBER(vip_state, vdc_ef1_w)
556556};
557557
558UINT32 vip_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
558UINT32 vip_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
559559{
560560   m_vdc->screen_update(screen, bitmap, cliprect);
561561
r17839r17840
774774   MCFG_CDP1861_SCREEN_ADD(CDP1861_TAG, SCREEN_TAG, XTAL_3_52128MHz/2)
775775   MCFG_SCREEN_UPDATE_DRIVER(vip_state, screen_update)
776776
777   MCFG_PALETTE_LENGTH(16)
778   MCFG_PALETTE_INIT(black_and_white)
779
780777   MCFG_CDP1861_ADD(CDP1861_TAG, XTAL_3_52128MHz/2, vdc_intf)
781778
782779   // sound hardware
trunk/src/mess/drivers/elf.c
r17839r17840
307307   MCFG_SCREEN_UPDATE_DEVICE(CDP1861_TAG, cdp1861_device, screen_update)
308308   MCFG_SCREEN_RAW_PARAMS(XTAL_3_579545MHz/2, CDP1861_SCREEN_WIDTH, CDP1861_HBLANK_END, CDP1861_HBLANK_START, CDP1861_TOTAL_SCANLINES, CDP1861_SCANLINE_VBLANK_END, CDP1861_SCANLINE_VBLANK_START)
309309
310   MCFG_PALETTE_LENGTH(2)
311   MCFG_PALETTE_INIT(black_and_white)
312
313310   MCFG_MM74C923_ADD(MM74C923_TAG, keyboard_intf)
314311   MCFG_DM9368_ADD(DM9368_H_TAG, led_h_intf)
315312   MCFG_DM9368_ADD(DM9368_L_TAG, led_l_intf)
trunk/src/mess/drivers/eti660.c
r17839r17840
260260   MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL_8_867238MHz/5)
261261   MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
262262
263   MCFG_PALETTE_LENGTH(8+8)
264
265263   /* sound hardware */
266264   MCFG_SPEAKER_STANDARD_MONO("mono")
267265   MCFG_CDP1864_ADD(CDP1864_TAG, XTAL_8_867238MHz/5, eti660_cdp1864_intf)
trunk/src/mess/drivers/studio2.c
r17839r17840
305305   DEVCB_CPU_INPUT_LINE(CDP1802_TAG, COSMAC_INPUT_LINE_EF1)
306306};
307307
308static PALETTE_INIT( visicom )
308static const rgb_t VISICOM_PALETTE[] =
309309{
310    palette_set_color_rgb(machine, 0, 0x00, 0x80, 0x00);
311    palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff);
312    palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00);
313    palette_set_color_rgb(machine, 3, 0xff, 0x00, 0x00);
314}
310    MAKE_RGB(0x00, 0x80, 0x00),
311    MAKE_RGB(0x00, 0x00, 0xff),
312    MAKE_RGB(0x00, 0xff, 0x00),
313    MAKE_RGB(0xff, 0x00, 0x00)
314};
315315
316316READ_LINE_MEMBER( mpt02_state::rdata_r )
317317{
r17839r17840
465465
466466    /* video hardware */
467467   MCFG_CDP1861_SCREEN_ADD(CDP1861_TAG, SCREEN_TAG, 1760000)
468
469   MCFG_PALETTE_LENGTH(2)
470   MCFG_PALETTE_INIT(black_and_white)
471
472468   MCFG_CDP1861_ADD(CDP1861_TAG, 1760000, studio2_cdp1861_intf)
473469
474470   /* sound hardware */
r17839r17840
488484
489485    /* video hardware */
490486   MCFG_CDP1861_SCREEN_ADD(CDP1861_TAG, SCREEN_TAG, XTAL_3_579545MHz/2)
491
492   MCFG_PALETTE_LENGTH(4)
493   MCFG_PALETTE_INIT(visicom)
494
495487   MCFG_CDP1861_ADD(CDP1861_TAG, XTAL_3_579545MHz/2/8, studio2_cdp1861_intf)
496488
497489   /* sound hardware */
r17839r17840
513505   MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, CDP1864_CLOCK)
514506   MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
515507
516   MCFG_PALETTE_LENGTH(8+8)
517
518508   /* sound hardware */
519509   MCFG_SPEAKER_STANDARD_MONO("mono")
520510   MCFG_SOUND_ADD(BEEPER_TAG, BEEP, 0)
trunk/src/mess/drivers/ql.c
r17839r17840
702702
703703
704704//**************************************************************************
705//  VIDEO
706//**************************************************************************
707
708//-------------------------------------------------
709//  PALETTE_INIT( ql )
710//-------------------------------------------------
711
712static PALETTE_INIT( ql )
713{
714   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00 ); // black
715   palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff ); // blue
716   palette_set_color_rgb(machine, 2, 0xff, 0x00, 0x00 ); // red
717   palette_set_color_rgb(machine, 3, 0xff, 0x00, 0xff ); // magenta
718   palette_set_color_rgb(machine, 4, 0x00, 0xff, 0x00 ); // green
719   palette_set_color_rgb(machine, 5, 0x00, 0xff, 0xff ); // cyan
720   palette_set_color_rgb(machine, 6, 0xff, 0xff, 0x00 ); // yellow
721   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff ); // white
722}
723
724
725//-------------------------------------------------
726//  SCREEN_UPDATE_IND16( ql )
727//-------------------------------------------------
728
729UINT32 ql_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
730{
731   m_zx8301->update_screen(bitmap, cliprect);
732
733   return 0;
734}
735
736
737
738//**************************************************************************
739705//  DEVICE CONFIGURATION
740706//**************************************************************************
741707
r17839r17840
1014980   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
1015981   MCFG_SCREEN_REFRESH_RATE(50.08)
1016982   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // not accurate
1017   MCFG_SCREEN_UPDATE_DRIVER(ql_state, screen_update)
983   MCFG_SCREEN_UPDATE_DEVICE(ZX8301_TAG, zx8301_device, screen_update)
1018984   MCFG_SCREEN_SIZE(960, 312)
1019985   MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 256-1)
1020986
1021   MCFG_PALETTE_LENGTH(8)
1022   MCFG_PALETTE_INIT(ql)
1023
1024987   // sound hardware
1025988   MCFG_SPEAKER_STANDARD_MONO("mono")
1026989   MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
trunk/src/mess/drivers/tandy2k.c
r17839r17840
306306
307307// Video
308308
309UINT32 tandy2k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
309UINT32 tandy2k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
310310{
311311   if (m_vidouts)
312312   {
r17839r17840
713713    MCFG_SCREEN_SIZE(640, 480)
714714    MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
715715
716   MCFG_PALETTE_LENGTH(2)
717    MCFG_PALETTE_INIT(black_and_white)
718
719716   MCFG_CRT9007_ADD(CRT9007_TAG, XTAL_16MHz*28/16, vpac_intf, vpac_mem)
720717   MCFG_CRT9212_ADD(CRT9212_0_TAG, drb0_intf)
721718   MCFG_CRT9212_ADD(CRT9212_1_TAG, drb1_intf)
trunk/src/mess/drivers/pc8001.c
r17839r17840
340340
341341/* Video */
342342
343static PALETTE_INIT( pc8001 )
344{
345}
346
347343void pc8001_state::video_start()
348344{
349345   // find memory regions
r17839r17840
352348
353349/* uPD3301 Interface */
354350
351static const rgb_t PALETTE[] =
352{
353   RGB_BLACK,
354   MAKE_RGB(0x00, 0x00, 0x00),
355   MAKE_RGB(0x00, 0x00, 0x00),
356   MAKE_RGB(0x00, 0x00, 0x00),
357   MAKE_RGB(0x00, 0x00, 0x00),
358   MAKE_RGB(0x00, 0x00, 0x00),
359   MAKE_RGB(0x00, 0x00, 0x00),
360   RGB_WHITE
361};
362
355363static UPD3301_DISPLAY_PIXELS( pc8001_display_pixels )
356364{
357365   pc8001_state *state = device->machine().driver_data<pc8001_state>();
r17839r17840
368376      {
369377         int color = BIT(data, 7) ^ rvv;
370378
371         bitmap.pix16(y, (sx * 8) + i) = color ? 7 : 0;
379         bitmap.pix32(y, (sx * 8) + i) = PALETTE[color ? 7 : 0];
372380
373381         data <<= 1;
374382      }
r17839r17840
381389      {
382390         int color = BIT(data, 7) ^ rvv;
383391
384         bitmap.pix16(y, (sx/2 * 16) + (i * 2)) = color ? 7 : 0;
385         bitmap.pix16(y, (sx/2 * 16) + (i * 2) + 1) = color ? 7 : 0;
392         bitmap.pix32(y, (sx/2 * 16) + (i * 2)) = PALETTE[color ? 7 : 0];
393         bitmap.pix32(y, (sx/2 * 16) + (i * 2) + 1) = PALETTE[color ? 7 : 0];
386394
387395         data <<= 1;
388396      }
r17839r17840
560568   MCFG_SCREEN_SIZE(640, 220)
561569   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1)
562570
563   MCFG_PALETTE_LENGTH(8)
564   MCFG_PALETTE_INIT(pc8001)
565
566571   /* sound hardware */
567572   MCFG_SPEAKER_STANDARD_MONO("mono")
568573   MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
r17839r17840
597602   MCFG_SCREEN_SIZE(640, 220)
598603   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1)
599604
600   MCFG_PALETTE_LENGTH(8)
601   MCFG_PALETTE_INIT(pc8001)
602
603605   /* sound hardware */
604606   MCFG_SPEAKER_STANDARD_MONO("mono")
605607   MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
trunk/src/mess/drivers/tmc2000e.c
r17839r17840
258258   MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL_1_75MHz)
259259   MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
260260
261   MCFG_PALETTE_LENGTH(8)
262
263261   // sound hardware
264262   MCFG_SPEAKER_STANDARD_MONO("mono")
265263   MCFG_CDP1864_ADD(CDP1864_TAG, XTAL_1_75MHz, tmc2000e_cdp1864_intf)
trunk/src/mess/drivers/cosmicos.c
r17839r17840
575575   MCFG_CDP1864_SCREEN_ADD(SCREEN_TAG, XTAL_1_75MHz)
576576   MCFG_SCREEN_UPDATE_DEVICE(CDP1864_TAG, cdp1864_device, screen_update)
577577
578   MCFG_PALETTE_LENGTH(8+8)
579
580578   /* sound hardware */
581579   MCFG_SPEAKER_STANDARD_MONO("mono")
582580

Previous 199869 Revisions Next


© 1997-2024 The MAME Team