1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-15 11:05:56 +00:00
cc65/asminc/cpu.mac
Carlo Bramini b04d79b1da [SIM65] Support undocumented opcodes for 6502
This PR is mostly a complete rewrite of the emulator for 6502/65c02 opcodes.
It provides an easier to maintain implementation of the instructions, by using few macros rather than having hand-written code for each function.
All undocumented, previously missing opcodes for 6502 are also implemented.
The patch also includes a detailed documentation of those opcodes, for reference to developers.
This PR should fix one of the milestones listed here for the next version of CC65:

https://github.com/cc65/wiki/wiki/Before-the-next-release
2024-02-08 12:13:17 +01:00

25 lines
922 B
Plaintext

; CPU bitmask constants
CPU_ISET_NONE = $0001
CPU_ISET_6502 = $0002
CPU_ISET_6502X = $0004
CPU_ISET_6502DTV = $0008
CPU_ISET_65SC02 = $0010
CPU_ISET_65C02 = $0020
CPU_ISET_65816 = $0040
CPU_ISET_SWEET16 = $0080
CPU_ISET_HUC6280 = $0100
;CPU_ISET_M740 = $0200 not actually implemented
CPU_ISET_4510 = $0400
; CPU capabilities
CPU_NONE = CPU_ISET_NONE
CPU_6502 = CPU_ISET_6502
CPU_6502X = CPU_ISET_6502|CPU_ISET_6502X
CPU_6502DTV = CPU_ISET_6502|CPU_ISET_6502DTV
CPU_65SC02 = CPU_ISET_6502|CPU_ISET_65SC02
CPU_65C02 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02
CPU_65816 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65816
CPU_SWEET16 = CPU_ISET_SWEET16
CPU_HUC6280 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_HUC6280
CPU_4510 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02|CPU_ISET_4510