According to WDC, the W65C22N is a "drop-in" replacement for the older VIA chips and should be compatible. The W65C22S version is not.
Thanks for the tip, with that in mind I started digging through the WDC datasheet. It looks to me like the biggest differences are that,
- S variant is fabbed with CMOS and thus can be clocked faster than the N variant
- S variant has a "bus holding device" on the data pins while the N variant does not
- S variant has a different on-die IRQB circuit than the vintage and N variants, but WDC states you can wire an external diode to the IRQB pin on the S variant to make it behave like the N
- S variant does not have current limiting resistors on the output pins while the N variant does, but a footnote in the datasheet suggests you can use external limiting resistors to make it behave like the N
So yeah, it looks like the S variant may not be a 100% compatible drop-in, but it may be possible to use the S variant anyway with enough external support components. At least I have a scope and a logic analyzer?
Now to find out if the 6522s in my scrap alarm boards are the S or the N variants...
For future study:
https://www.eevblog.com/forum/beginners/combining-open-drain-and-totem-pole-outputs/