Lines Matching +full:4 +full:kb
46 #define KB (1024UL) macro
127 bool gc_mode_c4; /* chain 4 */
222 data = (((sc->vga_ram[offset + 0 * 64*KB] >> bit) & 0x1) << 0) | in vga_get_pixel()
223 (((sc->vga_ram[offset + 1 * 64*KB] >> bit) & 0x1) << 1) | in vga_get_pixel()
224 (((sc->vga_ram[offset + 2 * 64*KB] >> bit) & 0x1) << 2) | in vga_get_pixel()
225 (((sc->vga_ram[offset + 3 * 64*KB] >> bit) & 0x1) << 3); in vga_get_pixel()
269 ch = sc->vga_ram[offset + 0 * 64*KB]; in vga_get_text_pixel()
270 attr = sc->vga_ram[offset + 1 * 64*KB]; in vga_get_text_pixel()
293 font = sc->vga_ram[font_offset + 2 * 64*KB]; in vga_get_text_pixel()
298 idx = sc->vga_atc.atc_palette[attr >> 4]; in vga_get_text_pixel()
352 offset &= (128 * KB - 1); in vga_mem_rd_handler()
359 offset &= (64 * KB - 1); in vga_mem_rd_handler()
363 * monochrome text mode: base 0xb0000 size 32kb in vga_mem_rd_handler()
368 * color text mode and CGA: base 0xb8000 size 32kb in vga_mem_rd_handler()
371 offset &= (32 * KB - 1); in vga_mem_rd_handler()
376 sc->vga_gc.gc_latch0 = sc->vga_ram[offset + 0*64*KB]; in vga_mem_rd_handler()
377 sc->vga_gc.gc_latch1 = sc->vga_ram[offset + 1*64*KB]; in vga_mem_rd_handler()
378 sc->vga_gc.gc_latch2 = sc->vga_ram[offset + 2*64*KB]; in vga_mem_rd_handler()
379 sc->vga_gc.gc_latch3 = sc->vga_ram[offset + 3*64*KB]; in vga_mem_rd_handler()
393 offset += map_sel * 64*KB; in vga_mem_rd_handler()
413 * extended mode: base 0xa0000 size 128kb in vga_mem_wr_handler()
416 offset &= (128 * KB - 1); in vga_mem_wr_handler()
420 * EGA/VGA mode: base 0xa0000 size 64kb in vga_mem_wr_handler()
423 offset &= (64 * KB - 1); in vga_mem_wr_handler()
427 * monochrome text mode: base 0xb0000 size 32kb in vga_mem_wr_handler()
432 * color text mode and CGA: base 0xb8000 size 32kb in vga_mem_wr_handler()
435 offset &= (32 * KB - 1); in vga_mem_wr_handler()
459 m2 = (set_reset & 4) ? mask : 0x00; in vga_mem_wr_handler()
464 c2 = (enb_set_reset & 4) ? (c2 & ~mask) : (val & mask); in vga_mem_wr_handler()
475 m2 = set_reset & 4 ? 0xff : ~mask; in vga_mem_wr_handler()
480 c2 = enb_set_reset & 4 ? c2 & m2 : val & m2; in vga_mem_wr_handler()
486 m2 = set_reset & 4 ? mask : 0x00; in vga_mem_wr_handler()
491 c2 = enb_set_reset & 4 ? c2 | m2 : val | m2; in vga_mem_wr_handler()
497 m2 = set_reset & 4 ? mask : 0x00; in vga_mem_wr_handler()
502 c2 = enb_set_reset & 4 ? c2 ^ m2 : val ^ m2; in vga_mem_wr_handler()
518 m2 = (val & 4 ? 0xff : 0x00) & mask; in vga_mem_wr_handler()
534 m2 = (val & 4 ? 0xff : 0x00) | ~mask; in vga_mem_wr_handler()
545 m2 = (val & 4 ? 0xff : 0x00) & mask; in vga_mem_wr_handler()
556 m2 = (val & 4 ? 0xff : 0x00) & mask; in vga_mem_wr_handler()
577 m2 = (set_reset & 4 ? 0xff : 0x00) & mask; in vga_mem_wr_handler()
593 m2 = (set_reset & 4 ? 0xff : 0x00) | ~mask; in vga_mem_wr_handler()
604 m2 = (set_reset & 4 ? 0xff : 0x00) & mask; in vga_mem_wr_handler()
615 m2 = (set_reset & 4 ? 0xff : 0x00) & mask; in vga_mem_wr_handler()
631 sc->vga_ram[offset + 1*64*KB] = c1; in vga_mem_wr_handler()
633 sc->vga_ram[offset + 3*64*KB] = c3; in vga_mem_wr_handler()
636 sc->vga_ram[offset + 0*64*KB] = c0; in vga_mem_wr_handler()
637 if (sc->vga_seq.seq_map_mask & 4) in vga_mem_wr_handler()
638 sc->vga_ram[offset + 2*64*KB] = c2; in vga_mem_wr_handler()
642 sc->vga_ram[offset + 0*64*KB] = c0; in vga_mem_wr_handler()
644 sc->vga_ram[offset + 1*64*KB] = c1; in vga_mem_wr_handler()
645 if (sc->vga_seq.seq_map_mask & 4) in vga_mem_wr_handler()
646 sc->vga_ram[offset + 2*64*KB] = c2; in vga_mem_wr_handler()
648 sc->vga_ram[offset + 3*64*KB] = c3; in vga_mem_wr_handler()
665 case 4: in vga_mem_handler()
676 vga_mem_wr_handler(addr + 4, *val >> 32, arg1); in vga_mem_handler()
691 case 4: in vga_mem_handler()
702 *val |= vga_mem_rd_handler(addr + 4, arg1) << 32; in vga_mem_handler()
1069 (val & ATC_CS_C45) << 4; in vga_port_out_handler()
1101 …val & SEQ_CMS_SA) >> SEQ_CMS_SA_SHIFT) * 2) + ((val & SEQ_CMS_SAH) >> SEQ_CMS_SAH_SHIFT)) * 8 * KB; in vga_port_out_handler()
1102 …val & SEQ_CMS_SB) >> SEQ_CMS_SB_SHIFT) * 2) + ((val & SEQ_CMS_SBH) >> SEQ_CMS_SBH_SHIFT)) * 8 * KB; in vga_port_out_handler()
1295 sc->mr.base = 640 * KB; in vga_init()
1296 sc->mr.size = 128 * KB; in vga_init()
1302 sc->vga_ram = malloc(256 * KB); in vga_init()
1303 memset(sc->vga_ram, 0, 256 * KB); in vga_init()