- Afegit el modo paused per a quan estiga el menú fora
This commit is contained in:
30
z80debug.cpp
30
z80debug.cpp
@@ -15,6 +15,7 @@ namespace z80debug
|
||||
SDL_Renderer *ren = nullptr;
|
||||
|
||||
bool is_debugging=false;
|
||||
bool is_paused=false;
|
||||
uint16_t mem_viewer_pos = 0;
|
||||
char console[256];
|
||||
char console_error[256];
|
||||
@@ -33,7 +34,7 @@ namespace z80debug
|
||||
|
||||
void init()
|
||||
{
|
||||
is_debugging = false;
|
||||
is_debugging = is_paused = false;
|
||||
for (int i=0; i<65536; ++i) breakpoints[i]=0;
|
||||
//show();
|
||||
}
|
||||
@@ -55,9 +56,30 @@ namespace z80debug
|
||||
win = NULL;
|
||||
}
|
||||
|
||||
void stop() { zx_ula::sound_disable(); is_debugging = true; breakpoints[z80::getPC()] &= ~8; show(); /*refresh();*/ }
|
||||
void cont() { is_debugging = false; hide();/*refresh()*/; zx_ula::sound_enable(); }
|
||||
void pause()
|
||||
{
|
||||
zx_ula::sound_disable();
|
||||
is_paused = true;
|
||||
breakpoints[z80::getPC()] &= ~8;
|
||||
}
|
||||
|
||||
void stop()
|
||||
{
|
||||
pause();
|
||||
is_debugging = true;
|
||||
show();
|
||||
/*refresh();*/
|
||||
}
|
||||
|
||||
void cont() {
|
||||
is_debugging = is_paused = false;
|
||||
hide();
|
||||
/*refresh();*/
|
||||
zx_ula::sound_enable();
|
||||
}
|
||||
|
||||
const bool debugging() { return is_debugging; }
|
||||
const bool paused() { return is_paused; }
|
||||
|
||||
|
||||
uint16_t find_previous_opcode(uint16_t pc)
|
||||
@@ -432,7 +454,7 @@ namespace z80debug
|
||||
fread(memory+address, size, 1, f);
|
||||
fclose(f);
|
||||
z80::setPC(address);
|
||||
is_debugging = false;
|
||||
is_debugging = is_paused = false;
|
||||
}
|
||||
|
||||
void savestate(const char *filename)
|
||||
|
||||
Reference in New Issue
Block a user