I still don't quite get it; how are you going to configure this map without another working computer, and if you have that computer and a means of dumping RAM and ROM, why would you need a 2K granularity? When E mentions a 1 byte granularity so you can reprogram 1 byte, why would you want to? Just change that byte in your 4K (or 2K) image and replace it all.
I guess I'm a little confused myself... In the theoretical board being described there already is another computer: a microcontroller. (Gubbish's choice would be an ATmega.) The idea of this board is rather than requiring the user to program an EPROM with a specific BASIC version (or specific extension/diagnostic ROMs) a single RAM chip is used to selectively replace both RAM and ROM. The ROM images would be stored as files on a micro SD card, and when the PET is powered up the microcontroller will initialize, copy the ROM contents into the correct locations in the onboard RAM, and then reset the CPU. (This would easily let someone, for instance, try multiple BASIC versions, or use the same board in CRTC or non-CRTC PETs.) The reason the idea of a "Mapping RAM" comes up is how to implement the other functionality of the Nicolas board, IE, selective read/write through to motherboard components, page write protection, etc, in an equally soft-configurable way.
For the record, I agree that one-byte resolution is serious overkill. I was just tossing that out there as a "here, you could just do it with two identical RAM chips for a pretty board layout" thought experiment. A perfect size would probably be a 256x4. You'd get four chip selects out of it, more than enough, and 256 byte resolution, enough to, say, only override the zero and one pages of RAM to facilitate running a diagnostic program.
Maybe what I need is a sample scenario of how this would actually be used to debug a PET with a bad RAM or ROM chip, a bad data and/or address buffer, etc., that would not require a PC and need less than 4K granularity?
Without an attached PC it's just as useful as the Nicolas board and more. Since the ROM programming and memory mapping could be completely customized merely by rewriting a config file on the SD card the user could step-by-step run through a series of diagnostic routines which exercise the address lines and data lines (run this while wielding an oscilloscope), test motherboard memory, checksum motherboard ROMs, any number of things.
(Here *is* actually an instance where one byte resolution might be useful, if it were included. You could, for instance, configure a memory map where a 6502 diagnostic program is mapped into empty memory space like 0xA000 and the only part of the system board ROM space that is overridden by the user is the couple of bytes at the top of ROM which hold the power-on RESET vector. That would let the CPU jump straight to the diagnostic program while still allowing it the access to checksum almost everything, including 99.9% of the KERNEL ROM. You could also override a bare minimum of the zero and one memory pages, enough to provide workspace for a complex diagnostic routine, while leaving all the rest of the system memory mapped through for testing.)
A board like this would also be good for development purposes. Having it in a PET would let a programmer develop a completely new 6502 OS from scratch using a cross-compiler on a modern PC and trivially test it by writing a couple files to a card.
In the end, granted, you still need a PC to write ROM images and config files to the MicroSD card, but that certainly doesn't require a PC be powered on in the same room as the PET mechanic. If this is a hangup and you *really* don't want to require another computer to change out what diagnostic routines you're running for a given power-on cycle then I don't see any alternative to having to include some sort of UI with buttons or switches on the board itself, which suddenly makes it much more expensive and complicated.
(Or... I guess, is you could have a program running on the MCU which, using a timer, would step through a series of different memory map and ROM settings, allowing each 6502 diagnostic to run for X number of seconds, after which it would halt the CPU, reprogram memory and passthrough settings, and reset for the next diagnostic.)
And if you're replacing RAM and ROM and have a serial or USB connection to another computer, why not make it into a real ICE while you're t it?
Honestly I sort of agree that the "dump memory contents" bit might be... reaching, and I think you probably are sneaking up on the level of complexity of a full-blown ICE by including it. Frankly I just don't know how trivial it really would be for an ATmega to do the required signal generation at the CPU socket in real time. That seems substantially less easy to me than its other tasks of preloading the contents of a couple of RAM chips and controlling CPU reset. But maybe it's a piece of cake, I don't know.
No, I just meant that while you're building this main RAM/ROM replacement we'll also need the equivalent of Nicolas' and equivalent video RAM replacement board.
That's a separate article, and really needs to remain one. Short of doing something really ugly with a jumper cable there's really no way of incorporating a video RAM replacement onto the same board.