aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k/q800.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2021-08-30 11:24:40 +0100
committerLaurent Vivier <laurent@vivier.eu>2021-09-08 15:37:40 +0200
commit5f083d4224d8927b1ce9b0f6d0eaf661c9bd5d51 (patch)
treed3e6460ec3ac28801813061b83edadb300dcd7d1 /hw/m68k/q800.c
parent741258b06cd5fa834fc826c8f308fc18fe1dab35 (diff)
mac_via: move ADB variables to MOS6522Q800VIA1State
The ADB is accessed using clock and data pins on q800 VIA1 port B and so can be moved to MOS6522Q800VIA1State. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210830102447.10806-6-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/m68k/q800.c')
-rw-r--r--hw/m68k/q800.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index ac0a13060b..e14f68f19b 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -225,7 +225,7 @@ static void q800_init(MachineState *machine)
hwaddr parameters_base;
CPUState *cs;
DeviceState *dev;
- DeviceState *via_dev;
+ DeviceState *via_dev, *via1_dev;
DeviceState *escc_orgate;
SysBusESPState *sysbus_esp;
ESPState *esp;
@@ -285,8 +285,8 @@ static void q800_init(MachineState *machine)
qdev_connect_gpio_out_named(DEVICE(sysbus), "irq", 1,
qdev_get_gpio_in(glue, 1));
-
- adb_bus = qdev_get_child_bus(via_dev, "adb.0");
+ via1_dev = DEVICE(MOS6522_Q800_VIA1(&MAC_VIA(via_dev)->mos6522_via1));
+ adb_bus = qdev_get_child_bus(DEVICE(via1_dev), "adb.0");
dev = qdev_new(TYPE_ADB_KEYBOARD);
qdev_realize_and_unref(dev, adb_bus, &error_fatal);
dev = qdev_new(TYPE_ADB_MOUSE);