- [NEW] Frequència del Z80 configurable

This commit is contained in:
2024-12-20 11:24:58 +01:00
parent 4a0e2b3b7d
commit fe36a970c2
5 changed files with 23 additions and 5 deletions

View File

@@ -72,7 +72,10 @@ namespace actions
}
int main(int argc, char *argv[])
{
{
const uint32_t clock = 3500000;
const uint32_t update_freq = clock / 10;
new zx_48mem();
z80dis::loadSymbols();
@@ -223,7 +226,7 @@ int main(int argc, char *argv[])
}
}
if (t_states>=350000)
if (t_states>=update_freq)
{
//if (SDL_GetTicks()>=time+1000)
//printf("%i\n", SDL_GetTicks()-(time+1000));
@@ -232,7 +235,7 @@ int main(int argc, char *argv[])
//t_states = 0;
//printf("%i: %i\n", SDL_GetTicks()-(time+1000), t_states);
while (SDL_GetTicks()<time+100) {}
t_states -= 350000;
t_states -= update_freq;
time = SDL_GetTicks();
z80analyze::refresh();
}