I think a couple of undocumented (illegal) op-codes might stop the 6502. If one of your ROMs is corrupt and accidentally includes some bad op-codes, it could cause interesting things to happen.
Anders,
I found this on a website that explains why the "KIL" instruction opcodes will stop the 6502:
The KIL Opcodes
There are many “KIL” opcodes, i.e. opcodes that stop the CPU, so that it can only recover using a RESET, and not even an IRQ or an NMI.
In order to understand this, let’s look at the different states an instruction can be in. After the instruction fetch, the CPU is in cycle T1. It will feed the opcode and the cycle number into the PLA and cause the rest of the CPU to carry out whatever has to be done in this cycle, according to the PLA. Then it will shift the T bitfield left by one, so the T2 line will be “1″, then line T3 and so on. There are seven T lines total, T1 to T7. At the end of each instruction, the PLA causes the T bitfield to reset, so that the next instruction starts with T1=1 again.
But what happens if T does not get reset? This can happen if in all seven states of T, no line fires that actually belongs to an instruction that ends at this cycle. T gets shifted left until state T7, in which another shift left will just shift the 1 bit out of T – all bits of T will be zero then, so no PLA line can fire any more.
All interrupt and NMI requests are always delayed until the current instruction is finished, i.e. until T gets reset. But since T never gets reset, all interrupts and NMIs are effectively disabled.
http://www.pagetable.com/?p=39
The following $x2 op-codes should work:
$82 (DOP #$nn = undocumented NOP that takes 2 clock cycles)
$A2 (LDX #$nn = official instruction)
$C2 (DOP #$nn = undocumented NOP that takes 2 clock cycles)
$E2 (DOP #$nn = undocumented NOP that takes 2 clock cycles)
My favorite 'illegal' instruction is "LAX" an instruction that loads the accumulator and the X register at the same time. It is said that gamers used some of these instructions to speed up their code.
-Dave