Revision 3023f332 hw/musicpal.c
b/hw/musicpal.c | ||
---|---|---|
752 | 752 |
int page; |
753 | 753 |
int page_off; |
754 | 754 |
DisplayState *ds; |
755 |
QEMUConsole *console; |
|
756 | 755 |
uint8_t video_ram[128*64/8]; |
757 | 756 |
} musicpal_lcd_state; |
758 | 757 |
|
... | ... | |
906 | 905 |
musicpal_lcd_write |
907 | 906 |
}; |
908 | 907 |
|
909 |
static void musicpal_lcd_init(DisplayState *ds, uint32_t base)
|
|
908 |
static void musicpal_lcd_init(uint32_t base) |
|
910 | 909 |
{ |
911 | 910 |
musicpal_lcd_state *s; |
912 | 911 |
int iomemtype; |
... | ... | |
914 | 913 |
s = qemu_mallocz(sizeof(musicpal_lcd_state)); |
915 | 914 |
if (!s) |
916 | 915 |
return; |
917 |
s->ds = ds; |
|
918 | 916 |
iomemtype = cpu_register_io_memory(0, musicpal_lcd_readfn, |
919 | 917 |
musicpal_lcd_writefn, s); |
920 | 918 |
cpu_register_physical_memory(base, MP_LCD_SIZE, iomemtype); |
921 | 919 |
|
922 |
s->console = graphic_console_init(ds, lcd_refresh, lcd_invalidate,
|
|
923 |
NULL, NULL, s);
|
|
924 |
qemu_console_resize(s->console, 128*3, 64*3);
|
|
920 |
s->ds = graphic_console_init(lcd_refresh, lcd_invalidate,
|
|
921 |
NULL, NULL, s); |
|
922 |
qemu_console_resize(s->ds, 128*3, 64*3);
|
|
925 | 923 |
} |
926 | 924 |
|
927 | 925 |
/* PIC register offsets */ |
... | ... | |
1404 | 1402 |
}; |
1405 | 1403 |
|
1406 | 1404 |
static void musicpal_init(ram_addr_t ram_size, int vga_ram_size, |
1407 |
const char *boot_device, DisplayState *ds,
|
|
1405 |
const char *boot_device, |
|
1408 | 1406 |
const char *kernel_filename, const char *kernel_cmdline, |
1409 | 1407 |
const char *initrd_filename, const char *cpu_model) |
1410 | 1408 |
{ |
... | ... | |
1470 | 1468 |
} |
1471 | 1469 |
mv88w8618_flashcfg_init(MP_FLASHCFG_BASE); |
1472 | 1470 |
|
1473 |
musicpal_lcd_init(ds, MP_LCD_BASE);
|
|
1471 |
musicpal_lcd_init(MP_LCD_BASE); |
|
1474 | 1472 |
|
1475 | 1473 |
qemu_add_kbd_event_handler(musicpal_key_event, pic[MP_GPIO_IRQ]); |
1476 | 1474 |
|
Also available in: Unified diff