diff options
Diffstat (limited to 'source/monitor.c')
-rw-r--r-- | source/monitor.c | 66 |
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(); } |