It's possible instead to write a routine to pre-scramble the binary image file before you burn it into the EPROM.
Do you mean something like this?
http://srecord.sourceforge.net/
No. (Some interesting stuff there, though.) Imagine you're designing a circuit board that includes an EPROM and a CPU. Normally you'd connect d0 of the CPU data bus to d0 of the EPROM, and CPU d1 to EPROM d1 and so on. But imagine that there are physical layout issues, and,
to accommodate the layout you want, you connect...
- CPU d0 to EPROM d4
CPU d1 to EPROM d5
CPU d2 to EPROM d6
CPU d3 to EPROM d7
CPU d4 to EPROM d0
CPU d5 to EPROM d1
CPU d6 to EPROM d2
CPU d7 to EPROM d3
In other words the board wiring causes the CPU to "see" the EPROM data as having its hi and lo nybbles swapped. (It's an unlikely example, but easy to discuss.)
To compensate, the "pre-scramble" is performed on the binary image of the EPROM data before it's blasted into the EPROM. Say the first byte is 34h; it will be replaced with 43h. Say the 2nd byte is 69h; that'll get switched to 96h. And so on -- every byte in the binary image has its nybbles swapped. Then the EPROM is burned and removed from the programming socket. When it's plugged into the socket on your board, the CPU will read the EPROM data as being normal -- ie; the hi and lo nybbles appear back where they belong.
Depending on the layout, you may choose to scramble the address lines instead of the data lines -- or scramble both (but not with each other, of course). The wiring you adopt will determine the pre-scramble you require.
Pre-scrambling yielded an immense advantage when I mod'ed
a dozen bizarre, embedded, discrete-TTL processor boards years ago. My goal was to hack the code, which -- rather inconveniently -- was stored in 82S115 TTL PROMs. I opted to replace the TTL PROMs with EPROMs, but the pinouts matched very poorly! Without the scramble trick I would have had to wire-mod almost all of the 24 pins on every socket. Instead there were only a few.
-- Jeff