Fixed 2 bugs on returnig from turbo state

This commit is contained in:
fabio.olimpieri 2013-05-25 09:51:40 +00:00
parent d020f6ec66
commit e3a2c394ee
3 changed files with 11 additions and 3 deletions

View File

@ -554,7 +554,7 @@ inline void show_screen (int tstados) {
if (ordenador.tstados_counter>=ordenador.tstatodos_frame) {
ordenador.tstados_counter-=ordenador.tstatodos_frame;
ordenador.interr = 1;
if ((ordenador.turbo_state == 0) || ((curr_frames%7 == 0)&&(curr_frames))) ordenador.readkeyboard = 1;
if ((ordenador.turbo_state == 0) || ((curr_frames%5 == 0)&&(curr_frames))) ordenador.readkeyboard = 1;
curr_frames++;
if (ordenador.tape_start_countdwn==1) ordenador.tape_stop=0; //Autoplay
if ((ordenador.tape_start_countdwn>0)&&(ordenador.stop_tape_start_countdown ==0)) ordenador.tape_start_countdwn--;

View File

@ -1596,7 +1596,10 @@ int main(int argc,char *argv[])
ordenador.contention=0;
}
else
if (tstados>0) {
{
ordenador.wr=0;
ordenador.r_fetch=0;
ordenador.io=0;
show_screen(tstados);
emulate(tstados+ordenador.contention);
ordenador.contention=0;
@ -1618,6 +1621,11 @@ int main(int argc,char *argv[])
else
{
ordenador.tape_start_countdwn=0; //Stop tape play countdown
if ((ordenador.turbo_state != 1)&&(ordenador.turbo==1))
{
update_frequency(0); //set machine frequency
jump_frames=0;
}
if (ordenador.tape_stop ==1) fastload_block_tzx(ordenador.tap_file);
}
}

View File

@ -1269,7 +1269,7 @@ void fastload_block_tzx (FILE * fichero) {
if ((ordenador.turbo_state!= 1)&&(ordenador.turbo==1))
{
update_frequency(10000000); //precision could be on
jump_frames=7;
jump_frames=3;
//ordenador.turbo_state=4;
}
ordenador.tape_start_countdwn=((unsigned int)pause[0]+256*(unsigned int)pause[1])/20+1; //autoplay countdown