5 hours ago, BruceMcF said:
Though the easiest way altogether is just use one of the however many User available FlashROM banks, because the selection logic for that is already done.
It would be straightforward to program the kernel to do a Far call to a specific ROM bank entry point based on the startup code stored in the RTC. Indeed, that could be the autostart mechanism ... if nothing is selected, the utility stores the ROM bank entry point for Basic COLD start, if you select autostart, the utility stores the ROM bank entry point for the autostart routine in Kernel, and you can explicitly specify a Far call location to run start-up code stored in a User segment of FlashROM.
BTW, FlashROM segments are 16K.
A parsimonious way to support ROM on an expansion card would to put the bits of the ROM bank out on an eight pin block header, and a ROM expansion card simply has it's own matching pin block header and a ribbon cable, with the specification that bit7 should be high to select external ROM and then bit5&6 select which card is being addressed. That allows 128K ROM per card. Then the extension required to the prototype logic is simply that internal ROM is not selected when bit7 is high ...
... then it's up to the card to detect that the address is in the ROM range at the same time that the high bit of the ROM bank is high, but that's only ROMB7=A15=A14=1, and ROMB5:ROMB6 matches the value in the jumper block.
But I don't know if the game is worth the candle, since with a single User FlashROM segment you can easily have the program support to access 3-wire serial ROM, and if there are enough GPIO free on the Serial Port after supporting the bit banged serial port, you can bit bang one of the serial ROM interfaces and have thee select pins to allow a User port daughter-board with four sockets for 3 wire serial ROM. Ditto on an expansion card, except it includes the VIA ... but same programming, just different I/O space.
And just as easily, a User FlashROM segment can just load a set of RAM segments with code on the SD card, and you have the equivalent effect, with no additional hardware overhead. And the files from the SD card would likely load faster than data from a serial ROM if it uses base I2C or 3-wire Microwire.
I'm making the (perhaps unfounded) assumption that the system ROM banks will all be occupied. If not, then the obvious answer is to flash the system ROM... and hope you don't screw it up. ?
Maybe something like the GGLabs Flash ROM, which sits in a DIP carrier....
https://gglabs.us/node/1933