25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_vga.c,v 1.75 2005/06/26 11:43:48 debug Exp $ |
* $Id: dev_vga.c,v 1.77 2005/07/15 07:34:06 debug Exp $ |
29 |
* |
* |
30 |
* VGA charcell and graphics device. |
* VGA charcell and graphics device. |
31 |
* |
* |
476 |
vga_update_cursor(cpu->machine, d); |
vga_update_cursor(cpu->machine, d); |
477 |
|
|
478 |
/* TODO: text vs graphics tick? */ |
/* TODO: text vs graphics tick? */ |
479 |
memory_device_bintrans_access(cpu, cpu->mem, extra, &low, &high); |
memory_device_dyntrans_access(cpu, cpu->mem, extra, &low, &high); |
480 |
|
|
481 |
if ((int64_t)low != -1) { |
if ((int64_t)low != -1) { |
482 |
debug("[ dev_vga_tick: bintrans access, %llx .. %llx ]\n", |
debug("[ dev_vga_tick: bintrans access, %llx .. %llx ]\n", |
1190 |
} |
} |
1191 |
|
|
1192 |
d->fb = dev_fb_init(machine, mem, VGA_FB_ADDR, VFB_GENERIC, |
d->fb = dev_fb_init(machine, mem, VGA_FB_ADDR, VFB_GENERIC, |
1193 |
d->fb_max_x, d->fb_max_y, d->fb_max_x, d->fb_max_y, 24, "VGA", 0); |
d->fb_max_x, d->fb_max_y, d->fb_max_x, d->fb_max_y, 24, "VGA"); |
1194 |
d->fb_size = d->fb_max_x * d->fb_max_y * 3; |
d->fb_size = d->fb_max_x * d->fb_max_y * 3; |
1195 |
|
|
1196 |
reset_palette(d, 0); |
reset_palette(d, 0); |
1197 |
|
|
1198 |
/* MEM_BINTRANS_WRITE_OK <-- This works with OpenBSD/arc, but not |
/* MEM_DYNTRANS_WRITE_OK <-- This works with OpenBSD/arc, but not |
1199 |
with Windows NT yet. Why? */ |
with Windows NT yet. Why? */ |
1200 |
memory_device_register(mem, "vga_charcells", videomem_base + 0x18000, |
memory_device_register(mem, "vga_charcells", videomem_base + 0x18000, |
1201 |
allocsize, dev_vga_access, d, MEM_BINTRANS_OK | |
allocsize, dev_vga_access, d, MEM_DYNTRANS_OK | |
1202 |
MEM_READING_HAS_NO_SIDE_EFFECTS, d->charcells); |
MEM_READING_HAS_NO_SIDE_EFFECTS, d->charcells); |
1203 |
memory_device_register(mem, "vga_gfx", videomem_base, GFX_ADDR_WINDOW, |
memory_device_register(mem, "vga_gfx", videomem_base, GFX_ADDR_WINDOW, |
1204 |
dev_vga_graphics_access, d, MEM_DEFAULT | |
dev_vga_graphics_access, d, MEM_DEFAULT | |