fix instruction set bits set by the compiler. in particular do not set the 65SC02 bit for 4510/45GS02, else we get clashes with sta(zp)

This commit is contained in:
mrdudz
2025-06-24 21:39:39 +02:00
parent d374ea2cde
commit d6cc893940
2 changed files with 18 additions and 12 deletions

View File

@@ -66,20 +66,26 @@ const char* CPUNames[CPU_COUNT] = {
"45GS02"
};
/* Tables with CPU instruction sets */
/* Tables with CPU instruction sets
* NOTE: make sure to only combine the instruction sets that are 100% compatible
*/
const unsigned CPUIsets[CPU_COUNT] = {
CPU_ISET_NONE,
CPU_ISET_6502,
CPU_ISET_6502 | CPU_ISET_6502X,
CPU_ISET_6502 | CPU_ISET_6502DTV,
CPU_ISET_6502 | CPU_ISET_65SC02,
CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02,
CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02 | CPU_ISET_65816,
CPU_ISET_6502X | CPU_ISET_6502,
CPU_ISET_6502DTV | CPU_ISET_6502,
CPU_ISET_65SC02 | CPU_ISET_6502,
CPU_ISET_65C02 | CPU_ISET_6502 | CPU_ISET_65SC02,
/* FIXME: does 65816 have both wai/stp and indirect-zp (without z)? */
CPU_ISET_65816 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02,
CPU_ISET_SWEET16,
CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02 | CPU_ISET_HUC6280,
CPU_ISET_6502 | CPU_ISET_M740,
CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02 | CPU_ISET_4510,
CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02 | CPU_ISET_4510 | CPU_ISET_45GS02,
/* FIXME: HUC6280 does not have wai/stp */
CPU_ISET_HUC6280 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02,
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,
};