Thanks for taking a look. > On Jul 4, 2026, at 3:30 PM, Mark Cave-Ayland <[email protected]> > wrote: > > This doesn't look right: in general we should avoid accessing a device state > struct directly unless it is absolutely unavoidable.
I'll handle this as part of switching to a GPIO (below). > Can you move this into a separate via1_swim_update(v1s) function as done for > the rtc and adb devices as below? If possible I'd like to minimise the > per-device logic in mos6522_q800_via1_write(). Yup, will do. > Given that SWIM2 is also a TYPE_DEVICE, you should be able to expose the sel > signal as a GPIO on the SWIM2 device in a similar way as to how "nubus-irq" > is defined in mos6522_q800_via2_init() but with just 1 signal. This allows > you to connect the signal with qdev_connect_gpio_out() (see hw/m68k/q800.c) > and drive it using the qemu IRQ functions, which should avoid having to > reference the SWIM2 device itself directly at all. Good idea -- I'll switch over to using a GPIO to drive this for v4. Matt
