Lines Matching +full:1 +full:- +full:d

25 static inline void vga_draw_glyph_line(uint8_t *d, uint32_t font_data,  in vga_draw_glyph_line()  argument
28 ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol; in vga_draw_glyph_line()
29 ((uint32_t *)d)[1] = (-((font_data >> 6) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
30 ((uint32_t *)d)[2] = (-((font_data >> 5) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
31 ((uint32_t *)d)[3] = (-((font_data >> 4) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
32 ((uint32_t *)d)[4] = (-((font_data >> 3) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
33 ((uint32_t *)d)[5] = (-((font_data >> 2) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
34 ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
35 ((uint32_t *)d)[7] = (-((font_data >> 0) & 1) & xorcol) ^ bgcol; in vga_draw_glyph_line()
38 static void vga_draw_glyph8(uint8_t *d, int linesize, in vga_draw_glyph8() argument
47 vga_draw_glyph_line(d, font_data, xorcol, bgcol); in vga_draw_glyph8()
49 d += linesize; in vga_draw_glyph8()
50 } while (--h); in vga_draw_glyph8()
53 static void vga_draw_glyph16(uint8_t *d, int linesize, in vga_draw_glyph16() argument
62 vga_draw_glyph_line(d, expand4to8[font_data >> 4], in vga_draw_glyph16()
64 vga_draw_glyph_line(d + 32, expand4to8[font_data & 0x0f], in vga_draw_glyph16()
67 d += linesize; in vga_draw_glyph16()
68 } while (--h); in vga_draw_glyph16()
71 static void vga_draw_glyph9(uint8_t *d, int linesize, in vga_draw_glyph9() argument
80 ((uint32_t *)d)[0] = (-((font_data >> 7)) & xorcol) ^ bgcol; in vga_draw_glyph9()
81 ((uint32_t *)d)[1] = (-((font_data >> 6) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
82 ((uint32_t *)d)[2] = (-((font_data >> 5) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
83 ((uint32_t *)d)[3] = (-((font_data >> 4) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
84 ((uint32_t *)d)[4] = (-((font_data >> 3) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
85 ((uint32_t *)d)[5] = (-((font_data >> 2) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
86 ((uint32_t *)d)[6] = (-((font_data >> 1) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
87 v = (-((font_data >> 0) & 1) & xorcol) ^ bgcol; in vga_draw_glyph9()
88 ((uint32_t *)d)[7] = v; in vga_draw_glyph9()
90 ((uint32_t *)d)[8] = v; in vga_draw_glyph9()
92 ((uint32_t *)d)[8] = bgcol; in vga_draw_glyph9()
94 d += linesize; in vga_draw_glyph9()
95 } while (--h); in vga_draw_glyph9()
101 static void *vga_draw_line2(VGACommonState *vga, uint8_t *d, in vga_draw_line2() argument
107 palette = vga->last_palette; in vga_draw_line2()
108 plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; in vga_draw_line2()
112 d = vga->panning_buf; in vga_draw_line2()
116 data = vga_read_dword_le(vga, addr & (VGA_VRAM_SIZE - 1)); in vga_draw_line2()
120 ((uint32_t *)d)[0] = palette[v >> 12]; in vga_draw_line2()
121 ((uint32_t *)d)[1] = palette[(v >> 8) & 0xf]; in vga_draw_line2()
122 ((uint32_t *)d)[2] = palette[(v >> 4) & 0xf]; in vga_draw_line2()
123 ((uint32_t *)d)[3] = palette[(v >> 0) & 0xf]; in vga_draw_line2()
125 v = expand2[GET_PLANE(data, 1)]; in vga_draw_line2()
127 ((uint32_t *)d)[4] = palette[v >> 12]; in vga_draw_line2()
128 ((uint32_t *)d)[5] = palette[(v >> 8) & 0xf]; in vga_draw_line2()
129 ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf]; in vga_draw_line2()
130 ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf]; in vga_draw_line2()
131 d += 32; in vga_draw_line2()
134 return hpel ? vga->panning_buf + 4 * hpel : NULL; in vga_draw_line2()
137 #define PUT_PIXEL2(d, n, v) \ argument
138 ((uint32_t *)d)[2*(n)] = ((uint32_t *)d)[2*(n)+1] = (v)
143 static void *vga_draw_line2d2(VGACommonState *vga, uint8_t *d, in vga_draw_line2d2() argument
149 palette = vga->last_palette; in vga_draw_line2d2()
150 plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; in vga_draw_line2d2()
154 d = vga->panning_buf; in vga_draw_line2d2()
158 data = vga_read_dword_le(vga, addr & (VGA_VRAM_SIZE - 1)); in vga_draw_line2d2()
162 PUT_PIXEL2(d, 0, palette[v >> 12]); in vga_draw_line2d2()
163 PUT_PIXEL2(d, 1, palette[(v >> 8) & 0xf]); in vga_draw_line2d2()
164 PUT_PIXEL2(d, 2, palette[(v >> 4) & 0xf]); in vga_draw_line2d2()
165 PUT_PIXEL2(d, 3, palette[(v >> 0) & 0xf]); in vga_draw_line2d2()
167 v = expand2[GET_PLANE(data, 1)]; in vga_draw_line2d2()
169 PUT_PIXEL2(d, 4, palette[v >> 12]); in vga_draw_line2d2()
170 PUT_PIXEL2(d, 5, palette[(v >> 8) & 0xf]); in vga_draw_line2d2()
171 PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]); in vga_draw_line2d2()
172 PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]); in vga_draw_line2d2()
173 d += 64; in vga_draw_line2d2()
176 return hpel ? vga->panning_buf + 8 * hpel : NULL; in vga_draw_line2d2()
182 static void *vga_draw_line4(VGACommonState *vga, uint8_t *d, in vga_draw_line4() argument
188 palette = vga->last_palette; in vga_draw_line4()
189 plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; in vga_draw_line4()
193 d = vga->panning_buf; in vga_draw_line4()
197 data = vga_read_dword_le(vga, addr & (VGA_VRAM_SIZE - 1)); in vga_draw_line4()
200 v |= expand4[GET_PLANE(data, 1)] << 1; in vga_draw_line4()
203 ((uint32_t *)d)[0] = palette[v >> 28]; in vga_draw_line4()
204 ((uint32_t *)d)[1] = palette[(v >> 24) & 0xf]; in vga_draw_line4()
205 ((uint32_t *)d)[2] = palette[(v >> 20) & 0xf]; in vga_draw_line4()
206 ((uint32_t *)d)[3] = palette[(v >> 16) & 0xf]; in vga_draw_line4()
207 ((uint32_t *)d)[4] = palette[(v >> 12) & 0xf]; in vga_draw_line4()
208 ((uint32_t *)d)[5] = palette[(v >> 8) & 0xf]; in vga_draw_line4()
209 ((uint32_t *)d)[6] = palette[(v >> 4) & 0xf]; in vga_draw_line4()
210 ((uint32_t *)d)[7] = palette[(v >> 0) & 0xf]; in vga_draw_line4()
211 d += 32; in vga_draw_line4()
214 return hpel ? vga->panning_buf + 4 * hpel : NULL; in vga_draw_line4()
220 static void *vga_draw_line4d2(VGACommonState *vga, uint8_t *d, in vga_draw_line4d2() argument
226 palette = vga->last_palette; in vga_draw_line4d2()
227 plane_mask = mask16[vga->ar[VGA_ATC_PLANE_ENABLE] & 0xf]; in vga_draw_line4d2()
231 d = vga->panning_buf; in vga_draw_line4d2()
235 data = vga_read_dword_le(vga, addr & (VGA_VRAM_SIZE - 1)); in vga_draw_line4d2()
238 v |= expand4[GET_PLANE(data, 1)] << 1; in vga_draw_line4d2()
241 PUT_PIXEL2(d, 0, palette[v >> 28]); in vga_draw_line4d2()
242 PUT_PIXEL2(d, 1, palette[(v >> 24) & 0xf]); in vga_draw_line4d2()
243 PUT_PIXEL2(d, 2, palette[(v >> 20) & 0xf]); in vga_draw_line4d2()
244 PUT_PIXEL2(d, 3, palette[(v >> 16) & 0xf]); in vga_draw_line4d2()
245 PUT_PIXEL2(d, 4, palette[(v >> 12) & 0xf]); in vga_draw_line4d2()
246 PUT_PIXEL2(d, 5, palette[(v >> 8) & 0xf]); in vga_draw_line4d2()
247 PUT_PIXEL2(d, 6, palette[(v >> 4) & 0xf]); in vga_draw_line4d2()
248 PUT_PIXEL2(d, 7, palette[(v >> 0) & 0xf]); in vga_draw_line4d2()
249 d += 64; in vga_draw_line4d2()
252 return hpel ? vga->panning_buf + 8 * hpel : NULL; in vga_draw_line4d2()
260 static void *vga_draw_line8d2(VGACommonState *vga, uint8_t *d, in vga_draw_line8d2() argument
266 palette = vga->last_palette; in vga_draw_line8d2()
267 hpel = (hpel >> 1) & 3; in vga_draw_line8d2()
282 d = vga->panning_buf; in vga_draw_line8d2()
286 addr &= VGA_VRAM_SIZE - 1; in vga_draw_line8d2()
287 PUT_PIXEL2(d, 0, palette[vga_read_byte(vga, addr + 0)]); in vga_draw_line8d2()
288 PUT_PIXEL2(d, 1, palette[vga_read_byte(vga, addr + 1)]); in vga_draw_line8d2()
289 PUT_PIXEL2(d, 2, palette[vga_read_byte(vga, addr + 2)]); in vga_draw_line8d2()
290 PUT_PIXEL2(d, 3, palette[vga_read_byte(vga, addr + 3)]); in vga_draw_line8d2()
291 d += 32; in vga_draw_line8d2()
294 return hpel ? vga->panning_buf + 8 * hpel : NULL; in vga_draw_line8d2()
302 static void *vga_draw_line8(VGACommonState *vga, uint8_t *d, in vga_draw_line8() argument
308 palette = vga->last_palette; in vga_draw_line8()
309 hpel = (hpel >> 1) & 3; in vga_draw_line8()
312 d = vga->panning_buf; in vga_draw_line8()
316 ((uint32_t *)d)[0] = palette[vga_read_byte(vga, addr + 0)]; in vga_draw_line8()
317 ((uint32_t *)d)[1] = palette[vga_read_byte(vga, addr + 1)]; in vga_draw_line8()
318 ((uint32_t *)d)[2] = palette[vga_read_byte(vga, addr + 2)]; in vga_draw_line8()
319 ((uint32_t *)d)[3] = palette[vga_read_byte(vga, addr + 3)]; in vga_draw_line8()
320 ((uint32_t *)d)[4] = palette[vga_read_byte(vga, addr + 4)]; in vga_draw_line8()
321 ((uint32_t *)d)[5] = palette[vga_read_byte(vga, addr + 5)]; in vga_draw_line8()
322 ((uint32_t *)d)[6] = palette[vga_read_byte(vga, addr + 6)]; in vga_draw_line8()
323 ((uint32_t *)d)[7] = palette[vga_read_byte(vga, addr + 7)]; in vga_draw_line8()
324 d += 32; in vga_draw_line8()
327 return hpel ? vga->panning_buf + 4 * hpel : NULL; in vga_draw_line8()
333 static void *vga_draw_line15_le(VGACommonState *vga, uint8_t *d, in vga_draw_line15_le() argument
345 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line15_le()
347 d += 4; in vga_draw_line15_le()
348 } while (--w != 0); in vga_draw_line15_le()
352 static void *vga_draw_line15_be(VGACommonState *vga, uint8_t *d, in vga_draw_line15_be() argument
364 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line15_be()
366 d += 4; in vga_draw_line15_be()
367 } while (--w != 0); in vga_draw_line15_be()
374 static void *vga_draw_line16_le(VGACommonState *vga, uint8_t *d, in vga_draw_line16_le() argument
386 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line16_le()
388 d += 4; in vga_draw_line16_le()
389 } while (--w != 0); in vga_draw_line16_le()
393 static void *vga_draw_line16_be(VGACommonState *vga, uint8_t *d, in vga_draw_line16_be() argument
405 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line16_be()
407 d += 4; in vga_draw_line16_be()
408 } while (--w != 0); in vga_draw_line16_be()
415 static void *vga_draw_line24_le(VGACommonState *vga, uint8_t *d, in vga_draw_line24_le() argument
424 g = vga_read_byte(vga, addr + 1); in vga_draw_line24_le()
426 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line24_le()
428 d += 4; in vga_draw_line24_le()
429 } while (--w != 0); in vga_draw_line24_le()
433 static void *vga_draw_line24_be(VGACommonState *vga, uint8_t *d, in vga_draw_line24_be() argument
442 g = vga_read_byte(vga, addr + 1); in vga_draw_line24_be()
444 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line24_be()
446 d += 4; in vga_draw_line24_be()
447 } while (--w != 0); in vga_draw_line24_be()
454 static void *vga_draw_line32_le(VGACommonState *vga, uint8_t *d, in vga_draw_line32_le() argument
463 g = vga_read_byte(vga, addr + 1); in vga_draw_line32_le()
465 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line32_le()
467 d += 4; in vga_draw_line32_le()
468 } while (--w != 0); in vga_draw_line32_le()
472 static void *vga_draw_line32_be(VGACommonState *vga, uint8_t *d, in vga_draw_line32_be() argument
480 r = vga_read_byte(vga, addr + 1); in vga_draw_line32_be()
483 ((uint32_t *)d)[0] = rgb_to_pixel32(r, g, b); in vga_draw_line32_be()
485 d += 4; in vga_draw_line32_be()
486 } while (--w != 0); in vga_draw_line32_be()