Lines Matching refs:offset
190 int offset; in vga_get_pixel() local
195 offset = (y * vd->gc_width / 8) + (x / 8); in vga_get_pixel()
198 data = (((vd->vga_ram[offset + 0 * 64*KB] >> bit) & 0x1) << 0) | in vga_get_pixel()
199 (((vd->vga_ram[offset + 1 * 64*KB] >> bit) & 0x1) << 1) | in vga_get_pixel()
200 (((vd->vga_ram[offset + 2 * 64*KB] >> bit) & 0x1) << 2) | in vga_get_pixel()
201 (((vd->vga_ram[offset + 3 * 64*KB] >> bit) & 0x1) << 3); in vga_get_pixel()
223 int offset; in vga_render_graphics() local
225 offset = y * vd->gc_width + x; in vga_render_graphics()
226 vd->gc_image->data[offset] = vga_get_pixel(vd, x, y); in vga_render_graphics()
234 int dots, offset, bit, font_offset; in vga_get_text_pixel() local
240 offset = 2 * vd->vga_crtc.crtc_start_addr; in vga_get_text_pixel()
241 offset += (y / 16 * vd->gc_width / dots) * 2 + (x / dots) * 2; in vga_get_text_pixel()
245 ch = vd->vga_ram[offset + 0 * 64*KB]; in vga_get_text_pixel()
246 attr = vd->vga_ram[offset + 1 * 64*KB]; in vga_get_text_pixel()
249 (offset == (vd->vga_crtc.crtc_cursor_loc * 2)) && in vga_get_text_pixel()
286 int offset; in vga_render_text() local
288 offset = y * vd->gc_width + x; in vga_render_text()
289 vd->gc_image->data[offset] = vga_get_text_pixel(vd, x, y); in vga_render_text()
319 int offset; in vga_mem_rd_handler() local
321 offset = addr; in vga_mem_rd_handler()
327 if (offset >= 0xa0000) { in vga_mem_rd_handler()
328 offset -=0xa0000; in vga_mem_rd_handler()
329 offset &= (128 * KB - 1); in vga_mem_rd_handler()
339 if (offset >= 0xa0000) { in vga_mem_rd_handler()
340 offset -=0xa0000; in vga_mem_rd_handler()
341 offset &= (64 * KB - 1); in vga_mem_rd_handler()
351 if (offset >= 0xb0000) { in vga_mem_rd_handler()
352 offset -=0xb0000; in vga_mem_rd_handler()
353 offset &= (32 * KB - 1); in vga_mem_rd_handler()
363 if (offset >= 0xb8000) { in vga_mem_rd_handler()
364 offset -=0xb8000; in vga_mem_rd_handler()
365 offset &= (32 * KB - 1); in vga_mem_rd_handler()
374 vd->vga_gc.gc_latch0 = vd->vga_ram[offset + 0*64*KB]; in vga_mem_rd_handler()
375 vd->vga_gc.gc_latch1 = vd->vga_ram[offset + 1*64*KB]; in vga_mem_rd_handler()
376 vd->vga_gc.gc_latch2 = vd->vga_ram[offset + 2*64*KB]; in vga_mem_rd_handler()
377 vd->vga_gc.gc_latch3 = vd->vga_ram[offset + 3*64*KB]; in vga_mem_rd_handler()
387 map_sel |= (offset & 1); in vga_mem_rd_handler()
388 offset &= ~1; in vga_mem_rd_handler()
392 offset += map_sel * 64*KB; in vga_mem_rd_handler()
394 return (vd->vga_ram[offset]); in vga_mem_rd_handler()
406 int offset; in vga_mem_wr_handler() local
408 offset = addr; in vga_mem_wr_handler()
414 if (offset >= 0xa0000) { in vga_mem_wr_handler()
415 offset -=0xa0000; in vga_mem_wr_handler()
416 offset &= (128 * KB - 1); in vga_mem_wr_handler()
426 if (offset >= 0xa0000) { in vga_mem_wr_handler()
427 offset -=0xa0000; in vga_mem_wr_handler()
428 offset &= (64 * KB - 1); in vga_mem_wr_handler()
438 if (offset >= 0xb0000) { in vga_mem_wr_handler()
439 offset -=0xb0000; in vga_mem_wr_handler()
440 offset &= (32 * KB - 1); in vga_mem_wr_handler()
450 if (offset >= 0xb8000) { in vga_mem_wr_handler()
451 offset -=0xb8000; in vga_mem_wr_handler()
452 offset &= (32 * KB - 1); in vga_mem_wr_handler()
649 if (offset & 1) { in vga_mem_wr_handler()
650 offset &= ~1; in vga_mem_wr_handler()
652 vd->vga_ram[offset + 1*64*KB] = c1; in vga_mem_wr_handler()
654 vd->vga_ram[offset + 3*64*KB] = c3; in vga_mem_wr_handler()
657 vd->vga_ram[offset + 0*64*KB] = c0; in vga_mem_wr_handler()
659 vd->vga_ram[offset + 2*64*KB] = c2; in vga_mem_wr_handler()
663 vd->vga_ram[offset + 0*64*KB] = c0; in vga_mem_wr_handler()
665 vd->vga_ram[offset + 1*64*KB] = c1; in vga_mem_wr_handler()
667 vd->vga_ram[offset + 2*64*KB] = c2; in vga_mem_wr_handler()
669 vd->vga_ram[offset + 3*64*KB] = c3; in vga_mem_wr_handler()
1369 uint64_t offset, int size, uint64_t value) in vga_ioport_write() argument
1374 port = offset; in vga_ioport_write()
1389 uint64_t offset, int size) in vga_ioport_read() argument
1396 port = offset; in vga_ioport_read()
1413 uint64_t offset, int size, uint64_t value) in vga_vbe_write() argument
1417 p = (uint8_t *)&(vga->vberegs) + offset; in vga_vbe_write()
1431 switch (offset) { in vga_vbe_write()
1466 uint64_t offset, int size) in vga_vbe_read() argument
1471 p = (uint8_t *)&(vga->vberegs) + offset; in vga_vbe_read()