Permalink
Browse files

Added live debugging functionality

  • Loading branch information...
1 parent 234e8cb commit eb15ca272ead742f05ef569eb6fcbb5c13e2b990 @chrizel committed Jan 7, 2012
Showing with 3 additions and 6 deletions.
  1. +3 −6 main.cc
View
@@ -1,8 +1,6 @@
#include <iostream>
-
#include <string>
-
-#include <stdlib.h>
+#include <cstdlib>
#if defined(__APPLE__)
#include <GLUT/glut.h>
@@ -15,9 +13,6 @@
#endif
#include "gameboy.h"
-#include "cpu.h"
-#include "word.h"
-#include "memory.h"
#include "debugger.h"
static GameBoy *gb = 0;
@@ -90,6 +85,8 @@ static void setKey(unsigned char key, bool down)
case 'p': gb->setButton(BTN_B, down); break;
case 'u': gb->setButton(BTN_SELECT, down); break;
case 'i': gb->setButton(BTN_START, down); break;
+ case 'v': if (!down) { gb->getDebugger()->verboseCPU = !gb->getDebugger()->verboseCPU; } break;
+ case 'b': if (!down) { gb->getDebugger()->stepMode = true; } break;
}
}

0 comments on commit eb15ca2

Please sign in to comment.