diff options
author | Hervé Poussineau <hpoussin@reactos.org> | 2011-08-26 21:20:12 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-08-27 17:03:30 +0000 |
commit | 97a3f6ffbba66250d9a6f1ba7f8444f6bb8c6676 (patch) | |
tree | 92a2a8ae997236cb3ef7acc9ea30ec930f4802d8 /hw/mips_jazz.c | |
parent | b213b37072e2eb3e3d13f2a3064e8876f00ce1a0 (diff) |
g364fb: convert to qdev
Extract G364 ROM contents from device emulation to machine emulation,
so device emulation can be reused in other machines (Commodore Amiga)
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/mips_jazz.c')
-rw-r--r-- | hw/mips_jazz.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c index 84ce0613a3..f3c9f93204 100644 --- a/hw/mips_jazz.c +++ b/hw/mips_jazz.c @@ -195,7 +195,20 @@ void mips_jazz_init (ram_addr_t ram_size, /* Video card */ switch (jazz_model) { case JAZZ_MAGNUM: - g364fb_mm_init(0x40000000, 0x60000000, 0, rc4030[3]); + dev = qdev_create(NULL, "sysbus-g364"); + qdev_init_nofail(dev); + sysbus = sysbus_from_qdev(dev); + sysbus_mmio_map(sysbus, 0, 0x60080000); + sysbus_mmio_map(sysbus, 1, 0x40000000); + sysbus_connect_irq(sysbus, 0, rc4030[3]); + { + /* Simple ROM, so user doesn't have to provide one */ + ram_addr_t rom_offset = qemu_ram_alloc(NULL, "g364fb.rom", 0x80000); + uint8_t *rom = qemu_get_ram_ptr(rom_offset); + cpu_register_physical_memory(0x60000000, 0x80000, + rom_offset | IO_MEM_ROM); + rom[0] = 0x10; /* Mips G364 */ + } break; case JAZZ_PICA61: isa_vga_mm_init(0x40000000, 0x60000000, 0, get_system_memory()); |