summaryrefslogtreecommitdiff
path: root/source/monitor.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2007-03-12 00:59:51 +0000
committerIan C <ianc@noddybox.co.uk>2007-03-12 00:59:51 +0000
commit7e2703a49de38100f9ee82042a744517fc7eb171 (patch)
treee76beb7f038e9ef51a30b5d10f5e4be7ffd73c46 /source/monitor.c
parenteeef0966f0448d71e79ad43d53769afebd47b459 (diff)
Altered some interfaces for the monitor.
Diffstat (limited to 'source/monitor.c')
-rw-r--r--source/monitor.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/source/monitor.c b/source/monitor.c
index 62d5f3b..ad81b28 100644
--- a/source/monitor.c
+++ b/source/monitor.c
@@ -24,9 +24,75 @@
#include <stdlib.h>
#include "monitor.h"
+#include "keyboard.h"
+#include "textmode.h"
+#include "framebuffer.h"
+
+/* ---------------------------------------- STATIC INTERFACES
+*/
+static void DisplayHelp()
+{
+ static const char *help[]=
+ {
+ /* 12345678901234567890123456789012 */
+ "MONITOR HELP",
+ "",
+ "Click on the config bar to exit.",
+ "",
+ "Press START to toggle between",
+ "single step mode and running.",
+ "",
+ "Press SELECT to toggle between",
+ "CPU info and memory display.",
+ "",
+ "In single step mode press A",
+ "to execute next instruction.",
+ "",
+ "Use L/R to alter memory shown",
+ "on the memory display.",
+ "",
+ "Note that all numbers are in hex",
+ "and the all keyboard keys are",
+ "sticky until the monitor exits.",
+ "",
+ "Press A to continue",
+ NULL
+ };
+
+ int f;
+
+ TM_Cls();
+
+ for(f=0; help[f]; f++)
+ {
+ TM_Put(0,f,help[f]);
+ }
+
+ while(!(keysUp() & KEY_A))
+ {
+ swiWaitForVBlank();
+ }
+}
+
/* ---------------------------------------- PUBLIC INTERFACES
*/
void MachineCodeMonitor(void)
{
+ int done = FALSE;
+
+ SK_DisplayKeyboard();
+ SK_SetDisplayBrightness(TRUE);
+
+ DisplayHelp();
+
+ /*
+ while(!done)
+ {
+ swiWaitForVBlank();
+ }
+ */
+
+ SK_SetDisplayBrightness(FALSE);
+ TM_Cls();
}