summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorAstrid Smith2010-09-06 18:09:29 -0700
committerAstrid Smith2010-09-06 18:34:53 -0700
commitbe4e09f43d8dae20e8fff2d0af21f0fc33298954 (patch)
tree7c6b04530f67cde5982da7ee8d49411f73283836 /misc.c
parent7c4dfba9781829b2825ebbdddca1531079d7adcc (diff)
Fixes to actually run code
This is the version to run the first (trivial) infinite loop correctly. I hacked up the loader slightly to replace one of the (nonexistent) pages with a static byte array. z80 code executed: $4000: JP $4000 4000 c3 40 00 4003 This version also draws the opcode executed on the screen, to aid in debugging the emulator: move.b d0,$4c00+32*(128/8) Also, it turns out that I was mixing up the emulated SP (a4) and emulated PC (a6). That has been fixed. Further, it seems that movea defaults to a word operation in a68k. This led to pointer corruption, which has been fixed.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/misc.c b/misc.c
new file mode 100644
index 0000000..50ccee9
--- /dev/null
+++ b/misc.c
@@ -0,0 +1,17 @@
+/* Miscellaneous C routines for 680 project.
+ *
+ * Error handling, for now.
+ *
+ * Copyright 2010, Astrid Smith
+ * GPL
+ */
+
+#include <tigcclib.h>
+#include "asm_vars.h"
+
+/* SOMETHING WENT HORRIBLY HORRIBLY WRONG
+ */
+void throw_error(char *message)
+{
+ return;
+}