Re: Yet another sbc without a parallel rom
Posted: Tue Oct 17, 2023 5:06 am
Proxy wrote:
... but even when you do choose the SPI EEROM, you could still hook it's pins to a VIA or similar to allow the CPU to access the ROM and program itself. ...
________________________
gfoot wrote:
... Jeff posted an example circuit to drive such EEPROMs here, which I think he's tested: viewtopic.php?p=76975#p76975 He had to use a delay circuit to send the right signal to the EEPROMs - I think some other brands of EEPROM wouldn't require that though. ...
Now, if in this context the data is read into daisychained A0-A5 address and D0-D7 data shift registers, the contents of the serial ROM (plus /BE to the CPU and pull up resisters on A6-A15) takes care of address generation. If the serial shift registers are cleared at the beginning of each pair of bytes, a high bit in the address byte data can mark the end of a pair of bytes which can directly trigger the data write state machine.
And the SO pin of the Flash ROM is high impedance while the command and address are being fed into the Serial ROM. So if there is a pulldown resister to ground on the Serial ROM SO line, the ADDR/DATA shift registers will be fed $0000 until SO starts to be driven by data. That means there will be no frame marker, and the write cycle will not be triggered, so the data write USR's can just run free on the serial clock tied to the serial ROM.
The same start pulse that starts the counter can be tied to the USR /clear pins, so they will have $0000 at the outset, and the Address USR Q7 output will simply stay low until a complete valid address and data have been loaded into the shift registers. So there is no need to count through the 32 cycles it takes to finish loading the command and address and start reading data.
I'm not a hardware hand, so I'd be nervous doing the write generation Jeff's way. I think I would count them, even if it adds another glue logic IC in the form of a presettable countdown counter, plus a gate from a quad OR. Input the serial clock and the Q4 of the presettable countdown timer into the OR gate and use that as the countdown clock. /PRELOAD loads a value less than $8, so it brings Q4 low, passing the clock through to the counter, until the counter wraps around to $F, bringing Q4 high, halting the timer until the next /PRELOAD. Q4 connects to the serial ROM SI as the command and address data..
Finally, for sanity, the byte at effective address $FFFFFF, the top of the final page in the final block, is written as $00, so the first marked address byte is at $000000, and the final block never need be re-written when loading a new first stage bootload routine. The payload for the full 64 bytes to $FFC0-$FFFF is 130 bytes ... an address/framing byte for each data byte, and a final $C000 to carry the end of payload bit6 high. And since each data byte travels with its own address, there is no need for padding in the payload.