Added ultraspeed turbo mode, ULA+ contention

This commit is contained in:
fabio.olimpieri 2012-05-20 17:21:18 +00:00
parent 89e9f9bc03
commit 2bc2a83812
3 changed files with 25 additions and 15 deletions

View File

@ -1275,7 +1275,7 @@ void Z80free_Out (register word Port, register byte Value) {
register word maskport; register word maskport;
if (((Port&0x0001)==0)||((Port>=0x4000)&&(Port<0x8000))) { if (((Port&0x0001)==0)||((Port>=0x4000)&&(Port<0x8000))||Port == 0xBF3B||Port == 0xFF3B) {
do_contention(); do_contention();
} }
@ -1348,7 +1348,7 @@ byte Z80free_In (register word Port) {
static unsigned int temporal_io; static unsigned int temporal_io;
byte pines; byte pines;
if (((Port&0x0001)==0)||((Port>=0x4000)&&(Port<0x8000))) { if (((Port&0x0001)==0)||((Port>=0x4000)&&(Port<0x8000))||Port == 0xFF3B) {
do_contention(); do_contention();
} }

View File

@ -79,7 +79,7 @@ static const char *emulation_messages[] = {
/*04*/ "Tap fast speed", /*04*/ "Tap fast speed",
/*05*/ "^|on|off", /*05*/ "^|on|off",
/*06*/ "Turbo mode", /*06*/ "Turbo mode",
/*07*/ "^|on|off", /*07*/ "^|off|speed|ultraspeed",
/*08*/ "Double scan", /*08*/ "Double scan",
/*09*/ "^|on|off", /*09*/ "^|on|off",
/*10*/ "TV mode", /*10*/ "TV mode",
@ -374,7 +374,7 @@ static void emulation_settings(void)
submenus[0] = get_machine_model(); submenus[0] = get_machine_model();
submenus[1] = ordenador.volume/2; submenus[1] = ordenador.volume/2;
submenus[2] = !ordenador.tape_fast_load; submenus[2] = !ordenador.tape_fast_load;
submenus[3] = !ordenador.turbo; submenus[3] = ordenador.turbo;
submenus[4] = !ordenador.dblscan; submenus[4] = !ordenador.dblscan;
submenus[5] = ordenador.bw; submenus[5] = ordenador.bw;
submenus[6] = !ordenador.ay_emul; submenus[6] = !ordenador.ay_emul;
@ -392,15 +392,25 @@ static void emulation_settings(void)
ordenador.volume = submenus[1]*2; //I should use set_volume() ? ordenador.volume = submenus[1]*2; //I should use set_volume() ?
ordenador.tape_fast_load = !submenus[2]; ordenador.tape_fast_load = !submenus[2];
ordenador.turbo = !submenus[3]; ordenador.turbo = submenus[3];
if(ordenador.turbo){ curr_frames=0;
ordenador.tst_sample=12000000/ordenador.freq; //5,0 MHz max emulation speed for wii at full frames switch(ordenador.turbo)
jump_frames=3; {
} else { case 0: //off
ordenador.tst_sample=3500000/ordenador.freq; ordenador.tst_sample=3500000/ordenador.freq;
jump_frames=0; jump_frames=0;
curr_frames=0; break;
case 1: //speed
ordenador.tst_sample=12000000/ordenador.freq; //5,0 MHz max emulation speed for wii at full frames
jump_frames=3;
break;
case 2: //very speed
ordenador.tst_sample=20000000/ordenador.freq;
jump_frames=24;
break;
default:
break;
} }
ordenador.dblscan = !submenus[4]; ordenador.dblscan = !submenus[4];

View File

@ -282,11 +282,11 @@ void settings_menu() {
computer_set_palete(); computer_set_palete();
break; break;
case SDLK_t: case SDLK_t:
curr_frames=0;
if(ordenador.turbo){ if(ordenador.turbo){
ordenador.tst_sample=3500000/ordenador.freq; ordenador.tst_sample=3500000/ordenador.freq;
ordenador.turbo = 0; ordenador.turbo = 0;
jump_frames=0; jump_frames=0;
curr_frames=0;
} else { } else {
ordenador.tst_sample=12000000/ordenador.freq; //5,0 MHz max emulation speed for wii at full frames ordenador.tst_sample=12000000/ordenador.freq; //5,0 MHz max emulation speed for wii at full frames
ordenador.turbo = 1; ordenador.turbo = 1;