Previous 15994 Revisions Next

r1808 Friday 29th February, 2008 at 12:28:43 UTC by Nathan Woods
Replaced mame_bitmap with bitmap_t (mame_bitmap will be gone in u4)
[src/mess]mscommon.c mscommon.h
[src/mess/drivers]apexc.c coupe.c einstein.c tm990189.c x68k.c
[src/mess/includes]coupe.h pocketc.h
[src/mess/machine]genesis.c nes.c
[src/mess/tools/messtest]tststubs.c
[src/mess/video]733_asr.c 733_asr.h 911_vdt.c 911_vdt.h amstrad.c apple2.c apple2gs.c apple3.c arcadia.c avigo.c bbc.c border.c border.h cdp1861.c cdp1864.c cgenie.c cirrus.c coco3.c coupe.c dgn_beta.c enterp.c epnick.c epnick.h gb.c hp48.c i82720.c intv.c kc.c m6847.c nc.c nes.c odyssey2.c oric.c pc8801.c pc_cga.c pc_mda.c pc_t1t.c pc_vga.c pc_video.c pc_video.h pcw.c pcw16.c pdp1.c pmd85.c pocketc.c primo.c smsvdp.c spectrum.c ssystem3.c ted7360.c tms3556.c trs80.c tx0.c vc4000.c vdc8563.c vic6560.c vic6567.c x68k.c z88.c zx.c zx8301.c

src/mess/tools/messtest/tststubs.c
r1807r1808
2828   return 0;
2929}
3030
31mame_bitmap *osd_override_snapshot(mame_bitmap *bitmap, rectangle *bounds)
31bitmap_t *osd_override_snapshot(bitmap_t *bitmap, rectangle *bounds)
3232{
3333   return NULL;
3434}
src/mess/includes/pocketc.h
r1807r1808
1616extern const unsigned short pocketc_colortable[8][2];
1717
1818typedef const char *POCKETC_FIGURE[];
19void pocketc_draw_special(mame_bitmap *bitmap,
19void pocketc_draw_special(bitmap_t *bitmap,
2020                    int x, int y, const POCKETC_FIGURE fig, int color);
2121
2222
src/mess/includes/coupe.h
r1807r1808
5151
5252/*----------- defined in video/coupe.c -----------*/
5353
54void drawMode1_line(mame_bitmap *,int);
55void drawMode2_line(mame_bitmap *,int);
56void drawMode3_line(mame_bitmap *,int);
57void drawMode4_line(mame_bitmap *,int);
54void drawMode1_line(bitmap_t *,int);
55void drawMode2_line(bitmap_t *,int);
56void drawMode3_line(bitmap_t *,int);
57void drawMode4_line(bitmap_t *,int);
5858
5959
6060#endif /* COUPE_H_ */
src/mess/video/zx.c
r1807r1808
4646   {
4747      int y, new_x, new_y;
4848      rectangle r;
49      mame_bitmap *bitmap = tmpbitmap;
49      bitmap_t *bitmap = tmpbitmap;
5050
5151      new_y = video_screen_get_vpos(0);
5252      new_x = video_screen_get_hpos(0);
r1807r1808
9898    * scanlines at the top and bottom of the display.
9999    */
100100   rectangle r = machine->screen[0].visarea;
101   mame_bitmap *bitmap = tmpbitmap;
101   bitmap_t *bitmap = tmpbitmap;
102102
103103   r.min_y = r.max_y = video_screen_get_vpos(0);
104104   fillbitmap(bitmap, machine->pens[1], &r);
r1807r1808
130130
131131int zx_ula_r(int offs, int region)
132132{
133   mame_bitmap *bitmap = tmpbitmap;
133   bitmap_t *bitmap = tmpbitmap;
134134   int x, y, chr, data, ireg, rreg, cycles, offs0 = offs, halted = 0;
135135   UINT8 *chrgen, *rom = memory_region(REGION_CPU1);
136136   UINT16 *scanline;
src/mess/video/vic6560.c
r1807r1808
9191
9292int vic6560_pal;
9393
94static mame_bitmap *vic6560_bitmap;
94static bitmap_t *vic6560_bitmap;
9595static int rasterline = 0, lastline = 0;
9696static void vic6560_drawlines (int start, int last);
9797
r1807r1808
348348
349349
350350#ifndef GFX
351INLINE void vic6560_draw_pointer (mame_bitmap *bitmap,
351INLINE void vic6560_draw_pointer (bitmap_t *bitmap,
352352                          rectangle *visible, int xoff, int yoff)
353353{
354354   /* this is a a static graphical object */
src/mess/video/dgn_beta.c
r1807r1808
141141static void SetClkMax(int ref, int params, const char *param[]);
142142#endif /* ENABLE_DEBUGGER */
143143
144static mame_bitmap   *bit;
144static bitmap_t   *bit;
145145static int MinAddr   = 0xFFFF;
146146static int MaxAddr   = 0x0000;
147147static int MinX   = 0xFFFF;
r1807r1808
358358/**************************/
359359
360360/* Plot a pixel on beta text screen, takes care of doubling height and width where needed */
361static void plot_text_pixel(int x, int y,int Dot,int Colour, int CharsPerLine, mame_bitmap *bitmap)
361static void plot_text_pixel(int x, int y,int Dot,int Colour, int CharsPerLine, bitmap_t *bitmap)
362362{
363363   int PlotX;
364364   int PlotY;
r1807r1808
399399   }
400400}
401401
402static void beta_plot_char_line(int x,int y, mame_bitmap *bitmap)
402static void beta_plot_char_line(int x,int y, bitmap_t *bitmap)
403403{
404404   int CharsPerLine   = m6845_get_register(H_DISPLAYED);   // Get chars per line.
405405   unsigned char *data    = memory_region(REGION_GFX1);      // ptr to char rom
r1807r1808
495495
496496/* Plot a pixel on the graphics screen, similar to character plotter above */
497497/* May merge at some point in the future, if they turn out to be sufficiently similar ! */
498static void plot_gfx_pixel(int x, int y, int Dot, int Colour, mame_bitmap *bitmap)
498static void plot_gfx_pixel(int x, int y, int Dot, int Colour, bitmap_t *bitmap)
499499{
500500   int   DoubleX      = (~GCtrl & GCtrlHiLo) ? 1 : 0;
501501   int   DoubleY      = (~m6845_get_register(INTERLACE) & 0x03) ? 1 : 0;
r1807r1808
546546
547547/* Get and plot a graphics bixel block */
548548
549static void beta_plot_gfx_line(int x,int y, mame_bitmap *bitmap)
549static void beta_plot_gfx_line(int x,int y, bitmap_t *bitmap)
550550{
551551   int crtcAddr;
552552   int Addr;
src/mess/video/pdp1.c
r1807r1808
2525#include "video/crt.h"
2626
2727
28static mame_bitmap *panel_bitmap;
29static mame_bitmap *typewriter_bitmap;
28static bitmap_t *panel_bitmap;
29static bitmap_t *typewriter_bitmap;
3030
3131static const rectangle typewriter_bitmap_bounds =
3232{
r1807r1808
4040   0,   panel_window_height-1,   /* min_y, max_y */
4141};
4242
43static void pdp1_draw_panel_backdrop(mame_bitmap *bitmap);
44static void pdp1_draw_panel(mame_bitmap *bitmap);
43static void pdp1_draw_panel_backdrop(bitmap_t *bitmap);
44static void pdp1_draw_panel(bitmap_t *bitmap);
4545
4646static lightpen_t lightpen_state, previous_lightpen_state;
47static void pdp1_erase_lightpen(mame_bitmap *bitmap);
48static void pdp1_draw_lightpen(mame_bitmap *bitmap);
47static void pdp1_erase_lightpen(bitmap_t *bitmap);
48static void pdp1_draw_lightpen(bitmap_t *bitmap);
4949
5050INLINE void pdp1_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color)
5151{
r1807r1808
150150};
151151
152152/* draw a small 8*8 LED (or is this a lamp? ) */
153static void pdp1_draw_led(mame_bitmap *bitmap, int x, int y, int state)
153static void pdp1_draw_led(bitmap_t *bitmap, int x, int y, int state)
154154{
155155   int xx, yy;
156156
r1807r1808
160160}
161161
162162/* draw nb_bits leds which represent nb_bits bits in value */
163static void pdp1_draw_multipleled(mame_bitmap *bitmap, int x, int y, int value, int nb_bits)
163static void pdp1_draw_multipleled(bitmap_t *bitmap, int x, int y, int value, int nb_bits)
164164{
165165   while (nb_bits)
166166   {
r1807r1808
174174
175175
176176/* draw a small 8*8 switch */
177static void pdp1_draw_switch(mame_bitmap *bitmap, int x, int y, int state)
177static void pdp1_draw_switch(bitmap_t *bitmap, int x, int y, int state)
178178{
179179   int xx, yy;
180180   int i;
r1807r1808
215215
216216
217217/* draw nb_bits switches which represent nb_bits bits in value */
218static void pdp1_draw_multipleswitch(mame_bitmap *bitmap, int x, int y, int value, int nb_bits)
218static void pdp1_draw_multipleswitch(bitmap_t *bitmap, int x, int y, int value, int nb_bits)
219219{
220220   while (nb_bits)
221221   {
r1807r1808
229229
230230
231231/* write a single char on screen */
232static void pdp1_draw_char(mame_bitmap *bitmap, char character, int x, int y, int color)
232static void pdp1_draw_char(bitmap_t *bitmap, char character, int x, int y, int color)
233233{
234234   drawgfx(bitmap, Machine->gfx[0], character-32, color, 0, 0,
235235            x+1, y, &Machine->screen[0].visarea, TRANSPARENCY_PEN, 0);
236236}
237237
238238/* write a string on screen */
239static void pdp1_draw_string(mame_bitmap *bitmap, const char *buf, int x, int y, int color)
239static void pdp1_draw_string(bitmap_t *bitmap, const char *buf, int x, int y, int color)
240240{
241241   while (* buf)
242242   {
r1807r1808
251251/*
252252   draw the operator control panel (fixed backdrop)
253253*/
254static void pdp1_draw_panel_backdrop(mame_bitmap *bitmap)
254static void pdp1_draw_panel_backdrop(bitmap_t *bitmap)
255255{
256256   /* fill with black */
257257   fillbitmap(panel_bitmap, Machine->pens[pen_panel_bg], &panel_bitmap_bounds);
r1807r1808
302302/*
303303   draw the operator control panel (dynamic elements)
304304*/
305static void pdp1_draw_panel(mame_bitmap *bitmap)
305static void pdp1_draw_panel(bitmap_t *bitmap)
306306{
307307   /* column 1: registers, test word, test address */
308308   pdp1_draw_multipleled(bitmap, x_panel_col1_offset+2*8, y_panel_pc_offset+8, cpunum_get_reg(0, PDP1_PC), 16);
r1807r1808
504504}
505505
506506#if 1
507static void pdp1_draw_circle(mame_bitmap *bitmap, int x, int y, int radius, int color_)
507static void pdp1_draw_circle(bitmap_t *bitmap, int x, int y, int radius, int color_)
508508{
509509   int interval;
510510   int a;
r1807r1808
539539   }
540540}
541541#else
542static void pdp1_draw_circle(mame_bitmap *bitmap, int x, int y, int radius, int color)
542static void pdp1_draw_circle(bitmap_t *bitmap, int x, int y, int radius, int color)
543543{
544544   float fx, fy;
545545   float interval;
r1807r1808
571571}
572572#endif
573573
574static void pdp1_erase_lightpen(mame_bitmap *bitmap)
574static void pdp1_erase_lightpen(bitmap_t *bitmap)
575575{
576576   if (previous_lightpen_state.active)
577577   {
r1807r1808
587587   }
588588}
589589
590static void pdp1_draw_lightpen(mame_bitmap *bitmap)
590static void pdp1_draw_lightpen(bitmap_t *bitmap)
591591{
592592   if (lightpen_state.active)
593593   {
src/mess/video/apple2gs.c
r1807r1808
1212#include "includes/apple2gs.h"
1313
1414
15static mame_bitmap *apple2gs_legacy_gfx;
15static bitmap_t *apple2gs_legacy_gfx;
1616UINT16 apple2gs_bordercolor;
1717
1818VIDEO_START( apple2gs )
src/mess/video/hp48.c
r1807r1808
2727
2828typedef const char *HP48_FIGURE;
2929
30static void hp48_draw_special(mame_bitmap *bitmap,int x, int y, const HP48_FIGURE figure, int color)
30static void hp48_draw_special(bitmap_t *bitmap,int x, int y, const HP48_FIGURE figure, int color)
3131{
3232   int j, xi=0;
3333   for (j=0; figure[j]; j++) {
src/mess/video/apple3.c
r1807r1808
8686
8787
8888
89static void apple3_video_text40(mame_bitmap *bitmap)
89static void apple3_video_text40(bitmap_t *bitmap)
9090{
9191   int x, y, col, row;
9292   offs_t offset;
r1807r1808
141141
142142
143143
144static void apple3_video_text80(mame_bitmap *bitmap)
144static void apple3_video_text80(bitmap_t *bitmap)
145145{
146146   int x, y, col, row;
147147   offs_t offset;
r1807r1808
193193
194194
195195
196static void apple3_video_graphics_hgr(mame_bitmap *bitmap)
196static void apple3_video_graphics_hgr(bitmap_t *bitmap)
197197{
198198   /* hi-res mode: 280x192x2 */
199199   int y, i, x;
r1807r1808
235235
236236
237237
238static void apple3_video_graphics_chgr(mame_bitmap *bitmap)
238static void apple3_video_graphics_chgr(bitmap_t *bitmap)
239239{
240240   /* color hi-res mode: 280x192x16 */
241241   int y, i, x;
r1807r1808
280280
281281
282282
283static void apple3_video_graphics_shgr(mame_bitmap *bitmap)
283static void apple3_video_graphics_shgr(bitmap_t *bitmap)
284284{
285285   /* super hi-res mode: 560x192x2 */
286286   int y, i, x;
r1807r1808
321321
322322
323323
324static void apple3_video_graphics_chires(mame_bitmap *bitmap)
324static void apple3_video_graphics_chires(bitmap_t *bitmap)
325325{
326326   UINT16 *pen;
327327   PAIR pix;
src/mess/video/911_vdt.c
r1807r1808
467467/*
468468   Video refresh
469469*/
470void vdt911_refresh(mame_bitmap *bitmap, int unit, int x, int y)
470void vdt911_refresh(bitmap_t *bitmap, int unit, int x, int y)
471471{
472472   const gfx_element *gfx = Machine->gfx[vdt[unit].model];
473473   int height = (vdt[unit].screen_size == char_960) ? 12 : /*25*/24;
src/mess/video/i82720.c
r1807r1808
115115   UINT16   vramsize;      /* Size in words   */
116116   UINT8   mode;         /* Resolution mode */
117117   UINT8   dirty;
118   mame_bitmap *tmpbmp;
118   bitmap_t *tmpbmp;
119119} TYP_GDC_MESS;
120120
121121static TYP_GDC_MESS gdc_mess;
src/mess/video/911_vdt.h
r1807r1808
6565 READ8_HANDLER(vdt911_0_cru_r);
6666WRITE8_HANDLER(vdt911_0_cru_w);
6767
68void vdt911_refresh(mame_bitmap *bitmap, int unit, int x, int y);
68void vdt911_refresh(bitmap_t *bitmap, int unit, int x, int y);
6969
7070void vdt911_keyboard(int unit);
7171
src/mess/video/nc.c
r1807r1808
5151
5252
5353/***************************************************************************
54  Draw the game screen in the given mame_bitmap.
54  Draw the game screen in the given bitmap_t.
5555  Do NOT call osd_update_display() from this function,
5656  it will be called by the main emulation engine.
5757***************************************************************************/
src/mess/video/cirrus.c
r1807r1808
6969#define LOG_PCIACCESS   0
7070
7171
72static void cirrus_update_8bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
72static void cirrus_update_8bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
7373{
7474   UINT16 *line;
7575   const UINT8 *vram;
r1807r1808
8888
8989
9090
91static void cirrus_update_16bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
91static void cirrus_update_16bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
9292{
9393   fatalerror("NYI");
9494}
9595
9696
9797
98static void cirrus_update_24bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
98static void cirrus_update_24bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
9999{
100100   fatalerror("NYI");
101101}
102102
103103
104104
105static void cirrus_update_32bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
105static void cirrus_update_32bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
106106{
107107   fatalerror("NYI");
108108}
src/mess/video/nes.c
r1807r1808
1414#include "includes/nes.h"
1515#include "machine/nes_mmc.h"
1616
17mame_bitmap *nes_zapper_hack;
17bitmap_t *nes_zapper_hack;
1818int nes_vram_sprite[8]; /* Used only by mmc5 for now */
1919static int last_frame_flip = 0;
2020
r1807r1808
8989   ppu2c0x_init_palette(machine, 0);
9090}
9191
92static void draw_sight(mame_bitmap *bitmap, int playerNum, int x_center, int y_center)
92static void draw_sight(bitmap_t *bitmap, int playerNum, int x_center, int y_center)
9393{
9494   int x,y;
9595   UINT16 color;
src/mess/video/pocketc.c
r1807r1808
4343}
4444
4545
46void pocketc_draw_special(mame_bitmap *bitmap,
46void pocketc_draw_special(bitmap_t *bitmap,
4747                    int x, int y, const POCKETC_FIGURE fig, int color)
4848{
4949   int i,j;
src/mess/video/gb.c
r1807r1808
244244
245245INLINE void gb_update_sprites (void)
246246{
247   mame_bitmap *bitmap = tmpbitmap;
247   bitmap_t *bitmap = tmpbitmap;
248248   UINT8 height, tilemask, line, *oam, *vram;
249249   int i, yindex;
250250
r1807r1808
330330}
331331
332332static void gb_update_scanline (void) {
333   mame_bitmap *bitmap = tmpbitmap;
333   bitmap_t *bitmap = tmpbitmap;
334334
335335   profiler_mark(PROFILER_VIDEO);
336336
r1807r1808
463463
464464INLINE void sgb_update_sprites (void)
465465{
466   mame_bitmap *bitmap = tmpbitmap;
466   bitmap_t *bitmap = tmpbitmap;
467467   UINT8 height, tilemask, line, *oam, *vram, pal;
468468   INT16 i, yindex;
469469
r1807r1808
561561   UINT16 yidx, xidx, xindex;
562562   UINT8 *map, *tiles, *tiles2;
563563   UINT8 pal, i;
564   mame_bitmap *bitmap = tmpbitmap;
564   bitmap_t *bitmap = tmpbitmap;
565565
566566   map = sgb_tile_map - 64;
567567
r1807r1808
619619}
620620
621621static void sgb_update_scanline (void) {
622   mame_bitmap *bitmap = tmpbitmap;
622   bitmap_t *bitmap = tmpbitmap;
623623
624624   profiler_mark(PROFILER_VIDEO);
625625
r1807r1808
791791/* --- Gameboy Color Specific --- */
792792
793793INLINE void cgb_update_sprites (void) {
794   mame_bitmap *bitmap = tmpbitmap;
794   bitmap_t *bitmap = tmpbitmap;
795795   UINT8 height, tilemask, line, *oam;
796796   int i, xindex, yindex;
797797
r1807r1808
886886}
887887
888888static void cgb_update_scanline (void) {
889   mame_bitmap *bitmap = tmpbitmap;
889   bitmap_t *bitmap = tmpbitmap;
890890
891891   profiler_mark(PROFILER_VIDEO);
892892
src/mess/video/z88.c
r1807r1808
4646
4747/* temp - change to gfxelement structure */
4848
49static void z88_vh_render_8x8(mame_bitmap *bitmap, int x, int y, int pen0, int pen1, unsigned char *pData)
49static void z88_vh_render_8x8(bitmap_t *bitmap, int x, int y, int pen0, int pen1, unsigned char *pData)
5050{
5151        int h,b;
5252
r1807r1808
7575        }
7676}
7777
78static void z88_vh_render_6x8(mame_bitmap *bitmap, int x, int y, int pen0, int pen1, unsigned char *pData)
78static void z88_vh_render_6x8(bitmap_t *bitmap, int x, int y, int pen0, int pen1, unsigned char *pData)
7979{
8080   int h,b;
8181
r1807r1808
107107   }
108108}
109109
110static void z88_vh_render_line(mame_bitmap *bitmap, int x, int y,int pen)
110static void z88_vh_render_line(bitmap_t *bitmap, int x, int y,int pen)
111111{
112112   z88_plot_pixel(bitmap, x, y+7, pen);
113113   z88_plot_pixel(bitmap, x+1, y+7, pen);
r1807r1808
151151
152152
153153/***************************************************************************
154  Draw the game screen in the given mame_bitmap.
154  Draw the game screen in the given bitmap_t.
155155  Do NOT call osd_update_display() from this fuz88tion,
156156  it will be called by the main emulation engine.
157157***************************************************************************/
src/mess/video/pc_vga.c
r1807r1808
11991199   pc_vga_reset();
12001200}
12011201
1202static void vga_vh_text(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
1202static void vga_vh_text(bitmap_t *bitmap, struct mscrtc6845 *crtc)
12031203{
12041204   UINT8 ch, attr;
12051205   UINT8 bits;
r1807r1808
12661266   }
12671267}
12681268
1269static void vga_vh_ega(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
1269static void vga_vh_ega(bitmap_t *bitmap, struct mscrtc6845 *crtc)
12701270{
12711271   int pos, line, column, c, addr, i;
12721272   int height = CRTC6845_CHAR_HEIGHT;
r1807r1808
13111311   }
13121312}
13131313
1314static void vga_vh_vga(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
1314static void vga_vh_vga(bitmap_t *bitmap, struct mscrtc6845 *crtc)
13151315{
13161316   int pos, line, column, c, addr, curr_addr;
13171317   UINT16 *bitmapline;
src/mess/video/pcw16.c
r1807r1808
6666}
6767
6868/* 640, 1 bit per pixel */
69static void pcw16_vh_decode_mode0(mame_bitmap *bitmap, int x, int y, unsigned char byte)
69static void pcw16_vh_decode_mode0(bitmap_t *bitmap, int x, int y, unsigned char byte)
7070{
7171   int b;
7272   int local_byte;
r1807r1808
8989}
9090
9191/* 320, 2 bits per pixel */
92static void pcw16_vh_decode_mode1(mame_bitmap *bitmap, int x, int y, unsigned char byte)
92static void pcw16_vh_decode_mode1(bitmap_t *bitmap, int x, int y, unsigned char byte)
9393{
9494   int b;
9595   int px;
r1807r1808
120120}
121121
122122/* 160, 4 bits per pixel */
123static void pcw16_vh_decode_mode2(mame_bitmap *bitmap, int x, int y, unsigned char byte)
123static void pcw16_vh_decode_mode2(bitmap_t *bitmap, int x, int y, unsigned char byte)
124124{
125125   int px;
126126   int b;
r1807r1808
152152}
153153
154154/***************************************************************************
155  Draw the game screen in the given mame_bitmap.
155  Draw the game screen in the given bitmap_t.
156156  Do NOT call osd_update_display() from this function,
157157  it will be called by the main emulation engine.
158158***************************************************************************/
src/mess/video/epnick.c
r1807r1808
898898  }
899899}
900900
901void    Nick_DoScreen(mame_bitmap *bm)
901void    Nick_DoScreen(bitmap_t *bm)
902902{
903903  int line = 0;
904904
src/mess/video/epnick.h
r1807r1808
127127extern PALETTE_INIT( nick );
128128
129129extern int Nick_vh_start(void);
130extern void Nick_DoScreen(mame_bitmap *bm);
130extern void Nick_DoScreen(bitmap_t *bm);
131131
132132extern int Nick_reg_r(int);
133133WRITE8_HANDLER ( Nick_reg_w );
src/mess/video/arcadia.c
r1807r1808
516516       UINT8 ram3[3][16];
517517   } d;
518518    } reg;
519   mame_bitmap *bitmap;
519   bitmap_t *bitmap;
520520} arcadia_video={ 0 };
521521
522522VIDEO_START( arcadia )
r1807r1808
641641    }
642642}
643643
644INLINE void arcadia_draw_char(mame_bitmap *bitmap, UINT8 *ch, int color,
644INLINE void arcadia_draw_char(bitmap_t *bitmap, UINT8 *ch, int color,
645645               int y, int x)
646646{
647647   /* 7-Sep-2007 - whomever wrote this crap code was dynamically remapping
r1807r1808
693693    }
694694}
695695
696INLINE void arcadia_vh_draw_line(mame_bitmap *bitmap,
696INLINE void arcadia_vh_draw_line(bitmap_t *bitmap,
697697             int y, UINT8 chars1[16])
698698{
699699    int x, ch, j, h;
r1807r1808
741741    return FALSE;
742742}
743743
744static void arcadia_draw_sprites(mame_bitmap *bitmap)
744static void arcadia_draw_sprites(bitmap_t *bitmap)
745745{
746746    int i, k, x, y;
747747    UINT8 b;
src/mess/video/m6847.c
r1807r1808
12161216
12171217
12181218
1219static void render_scanline(mame_bitmap *bitmap, int scanline)
1219static void render_scanline(bitmap_t *bitmap, int scanline)
12201220{
12211221   UINT32 border_color;
12221222   UINT32 *line;
src/mess/video/cgenie.c
r1807r1808
1414
1515static CRTC6845 crt;
1616static int graphics = 0;
17static mame_bitmap *dlybitmap = NULL;
17static bitmap_t *dlybitmap = NULL;
1818static int off_x = 0;
1919static int off_y = 0;
2020
r1807r1808
237237}
238238
239239
240static void cgenie_refresh_monitor(running_machine *machine, mame_bitmap * bitmap, const rectangle *cliprect)
240static void cgenie_refresh_monitor(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect)
241241{
242242   int i, address, offset, cursor, size, code, x, y;
243243    rectangle r;
r1807r1808
315315   }
316316}
317317
318static void cgenie_refresh_tv_set(running_machine *machine, mame_bitmap * bitmap, const rectangle *cliprect)
318static void cgenie_refresh_tv_set(running_machine *machine, bitmap_t * bitmap, const rectangle *cliprect)
319319{
320320   int i, address, offset, cursor, size, code, x, y;
321321    rectangle r;
r1807r1808
405405}
406406
407407/***************************************************************************
408  Draw the game screen in the given mame_bitmap.
408  Draw the game screen in the given bitmap_t.
409409***************************************************************************/
410410VIDEO_UPDATE( cgenie )
411411{
src/mess/video/pmd85.c
r1807r1808
2929{
3030}
3131
32static void pmd85_draw_scanline(mame_bitmap *bitmap, int pmd85_scanline)
32static void pmd85_draw_scanline(bitmap_t *bitmap, int pmd85_scanline)
3333{
3434   int x, i;
3535   int pen0, pen1;
src/mess/video/x68k.c
r1807r1808
4141UINT16* x68k_spriteram;  // sprite/background RAM
4242UINT16* x68k_spritereg;  // sprite/background registers
4343
44static mame_bitmap* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
45static mame_bitmap* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
46static mame_bitmap* x68k_gfx_1_bitmap_16;
47static mame_bitmap* x68k_gfx_2_bitmap_16;
48static mame_bitmap* x68k_gfx_3_bitmap_16;
49static mame_bitmap* x68k_gfx_0_bitmap_256;  // 256 colour, 512x512, 2 pages
50static mame_bitmap* x68k_gfx_1_bitmap_256;
51static mame_bitmap* x68k_gfx_0_bitmap_65536;  // 65536 colour, 512x512, 1 page
44static bitmap_t* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
45static bitmap_t* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
46static bitmap_t* x68k_gfx_1_bitmap_16;
47static bitmap_t* x68k_gfx_2_bitmap_16;
48static bitmap_t* x68k_gfx_3_bitmap_16;
49static bitmap_t* x68k_gfx_0_bitmap_256;  // 256 colour, 512x512, 2 pages
50static bitmap_t* x68k_gfx_1_bitmap_256;
51static bitmap_t* x68k_gfx_0_bitmap_65536;  // 65536 colour, 512x512, 1 page
5252
5353static tilemap* x68k_bg0_8;  // two 64x64 tilemaps, 8x8 characters
5454static tilemap* x68k_bg1_8;
r1807r1808
6767   *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color;
6868}
6969
70static mame_bitmap* x68k_get_gfx_pri(int pri,int type)
70static bitmap_t* x68k_get_gfx_pri(int pri,int type)
7171{
7272   if(type == GFX16)
7373   {
r1807r1808
700700   return x68k_spriteram[offset];
701701}
702702
703static void x68k_draw_gfx(mame_bitmap* bitmap,rectangle cliprect)
703static void x68k_draw_gfx(bitmap_t* bitmap,rectangle cliprect)
704704{
705705   int priority;
706706   rectangle rect;
r1807r1808
801801}
802802
803803// Sprite controller "Cynthia" at 0xeb0000
804static void x68k_draw_sprites(mame_bitmap* bitmap, int priority, rectangle cliprect)
804static void x68k_draw_sprites(bitmap_t* bitmap, int priority, rectangle cliprect)
805805{
806806   /*
807807      0xeb0000 - 0xeb07ff - Sprite registers (up to 128)
src/mess/video/spectrum.c
r1807r1808
342342 *******************************************************************/
343343
344344/* Draw a scanline in TS2068/TC2048 hires mode (code modified from COUPE.C) */
345static void ts2068_hires_scanline(mame_bitmap *bitmap, int y, int borderlines)
345static void ts2068_hires_scanline(bitmap_t *bitmap, int y, int borderlines)
346346{
347347   int x,b,scrx,scry;
348348   unsigned short ink,pap;
r1807r1808
387387}
388388
389389/* Draw a scanline in TS2068/TC2048 64-column mode */
390static void ts2068_64col_scanline(mame_bitmap *bitmap, int y, int borderlines, unsigned short inkcolor)
390static void ts2068_64col_scanline(bitmap_t *bitmap, int y, int borderlines, unsigned short inkcolor)
391391{
392392   int x,b,scrx,scry;
393393        unsigned char *scr1, *scr2;
r1807r1808
421421}
422422
423423/* Draw a scanline in TS2068/TC2048 lores (normal Spectrum) mode */
424static void ts2068_lores_scanline(mame_bitmap *bitmap, int y, int borderlines, int screen)
424static void ts2068_lores_scanline(bitmap_t *bitmap, int y, int borderlines, int screen)
425425{
426426   int x,b,scrx,scry;
427427   unsigned short ink,pap;
src/mess/video/tx0.c
r1807r1808
1212#include "video/crt.h"
1313
1414
15static mame_bitmap *panel_bitmap;
16static mame_bitmap *typewriter_bitmap;
15static bitmap_t *panel_bitmap;
16static bitmap_t *typewriter_bitmap;
1717
1818INLINE void tx0_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color)
1919{
r1807r1808
3232   0,   typewriter_window_height-1,   /* min_y, max_y */
3333};
3434
35static void tx0_draw_panel_backdrop(mame_bitmap *bitmap);
36static void tx0_draw_panel(mame_bitmap *bitmap);
35static void tx0_draw_panel_backdrop(bitmap_t *bitmap);
36static void tx0_draw_panel(bitmap_t *bitmap);
3737
3838
3939
r1807r1808
123123};
124124
125125/* draw a small 8*8 LED (or is this a lamp? ) */
126static void tx0_draw_led(mame_bitmap *bitmap, int x, int y, int state)
126static void tx0_draw_led(bitmap_t *bitmap, int x, int y, int state)
127127{
128128   int xx, yy;
129129
r1807r1808
133133}
134134
135135/* draw nb_bits leds which represent nb_bits bits in value */
136static void tx0_draw_multipleled(mame_bitmap *bitmap, int x, int y, int value, int nb_bits)
136static void tx0_draw_multipleled(bitmap_t *bitmap, int x, int y, int value, int nb_bits)
137137{
138138   while (nb_bits)
139139   {
r1807r1808
147147
148148
149149/* draw a small 8*8 switch */
150static void tx0_draw_switch(mame_bitmap *bitmap, int x, int y, int state)
150static void tx0_draw_switch(bitmap_t *bitmap, int x, int y, int state)
151151{
152152   int xx, yy;
153153   int i;
r1807r1808
188188
189189
190190/* draw nb_bits switches which represent nb_bits bits in value */
191static void tx0_draw_multipleswitch(mame_bitmap *bitmap, int x, int y, int value, int nb_bits)
191static void tx0_draw_multipleswitch(bitmap_t *bitmap, int x, int y, int value, int nb_bits)
192192{
193193   while (nb_bits)
194194   {
r1807r1808
202202
203203
204204/* write a single char on screen */
205static void tx0_draw_char(mame_bitmap *bitmap, char character, int x, int y, int color)
205static void tx0_draw_char(bitmap_t *bitmap, char character, int x, int y, int color)
206206{
207207   drawgfx(bitmap, Machine->gfx[0], character-32, color, 0, 0,
208208            x+1, y, &Machine->screen[0].visarea, TRANSPARENCY_PEN, 0);
209209}
210210
211211/* write a string on screen */
212static void tx0_draw_string(mame_bitmap *bitmap, const char *buf, int x, int y, int color)
212static void tx0_draw_string(bitmap_t *bitmap, const char *buf, int x, int y, int color)
213213{
214214   while (* buf)
215215   {
r1807r1808
222222
223223
224224/* draw a vertical line */
225static void tx0_draw_vline(mame_bitmap *bitmap, int x, int y, int height, int color)
225static void tx0_draw_vline(bitmap_t *bitmap, int x, int y, int height, int color)
226226{
227227   while (height--)
228228      tx0_plot_pixel(bitmap, x, y++, color);
r1807r1808
230230
231231#ifdef UNUSED_FUNCTION
232232/* draw a horizontal line */
233static void tx0_draw_hline(mame_bitmap *bitmap, int x, int y, int width, int color)
233static void tx0_draw_hline(bitmap_t *bitmap, int x, int y, int width, int color)
234234{
235235   while (width--)
236236      tx0_plot_pixel(bitmap, x++, y, color);
r1807r1808
240240/*
241241   draw the operator control panel (fixed backdrop)
242242*/
243static void tx0_draw_panel_backdrop(mame_bitmap *bitmap)
243static void tx0_draw_panel_backdrop(bitmap_t *bitmap)
244244{
245245   int i;
246246   char buf[3];
r1807r1808
287287/*
288288   draw the operator control panel (dynamic elements)
289289*/
290static void tx0_draw_panel(mame_bitmap *bitmap)
290static void tx0_draw_panel(bitmap_t *bitmap)
291291{
292292   int cm_sel, lr_sel;
293293   int i;
src/mess/video/border.c
r1807r1808
3535        CurrBorderColor = NewColor;
3636}
3737
38void draw_border(mame_bitmap *bitmap,
38void draw_border(bitmap_t *bitmap,
3939   int full_refresh,               /* Full refresh flag */
4040   int TopBorderLines,             /* Border lines before actual screen */
4141   int ScreenLines,                /* Screen height in pixels */
src/mess/video/border.h
r1807r1808
11extern void force_border_redraw (void);
22extern void set_last_border_color (int NewColor);
3extern void draw_border(mame_bitmap *bitmap, int full_refresh,
3extern void draw_border(bitmap_t *bitmap, int full_refresh,
44                int TopBorderLines, int ScreenLines, int BottomBorderLines,
55                int LeftBorderPixels, int ScreenPixels, int RightBorderPixels,
66                int LeftBorderCycles, int ScreenCycles, int RightBorderCycles,
src/mess/video/pc8801.c
r1807r1808
7676
7777static char *graph_dirty=NULL;
7878static unsigned short *attr_tmp=NULL,*attr_old=NULL,*text_old=NULL;
79static mame_bitmap *wbm1,*wbm2;
79static bitmap_t *wbm1,*wbm2;
8080
8181#define TRAM(x,y) (pc88sr_is_highspeed ? \
8282   pc88sr_textRAM[(dmac_addr[2]+(x)+(y)*120)&0xfff] : \
src/mess/video/pc_video.c
r1807r1808
145145 *
146146 *************************************/
147147
148void pc_render_gfx_1bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc,
148void pc_render_gfx_1bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc,
149149   const UINT8 *vram, const UINT16 *palette, int interlace)
150150{
151151   int sx, sy, sh;
r1807r1808
185185
186186
187187
188void pc_render_gfx_2bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc,
188void pc_render_gfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc,
189189   const UINT8 *vram, const UINT16 *palette, int interlace)
190190{
191191   int sx, sy, sh;
r1807r1808
226226
227227
228228
229void pc_render_gfx_4bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc,
229void pc_render_gfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc,
230230   const UINT8 *vram, const UINT16 *palette, int interlace)
231231{
232232   int sx, sy, sh;
src/mess/video/pcw.c
r1807r1808
4747}
4848
4949/***************************************************************************
50  Draw the game screen in the given mame_bitmap.
50  Draw the game screen in the given bitmap_t.
5151  Do NOT call osd_update_display() from this function,
5252  it will be called by the main emulation engine.
5353***************************************************************************/
src/mess/video/oric.c
r1807r1808
198198
199199/* render 6-pixels using foreground and background colours specified */
200200/* used in hires and text mode */
201static void oric_vh_render_6pixels(mame_bitmap *bitmap,int x,int y, int fg, int bg,int data, int invert_flag)
201static void oric_vh_render_6pixels(bitmap_t *bitmap,int x,int y, int fg, int bg,int data, int invert_flag)
202202{
203203   int i;
204204   int pens[2];
src/mess/video/pc_video.h
r1807r1808
1212#include "includes/crtc6845.h"
1313
1414
15typedef void (*pc_video_update_proc)(mame_bitmap *bitmap,
15typedef void (*pc_video_update_proc)(bitmap_t *bitmap,
1616   struct mscrtc6845 *crtc);
1717
1818struct mscrtc6845 *pc_video_start(const struct mscrtc6845_config *config,
r1807r1808
2626WRITE32_HANDLER( pc_video_videoram32_w );
2727
2828/* renderers */
29void pc_render_gfx_1bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc,
29void pc_render_gfx_1bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc,
3030   const UINT8 *vram, const UINT16 *palette, int interlace);
31void pc_render_gfx_2bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc,
31void pc_render_gfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc,
3232   const UINT8 *vram, const UINT16 *palette, int interlace);
33void pc_render_gfx_4bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc,
33void pc_render_gfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc,
3434   const UINT8 *vram, const UINT16 *palette, int interlace);
3535
3636
src/mess/video/enterp.c
r1807r1808
1818}
1919
2020/***************************************************************************
21  Draw the game screen in the given mame_bitmap.
21  Draw the game screen in the given bitmap_t.
2222  Do NOT call osd_update_display() from this function,
2323  it will be called by the main emulation engine.
2424***************************************************************************/
src/mess/video/zx8301.c
r1807r1808
4747   zx8301.base = BIT(data, 7);
4848}
4949
50static void zx8301_draw_screen(mame_bitmap *bitmap)
50static void zx8301_draw_screen(bitmap_t *bitmap)
5151{
5252   UINT32 addr = zx8301.base << 15;
5353   int y, word, pixel;
src/mess/video/pc_mda.c
r1807r1808
276276  The character cell size is 9x15. Column 9 is column 8 repeated for
277277  character codes 176 to 223.
278278***************************************************************************/
279static void mda_text_inten(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
279static void mda_text_inten(bitmap_t *bitmap, struct mscrtc6845 *crtc)
280280{
281281   int sx, sy;
282282   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
327327  The character cell size is 9x15. Column 9 is column 8 repeated for
328328  character codes 176 to 223.
329329***************************************************************************/
330static void mda_text_blink(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
330static void mda_text_blink(bitmap_t *bitmap, struct mscrtc6845 *crtc)
331331{
332332   int sx, sy;
333333   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
384384  bit 7 being the leftmost.
385385***************************************************************************/
386386
387static void hercules_gfx(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
387static void hercules_gfx(bitmap_t *bitmap, struct mscrtc6845 *crtc)
388388{
389389   const UINT8 *vram = videoram;
390390   static const UINT16 palette[2] = {0, 10};
src/mess/video/pc_t1t.c
r1807r1808
492492  Plot single text character
493493***************************************************************************/
494494
495static void t1t_plot_char(mame_bitmap *bitmap, const rectangle *r, UINT8 ch, UINT8 attr)
495static void t1t_plot_char(bitmap_t *bitmap, const rectangle *r, UINT8 ch, UINT8 attr)
496496{
497497   int width;
498498   int height;
r1807r1808
519519  Draw text mode with 40x25 characters (default) with high intensity bg.
520520***************************************************************************/
521521
522static void t1t_text_inten(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
522static void t1t_text_inten(bitmap_t *bitmap, struct mscrtc6845 *crtc)
523523{
524524   int sx, sy;
525525   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
571571  Draw text mode with 40x25 characters (default) and blinking colors.
572572***************************************************************************/
573573
574static void t1t_text_blink(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
574static void t1t_text_blink(bitmap_t *bitmap, struct mscrtc6845 *crtc)
575575{
576576   int sx, sy;
577577   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
635635  Even scanlines are from T1T_base + 0x0000, odd from T1T_base + 0x2000
636636***************************************************************************/
637637
638static void t1t_gfx_2bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
638static void t1t_gfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
639639{
640640   static const UINT16 palette[] =
641641   {
r1807r1808
653653  The cell size is 1x1 (1 scanline is the real default)
654654  Even scanlines are from T1T_base + 0x0000, odd from T1T_base + 0x2000
655655***************************************************************************/
656static void t1t_gfx_1bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
656static void t1t_gfx_1bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
657657{
658658   int i, sx, sy, sh;
659659   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
695695  CGA_base + 0x2000
696696***************************************************************************/
697697
698static void t1t_gfx_4bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
698static void t1t_gfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
699699{
700700   pc_render_gfx_4bpp(bitmap, crtc, pcjr.displayram, NULL, 4);
701701}
src/mess/video/vdc8563.c
r1807r1808
402402   }
403403}
404404
405static void vdc8563_monotext_screenrefresh (mame_bitmap *bitmap, int full_refresh)
405static void vdc8563_monotext_screenrefresh (bitmap_t *bitmap, int full_refresh)
406406{
407407   int x, y, i;
408408   rectangle rect;
r1807r1808
442442   }
443443}
444444
445static void vdc8563_text_screenrefresh (mame_bitmap *bitmap, int full_refresh)
445static void vdc8563_text_screenrefresh (bitmap_t *bitmap, int full_refresh)
446446{
447447   int x, y, i, j;
448448   rectangle rect;
r1807r1808
502502   }
503503}
504504
505static void vdc8563_graphic_screenrefresh (mame_bitmap *bitmap, int full_refresh)
505static void vdc8563_graphic_screenrefresh (bitmap_t *bitmap, int full_refresh)
506506{
507507   int x, y, i, j, k;
508508   rectangle rect;
src/mess/video/coco3.c
r1807r1808
306306
307307
308308
309static void coco3_render_scanline(mame_bitmap *bitmap, int scanline)
309static void coco3_render_scanline(bitmap_t *bitmap, int scanline)
310310{
311311   const coco3_scanline_record *scanline_record;
312312   UINT32 *line;
src/mess/video/smsvdp.c
r1807r1808
9696   UINT8      *VRAM;                  /* Pointer to VRAM */
9797   UINT8      *CRAM;                  /* Pointer to CRAM */
9898   const UINT8   *sms_frame_timing;
99   mame_bitmap   *prev_bitmap;
99   bitmap_t   *prev_bitmap;
100100   int         prev_bitmap_saved;
101101   UINT8      *collision_buffer;
102102
r1807r1808
111111} smsvdp;
112112
113113static TIMER_CALLBACK(smsvdp_display_callback);
114static void sms_refresh_line(mame_bitmap *bitmap, int offsetx, int offsety, int line);
114static void sms_refresh_line(bitmap_t *bitmap, int offsetx, int offsety, int line);
115115static void sms_update_palette(void);
116116
117117static void set_display_settings( void ) {
r1807r1808
914914   sms_refresh_tms9918_sprites( lineBuffer, line );
915915}
916916
917static void sms_refresh_line( mame_bitmap *bitmap, int pixelOffsetX, int pixelPlotY, int line ) {
917static void sms_refresh_line( bitmap_t *bitmap, int pixelOffsetX, int pixelPlotY, int line ) {
918918   int x;
919919   int *blitLineBuffer = smsvdp.line_buffer;
920920
src/mess/video/pc_cga.c
r1807r1808
497497  The character cell size is 16x8
498498***************************************************************************/
499499
500static void cga_text_inten(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
500static void cga_text_inten(bitmap_t *bitmap, struct mscrtc6845 *crtc)
501501{
502502   int sx, sy;
503503   int   offs = mscrtc6845_get_start(crtc) * 2;
r1807r1808
551551  The character cell size is 16x8
552552***************************************************************************/
553553
554static void cga_text_inten_alt(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
554static void cga_text_inten_alt(bitmap_t *bitmap, struct mscrtc6845 *crtc)
555555{
556556   int sx, sy;
557557   int   offs = mscrtc6845_get_start(crtc) * 2;
r1807r1808
600600  Draw text mode with 40x25 characters (default) and blinking colors.
601601  The character cell size is 16x8
602602***************************************************************************/
603static void cga_text_blink(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
603static void cga_text_blink(bitmap_t *bitmap, struct mscrtc6845 *crtc)
604604{
605605   int sx, sy;
606606   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
665665  The character cell size is 16x8
666666***************************************************************************/
667667
668static void cga_text_blink_alt(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
668static void cga_text_blink_alt(bitmap_t *bitmap, struct mscrtc6845 *crtc)
669669{
670670   int sx, sy;
671671   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
727727  cga fetches 2 byte per mscrtc6845 access (not modeled here)!
728728***************************************************************************/
729729
730static void cga_gfx_2bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
730static void cga_gfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
731731{
732732   const UINT16 *palette;
733733   int colorset = cga.color_select & 0x3F;
r1807r1808
769769  Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
770770***************************************************************************/
771771
772static void cga_gfx_1bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
772static void cga_gfx_1bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
773773{
774774   const UINT16 *palette;
775775
r1807r1808
785785
786786
787787
788INLINE void cga_plot_unit_4bpp(mame_bitmap *bitmap,
788INLINE void cga_plot_unit_4bpp(bitmap_t *bitmap,
789789             int x, int y, int offs, int scale)
790790{
791791   int color;
r1807r1808
798798}
799799
800800
801static void cga_gfx_4bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc, int scale)
801static void cga_gfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc, int scale)
802802{
803803   int i, sx, sy, sh;
804804   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
837837 * The different scaling factors mean that the '160x200' versions of screens
838838 * are the same size as the normal colour ones.
839839 */
840static void cga_gfx_4bpph(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
840static void cga_gfx_4bpph(bitmap_t *bitmap, struct mscrtc6845 *crtc)
841841{
842842   pc_cga_check_palette();
843843   cga_gfx_4bpp(bitmap, crtc, 8);
r1807r1808
845845
846846
847847/* The lo-res graphics mode on a colour composite monitor */
848static void cga_gfx_4bppl(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
848static void cga_gfx_4bppl(bitmap_t *bitmap, struct mscrtc6845 *crtc)
849849{
850850   pc_cga_check_palette();
851851   cga_gfx_4bpp(bitmap, crtc, 4);
r1807r1808
854854
855855
856856
857INLINE void pgfx_plot_unit_4bpp(mame_bitmap *bitmap,
857INLINE void pgfx_plot_unit_4bpp(bitmap_t *bitmap,
858858                      int x, int y, int offs)
859859{
860860   int color, values[2];
r1807r1808
889889  Second plane at CGA_base + 0x4000 / 0x6000
890890***************************************************************************/
891891
892static void cga_pgfx_4bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
892static void cga_pgfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
893893{
894894   int i, sx, sy, sh;
895895   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
922922
923923
924924
925INLINE void pgfx_plot_unit_2bpp(mame_bitmap *bitmap,
925INLINE void pgfx_plot_unit_2bpp(bitmap_t *bitmap,
926926                int x, int y, const UINT16 *palette, int offs)
927927{
928928   int i;
r1807r1808
969969  cga fetches 2 byte per mscrtc6845 access (not modeled here)!
970970***************************************************************************/
971971
972static void cga_pgfx_2bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
972static void cga_pgfx_2bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
973973{
974974   int i, sx, sy, sh;
975975   int   offs = mscrtc6845_get_start(crtc)*2;
r1807r1808
10331033// mapping of the 4 planes into videoram
10341034// (text data should be readable at videoram+0)
10351035static const int videoram_offset[4]= { 0xc000, 0x8000, 0x4000, 0 };
1036INLINE void pc1512_plot_unit(mame_bitmap *bitmap,
1036INLINE void pc1512_plot_unit(bitmap_t *bitmap,
10371037                      int x, int y, int offs)
10381038{
10391039   int color, values[4];
r1807r1808
10651065  Even scanlines are from CGA_base + 0x0000, odd from CGA_base + 0x2000
10661066***************************************************************************/
10671067
1068static void pc1512_gfx_4bpp(mame_bitmap *bitmap, struct mscrtc6845 *crtc)
1068static void pc1512_gfx_4bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
10691069{
10701070   int i, sx, sy, sh;
10711071   int   offs = mscrtc6845_get_start(crtc)*2;
src/mess/video/intv.c
r1807r1808
204204    }
205205}
206206
207static void render_line(running_machine *machine, mame_bitmap *bitmap,
207static void render_line(running_machine *machine, bitmap_t *bitmap,
208208   UINT8 nextByte, UINT16 x, UINT16 y, UINT8 fgcolor, UINT8 bgcolor)
209209{
210210    UINT32 color = (nextByte & 0x80 ? machine->pens[fgcolor]
r1807r1808
264264    intv_plot_pixel(bitmap, x+15, y+1, color);
265265}
266266
267static void render_colored_squares(running_machine *machine, mame_bitmap *bitmap,
267static void render_colored_squares(running_machine *machine, bitmap_t *bitmap,
268268   UINT16 x, UINT16 y, UINT8 color0, UINT8 color1, UINT8 color2, UINT8 color3)
269269{
270270    plot_box(bitmap, x, y, 8, 8, machine->pens[color0]);
r1807r1808
273273    plot_box(bitmap, x+8, y+8, 8, 8, machine->pens[color3]);
274274}
275275
276static void render_color_stack_mode(running_machine *machine, mame_bitmap *bitmap)
276static void render_color_stack_mode(running_machine *machine, bitmap_t *bitmap)
277277{
278278    UINT8 h, csPtr = 0, nexty = 0;
279279    UINT16 nextCard, nextx = 0;
r1807r1808
332332    }
333333}
334334
335static void render_fg_bg_mode(running_machine *machine, mame_bitmap *bitmap)
335static void render_fg_bg_mode(running_machine *machine, bitmap_t *bitmap)
336336{
337337    UINT8 i, j, isGrom, fgcolor, bgcolor, nexty = 0;
338338    UINT16 nextCard, memoryLocation, nextx = 0;
r1807r1808
368368    }
369369}
370370
371static void copy_sprites_to_background(running_machine *machine, mame_bitmap *bitmap)
371static void copy_sprites_to_background(running_machine *machine, bitmap_t *bitmap)
372372{
373373    UINT8 width, currentPixel;
374374    UINT8 borderCollision, foregroundCollision;
r1807r1808
437437    }
438438}
439439
440static void render_background(running_machine *machine, mame_bitmap *bitmap)
440static void render_background(running_machine *machine, bitmap_t *bitmap)
441441{
442442   if (intv_color_stack_mode)
443443        render_color_stack_mode(machine, bitmap);
r1807r1808
446446}
447447
448448/*
449static void draw_background(mame_bitmap *bitmap, int transparency)
449static void draw_background(bitmap_t *bitmap, int transparency)
450450{
451451   // First, draw the background
452452   int offs = 0;
r1807r1808
598598
599599/* TBD: need to handle sprites behind foreground? */
600600/*
601static void draw_sprites(mame_bitmap *bitmap, int behind_foreground)
601static void draw_sprites(bitmap_t *bitmap, int behind_foreground)
602602{
603603   int i;
604604   int code;
r1807r1808
699699}
700700*/
701701
702static void draw_borders(running_machine *machine, mame_bitmap *bm)
702static void draw_borders(running_machine *machine, bitmap_t *bm)
703703{
704704   if (intv_left_edge_inhibit)
705705   {
src/mess/video/cdp1864.c
r1807r1808
55#include "video/cdp1864.h"
66
77
8static mame_bitmap *cdptmpbitmap;
8static bitmap_t *cdptmpbitmap;
99
1010static emu_timer *cdp1864_int_timer;
1111static emu_timer *cdp1864_efx_timer;
src/mess/video/ssystem3.c
r1807r1808
6161    "  dddddddddddd"
6262};
6363
64static void ssystem3_draw_7segment(mame_bitmap *bitmap,int value, int x, int y)
64static void ssystem3_draw_7segment(bitmap_t *bitmap,int value, int x, int y)
6565{
6666   int i, xi, yi, mask, color;
6767
r1807r1808
140140" 55555555   55555555          000000   000000   00   00   00  00         000000      00     00  00    00   0000000"
141141;
142142
143static void ssystem3_draw_led(mame_bitmap *bitmap,INT16 color, int x, int y, int ch)
143static void ssystem3_draw_led(bitmap_t *bitmap,INT16 color, int x, int y, int ch)
144144{
145145   int j, xi=0;
146146   for (j=0; single_led[j]; j++) {
src/mess/video/amstrad.c
r1807r1808
8787/* 2 HSYNCS after the VSYNC Counter */
8888static int amstrad_CRTC_HS_After_VS_Counter;
8989
90static mame_bitmap   *amstrad_bitmap;
90static bitmap_t   *amstrad_bitmap;
9191
9292static int amstrad_scanline;
9393static int border_counter;  // counts length of the soft scroll border extend
r1807r1808
391391/* mode 0 - low resolution - 16 colours */
392392static void amstrad_plus_draw_screen_enabled_mode_0(void)
393393{
394   mame_bitmap *bitmap = amstrad_bitmap;
394   bitmap_t *bitmap = amstrad_bitmap;
395395
396396   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
397397   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
449449/* mode 1 - medium resolution - 4 colours */
450450static void amstrad_plus_draw_screen_enabled_mode_1(void)
451451{
452   mame_bitmap *bitmap = amstrad_bitmap;
452   bitmap_t *bitmap = amstrad_bitmap;
453453
454454   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
455455   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
500500/* mode 2: high resolution - 2 colours */
501501static void amstrad_plus_draw_screen_enabled_mode_2(void)
502502{
503   mame_bitmap *bitmap = amstrad_bitmap;
503   bitmap_t *bitmap = amstrad_bitmap;
504504
505505   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
506506   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
540540/* undocumented mode. low resolution - 4 colours */
541541static void amstrad_plus_draw_screen_enabled_mode_3(void)
542542{
543   mame_bitmap *bitmap = amstrad_bitmap;
543   bitmap_t *bitmap = amstrad_bitmap;
544544
545545   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
546546   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
598598/* mode 0 - low resolution - 16 colours */
599599static void amstrad_draw_screen_enabled_mode_0(void)
600600{
601   mame_bitmap *bitmap = amstrad_bitmap;
601   bitmap_t *bitmap = amstrad_bitmap;
602602
603603   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
604604   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
645645/* mode 1 - medium resolution - 4 colours */
646646static void amstrad_draw_screen_enabled_mode_1(void)
647647{
648   mame_bitmap *bitmap = amstrad_bitmap;
648   bitmap_t *bitmap = amstrad_bitmap;
649649
650650   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
651651   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
694694/* mode 2: high resolution - 2 colours */
695695static void amstrad_draw_screen_enabled_mode_2(void)
696696{
697   mame_bitmap *bitmap = amstrad_bitmap;
697   bitmap_t *bitmap = amstrad_bitmap;
698698
699699   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
700700   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
737737/* undocumented mode. low resolution - 4 colours */
738738static void amstrad_draw_screen_enabled_mode_3(void)
739739{
740   mame_bitmap *bitmap = amstrad_bitmap;
740   bitmap_t *bitmap = amstrad_bitmap;
741741
742742   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
743743   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
783783/* Aleste mode 2: high resolution - 4 colours */
784784static void aleste_draw_screen_enabled_mode_2(void)
785785{
786   mame_bitmap *bitmap = amstrad_bitmap;
786   bitmap_t *bitmap = amstrad_bitmap;
787787
788788   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
789789   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
827827/* Aleste mode 3 - medium resolution, 16 colours */
828828static void aleste_draw_screen_enabled_mode_3(void)
829829{
830   mame_bitmap *bitmap = amstrad_bitmap;
830   bitmap_t *bitmap = amstrad_bitmap;
831831
832832   int ma = amstrad_CRTC_MA; // m6845_memory_address_r(0);
833833   int ra = amstrad_CRTC_RA; // m6845_row_address_r(0);
r1807r1808
920920
921921  &6422 - &643f   Sprite palette, 12-bit, xxxxGGGGRRRRBBBB, sprite pens 1-15 (0 is always transparent)
922922*/
923static void amstrad_plus_sprite_draw(mame_bitmap* scr_bitmap)
923static void amstrad_plus_sprite_draw(bitmap_t* scr_bitmap)
924924{
925925   int spr;  // sprite number
926926   int xloc,yloc;
src/mess/video/avigo.c
r1807r1808
134134//static unsigned int avigo_ad_y;
135135
136136/***************************************************************************
137  Draw the game screen in the given mame_bitmap.
137  Draw the game screen in the given bitmap_t.
138138  Do NOT call osd_update_display() from this function,
139139  it will be called by the main emulation engine.
140140***************************************************************************/
src/mess/video/vic6567.c
r1807r1808
183183
184184   int chargenaddr, videoaddr;
185185
186   mame_bitmap *bitmap;
186   bitmap_t *bitmap;
187187   int x_begin, x_end;
188188   int y_begin, y_end;
189189
src/mess/video/coupe.c
r1807r1808
1515
1616unsigned char *sam_screen;
1717
18void drawMode4_line(mame_bitmap *bitmap,int y)
18void drawMode4_line(bitmap_t *bitmap,int y)
1919{
2020   int x;
2121   unsigned char tmp=0;
r1807r1808
5757   }
5858}
5959
60void drawMode3_line(mame_bitmap *bitmap,int y)
60void drawMode3_line(bitmap_t *bitmap,int y)
6161{
6262   int x;
6363   unsigned char tmp=0;
r1807r1808
9999   }
100100}
101101
102void drawMode2_line(mame_bitmap *bitmap,int y)
102void drawMode2_line(bitmap_t *bitmap,int y)
103103{
104104   int x,b,scrx;
105105   unsigned char tmp=0;
r1807r1808
129129   }
130130}
131131
132void drawMode1_line(mame_bitmap *bitmap,int y)
132void drawMode1_line(bitmap_t *bitmap,int y)
133133{
134134   int x,b,scrx,scry;
135135   unsigned char tmp=0;
src/mess/video/trs80.c
r1807r1808
6767}
6868
6969/***************************************************************************
70  Draw the game screen in the given mame_bitmap.
70  Draw the game screen in the given bitmap_t.
7171  Do NOT call osd_update_display() from this function,
7272  it will be called by the main emulation engine.
7373***************************************************************************/
src/mess/video/odyssey2.c
r1807r1808
339339    }
340340}
341341
342INLINE void odyssey2_draw(mame_bitmap *bitmap, UINT8 bg[][320], UINT8 code, int x, int y, int scale_x, int scale_y, UINT8 collision_id, UINT32 col)
342INLINE void odyssey2_draw(bitmap_t *bitmap, UINT8 bg[][320], UINT8 code, int x, int y, int scale_x, int scale_y, UINT8 collision_id, UINT32 col)
343343{
344344    int m,x1,y1;
345345    for (m=0x80; m>0; m>>=1, x+=scale_x)
r1807r1808
359359}
360360
361361// different bit ordering, maybe I should change rom
362INLINE void odyssey2_draw_sprite(mame_bitmap *bitmap, UINT8 bg[][320], UINT8 code, int x, int y, int scale_x, int scale_y, UINT8 collision_id, UINT32 col)
362INLINE void odyssey2_draw_sprite(bitmap_t *bitmap, UINT8 bg[][320], UINT8 code, int x, int y, int scale_x, int scale_y, UINT8 collision_id, UINT32 col)
363363{
364364    int m,x1,y1;
365365
r1807r1808
379379    }
380380}
381381
382INLINE void odyssey2_draw_grid( mame_bitmap* bitmap, UINT8 bg[][320] )
382INLINE void odyssey2_draw_grid( bitmap_t* bitmap, UINT8 bg[][320] )
383383{
384384    int width  = 16;
385385    int height = 24;
r1807r1808
421421    }
422422}
423423
424INLINE void odyssey2_draw_char(mame_bitmap *bitmap, UINT8 bg[][320], int x, int y, int ptr, int color)
424INLINE void odyssey2_draw_char(bitmap_t *bitmap, UINT8 bg[][320], int x, int y, int ptr, int color)
425425{
426426    int n, i;
427427    int offset = ptr | ((color & 1) << 8);
src/mess/video/apple2.c
r1807r1808
9595   textual character
9696-------------------------------------------------*/
9797
98INLINE void apple2_plot_text_character(mame_bitmap *bitmap, int xpos, int ypos, int xscale, UINT32 code,
98INLINE void apple2_plot_text_character(bitmap_t *bitmap, int xpos, int ypos, int xscale, UINT32 code,
9999   const UINT8 *textgfx_data, UINT32 textgfx_datalen, UINT32 my_a2)
100100{
101101   int x, y, i;
r1807r1808
142142   column or 80 column)
143143-------------------------------------------------*/
144144
145static void apple2_text_draw(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int page, int beginrow, int endrow)
145static void apple2_text_draw(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int page, int beginrow, int endrow)
146146{
147147   int row, col;
148148   UINT32 start_address = (page ? 0x0800 : 0x0400);
r1807r1808
182182    apple2_lores_draw - renders lo-res text
183183-------------------------------------------------*/
184184
185static void apple2_lores_draw(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int page, int beginrow, int endrow)
185static void apple2_lores_draw(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int page, int beginrow, int endrow)
186186{
187187   int row, col, y, x;
188188   UINT8 code;
r1807r1808
265265
266266struct drawtask_params
267267{
268   mame_bitmap *bitmap;
268   bitmap_t *bitmap;
269269   const UINT8 *vram;
270270   int beginrow;
271271   int rowcount;
r1807r1808
274274
275275static void apple2_hires_draw_task(struct drawtask_params *dtparams)
276276{
277   mame_bitmap *bitmap;
277   bitmap_t *bitmap;
278278   const UINT8 *vram;
279279   int beginrow;
280280   int endrow;
r1807r1808
352352   }
353353}
354354
355static void apple2_hires_draw(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect, int page, int beginrow, int endrow)
355static void apple2_hires_draw(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int page, int beginrow, int endrow)
356356{
357357   struct drawtask_params dtparams;
358358
src/mess/video/tms3556.c
r1807r1808
531531
532532   draw a line.  If non-interlaced mode, duplicate the line.
533533*/
534static void tms3556_draw_line(mame_bitmap *bmp, int line)
534static void tms3556_draw_line(bitmap_t *bmp, int line)
535535{
536536   int double_lines;
537537   UINT16 *ln, *ln2 = NULL;
src/mess/video/primo.c
r1807r1808
1515UINT16 primo_video_memory_base;
1616
1717
18static void primo_draw_scanline(mame_bitmap *bitmap, int primo_scanline)
18static void primo_draw_scanline(bitmap_t *bitmap, int primo_scanline)
1919{
2020   int x, i;
2121   UINT8 data;
src/mess/video/ted7360.c
r1807r1808
505505
506506static UINT16 c16_bitmap[2], bitmapmulti[4], mono[2], monoinversed[2], multi[4], ecmcolor[2], colors[5];
507507
508static mame_bitmap *ted7360_bitmap;
508static bitmap_t *ted7360_bitmap;
509509static int rasterline = 0, lastline = 0;
510510static double rastertime;
511511static void ted7360_drawlines (int first, int last);
src/mess/video/vc4000.c
r1807r1808
6666      } d;
6767   } reg;
6868
69   mame_bitmap *bitmap;
69   bitmap_t *bitmap;
7070} vc4000_video =
7171{
7272   {
r1807r1808
255255   "iiiihhhhgggg"
256256};
257257
258static void vc4000_draw_digit(mame_bitmap *bitmap, int x, int y, int d, int line)
258static void vc4000_draw_digit(bitmap_t *bitmap, int x, int y, int d, int line)
259259{
260260   static const int digit_to_segment[0x10]={
261261   0x0fff, 0x007c, 0x17df, 0x15ff, 0x1c7d, 0x1df7, 0x1ff7, 0x007f, 0x1fff, 0x1dff
r1807r1808
282282}
283283
284284
285static void vc4000_sprite_update(mame_bitmap *bitmap, UINT8 *collision, SPRITE *This)
285static void vc4000_sprite_update(bitmap_t *bitmap, UINT8 *collision, SPRITE *This)
286286{
287287
288288   int i,j,m;
src/mess/video/733_asr.c
r1807r1808
6565
6666   void (*int_callback)(int state);
6767
68   mame_bitmap *bitmap;
68   bitmap_t *bitmap;
6969} asr[MAX_ASR];
7070
7171enum
r1807r1808
427427/*
428428   Video refresh
429429*/
430void asr733_refresh(mame_bitmap *bitmap, int unit, int x, int y)
430void asr733_refresh(bitmap_t *bitmap, int unit, int x, int y)
431431{
432432   copybitmap(bitmap, asr[unit].bitmap, 0, 0, x, y, &Machine->screen[0].visarea);
433433}
src/mess/video/cdp1861.c
r1807r1808
33#include "cpu/cdp1802/cdp1802.h"
44#include "video/cdp1861.h"
55
6static mame_bitmap *cdptmpbitmap;
6static bitmap_t *cdptmpbitmap;
77
88static emu_timer *cdp1861_int_timer;
99static emu_timer *cdp1861_efx_timer;
src/mess/video/bbc.c
r1807r1808
5050static UINT16 *BBC_display_right;
5151
5252// this is a more global variable to store the bitmap variable passed in in the bbc_vh_screenrefresh function
53static mame_bitmap *BBC_bitmap;
53static bitmap_t *BBC_bitmap;
5454
5555// this is the X and Y screen location in emulation pixels of the next pixels to be drawn
5656static int y_screen_pos;
src/mess/video/733_asr.h
r1807r1808
3434 READ8_HANDLER(asr733_0_cru_r);
3535WRITE8_HANDLER(asr733_0_cru_w);
3636
37void asr733_refresh(mame_bitmap *bitmap, int unit, int x, int y);
37void asr733_refresh(bitmap_t *bitmap, int unit, int x, int y);
3838
3939void asr733_keyboard(int unit);
4040
src/mess/video/kc.c
r1807r1808
114114
115115
116116/* draw 8 pixels */
117static void kc85_draw_8_pixels(mame_bitmap *bitmap,int x,int y, unsigned char colour_byte, unsigned char gfx_byte)
117static void kc85_draw_8_pixels(bitmap_t *bitmap,int x,int y, unsigned char colour_byte, unsigned char gfx_byte)
118118{
119119   int a;
120120   int background_pen;
r1807r1808
270270struct video_update_state
271271{
272272   /* bitmap to render to */
273   mame_bitmap *bitmap;
273   bitmap_t *bitmap;
274274   /* grab colour and pixel information for 8-pixels referenced by x,y coordinate */
275275   void (*pixel_grab_callback)(struct grab_info *,int x,int y, unsigned char *colour_ptr, unsigned char *pixel_ptr);
276276   /* current coords */
r1807r1808
490490
491491/* the kc85 screen is 320 pixels wide and 256 pixels tall */
492492/* if we assume a 50hz display, there are 312 lines for the complete frame, leaving 56 lines not visible */
493static void kc85_common_process_frame(mame_bitmap *bitmap, void (*pixel_grab_callback)(struct grab_info *,int x,int y,unsigned char *, unsigned char *),struct grab_info *grab_data)
493static void kc85_common_process_frame(bitmap_t *bitmap, void (*pixel_grab_callback)(struct grab_info *,int x,int y,unsigned char *, unsigned char *),struct grab_info *grab_data)
494494{
495495   int cycles_remaining_in_frame = KC85_CYCLES_PER_FRAME;
496496
r1807r1808
647647
648648
649649/***************************************************************************
650  Draw the game screen in the given mame_bitmap.
650  Draw the game screen in the given bitmap_t.
651651  Do NOT call osd_update_display() from this function,
652652  it will be called by the main emulation engine.
653653***************************************************************************/
r1807r1808
726726}
727727
728728/***************************************************************************
729  Draw the game screen in the given mame_bitmap.
729  Draw the game screen in the given bitmap_t.
730730  Do NOT call osd_update_display() from this function,
731731  it will be called by the main emulation engine.
732732***************************************************************************/
src/mess/machine/nes.c
r1807r1808
204204   UINT16 pix = 0;
205205   rgb_t col;
206206   UINT8 r, g, b;
207   extern mame_bitmap *nes_zapper_hack;
207   extern bitmap_t *nes_zapper_hack;
208208
209209   if (nes_zapper_hack)
210210      pix = *BITMAP_ADDR16(nes_zapper_hack, input->i2, input->i1);
src/mess/machine/genesis.c
r1807r1808
129129{
130130   UINT32 *destline;
131131   int i;
132   mame_bitmap *bitmap = tmpbitmap;
132   bitmap_t *bitmap = tmpbitmap;
133133
134134   destline = BITMAP_ADDR32(bitmap, line, 0);
135135
src/mess/mscommon.c
r1807r1808
8383   return term;
8484}
8585
86void terminal_draw(mame_bitmap *dest, const rectangle *cliprect, struct terminal *terminal)
86void terminal_draw(bitmap_t *dest, const rectangle *cliprect, struct terminal *terminal)
8787{
8888   current_terminal = terminal;
8989   tilemap_draw(dest, cliprect, terminal->tm, 0, 0);
r1807r1808
176176
177177***************************************************************************/
178178
179void draw_led(mame_bitmap *bitmap, const char *led, int valueorcolor, int x, int y)
179void draw_led(bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y)
180180{
181181   char c;
182182   int i, xi, yi, mask, color;
src/mess/drivers/tm990189.c
r1807r1808
263263   segment_state[digitsel] |= ~segment;
264264}
265265
266static void update_common(mame_bitmap *bitmap,
266static void update_common(bitmap_t *bitmap,
267267                     int display_x, int display_y,
268268                     int LED14_x, int LED14_y,
269269                     int LED56_x, int LED56_y,
src/mess/drivers/apexc.c
r1807r1808
445445#define APEXC_PALETTE_SIZE ARRAY_LENGTH(apexc_palette)
446446#define APEXC_COLORTABLE_SIZE sizeof(apexc_colortable)/2
447447
448static mame_bitmap *apexc_bitmap;
448static bitmap_t *apexc_bitmap;
449449
450450enum
451451{
r1807r1808
494494}
495495
496496/* draw a small 8*8 LED (well, there were no LEDs at the time, so let's call this a lamp ;-) ) */
497static void apexc_draw_led(mame_bitmap *bitmap, int x, int y, int state)
497static void apexc_draw_led(bitmap_t *bitmap, int x, int y, int state)
498498{
499499   int xx, yy;
500500
r1807r1808
504504}
505505
506506/* write a single char on screen */
507static void apexc_draw_char(mame_bitmap *bitmap, char character, int x, int y, int color)
507static void apexc_draw_char(bitmap_t *bitmap, char character, int x, int y, int color)
508508{
509509   drawgfx(bitmap, Machine->gfx[0], character-32, color, 0, 0,
510510            x+1, y, &Machine->screen[0].visarea, TRANSPARENCY_PEN, 0);
511511}
512512
513513/* write a string on screen */
514static void apexc_draw_string(mame_bitmap *bitmap, const char *buf, int x, int y, int color)
514static void apexc_draw_string(bitmap_t *bitmap, const char *buf, int x, int y, int color)
515515{
516516   while (* buf)
517517   {
src/mess/drivers/x68k.c
r1807r1808
154154
155155static UINT8 mfp_key;
156156
157extern mame_bitmap* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
158extern mame_bitmap* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
159extern mame_bitmap* x68k_gfx_1_bitmap_16;
160extern mame_bitmap* x68k_gfx_2_bitmap_16;
161extern mame_bitmap* x68k_gfx_3_bitmap_16;
162extern mame_bitmap* x68k_gfx_0_bitmap_256;  // 256 colour, 512x512, 2 pages
163extern mame_bitmap* x68k_gfx_1_bitmap_256;
164extern mame_bitmap* x68k_gfx_0_bitmap_65536;  // 65536 colour, 512x512, 1 page
157extern bitmap_t* x68k_text_bitmap;  // 1024x1024 4x1bpp planes text
158extern bitmap_t* x68k_gfx_0_bitmap_16;  // 16 colour, 512x512, 4 pages
159extern bitmap_t* x68k_gfx_1_bitmap_16;
160extern bitmap_t* x68k_gfx_2_bitmap_16;
161extern bitmap_t* x68k_gfx_3_bitmap_16;
162extern bitmap_t* x68k_gfx_0_bitmap_256;  // 256 colour, 512x512, 2 pages
163extern bitmap_t* x68k_gfx_1_bitmap_256;
164extern bitmap_t* x68k_gfx_0_bitmap_65536;  // 65536 colour, 512x512, 1 page
165165
166166extern tilemap* x68k_bg0_8;  // two 64x64 tilemaps, 8x8 characters
167167extern tilemap* x68k_bg1_8;
src/mess/drivers/einstein.c
r1807r1808
16311631  127*262 = 33274 cycles per frame, vsync len 375 cycles
16321632*/
16331633
1634//static void einstein_80col_plot_char_line(int x,int y, mame_bitmap *bitmap)
1634//static void einstein_80col_plot_char_line(int x,int y, bitmap_t *bitmap)
16351635//{
16361636//  int w;
16371637//  if (Einstein_DE)
src/mess/drivers/coupe.c
r1807r1808
4242
4343static INTERRUPT_GEN( coupe_line_interrupt )
4444{
45   mame_bitmap *bitmap = tmpbitmap;
45   bitmap_t *bitmap = tmpbitmap;
4646   int interrupted=0;   /* This is used to allow me to clear the STAT flag (easiest way I can do it!) */
4747
4848   HPEN = CURLINE;
src/mess/mscommon.h
r1807r1808
2828   int (*getcursorcode)(int original_code),
2929   int num_cols, int num_rows);
3030
31void terminal_draw(mame_bitmap *dest, const rectangle *cliprect,
31void terminal_draw(bitmap_t *dest, const rectangle *cliprect,
3232   struct terminal *terminal);
3333void terminal_putchar(struct terminal *terminal, int x, int y, int ch);
3434int terminal_getchar(struct terminal *terminal, int x, int y);
r1807r1808
5252 * the value of 'valueorcolor' is a mask when lowercase letters are in the led
5353 * string or is a color when '1' characters are in the led string
5454 */
55void draw_led(mame_bitmap *bitmap, const char *led, int valueorcolor, int x, int y);
55void draw_led(bitmap_t *bitmap, const char *led, int valueorcolor, int x, int y);
5656
5757/* a radius two led:
5858 *

Previous 15994 Revisions Next


© 1998-2018 The MESS Team