mirror of
https://github.com/hoglet67/AtomBusMon.git
synced 2024-09-30 07:54:37 +00:00
Use CPU_65C02 for defined as CPU == 65C02 doesn't work
Change-Id: Ibedbac5941ab897f0d530dfa3d73cc516d62bd8f
This commit is contained in:
parent
1c44718f91
commit
f4bff7757c
@ -12,13 +12,13 @@
|
|||||||
|
|
||||||
#define VERSION "0.80"
|
#define VERSION "0.80"
|
||||||
|
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
#define NAME "ICE-Z80"
|
#define NAME "ICE-Z80"
|
||||||
#elif (CPU == 6502)
|
#elif defined(CPU_6502)
|
||||||
#define NAME "ICE-6502"
|
#define NAME "ICE-6502"
|
||||||
#elif (CPU == C02)
|
#elif defined(CPU_65C02)
|
||||||
#define NAME "ICE-65C02"
|
#define NAME "ICE-65C02"
|
||||||
#elif (CPU == 6809)
|
#elif defined(CPU_6809)
|
||||||
#define NAME "ICE-6809"
|
#define NAME "ICE-6809"
|
||||||
#else
|
#else
|
||||||
#error "Unsupported CPU type"
|
#error "Unsupported CPU type"
|
||||||
@ -38,7 +38,7 @@ char *cmdStrings[] = {
|
|||||||
"help",
|
"help",
|
||||||
"continue",
|
"continue",
|
||||||
"step",
|
"step",
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
"regs",
|
"regs",
|
||||||
"dis",
|
"dis",
|
||||||
"fill",
|
"fill",
|
||||||
@ -46,14 +46,14 @@ char *cmdStrings[] = {
|
|||||||
"mem",
|
"mem",
|
||||||
"rdm",
|
"rdm",
|
||||||
"wrm",
|
"wrm",
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
"io",
|
"io",
|
||||||
"rdi",
|
"rdi",
|
||||||
"wri",
|
"wri",
|
||||||
#endif
|
#endif
|
||||||
"test",
|
"test",
|
||||||
"srec",
|
"srec",
|
||||||
#if (CPU != Z80)
|
#if !defined(CPU_Z80)
|
||||||
"special",
|
"special",
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -66,7 +66,7 @@ char *cmdStrings[] = {
|
|||||||
"watchrm",
|
"watchrm",
|
||||||
"breakwm",
|
"breakwm",
|
||||||
"watchwm",
|
"watchwm",
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
"breakri",
|
"breakri",
|
||||||
"watchri",
|
"watchri",
|
||||||
"breakwi",
|
"breakwi",
|
||||||
@ -81,7 +81,7 @@ void (*cmdFuncs[])(char *params) = {
|
|||||||
doCmdHelp,
|
doCmdHelp,
|
||||||
doCmdContinue,
|
doCmdContinue,
|
||||||
doCmdStep,
|
doCmdStep,
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
doCmdRegs,
|
doCmdRegs,
|
||||||
doCmdDis,
|
doCmdDis,
|
||||||
doCmdFill,
|
doCmdFill,
|
||||||
@ -89,14 +89,14 @@ void (*cmdFuncs[])(char *params) = {
|
|||||||
doCmdMem,
|
doCmdMem,
|
||||||
doCmdReadMem,
|
doCmdReadMem,
|
||||||
doCmdWriteMem,
|
doCmdWriteMem,
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
doCmdIO,
|
doCmdIO,
|
||||||
doCmdReadIO,
|
doCmdReadIO,
|
||||||
doCmdWriteIO,
|
doCmdWriteIO,
|
||||||
#endif
|
#endif
|
||||||
doCmdTest,
|
doCmdTest,
|
||||||
doCmdSRec,
|
doCmdSRec,
|
||||||
#if (CPU != Z80)
|
#if !defined(CPU_Z80)
|
||||||
doCmdSpecial,
|
doCmdSpecial,
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -109,7 +109,7 @@ void (*cmdFuncs[])(char *params) = {
|
|||||||
doCmdWatchRdMem,
|
doCmdWatchRdMem,
|
||||||
doCmdBreakWrMem,
|
doCmdBreakWrMem,
|
||||||
doCmdWatchWrMem,
|
doCmdWatchWrMem,
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
doCmdBreakRdIO,
|
doCmdBreakRdIO,
|
||||||
doCmdWatchRdIO,
|
doCmdWatchRdIO,
|
||||||
doCmdBreakWrIO,
|
doCmdBreakWrIO,
|
||||||
@ -283,7 +283,7 @@ void (*cmdFuncs[])(char *params) = {
|
|||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
// The space available for address comparators depends on the size of the CPU core
|
// The space available for address comparators depends on the size of the CPU core
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
#define MAXBKPTS 4
|
#define MAXBKPTS 4
|
||||||
#else
|
#else
|
||||||
#define MAXBKPTS 8
|
#define MAXBKPTS 8
|
||||||
@ -516,7 +516,7 @@ void lcdAddr(unsigned int addr) {
|
|||||||
* Host Memory/IO Access helpers
|
* Host Memory/IO Access helpers
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
void loadData(unsigned int data) {
|
void loadData(unsigned int data) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i <= 7; i++) {
|
for (i = 0; i <= 7; i++) {
|
||||||
@ -697,7 +697,7 @@ int logDetails() {
|
|||||||
} else {
|
} else {
|
||||||
log0("\n");
|
log0("\n");
|
||||||
}
|
}
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
if (mode & B_RDWR_MASK) {
|
if (mode & B_RDWR_MASK) {
|
||||||
// It's only safe to do this for brkpts, as it makes memory accesses
|
// It's only safe to do this for brkpts, as it makes memory accesses
|
||||||
logCycleCount(OFFSET_BW_CNTL, OFFSET_BW_CNTH);
|
logCycleCount(OFFSET_BW_CNTL, OFFSET_BW_CNTH);
|
||||||
@ -715,7 +715,7 @@ void logAddr() {
|
|||||||
#endif
|
#endif
|
||||||
// Update the serial console
|
// Update the serial console
|
||||||
logCycleCount(OFFSET_CNTL, OFFSET_CNTH);
|
logCycleCount(OFFSET_CNTL, OFFSET_CNTH);
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
//log0("%04X\n", i_addr);
|
//log0("%04X\n", i_addr);
|
||||||
disMem(memAddr);
|
disMem(memAddr);
|
||||||
#else
|
#else
|
||||||
@ -725,7 +725,7 @@ void logAddr() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void version() {
|
void version() {
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
log0("%s In-Circuit Emulator version %s\n", NAME, VERSION);
|
log0("%s In-Circuit Emulator version %s\n", NAME, VERSION);
|
||||||
#else
|
#else
|
||||||
log0("%s Bus Monitor version %s\n", NAME, VERSION);
|
log0("%s Bus Monitor version %s\n", NAME, VERSION);
|
||||||
@ -831,7 +831,7 @@ void genericBreakpoint(char *params, unsigned int mode) {
|
|||||||
* Test Helpers
|
* Test Helpers
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
char *testNames[6] = {
|
char *testNames[6] = {
|
||||||
"Fixed",
|
"Fixed",
|
||||||
"Checkerboard",
|
"Checkerboard",
|
||||||
@ -904,7 +904,7 @@ void test(unsigned int start, unsigned int end, int data) {
|
|||||||
log0(": passed\n");
|
log0(": passed\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // CPUEMBEDDED
|
#endif // CPU_EMBEDDED
|
||||||
|
|
||||||
/*******************************************
|
/*******************************************
|
||||||
* User Commands
|
* User Commands
|
||||||
@ -945,7 +945,7 @@ void doCmdStep(char *params) {
|
|||||||
|
|
||||||
void doCmdReset(char *params) {
|
void doCmdReset(char *params) {
|
||||||
log0("Resetting CPU\n");
|
log0("Resetting CPU\n");
|
||||||
#if (CPU == 6502 || CPU == C02)
|
#if defined(CPU_6502) || defined(CPU_65C02)
|
||||||
// For the 6502 cores, to get the single stepping to stop correctly
|
// For the 6502 cores, to get the single stepping to stop correctly
|
||||||
// on the first instruction after reset, it helps to assert reset twice.
|
// on the first instruction after reset, it helps to assert reset twice.
|
||||||
// I haven't looked into why this is, as it doesn't seem very important.
|
// I haven't looked into why this is, as it doesn't seem very important.
|
||||||
@ -959,13 +959,13 @@ void doCmdReset(char *params) {
|
|||||||
Delay_us(50);
|
Delay_us(50);
|
||||||
hwCmd(CMD_RESET, 0);
|
hwCmd(CMD_RESET, 0);
|
||||||
Delay_us(50);
|
Delay_us(50);
|
||||||
#if (CPU == 6502 || CPU == C02)
|
#if defined(CPU_6502) || defined(CPU_65C02)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
logAddr();
|
logAddr();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
|
|
||||||
// doCmdRegs is now in regs<cpu>.c
|
// doCmdRegs is now in regs<cpu>.c
|
||||||
|
|
||||||
@ -1026,7 +1026,7 @@ void doCmdWriteMem(char *params) {
|
|||||||
genericWrite(params, writeMemByte);
|
genericWrite(params, writeMemByte);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
|
|
||||||
void doCmdIO(char *params) {
|
void doCmdIO(char *params) {
|
||||||
genericDump(params, readIOByteInc);
|
genericDump(params, readIOByteInc);
|
||||||
@ -1162,7 +1162,7 @@ void doCmdSRec(char *params) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CPU != Z80)
|
#if !defined(CPU_Z80)
|
||||||
void logSpecial(char *function, int value) {
|
void logSpecial(char *function, int value) {
|
||||||
log0("%s", function);
|
log0("%s", function);
|
||||||
if (value) {
|
if (value) {
|
||||||
@ -1184,7 +1184,7 @@ void doCmdSpecial(char *params) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // CPUEMBEDDED
|
#endif // CPU_EMBEDDED
|
||||||
|
|
||||||
void doCmdTrace(char *params) {
|
void doCmdTrace(char *params) {
|
||||||
long i;
|
long i;
|
||||||
@ -1231,7 +1231,7 @@ void doCmdWatchWrMem(char *params) {
|
|||||||
genericBreakpoint(params, 1 << WATCH_MEM_WRITE);
|
genericBreakpoint(params, 1 << WATCH_MEM_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (CPU == Z80)
|
#if defined(CPU_Z80)
|
||||||
|
|
||||||
void doCmdBreakRdIO(char *params) {
|
void doCmdBreakRdIO(char *params) {
|
||||||
genericBreakpoint(params, 1 << BRKPT_IO_READ);
|
genericBreakpoint(params, 1 << BRKPT_IO_READ);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
unsigned int hwRead8(unsigned int offset);
|
unsigned int hwRead8(unsigned int offset);
|
||||||
unsigned int hwRead16(unsigned int offset);
|
unsigned int hwRead16(unsigned int offset);
|
||||||
|
|
||||||
#ifdef CPUEMBEDDED
|
#ifdef CPU_EMBEDDED
|
||||||
unsigned int disMem(unsigned int addr);
|
unsigned int disMem(unsigned int addr);
|
||||||
void loadData(unsigned int data);
|
void loadData(unsigned int data);
|
||||||
void loadAddr(unsigned int addr);
|
void loadAddr(unsigned int addr);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CPU specfic build flags
|
# CPU specfic build flags
|
||||||
CPU_CFLAGS = -DCPU=6502 -DCPUEMBEDDED
|
CPU_CFLAGS = -DCPU_6502 -DCPU_EMBEDDED
|
||||||
|
|
||||||
# CPU specfic object files
|
# CPU specfic object files
|
||||||
CPU_OBJECTS = dis6502.o regs6502.o
|
CPU_OBJECTS = dis6502.o regs6502.o
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CPU specfic build flags
|
# CPU specfic build flags
|
||||||
CPU_CFLAGS = -DCPU=6502 -DCPUEMBEDDED
|
CPU_CFLAGS = -DCPU_6502 -DCPU_EMBEDDED
|
||||||
|
|
||||||
# CPU specfic object files
|
# CPU specfic object files
|
||||||
CPU_OBJECTS = dis6502.o regs6502.o
|
CPU_OBJECTS = dis6502.o regs6502.o
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CPU specfic build flags
|
# CPU specfic build flags
|
||||||
CPU_CFLAGS = -DCPU=6502
|
CPU_CFLAGS = -DCPU_6502
|
||||||
|
|
||||||
# CPU specfic object files
|
# CPU specfic object files
|
||||||
CPU_OBJECTS = hd44780.o
|
CPU_OBJECTS = hd44780.o
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CPU specfic build flags
|
# CPU specfic build flags
|
||||||
CPU_CFLAGS = -DCPU=C02 -DCPUEMBEDDED
|
CPU_CFLAGS = -DCPU_65C02 -DCPU_EMBEDDED
|
||||||
|
|
||||||
# CPU specfic object files
|
# CPU specfic object files
|
||||||
CPU_OBJECTS = dis65c02.o regs6502.o
|
CPU_OBJECTS = dis65c02.o regs6502.o
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CPU specfic build flags
|
# CPU specfic build flags
|
||||||
CPU_CFLAGS = -DCPU=6809 -DCPUEMBEDDED
|
CPU_CFLAGS = -DCPU_6809 -DCPU_EMBEDDED
|
||||||
|
|
||||||
# CPU specfic object files
|
# CPU specfic object files
|
||||||
CPU_OBJECTS = dis6809.o regs6809.o
|
CPU_OBJECTS = dis6809.o regs6809.o
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# CPU specfic build flags
|
# CPU specfic build flags
|
||||||
CPU_CFLAGS = -DCPU=Z80 -DCPUEMBEDDED
|
CPU_CFLAGS = -DCPU_Z80 -DCPU_EMBEDDED
|
||||||
|
|
||||||
# CPU specfic object files
|
# CPU specfic object files
|
||||||
CPU_OBJECTS = disz80.o regsz80.o
|
CPU_OBJECTS = disz80.o regsz80.o
|
||||||
|
Loading…
Reference in New Issue
Block a user