Skip to content

Commit a372ead

Browse files
authored
Merge pull request cc65#2334 from carlo-bramini/fix-sim65-1
[SIM65] Support undocumented opcodes for 6502
2 parents 081d18f + b04d79b commit a372ead

File tree

5 files changed

+1807
-927
lines changed

5 files changed

+1807
-927
lines changed

asminc/cpu.mac

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CPU_ISET_4510 = $0400
1515
CPU_NONE = CPU_ISET_NONE
1616
CPU_6502 = CPU_ISET_6502
1717
CPU_6502X = CPU_ISET_6502|CPU_ISET_6502X
18-
CPU_6502DTV = CPU_ISET_6502|CPU_ISET_6502X|CPU_ISET_6502DTV
18+
CPU_6502DTV = CPU_ISET_6502|CPU_ISET_6502DTV
1919
CPU_65SC02 = CPU_ISET_6502|CPU_ISET_65SC02
2020
CPU_65C02 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65C02
2121
CPU_65816 = CPU_ISET_6502|CPU_ISET_65SC02|CPU_ISET_65816

libsrc/sim6502/exehdr.s

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,21 @@
99
.import __MAIN_START__
1010
.import startup
1111

12+
.macpack cpu
13+
1214
.segment "EXEHDR"
1315

1416
.byte $73, $69, $6D, $36, $35 ; 'sim65'
1517
.byte 2 ; header version
16-
.byte .defined(__SIM65C02__) ; CPU type
18+
.if (.cpu .bitand ::CPU_ISET_6502X)
19+
.byte 2
20+
.elseif (.cpu .bitand ::CPU_ISET_65C02)
21+
.byte 1
22+
.elseif (.cpu .bitand ::CPU_ISET_6502)
23+
.byte 0
24+
.else
25+
.error Unknow CPU type.
26+
.endif
1727
.byte sp ; sp address
1828
.addr __MAIN_START__ ; load address
1929
.addr startup ; reset address

0 commit comments

Comments
 (0)