breakpoints, mem, run, console...
This commit is contained in:
29
main.cpp
29
main.cpp
@@ -39,17 +39,30 @@ int main(int argc, char *argv[])
|
||||
while (SDL_PollEvent(&e))
|
||||
{
|
||||
if (e.type == SDL_QUIT) { should_exit=true; break; }
|
||||
if (e.type == SDL_KEYDOWN) {
|
||||
if (e.key.keysym.scancode==SDL_SCANCODE_ESCAPE) {
|
||||
should_exit=true; break;
|
||||
} else if (e.key.keysym.scancode==SDL_SCANCODE_RETURN) {
|
||||
//uint16_t PC = z80::getPC();
|
||||
//z80dis::getAsm(&memory[PC]);
|
||||
t += z80::step();
|
||||
z80debug::refresh();
|
||||
if (z80debug::debugging()) {
|
||||
if (e.type == SDL_KEYDOWN) {
|
||||
if (e.key.keysym.scancode==SDL_SCANCODE_ESCAPE) {
|
||||
should_exit=true; break;
|
||||
} else if (e.key.keysym.scancode==SDL_SCANCODE_F10) {
|
||||
t += z80::step();
|
||||
z80debug::refresh();
|
||||
} else if (e.key.keysym.scancode==SDL_SCANCODE_RETURN) {
|
||||
z80debug::executeConsole();
|
||||
} else if (e.key.keysym.scancode==SDL_SCANCODE_BACKSPACE) {
|
||||
z80debug::DeleteCharConsole();
|
||||
}
|
||||
}
|
||||
if (e.type == SDL_TEXTINPUT) {
|
||||
z80debug::sendToConsole(e.text.text);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!z80debug::debugging()) {
|
||||
if (z80debug::isbreak(z80::getPC()))
|
||||
z80debug::stop();
|
||||
else
|
||||
t += z80::step();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user