Skip to content

Commit

Permalink
Added live debugging functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
chrizel committed Jan 7, 2012
1 parent 234e8cb commit eb15ca2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions main.cc
@@ -1,8 +1,6 @@
#include <iostream>

#include <string>

#include <stdlib.h>
#include <cstdlib>

#if defined(__APPLE__)
#include <GLUT/glut.h>
Expand All @@ -15,9 +13,6 @@
#endif

#include "gameboy.h"
#include "cpu.h"
#include "word.h"
#include "memory.h"
#include "debugger.h"

static GameBoy *gb = 0;
Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit eb15ca2

Please sign in to comment.