- [FIX] Al anar de 10 en 10 steps de vegades se botaba breakpoints
- [FIX] Ara cada renderer te la seua textura de font - [CHG] Continuar l'execució ja no tanca el debugger - [NEW] En la memòria no tocada actual o en avanç, se "adivina" quina es la instrucció - [FIX] Resetejar el spectrum borrava la ROM - [NEW] Anar avant o arrere en el temps mou el cursor del desensamblador
This commit is contained in:
73
main.cpp
73
main.cpp
@@ -133,29 +133,30 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (!z80debug::debugging() && !z80debug::paused()) {
|
||||
if (z80debug::isbreak(z80::getPC(), 9)) {
|
||||
z80debug::stop();
|
||||
zxscreen::redraw();
|
||||
} else {
|
||||
//if (z80::getPC()==0x05C8) zx_tape::go_berserk();
|
||||
bool fastload=false;
|
||||
if (zx_tape::getplaying() && zx_tape::getOption(ZXTAPE_OPTION_FAST_LOAD)) { fastload=true; time = SDL_GetTicks(); }
|
||||
while (zx_tape::getplaying() && zx_tape::getOption(ZXTAPE_OPTION_FAST_LOAD))
|
||||
{
|
||||
//if (z80::getPC()==0x05C8) zx_tape::go_berserk();
|
||||
bool fastload=false;
|
||||
if (zx_tape::getplaying() && zx_tape::getOption(ZXTAPE_OPTION_FAST_LOAD)) { fastload=true; time = SDL_GetTicks(); }
|
||||
while (zx_tape::getplaying() && zx_tape::getOption(ZXTAPE_OPTION_FAST_LOAD))
|
||||
{
|
||||
// zx_tape::update(z80::step());
|
||||
uint8_t dt = z80::step();
|
||||
t_states += dt;
|
||||
zx_tape::update(dt);
|
||||
if (SDL_GetTicks()-time>=1000) {
|
||||
time = SDL_GetTicks();
|
||||
zx_tape::report();
|
||||
}
|
||||
//zx_ula::sound_update(dt);
|
||||
//zxscreen::refresh(dt);
|
||||
uint8_t dt = z80::step();
|
||||
t_states += dt;
|
||||
zx_tape::update(dt);
|
||||
if (SDL_GetTicks()-time>=1000) {
|
||||
time = SDL_GetTicks();
|
||||
zx_tape::report();
|
||||
}
|
||||
if (fastload) { printf("%i\n", SDL_GetTicks()-time); t_states=0; }
|
||||
// En cada bucle fem 10 pasos de la CPU, sino s'ofega
|
||||
for (int i=0;i<5;++i) {
|
||||
//zx_ula::sound_update(dt);
|
||||
//zxscreen::refresh(dt);
|
||||
}
|
||||
if (fastload) { printf("%i\n", SDL_GetTicks()-time); t_states=0; }
|
||||
// En cada bucle fem 10 pasos de la CPU, sino s'ofega
|
||||
for (int i=0;i<5;++i) {
|
||||
if (z80debug::isbreak(z80::getPC(), 9)) {
|
||||
z80debug::stop();
|
||||
zxscreen::redraw();
|
||||
break;
|
||||
} else {
|
||||
uint8_t dt = z80::step();
|
||||
t_states += dt;
|
||||
zx_tape::update(dt);
|
||||
@@ -163,21 +164,23 @@ int main(int argc, char *argv[])
|
||||
zx_ula::sound_update(dt);
|
||||
zxscreen::refresh(dt);
|
||||
}
|
||||
|
||||
if (t_states>=350000)
|
||||
{
|
||||
//if (SDL_GetTicks()>=time+1000)
|
||||
//printf("%i\n", SDL_GetTicks()-(time+1000));
|
||||
//else
|
||||
// printf("%i\n", SDL_GetTicks()-(time+1000));
|
||||
//t_states = 0;
|
||||
//printf("%i: %i\n", SDL_GetTicks()-(time+1000), t_states);
|
||||
while (SDL_GetTicks()<time+100) {}
|
||||
t_states -= 350000;
|
||||
time = SDL_GetTicks();
|
||||
z80analyze::refresh();
|
||||
}
|
||||
}
|
||||
|
||||
if (t_states>=350000)
|
||||
{
|
||||
//if (SDL_GetTicks()>=time+1000)
|
||||
//printf("%i\n", SDL_GetTicks()-(time+1000));
|
||||
//else
|
||||
// printf("%i\n", SDL_GetTicks()-(time+1000));
|
||||
//t_states = 0;
|
||||
//printf("%i: %i\n", SDL_GetTicks()-(time+1000), t_states);
|
||||
while (SDL_GetTicks()<time+100) {}
|
||||
t_states -= 350000;
|
||||
time = SDL_GetTicks();
|
||||
z80analyze::refresh();
|
||||
}
|
||||
|
||||
|
||||
} else if (!z80debug::debugging() && z80debug::paused()) {
|
||||
zxscreen::redraw(false);
|
||||
ui::menu::show();
|
||||
|
||||
Reference in New Issue
Block a user