diff --git a/asminc/cpu.mac b/asminc/cpu.mac index c66641078..728c99262 100644 --- a/asminc/cpu.mac +++ b/asminc/cpu.mac @@ -12,6 +12,8 @@ CPU_ISET_HUC6280 = $0100 CPU_ISET_M740 = $0200 CPU_ISET_4510 = $0400 CPU_ISET_45GS02 = $0800 +CPU_ISET_W65C02 = $1000 +CPU_ISET_65CE02 = $2000 ; CPU capabilities ; make sure to only combine the instruction sets that are 100% compatible @@ -31,3 +33,5 @@ CPU_HUC6280 = CPU_ISET_HUC6280 | CPU_ISET_6502 | CPU_ISET_65C02 CPU_4510 = CPU_ISET_4510 | CPU_ISET_6502 | CPU_ISET_65C02 CPU_45GS02 = CPU_ISET_45GS02 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_4510 CPU_M740 = CPU_ISET_M740 | CPU_ISET_6502 +CPU_W65C02 = CPU_ISET_W65C02 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02 +CPU_65CE02 = CPU_ISET_65CE02 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02 diff --git a/src/common/cpu.c b/src/common/cpu.c index 54bb8a3fb..31fa8d7bf 100644 --- a/src/common/cpu.c +++ b/src/common/cpu.c @@ -56,14 +56,16 @@ const char* CPUNames[CPU_COUNT] = { "6502", "6502X", "6502DTV", - "65SC02", - "65C02", + "65SC02", /* the original CMOS instruction set */ + "65C02", /* CMOS with Rockwell extensions */ "65816", "sweet16", "huc6280", "m740", "4510", "45GS02" + "W65C02", /* CMOS with WDC extensions */ + "65CE02", /* CMOS with GTE extensions */ }; /* Tables with CPU instruction sets @@ -84,8 +86,10 @@ const unsigned CPUIsets[CPU_COUNT] = { CPU_ISET_M740 | CPU_ISET_6502, /* 4510 does NOT have indirect-zp (without z), so we can not use 65SC02 */ /* FIXME: 4510 does not have wai/stp */ - CPU_ISET_4510 | CPU_ISET_6502 | CPU_ISET_65C02, - CPU_ISET_45GS02 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_4510, + CPU_ISET_4510 | CPU_ISET_6502 | CPU_ISET_65C02, + CPU_ISET_45GS02 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_4510, + CPU_ISET_W65C02 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02, + CPU_ISET_65CE02 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02, }; diff --git a/src/common/cpu.h b/src/common/cpu.h index 81795e146..0784600f7 100644 --- a/src/common/cpu.h +++ b/src/common/cpu.h @@ -51,14 +51,16 @@ typedef enum { CPU_6502, CPU_6502X, /* "Extended", that is: with illegal opcodes */ CPU_6502DTV, /* CPU_6502 + DTV extra and illegal opcodes */ - CPU_65SC02, - CPU_65C02, + CPU_65SC02, /* the original CMOS instruction set */ + CPU_65C02, /* CMOS with Rockwell extensions */ CPU_65816, CPU_SWEET16, CPU_HUC6280, /* Used in PC engine */ CPU_M740, /* Mitsubishi 740 series MCUs */ CPU_4510, /* CPU of C65 */ CPU_45GS02, /* CPU of MEGA65 */ + CPU_W65C02, /* CMOS with WDC extensions */ + CPU_65CE02, /* CMOS with GTE extensions */ CPU_COUNT /* Number of different CPUs */ } cpu_t; @@ -75,7 +77,9 @@ enum { CPU_ISET_HUC6280 = 1 << CPU_HUC6280, CPU_ISET_M740 = 1 << CPU_M740, CPU_ISET_4510 = 1 << CPU_4510, - CPU_ISET_45GS02 = 1 << CPU_45GS02 + CPU_ISET_45GS02 = 1 << CPU_45GS02, + CPU_ISET_W65C02 = 1 << CPU_W65C02, + CPU_ISET_65CE02 = 1 << CPU_65CE02 }; /* CPU used */