Here's a first draft proof of concept expanding on comments from the SPI bootloader discussion; moved to to allow comments without further cluttering that thread.
The parts are basically what I've got on hand at the moment, and so are not optimal; in particular the memory would be better as a single 64k part which would both increase speed and simplify the decoding.
The memory map uses the entire 64k for RAM with the exception of an I/O hole at 0xfe00-feff; the VIA is mapped into the lower half of that.
On boot, the STM holds
ndisable low which prevents the RAM from outputing data and provides the boot code as a sequence of bytes on the databus in the form
Code:
lda #xx
sta $llhh
and releasing the data bus to allow the processor to write the byte just delivered to the address requested. At the end of the boot sequence,
ndisable is released high and the processor reset to allow normal operation from the contents of ram.
The STM provides eight bits of data, the
ndisable control, and
rst, ph0, irq and
nmi to the system.
Power is provided via an FTDI USB/serial connector cable; regulated to 3v3 by a choice of either a linear or a switch mode supply (I want to play). This cable also carries serial data to and from the UART on the STM.
The VIA provides an interface to the STM's SPI1 port; the STM then acts as an SPI-UART adaptor (code still to be written but I expect to include a buffer or 32 or 64 bytes with CTS/RTS interfacing performed automatically by the STM.
Note that the STM is a 3v3 part; some of the I/O ports are 5v tolerant but I haven't investigated yet which so at the moment everything runs at 3v3.
Circuit parts are generic; expect 74HC and 3v3 ram.
Did I miss anything obvious? This is still likely to change, particularly around the 3v3/5v split.
Neil