Merge pull request #2334 from carlo-bramini/fix-sim65-1
[SIM65] Support undocumented opcodes for 6502
This commit is contained in:
2703
src/sim65/6502.c
2703
src/sim65/6502.c
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,8 @@
|
||||
/* Supported CPUs */
|
||||
typedef enum CPUType {
|
||||
CPU_6502,
|
||||
CPU_65C02
|
||||
CPU_65C02,
|
||||
CPU_6502X
|
||||
} CPUType;
|
||||
|
||||
/* Current CPU */
|
||||
|
||||
@@ -177,10 +177,16 @@ static unsigned char ReadProgramFile (void)
|
||||
|
||||
/* Get the CPU type from the file header */
|
||||
if ((Val = fgetc(F)) != EOF) {
|
||||
if (Val != CPU_6502 && Val != CPU_65C02) {
|
||||
switch (Val) {
|
||||
case CPU_6502:
|
||||
case CPU_65C02:
|
||||
case CPU_6502X:
|
||||
CPU = Val;
|
||||
break;
|
||||
|
||||
default:
|
||||
Error ("'%s': Invalid CPU type", ProgramFile);
|
||||
}
|
||||
CPU = Val;
|
||||
}
|
||||
|
||||
/* Get the address of sp from the file header */
|
||||
|
||||
Reference in New Issue
Block a user