Started implementing the debugger.

This commit is contained in:
2017-01-31 19:42:04 +01:00
parent 3eba81d2bd
commit e47cb247eb
13 changed files with 7188 additions and 118 deletions

View File

@@ -3,6 +3,7 @@
#include "vm.h"
#include "vdp.h"
#include <SDL.h>
#include "debug.h"
#define BTN_ANY 0
#define BTN_UP 1
@@ -43,6 +44,7 @@ int main(int argc, char** argv) {
vm_register_out_port(20, input_data_in);
vm_register_in_port(21, input_data_out);
debug_init(vm_get_memory());
static bool should_quit = false;
static SDL_Event sdlEvent;
SDL_Scancode just_pressed;
@@ -51,6 +53,7 @@ int main(int argc, char** argv) {
while (!should_quit) {
just_pressed = SDL_SCANCODE_UNKNOWN;
while (SDL_PollEvent(&sdlEvent)) {
if (sdlEvent.type == SDL_WINDOWEVENT_CLOSE) { should_quit = true; break; }
if (sdlEvent.type == SDL_QUIT) { should_quit = true; break; }
else if (sdlEvent.type == SDL_KEYDOWN) {
anykey = true;