For the expansion User Port based on the VIA on an expansion port slot:
PortA: MOSI. PortA7 tied to MOSI, PortA0-PortA6, DNC but set up as outputs, so they work as registers.
PortB:
PortB0-PortB5, /Select0-/Select5
PortB6: "SMASK", this is tied to an AND for Mode0 devices to convert a Mode3 SPI system based on the VIA into a Mode0 SPI bus
PortB7: "/Alert", an input that the SPI device holds low to send a special signal. Note that there are two spare NAND gates in the circuit to implement the Mode0/Mode1/Mode2 support, so if the device raises a line to send a special signal, that can be easily converted to a pull down /Alert.
CA2 is put into Pulse Output mode, and acts as SCLK (the Mode3 internal serial clock). The pulse is one full PHI2 cycle wide, so this particular interface is for SPI servant devices that can handle 4MHz or higher SPI clock (that is a fairly common top end speed for medium-fast SPI chips).
CB2 is the serial shift register input, with the SSR configured as driven by CB1.
CB1 is the serial clock input into the serial shift register. It is tied directly to CA2, not to the SPI_SCLK, since the VIA SR is a Mode3-only MISO.
CPOL is a location in the program memory that is $00 if Mode3/Mode2 is desired, set to %01000000 if Mode0/Mode1 is desired. This works as a mask for TSB/TRB operations to pull the SMASK bit up and put it back down, but only if Mode0/Mode1 operation is desired.
SPI_BYTE: ; Output byte in A, Input Byte returns in A, returns CC if /Alert is not sent, CS if Alert is sent
STA VIA2_PORTA : LDA CPOL : TRB VIA2_PORTB
ASL VIA2_PORTA : ASL VIA2_PORTA : ASL VIA2_PORTA : ASL VIA2_PORTA
ASL VIA2_PORTA : ASL VIA2_PORTA : ASL VIA2_PORTA
LDA CPOL : TRB VIA2_PORTB : LDA VIA2_SR
BIT VIA2_PORTB : BEQ + : CLC : RTS
+ SEC
: RTS I get about 89 clock cycles (90 is alert is sent), so 89.888KB/sec, 719kbps, 4-5 times faster than the I2C bus.
For something like a MAX3001 SPI UART, this seems like it would be plenty fast to run it at very high serial port baud rates. For something like a Raspberry Pi Pico used as a Flash USB drive loader, it would copy fairly large files into the SD card fairly quickly as well as being a quite reasonable "keyring Disk9" to complement the built in SD card Disk8. And stepping up to a RPi Zero-W makes for a budget WiFi internet modem option.