Turbo mode and precision emulation on at the same time

This commit is contained in:
fabio.olimpieri 2013-01-03 10:00:10 +00:00
parent 27460a96b6
commit eeaf3db38f
4 changed files with 16 additions and 5 deletions

View File

@ -111,6 +111,7 @@ void computer_init () { //Called only on start-up
ordenador.turbo = 0;
ordenador.turbo_state = 0;
ordenador.precision = 0;
ordenador.precision_old = 0;
ordenador.tape_readed = 0;
ordenador.pause = 1; // tape stop

View File

@ -37,6 +37,7 @@ int countdown;
struct computer {
unsigned char precision; //If set 1 emulate with more precision
unsigned char precision_old;
unsigned char npixels; //1, 2 or 4 depending on dblscan and zaurus_mini
unsigned char progressive; //interlace or progressive 576
unsigned int temporal_io;

View File

@ -531,7 +531,7 @@ static void emulation_settings(void)
switch(ordenador.turbo)
{
case 1: //auto
ordenador.precision =0;
//ordenador.precision =0;
case 0: //off
update_frequency(0); //set machine frequency
jump_frames=0;
@ -541,12 +541,14 @@ static void emulation_settings(void)
update_frequency(10000000);
jump_frames=4;
ordenador.precision =0;
ordenador.precision_old =0;
ordenador.turbo_state=2;
break;
case 3: //ultra fast
update_frequency(15000000);
jump_frames=24;
ordenador.precision =0;
ordenador.precision_old =0;
ordenador.turbo_state=3;
break;
default:
@ -557,12 +559,17 @@ static void emulation_settings(void)
if (submenus[4] != submenus_old[4])
{
ordenador.precision = !submenus[4];
if (ordenador.precision)
if ((ordenador.turbo==1)&&(ordenador.turbo_state==3)) ordenador.precision_old=ordenador.precision; //Tape is loading
else if (ordenador.precision)
{
update_frequency(0);
jump_frames=0;
ordenador.turbo =0;
ordenador.turbo_state=0;
if (ordenador.turbo!=1)
{
ordenador.turbo =0;
ordenador.turbo_state=0;
}
}
}
}

View File

@ -39,6 +39,7 @@ inline void tape_read(FILE *fichero, int tstados) {
update_frequency(0); //set machine frequency
jump_frames=0;
ordenador.turbo_state = 0;
ordenador.precision=ordenador.precision_old;
}
return;
}
@ -48,6 +49,7 @@ inline void tape_read(FILE *fichero, int tstados) {
{
update_frequency(15000000);
jump_frames=24;
ordenador.precision_old=ordenador.precision;
ordenador.precision =0;
ordenador.turbo_state = 3;
}