1
0
mirror of https://github.com/cc65/cc65.git synced 2026-01-22 17:16:21 +00:00

fix instruction bitfields. 65CE02 derivates can not use 65SC02, because of the zp-ind-z clash

This commit is contained in:
mrdudz
2025-06-28 18:17:13 +02:00
parent 8e4936d68d
commit bf1dbc54fc
2 changed files with 12 additions and 10 deletions

View File

@@ -23,15 +23,18 @@ CPU_6502X = CPU_ISET_6502X | CPU_ISET_6502
CPU_6502DTV = CPU_ISET_6502DTV | CPU_ISET_6502
CPU_65SC02 = CPU_ISET_65SC02 | CPU_ISET_6502
CPU_65C02 = CPU_ISET_65C02 | CPU_ISET_6502 | CPU_ISET_65SC02
CPU_65816 = CPU_ISET_65816 | CPU_ISET_6502 | CPU_ISET_65SC02
CPU_SWEET16 = CPU_ISET_SWEET16
CPU_W65C02 = CPU_ISET_W65C02 | CPU_ISET_6502 | CPU_ISET_65SC02 | CPU_ISET_65C02
; FIXME: CPU_ISET_65SC02 does not apply to the following, because the zp-indirect
; addressing was replaced with zp-indirect,z-indexed in 652SCE02
; NOTE: HUC6280 removes "wai" ($cb) and "stp" ($db) from the 65C02 instruction set
CPU_HUC6280 = CPU_ISET_HUC6280 | CPU_ISET_6502 | CPU_ISET_65C02
; NOTE: 4510 replaces "wai" ($cb) and "stp" ($db) of the 65C02 instruction set
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_4510 = CPU_ISET_4510 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_65CE02
CPU_45GS02 = CPU_ISET_45GS02 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_65CE02 | 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
CPU_65CE02 = CPU_ISET_65CE02 | CPU_ISET_6502 | CPU_ISET_65C02
CPU_65816 = CPU_ISET_65816 | CPU_ISET_6502 | CPU_ISET_65SC02
CPU_SWEET16 = CPU_ISET_SWEET16

View File

@@ -81,15 +81,14 @@ const unsigned CPUIsets[CPU_COUNT] = {
/* 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,
/* 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,
CPU_ISET_4510 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_65CE02,
CPU_ISET_45GS02 | CPU_ISET_6502 | CPU_ISET_65C02 | CPU_ISET_65CE02 | 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,
CPU_ISET_65CE02 | CPU_ISET_6502 | CPU_ISET_65C02,
};