Started implementing the debugger.
This commit is contained in:
3
main.cpp
3
main.cpp
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user