From 7e2703a49de38100f9ee82042a744517fc7eb171 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 12 Mar 2007 00:59:51 +0000 Subject: Altered some interfaces for the monitor. --- source/monitor.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'source/monitor.c') 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 #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(); } -- cgit v1.2.3