GARTHWILSON wrote:
kc5tja suggested the C64's 6510 because internally it's the same processor and searching the C64 material would likely get you what you're looking for. I understand that Berkeley Softworks used the undocumented op codes when they wrote GEOS for the C64.
Memblers also understood what you wanted, and gave the link to his site which in turn has plenty of good stuff for you. Three of the links I found there dealing with undocumented op codes are:
http://nesdev.parodius.com/undocumented_opcodes.txthttp://nesdev.parodius.com/extra_instructions.txthttp://nesdev.parodius.com/6502_cpu.txtThese unofficial op codes however really should only be used for legacy code and hardware. If you want a more powerful 6502, you'll do much better to use the CMOS version (expecially WDC's, which are being made today), or the 65816.
Thanks for the information. After long research, I found the source of a bug on Ultima I on my Apple ][ emulator and sure enough, it was caused by an undocumented opcode. So, I decided to implement them on my underlying 6502 emulator.
However, looking at the links above, I see conflicting information with regards to status flags. For example, for opcodes $83, $87, $8F, $93
Document 1 claims that:
AAX (SAX) [AXS]
AND X register with accumulator and store result in memory. Status flags: N,Z
Document 2 claims that:
AXS *** (SAX)
AXS ANDs the contents of the A and X registers (without changing the contents of either register) and stores the result in memory.
AXS does not affect any flags in the processor status register.
Document 1 is not clear if the accumulator is affected and claims flags N and Z are. Document 2 however is more clear, claims accumulator is not affected and no flags are affected. I am thinking on using document 2 for my emulation, just wondering if there is anything updated and more streamlined by now ?