Revision 95219897 hw/tcx.c
b/hw/tcx.c | ||
---|---|---|
37 | 37 |
uint8_t dac_index, dac_state; |
38 | 38 |
} TCXState; |
39 | 39 |
|
40 |
static void tcx_screen_dump(void *opaque, const char *filename); |
|
41 |
|
|
40 | 42 |
static void tcx_draw_line32(TCXState *s1, uint8_t *d, |
41 | 43 |
const uint8_t *s, int width) |
42 | 44 |
{ |
... | ... | |
81 | 83 |
|
82 | 84 |
/* Fixed line length 1024 allows us to do nice tricks not possible on |
83 | 85 |
VGA... */ |
84 |
void tcx_update_display(void *opaque) |
|
86 |
static void tcx_update_display(void *opaque)
|
|
85 | 87 |
{ |
86 | 88 |
TCXState *ts = opaque; |
87 | 89 |
uint32_t page; |
... | ... | |
158 | 160 |
} |
159 | 161 |
} |
160 | 162 |
|
161 |
void tcx_invalidate_display(void *opaque) |
|
163 |
static void tcx_invalidate_display(void *opaque)
|
|
162 | 164 |
{ |
163 | 165 |
TCXState *s = opaque; |
164 | 166 |
int i; |
... | ... | |
269 | 271 |
tcx_dac_writel, |
270 | 272 |
}; |
271 | 273 |
|
272 |
void *tcx_init(DisplayState *ds, uint32_t addr, uint8_t *vram_base,
|
|
273 |
unsigned long vram_offset, int vram_size, int width, int height)
|
|
274 |
void tcx_init(DisplayState *ds, uint32_t addr, uint8_t *vram_base, |
|
275 |
unsigned long vram_offset, int vram_size, int width, int height) |
|
274 | 276 |
{ |
275 | 277 |
TCXState *s; |
276 | 278 |
int io_memory; |
277 | 279 |
|
278 | 280 |
s = qemu_mallocz(sizeof(TCXState)); |
279 | 281 |
if (!s) |
280 |
return NULL;
|
|
282 |
return; |
|
281 | 283 |
s->ds = ds; |
282 | 284 |
s->addr = addr; |
283 | 285 |
s->vram = vram_base; |
... | ... | |
289 | 291 |
io_memory = cpu_register_io_memory(0, tcx_dac_read, tcx_dac_write, s); |
290 | 292 |
cpu_register_physical_memory(addr + 0x200000, TCX_DAC_NREGS, io_memory); |
291 | 293 |
|
294 |
graphic_console_init(s->ds, tcx_update_display, tcx_invalidate_display, |
|
295 |
tcx_screen_dump, s); |
|
292 | 296 |
register_savevm("tcx", addr, 1, tcx_save, tcx_load, s); |
293 | 297 |
qemu_register_reset(tcx_reset, s); |
294 | 298 |
tcx_reset(s); |
295 | 299 |
dpy_resize(s->ds, width, height); |
296 |
return s; |
|
297 | 300 |
} |
298 | 301 |
|
299 |
void tcx_screen_dump(void *opaque, const char *filename) |
|
302 |
static void tcx_screen_dump(void *opaque, const char *filename)
|
|
300 | 303 |
{ |
301 | 304 |
TCXState *s = opaque; |
302 | 305 |
FILE *f; |
Also available in: Unified diff