mirror of
https://github.com/bradgrantham/apple2e.git
synced 2025-08-15 15:27:22 +00:00
update cpu6502 with Jim's improvements
This commit is contained in:
11
cpu6502.h
11
cpu6502.h
@@ -14,6 +14,12 @@
|
|||||||
void read(int addr, unsigned char data);
|
void read(int addr, unsigned char data);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef CPU6502_H
|
||||||
|
#define CPU6502_H
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
template<class CLK, class BUS>
|
template<class CLK, class BUS>
|
||||||
struct CPU6502
|
struct CPU6502
|
||||||
{
|
{
|
||||||
@@ -1468,7 +1474,8 @@ struct CPU6502
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
printf("unhandled instruction %02X at %04X\n", inst, pc - 1);
|
printf("unhandled instruction %02X at %04X\n", inst, pc - 1);
|
||||||
fflush(stdout); exit(1);
|
fflush(stdout);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
assert(cycles[inst] > 0);
|
assert(cycles[inst] > 0);
|
||||||
clk.add_cpu_cycles(cycles[inst]);
|
clk.add_cpu_cycles(cycles[inst]);
|
||||||
@@ -1496,3 +1503,5 @@ int CPU6502<CLK, BUS>::cycles[256] =
|
|||||||
/* 0xF- */ 2, 5, -1, -1, -1, 4, 6, -1, 2, 4, -1, -1, -1, 4, 7, -1,
|
/* 0xF- */ 2, 5, -1, -1, -1, 4, 6, -1, 2, 4, -1, -1, -1, 4, 7, -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // CPU6502_H
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user