- [FIX] El debugger se agarrotava quan duia un rato
- [FIX] No calculava correctament l'adreça a la que anar en una interrupció de mode 2 - [NEW] Afegit commando "goto adreça" al debugger
This commit is contained in:
4
main.cpp
4
main.cpp
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
|
|||||||
zxscreen::redraw();
|
zxscreen::redraw();
|
||||||
}
|
}
|
||||||
if (e.type == SDL_MOUSEWHEEL) {
|
if (e.type == SDL_MOUSEWHEEL) {
|
||||||
if (e.wheel.mouseX<46 && e.wheel.mouseY<20) {
|
if (e.wheel.mouseX<46*CHR_W && e.wheel.mouseY<20*CHR_H) {
|
||||||
if (e.wheel.y>0) {
|
if (e.wheel.y>0) {
|
||||||
z80debug::cursorback();
|
z80debug::cursorback();
|
||||||
z80debug::refresh();
|
z80debug::refresh();
|
||||||
@@ -245,7 +245,7 @@ int main(int argc, char *argv[])
|
|||||||
time = SDL_GetTicks();
|
time = SDL_GetTicks();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (z80debug::paused()) {
|
} else if (!z80debug::debugging() && z80debug::paused()) {
|
||||||
zxscreen::redraw(false);
|
zxscreen::redraw(false);
|
||||||
ui::menu::show();
|
ui::menu::show();
|
||||||
zxscreen::present();
|
zxscreen::present();
|
||||||
|
|||||||
2
z80.cpp
2
z80.cpp
@@ -662,7 +662,7 @@ namespace z80
|
|||||||
if (im==1) {
|
if (im==1) {
|
||||||
rPC = 0x38;
|
rPC = 0x38;
|
||||||
} else if (im==2) {
|
} else if (im==2) {
|
||||||
const uint8_t address = (rI<<8) | 0xFE;
|
const uint16_t address = (rI<<8) | 0xFE;
|
||||||
rPC = READ_MEM_16(address);
|
rPC = READ_MEM_16(address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -453,6 +453,12 @@ namespace z80debug
|
|||||||
else if (strcmp(cmd, "l")==0) { getcmd(); int value = getnum(cmd); z80::getRegs()[6] = value; }
|
else if (strcmp(cmd, "l")==0) { getcmd(); int value = getnum(cmd); z80::getRegs()[6] = value; }
|
||||||
else if (strcmp(cmd, "h")==0) { getcmd(); int value = getnum(cmd); z80::getRegs()[7] = value; }
|
else if (strcmp(cmd, "h")==0) { getcmd(); int value = getnum(cmd); z80::getRegs()[7] = value; }
|
||||||
else { strcpy(console_error, "Syntax error: invalid register"); return; }
|
else { strcpy(console_error, "Syntax error: invalid register"); return; }
|
||||||
|
} else if (strcmp(cmd, "g")==0 || strcmp(cmd, "goto")==0) {
|
||||||
|
getcmd();
|
||||||
|
int address = getnum(cmd);
|
||||||
|
if (address<0 || address>=65536) { strcpy(console_error, "Illegal address"); return; }
|
||||||
|
if (z80::getMemTag(address)!=MEMTAG_INST) address = find_previous_opcode(address);
|
||||||
|
z80debug::setcursor(address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user