3 ms·
> Only documented 6507 instructions were disassembled, since we reasoned that use of undocumented instructions would have been rare, and this avoided having a n
by MegaDeKay 3y ago
> Only documented 6507 instructions were disassembled, since we reasoned that use of undocumented instructions would have been rare, and this avoided having a number of data values being erroneously interpreted as instructions.
This assumption jumped out at me. The 2600 programmers were pulling every trick in the book to crunch code size down and squeeze every cycle they could out of that 6507. How well those illegal opcodes [0] might have been understood back at this time is another question. They were apparently used in NES games [1] but that console obviously came later.
[0] https://www.masswerk.at/nowgobang/2021/6502-illegal-opcodes https://www.masswerk.at/nowgobang/2021/6502-illegal-opcodes
[1] https://www.nesdev.org/wiki/CPU_unofficial_opcodes https://www.nesdev.org/wiki/CPU_unofficial_opcodes
- JohnFen 3y agoGood catch. > How well those illegal opcodes [0] might have been understood back at this time is another question. I'd be willing to bet they were understood very well. Lots of people back at that time spent a lot of effort looking for and characterizing undocumented opcodes for pretty much every processor that was in use. I was one of them! Is the 6507 identical with the 6502 from an opcode perspective? It's also possible that there weren't any really useful undocumented opcodes on that particular processor. Most of them weren't, they were just side-effects of how the processor parsed the instructions.
- MegaDeKay 3y ago> Is the 6507 identical with the 6502 from an opcode perspective? Yes, I believe so. The differences were in the packaging - simplified to lower costs. "The main differences between 6502 and 6507 is that the 6507 has less address lines so it can only address 8K instead of 64K and it also lacks the IRQ# and NMI# interrupt lines." https://forums.atariage.com/topic/199454-programming-asm-for-6502-vs-6507-questions/ https://forums.atariage.com/topic/199454-programming-asm-for... But I found this bit from the NESDev wiki I linked above very interesting: "Most NMOS 6502 cores interpret them the same way, although there are slight differences with the less stable instructions. CMOS variants of the 6502 handle them completely differently, and later CPUs in the same family (e.g. 65C02, HuC6280, 65C816) were free to implement new instructions in the place of the unused ones."