From 95b18c7bf475d91210881280aba70ecc01dbdde7 Mon Sep 17 00:00:00 2001 From: "fabio.olimpieri" Date: Sun, 24 Mar 2013 14:31:03 +0000 Subject: [PATCH] Increased samples in anti aliasing filter, fixed two bugs in original gui --- src/computer.c | 2 +- src/computer.h | 2 +- src/menus.c | 5 ++++- src/tape.c | 14 +++++++------- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/computer.c b/src/computer.c index 22260c4..0d4de4a 100644 --- a/src/computer.c +++ b/src/computer.c @@ -564,7 +564,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)) ordenador.readkeyboard = 1; + if ((ordenador.turbo_state == 0) || ((curr_frames%7 == 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--; diff --git a/src/computer.h b/src/computer.h index 223561f..9e8f085 100644 --- a/src/computer.h +++ b/src/computer.h @@ -28,7 +28,7 @@ #define KB_BUFFER_LENGHT 10 #define MAX_PATH_LENGTH 256 -#define N_SAMPLES 4 +#define N_SAMPLES 8 extern char salir; diff --git a/src/menus.c b/src/menus.c index 6df076d..26921b6 100644 --- a/src/menus.c +++ b/src/menus.c @@ -32,6 +32,7 @@ #include "characters.h" #include "menus.h" #include "tape.h" +#include "tape_browser.h" #include @@ -314,7 +315,7 @@ void help_menu() { clean_screen(); - print_string(fbuffer,"FBZX Wii (1.0)",-1,20,15,0,ancho); + print_string(fbuffer,"FBZX Wii (10.0)",-1,20,15,0,ancho); print_string(fbuffer,"Available keys",-1,50,14,0,ancho); print_string(fbuffer,"Shift:Caps Shift Ctrl:Symbol Shift",-1,95,11,0,ancho); @@ -734,9 +735,11 @@ void select_tapfile() { if((!strncmp(char_id,"ZXTape!",7)) && (char_id[7]==0x1A)&&(char_id[8]==1)) { ordenador.tape_file_type = TAP_TZX; rewind_tape(ordenador.tap_file,1); + browser_tzx(ordenador.tap_file); } else { ordenador.tape_file_type = TAP_TAP; rewind_tape(ordenador.tap_file,1); + browser_tap(ordenador.tap_file); } clean_screen(); diff --git a/src/tape.c b/src/tape.c index 5cfe05c..5ccce94 100644 --- a/src/tape.c +++ b/src/tape.c @@ -57,7 +57,7 @@ inline void tape_read(FILE *fichero, int tstados) { //Auto ultra fast mode if ((ordenador.turbo_state != 1)&&(ordenador.turbo==1)) { - if (ordenador.tape_file_type==TAP_TAP) update_frequency(12500000); + if (ordenador.tape_file_type==TAP_TAP) update_frequency(12000000); else update_frequency(10500000); jump_frames=7; ordenador.precision_old=ordenador.precision; @@ -723,7 +723,7 @@ unsigned char file_empty(FILE *fichero) { void save_file(FILE *fichero) { long position; - unsigned char xor,salir; + unsigned char xor,salir_s; byte dato; int longitud; @@ -743,18 +743,18 @@ void save_file(FILE *fichero) { xor^=procesador.Rm.br.A; - salir = 0; + salir_s = 0; do { if (procesador.Rm.wr.DE == 0) - salir = 2; - if (!salir) { + salir_s = 2; + if (!salir_s) { dato=Z80free_Rd_fake(procesador.Rm.wr.IX); // read data fprintf(fichero,"%c",dato); xor^=dato; procesador.Rm.wr.IX++; procesador.Rm.wr.DE--; } - } while (!salir); + } while (!salir_s); fprintf(fichero,"%c",xor); procesador.Rm.wr.IX++; procesador.Rm.wr.IX++; @@ -1268,7 +1268,7 @@ void fastload_block_tzx (FILE * fichero) { //Anticipate auto ultra fast mode if ((ordenador.turbo_state!= 1)&&(ordenador.turbo==1)) { - update_frequency(11000000); + update_frequency(10500000); jump_frames=7; ordenador.turbo_state=4; }