Previous 199869 Revisions Next

r19390 Friday 7th December, 2012 at 16:05:11 UTC by Curt Coder
upd7220: Refactored to use bitmap_rgb32. (nw)
i8275: Refactored to use bitmap_rgb32. (nw)
[src/emu/video]i8275.c i8275.h
[src/mess/drivers]a5105.c apc.c compis.c dmv.c if800.c ipds.c mz6500.c pc9801.c qx10.c sm1800.c
[src/mess/includes]radio86.h
[src/mess/video]mikromik.c radio86.c upd7220.c upd7220.h

trunk/src/emu/video/i8275.c
r19389r19390
455455}
456456
457457/* Screen Update */
458void i8275_update(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect)
458void i8275_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect)
459459{
460460   i8275_t *i8275 = get_safe_token(device);
461461   i8275->ypos = 0;
trunk/src/emu/video/i8275.h
r19389r19390
6969DECLARE_WRITE8_DEVICE_HANDLER ( i8275_w );
7070
7171/* updates the screen */
72void i8275_update(device_t *device, bitmap_ind16 &bitmap, const rectangle &cliprect);
72void i8275_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect);
7373
7474DECLARE_WRITE8_DEVICE_HANDLER( i8275_dack_w );
7575
trunk/src/mess/includes/radio86.h
r19389r19390
1919
2020   virtual void video_start();
2121
22   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
22   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
2323
24   bitmap_ind16 m_bitmap;
24   bitmap_rgb32 m_bitmap;
2525
2626   UINT8 m_tape_value;
2727   UINT8 m_mikrosha_font_page;
r19389r19390
3838   DECLARE_DRIVER_INIT(radio86);
3939   DECLARE_MACHINE_RESET(radio86);
4040   DECLARE_PALETTE_INIT(radio86);
41   UINT32 screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
41   UINT32 screen_update_radio86(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
4242   TIMER_CALLBACK_MEMBER(radio86_reset);
4343   DECLARE_READ8_MEMBER(radio86_8255_portb_r2);
4444   DECLARE_READ8_MEMBER(radio86_8255_portc_r2);
trunk/src/mess/video/radio86.c
r19389r19390
1616   machine().primary_screen->register_screen_bitmap(m_bitmap);
1717}
1818
19UINT32 radio86_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
19UINT32 radio86_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
2020{
2121   copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect);
2222   return 0;
r19389r19390
2626{
2727   radio86_state *state = device->machine().driver_data<radio86_state>();
2828   int i;
29   bitmap_ind16 &bitmap = state->m_bitmap;
29   bitmap_rgb32 &bitmap = state->m_bitmap;
30   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
3031   UINT8 *charmap = state->memregion("gfx1")->base();
3132   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
3233   if (vsp) {
r19389r19390
3940      pixels ^= 0xff;
4041   }
4142   for(i=0;i<6;i++) {
42      bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0;
43      bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0];
4344   }
4445}
4546
r19389r19390
4849{
4950   radio86_state *state = device->machine().driver_data<radio86_state>();
5051   int i;
51   bitmap_ind16 &bitmap = state->m_bitmap;
52   bitmap_rgb32 &bitmap = state->m_bitmap;
53   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
5254   UINT8 *charmap = state->memregion("gfx1")->base() + (state->m_mikrosha_font_page & 1) * 0x400;
5355   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
5456   if (vsp) {
r19389r19390
6163      pixels ^= 0xff;
6264   }
6365   for(i=0;i<6;i++) {
64      bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0;
66      bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0];
6567   }
6668}
6769
r19389r19390
6971{
7072   radio86_state *state = device->machine().driver_data<radio86_state>();
7173   int i;
72   bitmap_ind16 &bitmap = state->m_bitmap;
74   bitmap_rgb32 &bitmap = state->m_bitmap;
75   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
7376   UINT8 *charmap = state->memregion("gfx1")->base() + (gpa & 1) * 0x400;
7477   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
7578   if (vsp) {
r19389r19390
8285      pixels ^= 0xff;
8386   }
8487   for(i=0;i<6;i++) {
85      bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0;
88      bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0];
8689   }
8790}
8891
r19389r19390
9093{
9194   radio86_state *state = device->machine().driver_data<radio86_state>();
9295   int i;
93   bitmap_ind16 &bitmap = state->m_bitmap;
96   bitmap_rgb32 &bitmap = state->m_bitmap;
97   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
9498   UINT8 *charmap = state->memregion("gfx1")->base() + 0x400 * (gpa * 2 + hlgt);
9599   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
96100   if (vsp) {
r19389r19390
103107      pixels ^= 0xff;
104108   }
105109   for(i=0;i<6;i++) {
106      bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1;
110      bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1];
107111   }
108112}
109113
110UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
114UINT32 radio86_state::screen_update_radio86(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
111115{
112116   device_t *devconf = machine().device("i8275");
113117   i8275_update( devconf, bitmap, cliprect);
trunk/src/mess/video/upd7220.c
r19389r19390
15541554//  update_text -
15551555//-------------------------------------------------
15561556
1557void upd7220_device::update_text(bitmap_ind16 &bitmap, const rectangle &cliprect)
1557void upd7220_device::update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect)
15581558{
15591559   UINT32 addr, sad;
15601560   UINT16 len;
r19389r19390
15821582//  draw_graphics_line -
15831583//-------------------------------------------------
15841584
1585void upd7220_device::draw_graphics_line(bitmap_ind16 &bitmap, UINT32 addr, int y, int wd)
1585void upd7220_device::draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd)
15861586{
15871587   int sx;
15881588
r19389r19390
16001600//  update_graphics -
16011601//-------------------------------------------------
16021602
1603void upd7220_device::update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect, int force_bitmap)
1603void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap)
16041604{
16051605   UINT32 addr, sad;
16061606   UINT16 len;
r19389r19390
16531653//  update_screen -
16541654//-------------------------------------------------
16551655
1656UINT32 upd7220_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
1656UINT32 upd7220_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
16571657{
16581658   if (m_de)
16591659   {
trunk/src/mess/video/upd7220.h
r19389r19390
6464//  TYPE DEFINITIONS
6565//**************************************************************************
6666
67typedef void (*upd7220_display_pixels_func)(device_t *device, bitmap_ind16 &bitmap, int y, int x, UINT32 address);
68#define UPD7220_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_ind16 &bitmap, int y, int x, UINT32 address)
67typedef void (*upd7220_display_pixels_func)(device_t *device, bitmap_rgb32 &bitmap, int y, int x, UINT32 address);
68#define UPD7220_DISPLAY_PIXELS(name) void name(device_t *device, bitmap_rgb32 &bitmap, int y, int x, UINT32 address)
6969
70typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_ind16 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr);
71#define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_ind16 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr)
70typedef void (*upd7220_draw_text_line)(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr);
71#define UPD7220_DRAW_TEXT_LINE(name) void name(device_t *device, bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd, int pitch,int screen_min_x,int screen_min_y,int screen_max_x, int screen_max_y,int lr, int cursor_on, int cursor_addr)
7272
7373
7474// ======================> upd7220_interface
r19389r19390
109109    DECLARE_READ8_MEMBER( vram_r );
110110    DECLARE_WRITE8_MEMBER( vram_w );
111111
112   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);
113113   virtual const rom_entry *device_rom_region() const;
114114   virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
115115
r19389r19390
150150   void draw_char(int x, int y);
151151   int translate_command(UINT8 data);
152152   void process_fifo();
153   void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect);
154   void draw_graphics_line(bitmap_ind16 &bitmap, UINT32 addr, int y, int wd);
155   void update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect, int force_bitmap);
153   void update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);
154   void draw_graphics_line(bitmap_rgb32 &bitmap, UINT32 addr, int y, int wd);
155   void update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap);
156156
157157   devcb_resolved_write_line   m_out_drq_func;
158158   devcb_resolved_write_line   m_out_hsync_func;
trunk/src/mess/video/mikromik.c
r19389r19390
33
44
55//-------------------------------------------------
6//  PALETTE_INIT( mm1 )
7//-------------------------------------------------
8
9PALETTE_INIT_MEMBER(mm1_state,mm1)
10{
11   palette_set_color(machine(), 0, RGB_BLACK); /* black */
12   palette_set_color_rgb(machine(), 1, 0x00, 0xc0, 0x00); /* green */
13   palette_set_color_rgb(machine(), 2, 0x00, 0xff, 0x00); /* bright green */
14}
15
16
17//-------------------------------------------------
186//  i8275_interface crtc_intf
197//-------------------------------------------------
208
r19389r19390
4129
4230      int color = hlt_in ? 2 : (video_in ^ compl_in);
4331
44      state->m_bitmap.pix16(y, x + i) = color;
32      state->m_bitmap.pix32(y, x + i) = RGB_MONOCHROME_GREEN_HIGHLIGHT[color];
4533   }
4634}
4735
r19389r19390
7765
7866   for (int i = 0; i < 8; i++)
7967   {
80      if (BIT(data, i)) bitmap.pix16(y, x + i) = 1;
68      if (BIT(data, i)) bitmap.pix32(y, x + i) = RGB_MONOCHROME_GREEN_HIGHLIGHT[1];
8169   }
8270}
8371
r19389r19390
10997//  SCREEN_UPDATE_IND16( mm1 )
11098//-------------------------------------------------
11199
112UINT32 mm1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
100UINT32 mm1_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
113101{
114102   /* text */
115103   i8275_update(m_crtc, bitmap, cliprect);
r19389r19390
161149   //MCFG_SCREEN_RAW_PARAMS(XTAL_18_720MHz, ...)
162150
163151   MCFG_GFXDECODE(mm1)
164   MCFG_PALETTE_LENGTH(3)
165   MCFG_PALETTE_INIT_OVERRIDE(mm1_state,mm1)
166152
167153   MCFG_I8275_ADD(I8275_TAG, crtc_intf)
168154   MCFG_UPD7220_ADD(UPD7220_TAG, XTAL_18_720MHz/8, hgdc_intf, mm1_upd7220_map)
trunk/src/mess/drivers/sm1800.c
r19389r19390
3939   DECLARE_WRITE8_MEMBER(sm1800_8255_portc_w);
4040   DECLARE_READ8_MEMBER(sm1800_8255_porta_r);
4141   DECLARE_READ8_MEMBER(sm1800_8255_portc_r);
42   bitmap_ind16 m_bitmap;
42   bitmap_rgb32 m_bitmap;
4343   UINT8 m_irq_state;
4444   virtual void machine_reset();
4545   virtual void video_start();
4646   virtual void palette_init();
47   UINT32 screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
47   UINT32 screen_update_sm1800(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
4848   INTERRUPT_GEN_MEMBER(sm1800_vblank_interrupt);
4949};
5050
r19389r19390
8585
8686}
8787
88UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
88UINT32 sm1800_state::screen_update_sm1800(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
8989{
9090   device_t *devconf = machine().device("i8275");
9191   i8275_update( devconf, bitmap, cliprect);
r19389r19390
103103{
104104   int i;
105105   sm1800_state *state = device->machine().driver_data<sm1800_state>();
106   bitmap_ind16 &bitmap = state->m_bitmap;
106   bitmap_rgb32 &bitmap = state->m_bitmap;
107   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
107108   UINT8 *charmap = state->memregion("chargen")->base();
108109   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
109110   if (vsp)
r19389r19390
116117      pixels ^= 0xff;
117118
118119   for(i=0;i<8;i++)
119      bitmap.pix16(y, x + i) = (pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0;
120      bitmap.pix32(y, x + i) = palette[(pixels >> (7-i)) & 1 ? (hlgt ? 2 : 1) : 0];
120121}
121122
122123const i8275_interface sm1800_i8275_interface = {
trunk/src/mess/drivers/compis.c
r19389r19390
125125static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
126126{
127127   compis_state *state = device->machine().driver_data<compis_state>();
128   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
128129   UINT8 i,gfx = state->m_video_ram[address & 0x1ffff];
129130
130131   for(i=0; i<8; i++)
131      bitmap.pix16(y, x + i) = BIT((gfx >> i), 0);
132      bitmap.pix32(y, x + i) = palette[BIT((gfx >> i), 0)];
132133}
133134
134135
trunk/src/mess/drivers/dmv.c
r19389r19390
148148static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
149149{
150150   dmv_state *state = device->machine().driver_data<dmv_state>();
151   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
151152   UINT8 * chargen = state->memregion("maincpu")->base() + 0x1000;
152153
153154   for( int x = 0; x < pitch; x++ )
r19389r19390
174175            if(res_x > screen_max_x || res_y > screen_max_y)
175176               continue;
176177
177            bitmap.pix16(res_y, res_x) = pen;
178            bitmap.pix32(res_y, res_x) = palette[pen];
178179         }
179180      }
180181   }
trunk/src/mess/drivers/mz6500.c
r19389r19390
3636static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
3737{
3838   mz6500_state *state = device->machine().driver_data<mz6500_state>();
39   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
3940   int gfx[3];
4041   UINT8 i,pen;
4142
r19389r19390
4748   {
4849      pen = (BIT(gfx[0], i)) | (BIT(gfx[1], i) << 1) | (BIT(gfx[2], i) << 2);
4950
50      bitmap.pix16(y, x + i) = pen;
51      bitmap.pix32(y, x + i) = palette[pen];
5152   }
5253}
5354
trunk/src/mess/drivers/qx10.c
r19389r19390
8585   //required_shared_ptr<UINT8> m_video_ram;
8686   UINT8 *m_video_ram;
8787
88   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
88   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
8989
9090   virtual void machine_start();
9191   virtual void machine_reset();
r19389r19390
154154static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
155155{
156156   qx10_state *state = device->machine().driver_data<qx10_state>();
157   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
157158   int xi,gfx[3];
158159   UINT8 pen;
159160
r19389r19390
176177      pen|= ((gfx[1] >> (7-xi)) & 1) ? 2 : 0;
177178      pen|= ((gfx[2] >> (7-xi)) & 1) ? 4 : 0;
178179
179      bitmap.pix16(y, x + xi) = pen;
180      bitmap.pix32(y, x + xi) = palette[pen];
180181   }
181182}
182183
183184static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
184185{
185186   qx10_state *state = device->machine().driver_data<qx10_state>();
187   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
186188   int x;
187189   int xi,yi;
188190   int tile;
r19389r19390
227229               continue;
228230
229231            if(pen)
230               bitmap.pix16(res_y, res_x) = pen;
232               bitmap.pix32(res_y, res_x) = palette[pen];
231233         }
232234      }
233235   }
234236}
235237
236UINT32 qx10_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
238UINT32 qx10_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
237239{
238240   bitmap.fill(get_black_pen(machine()), cliprect);
239241
trunk/src/mess/drivers/a5105.c
r19389r19390
8787static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
8888{
8989   a5105_state *state = device->machine().driver_data<a5105_state>();
90   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
9091
9192   int xi,gfx;
9293   UINT8 pen;
r19389r19390
9798   {
9899      pen = ((gfx >> xi) & 1) ? 7 : 0;
99100
100      bitmap.pix16(y, x + xi) = pen;
101      bitmap.pix32(y, x + xi) = palette[pen];
101102   }
102103}
103104
104105static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
105106{
106107   a5105_state *state = device->machine().driver_data<a5105_state>();
108   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
107109   int x;
108110   int xi,yi;
109111   int tile,color;
r19389r19390
134136            if(res_x > screen_max_x || res_y > screen_max_y)
135137               continue;
136138
137            bitmap.pix16(res_y, res_x) = pen;
139            bitmap.pix32(res_y, res_x) = palette[pen];
138140         }
139141      }
140142   }
trunk/src/mess/drivers/apc.c
r19389r19390
103103   required_shared_ptr<UINT8> m_video_ram_2;
104104
105105   // screen updates
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
108108
109109   DECLARE_READ8_MEMBER(apc_port_28_r);
r19389r19390
168168   m_aux_pcg = memregion("aux_pcg")->base();
169169}
170170
171UINT32 apc_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect )
171UINT32 apc_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect )
172172{
173173   bitmap.fill(get_black_pen(machine()), cliprect);
174174
r19389r19390
188188static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
189189{
190190   apc_state *state = device->machine().driver_data<apc_state>();
191   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
191192   int xi,yi,yi_trans;
192193   int x;
193194   UINT8 char_size;
r19389r19390
278279               pen = (tile_data >> (xi) & 1) ? color : 0;
279280
280281            if(pen)
281               bitmap.pix16(res_y, res_x) = pen;
282               bitmap.pix32(res_y, res_x) = palette[pen];
282283
283284//              if(state->m_video_ff[WIDTH40_REG])
284285//              {
trunk/src/mess/drivers/pc9801.c
r19389r19390
303303   required_device<upd7220_device> m_hgdc2;
304304
305305   virtual void video_start();
306   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
306   UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
307307
308308   required_shared_ptr<UINT8> m_video_ram_1;
309309   required_shared_ptr<UINT8> m_video_ram_2;
r19389r19390
575575   state_save_register_global_pointer(machine(), m_pcg_ram, 0x200000);
576576}
577577
578UINT32 pc9801_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
578UINT32 pc9801_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
579579{
580580   bitmap.fill(get_black_pen(machine()), cliprect);
581581
r19389r19390
588588static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
589589{
590590   pc9801_state *state = device->machine().driver_data<pc9801_state>();
591    const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
591592   int xi;
592593   int res_x,res_y;
593594   UINT8 pen;
r19389r19390
614615      if(interlace_on)
615616      {
616617         if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+0))
617            bitmap.pix16(res_y*2+0, res_x) = pen + colors16_mode;
618            bitmap.pix32(res_y*2+0, res_x) = palette[pen + colors16_mode];
618619         if(device->machine().primary_screen->visible_area().contains(res_x, res_y*2+1))
619            bitmap.pix16(res_y*2+1, res_x) = pen + colors16_mode;
620            bitmap.pix32(res_y*2+1, res_x) = palette[pen + colors16_mode];
620621      }
621622      else
622         bitmap.pix16(res_y, res_x) = pen + colors16_mode;
623         bitmap.pix32(res_y, res_x) = palette[pen + colors16_mode];
623624   }
624625}
625626
626627static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
627628{
628629   pc9801_state *state = device->machine().driver_data<pc9801_state>();
630    const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
629631   int xi,yi;
630632   int x;
631633   UINT8 char_size;
r19389r19390
728730               pen = (tile_data >> (7-xi) & 1) ? color : 0;
729731
730732            if(pen)
731               bitmap.pix16(res_y, res_x) = pen;
733               bitmap.pix32(res_y, res_x) = palette[pen];
732734
733735            if(state->m_video_ff[WIDTH40_REG])
734736            {
735737               if(!device->machine().primary_screen->visible_area().contains(res_x+1, res_y))
736738                  continue;
737739
738               bitmap.pix16(res_y, res_x+1) = pen;
740               bitmap.pix32(res_y, res_x+1) = palette[pen];
739741            }
740742         }
741743      }
trunk/src/mess/drivers/if800.c
r19389r19390
3030static UPD7220_DISPLAY_PIXELS( hgdc_display_pixels )
3131{
3232   if800_state *state = device->machine().driver_data<if800_state>();
33   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
3334
3435   int xi,gfx;
3536   UINT8 pen;
r19389r19390
4041   {
4142      pen = ((gfx >> xi) & 1) ? 1 : 0;
4243
43      bitmap.pix16(y, x + xi) = pen;
44      bitmap.pix32(y, x + xi) = palette[pen];
4445   }
4546}
4647
trunk/src/mess/drivers/ipds.c
r19389r19390
2929   DECLARE_WRITE8_MEMBER(ipds_b1_w);
3030   DECLARE_WRITE8_MEMBER(kbd_put);
3131   UINT8 m_term_data;
32   bitmap_ind16 m_bitmap;
32   bitmap_rgb32 m_bitmap;
3333   virtual void video_start();
3434   virtual void machine_reset();
35   UINT32 screen_update_ipds(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
35   UINT32 screen_update_ipds(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
3636};
3737
3838READ8_MEMBER( ipds_state::ipds_b0_r )
r19389r19390
8888{
8989   int i;
9090   ipds_state *state = device->machine().driver_data<ipds_state>();
91   bitmap_ind16 &bitmap = state->m_bitmap;
91   bitmap_rgb32 &bitmap = state->m_bitmap;
92   const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
9293   UINT8 *charmap = state->memregion("chargen")->base();
9394   UINT8 pixels = charmap[(linecount & 7) + (charcode << 3)] ^ 0xff;
9495
r19389r19390
102103      pixels ^= 0xff;
103104
104105   for(i=0;i<6;i++)
105      bitmap.pix16(y, x + i) = (pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0;
106      bitmap.pix32(y, x + i) = palette[(pixels >> (5-i)) & 1 ? (hlgt ? 2 : 1) : 0];
106107}
107108
108109const i8275_interface ipds_i8275_interface =
r19389r19390
115116   ipds_display_pixels
116117};
117118
118UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
119UINT32 ipds_state::screen_update_ipds(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
119120{
120121   device_t *devconf = machine().device("i8275");
121122   i8275_update( devconf, bitmap, cliprect);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team