With 4 neighbours, each 6502 would see 4 blocks of 2k RAM, all of which would be shared, but each block shared with a different neighbour. By convention part of each RAM would be private to one side or the other, and part would be shared. The address map might look interesting, being a patchwork, and each patch appearing in a different part of the address map on each side of the shared block.
Code: Select all
+------------------------------------------+
| |
| +---+ |
| | | |
| | +-+--+ +---+ +----+ +---+ +----+ +---+ |
+---+6502| |RAM| |6502| |RAM| |6502| |RAM+-+
| +----+ +---+ +----+ +---+ +----+ +---+
|
| +---+ +---+ +---+
| |RAM| |RAM| |RAM|
| +---+ +---+ +---+
|
| +----+ +---+ +----+ +---+ +----+ +---+
| |6502| |RAM| |6502| |RAM| |6502| |RAM|
| +----+ +---+ +----+ +---+ +----+ +---+
|
| +---+ +---+ +---+
| |RAM| |RAM| |RAM|
| +-+-+ +---+ +---+
| |
+---+
Just maybe, the zero page and stack could be implemented as distributed RAM, and therefore be private. Or maybe there's enough block RAM to have a private block as well as the shared blocks - depends on how big the FPGA is, and how many CPUs to squeeze in. As we know from the Atari 2600 and other efforts, we don't need a full page 0 or page 1 to make a viable machine. Even 64 bytes mapped into both pages can be useful.
As for programming such a network, well that's a software problem!
(The transputer was all about local memory and synchronous communication with up to 4 neighbours over a byte-wide channel, but we don't have an FPGA model for the transputer. It would of course be possible to design a byte-wide channel as a peripheral, but shared memory comes for free.)