mirror of
https://github.com/jscrane/Apple1.git
synced 2024-11-22 06:31:37 +00:00
cleanup
This commit is contained in:
parent
728e1e4058
commit
b963514111
3
Makefile
3
Makefile
@ -1,6 +1,7 @@
|
||||
PROCESSOR_FAMILY := lm4f
|
||||
BOARD := lplm4f120h5qr
|
||||
# watch the CPU execute
|
||||
LOCAL_CPPFLAGS := -DCPU_DEBUG
|
||||
#LOCAL_CPPFLAGS := -DCPU_DEBUG
|
||||
CXXFLAGS := -fno-operator-names
|
||||
|
||||
include energia.mk
|
||||
|
18
apple1.ino
18
apple1.ino
@ -23,19 +23,7 @@ prom m(monitor, sizeof(monitor));
|
||||
ram pages[RAM_SIZE / 1024];
|
||||
io io;
|
||||
|
||||
void status(const char *fmt, ...) {
|
||||
char tmp[256];
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vsnprintf(tmp, sizeof(tmp), fmt, args);
|
||||
io.clear();
|
||||
io.error(tmp);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
jmp_buf ex;
|
||||
r6502 cpu(memory, ex, status);
|
||||
bool halted = false;
|
||||
r6502 cpu(memory);
|
||||
const char *filename;
|
||||
|
||||
void reset() {
|
||||
@ -46,8 +34,6 @@ void reset() {
|
||||
io.tape.start(PROGRAMS);
|
||||
else
|
||||
io.status("No SD Card");
|
||||
|
||||
halted = (setjmp(ex) != 0);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
@ -105,6 +91,6 @@ void loop() {
|
||||
io.up(key);
|
||||
break;
|
||||
}
|
||||
} else if (!halted)
|
||||
} else if (!cpu.halted())
|
||||
cpu.run(CPU_INSTRUCTIONS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user