- [CHG] En proves: fer un IN a un port no usat ara torna 0x00 en compte de 0xFF. Probablement hi haurà que revertir-ho.
- [NEW] Amb F9 es pot ficar o llevar un breakpoint en l'adreça on estiga el cursor del desensamblador. - [NEW] Nou comando de la consola "show analyzer" - [FIX] Quan es fa un full refresh mentres se debugga no ha de causar interrupcions. A més, ara mantenim els t_states i el punter a pantalla. - [FIX] La instrucció CPIR llegia mal la memòria apuntada per HL al considerar si hi havia coincidencia
This commit is contained in:
12
z80.cpp
12
z80.cpp
@@ -930,10 +930,11 @@ namespace z80
|
||||
}
|
||||
}
|
||||
|
||||
void CPI()
|
||||
uint8_t CPI()
|
||||
{
|
||||
bool keep_fC = (rF & fC);
|
||||
CP(READ_MEM_8(rHL));
|
||||
const uint8_t hlmem = READ_MEM_8(rHL);
|
||||
CP(hlmem);
|
||||
rHL++;
|
||||
rBC--;
|
||||
t+=2;
|
||||
@@ -941,12 +942,13 @@ namespace z80
|
||||
if (keep_fC) SET_FLAGS(fC);
|
||||
if (rBC!=0) SET_FLAGS(fP);
|
||||
//if (READ_MEM_8(rHL)==rA) SET_FLAGS(fZ);
|
||||
return hlmem;
|
||||
}
|
||||
|
||||
void CPIR()
|
||||
{
|
||||
CPI();
|
||||
if (rBC!=0 && READ_MEM_8(rHL)!=rA)
|
||||
const uint8_t hlmem = CPI();
|
||||
if (rBC!=0 && hlmem!=rA)
|
||||
{
|
||||
rPC-=2;
|
||||
t+=2;
|
||||
@@ -996,7 +998,7 @@ namespace z80
|
||||
}
|
||||
return val;
|
||||
} else
|
||||
return 0xff;
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
void OUT(uint8_t val, int port = 0x10000)
|
||||
|
||||
21
z80debug.cpp
21
z80debug.cpp
@@ -147,11 +147,13 @@ namespace z80debug
|
||||
z80debug::history::goforward();
|
||||
z80debug::refresh();
|
||||
z80analyze::refresh();
|
||||
/*} else if (e->key.keysym.scancode==SDL_SCANCODE_F6) {
|
||||
z80debug::history::gototop();
|
||||
const uint8_t dt = z80::step();
|
||||
z80debug::refresh();
|
||||
zxscreen::refresh(dt);*/
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_F9) {
|
||||
const uint16_t address = cursor;
|
||||
if (breakpoints[line_address[address]]==0)
|
||||
breakpoints[line_address[address]]=1;
|
||||
else
|
||||
breakpoints[line_address[address]]=0;
|
||||
refresh();
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_UP) {
|
||||
if (console_history_nav != console_history_pos+1 && console_history[console_history_nav-1][0]!=0) console_history_nav--;
|
||||
//z80debug::cursorback();
|
||||
@@ -965,6 +967,15 @@ namespace z80debug
|
||||
} else {
|
||||
search(cmd);
|
||||
}
|
||||
} else if (strcmp(cmd, "show")==0) {
|
||||
getcmd();
|
||||
if (strcmp(cmd, "analyzer")==0) {
|
||||
z80analyze::show();
|
||||
} else {
|
||||
sendToConsoleLog("Unrecognized window. Usage: Show [analyzer]");
|
||||
}
|
||||
} else {
|
||||
sendToConsoleLog("Unrecognized command.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace zxscreen
|
||||
}
|
||||
}
|
||||
|
||||
void refresh(const uint32_t dt)
|
||||
void refresh(const uint32_t dt, const bool full)
|
||||
{
|
||||
const uint8_t* memory = z80::getMem();
|
||||
const uint8_t border_color = zx_ula::get_border_color();
|
||||
@@ -220,16 +220,20 @@ namespace zxscreen
|
||||
t_screen=0;
|
||||
ptr_pixel = zx_pixels;
|
||||
redraw();
|
||||
z80::interrupt();
|
||||
if (!full) z80::interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void fullrefresh()
|
||||
{
|
||||
uint32_t tmp = t_screen;
|
||||
t_screen = 0;
|
||||
uint8_t * tmp_ptr = ptr_pixel;
|
||||
ptr_pixel = zx_pixels;
|
||||
refresh(69888);
|
||||
refresh(69888, true);
|
||||
ptr_pixel = tmp_ptr;
|
||||
t_screen = tmp;
|
||||
}
|
||||
|
||||
void debugrefresh(const uint32_t dt)
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace zxscreen
|
||||
void init();
|
||||
void reinit();
|
||||
void focus();
|
||||
void refresh(const uint32_t dt);
|
||||
void refresh(const uint32_t dt, const bool full=false);
|
||||
void fullrefresh();
|
||||
void debugrefresh();
|
||||
void redraw(const bool present=true);
|
||||
|
||||
Reference in New Issue
Block a user