Revision c60e08d9 hw/tcx.c
b/hw/tcx.c | ||
---|---|---|
36 | 36 |
typedef struct TCXState { |
37 | 37 |
target_phys_addr_t addr; |
38 | 38 |
DisplayState *ds; |
39 |
QEMUConsole *console; |
|
39 | 40 |
uint8_t *vram; |
40 | 41 |
uint32_t *vram24, *cplane; |
41 | 42 |
ram_addr_t vram_offset, vram24_offset, cplane_offset; |
... | ... | |
186 | 187 |
|
187 | 188 |
if (ts->ds->depth == 0) |
188 | 189 |
return; |
189 |
if (ts->ds->width != ts->width || ts->ds->height != ts->height) |
|
190 |
dpy_resize(ts->ds, ts->width, ts->height); |
|
191 | 190 |
page = ts->vram_offset; |
192 | 191 |
y_start = -1; |
193 | 192 |
page_min = 0xffffffff; |
... | ... | |
266 | 265 |
|
267 | 266 |
if (ts->ds->depth != 32) |
268 | 267 |
return; |
269 |
if (ts->ds->width != ts->width || ts->ds->height != ts->height) |
|
270 |
dpy_resize(ts->ds, ts->width, ts->height); |
|
271 | 268 |
page = ts->vram_offset; |
272 | 269 |
page24 = ts->vram24_offset; |
273 | 270 |
cpage = ts->cplane_offset; |
... | ... | |
541 | 538 |
s->cplane = (uint32_t *)vram_base; |
542 | 539 |
s->cplane_offset = vram_offset; |
543 | 540 |
cpu_register_physical_memory(addr + 0x0a000000ULL, size, vram_offset); |
544 |
graphic_console_init(s->ds, tcx24_update_display, |
|
545 |
tcx24_invalidate_display, |
|
546 |
tcx24_screen_dump, NULL, s); |
|
541 |
s->console = graphic_console_init(s->ds, tcx24_update_display,
|
|
542 |
tcx24_invalidate_display,
|
|
543 |
tcx24_screen_dump, NULL, s);
|
|
547 | 544 |
} else { |
548 | 545 |
cpu_register_physical_memory(addr + 0x00300000ULL, TCX_THC_NREGS_8, |
549 | 546 |
dummy_memory); |
550 |
graphic_console_init(s->ds, tcx_update_display, tcx_invalidate_display, |
|
551 |
tcx_screen_dump, NULL, s); |
|
547 |
s->console = graphic_console_init(s->ds, tcx_update_display, |
|
548 |
tcx_invalidate_display, |
|
549 |
tcx_screen_dump, NULL, s); |
|
552 | 550 |
} |
553 | 551 |
// NetBSD writes here even with 8-bit display |
554 | 552 |
cpu_register_physical_memory(addr + 0x00301000ULL, TCX_THC_NREGS_24, |
... | ... | |
557 | 555 |
register_savevm("tcx", addr, 4, tcx_save, tcx_load, s); |
558 | 556 |
qemu_register_reset(tcx_reset, s); |
559 | 557 |
tcx_reset(s); |
560 |
dpy_resize(s->ds, width, height);
|
|
558 |
qemu_console_resize(s->console, width, height);
|
|
561 | 559 |
} |
562 | 560 |
|
563 | 561 |
static void tcx_screen_dump(void *opaque, const char *filename) |
Also available in: Unified diff