Depending on the complexity, it could be possible to translate the incompatible instructions in hardware with an FPGA. This would allow the original Mac ROM and OS to continue working. If the substituted instruction is shorter than the original 040 code, NOPs can simply be inserted to direct the program counter back to the proper spot. But if the substituted instruction is longer than the original 040 code, things become more complicated pretty fast. You would have to line the program counter back up with a backwards jump and make absolutely sure that the condition codes were preserved. This would cause hiccups in cycle-exact-timed code, I'm not sure if that's a problem or not.
If the only issue is in ROM, it may be easier to fix it in software by opening the ROM, translating it, and burning it to new chips.
If the only issue is in ROM, it may be easier to fix it in software by opening the ROM, translating it, and burning it to new chips.
