diff --git a/Makefile.gc b/Makefile.gc index 143f9a3..877a780 100644 --- a/Makefile.gc +++ b/Makefile.gc @@ -122,6 +122,7 @@ dist: $(BUILD) mkdir -p $@/fbzx-gc/scr2 mkdir -p $@/fbzx-gc/configurations mkdir -p $@/fbzx-gc/poke + mkdir -p $@/fbzx-wii/rzx mkdir -p $@/fbzx-gc/doc mkdir -p $@/fbzx-gc/fbzx/allophones cp fbzx_gc.dol $@/fbzx-gc/fbzx_gc.dol @@ -151,6 +152,7 @@ dist: $(BUILD) touch $@/fbzx-gc/scr2/dummy touch $@/fbzx-gc/configurations/dummy touch $@/fbzx-gc/poke/dummy + touch $@/fbzx-wii/rzx/dummy cd $@ && tar -czf ../fbzx-gc-vx-bin.tar.gz * distsource: diff --git a/Makefile.wii b/Makefile.wii index b4d7371..00c1e54 100644 --- a/Makefile.wii +++ b/Makefile.wii @@ -122,6 +122,7 @@ dist: $(BUILD) mkdir -p $@/fbzx-wii/scr2 mkdir -p $@/fbzx-wii/configurations mkdir -p $@/fbzx-wii/poke + mkdir -p $@/fbzx-wii/rzx mkdir -p $@/apps/fbzx-wii/doc mkdir -p $@/fbzx-wii/fbzx/allophones cp fbzx.dol $@/apps/fbzx-wii/boot.dol @@ -154,6 +155,7 @@ dist: $(BUILD) touch $@/fbzx-wii/scr2/dummy touch $@/fbzx-wii/configurations/dummy touch $@/fbzx-wii/poke/dummy + touch $@/fbzx-wii/rzx/dummy cd $@ && tar -czf ../fbzx-wii-vx-bin.tar.gz * distsource: diff --git a/Makefile.win b/Makefile.win index 4319714..e28c9c8 100644 --- a/Makefile.win +++ b/Makefile.win @@ -132,6 +132,7 @@ dist: $(BUILD) mkdir -p $@/fbzx-wii/scr2 mkdir -p $@/fbzx-wii/configurations mkdir -p $@/fbzx-wii/poke + mkdir -p $@/fbzx-wii/rzx mkdir -p $@/fbzx-wii/doc mkdir -p $@/fbzx-wii/fbzx/allophones cp fbzx-wii.exe $@/fbzx-wii/fbzx-wii.exe @@ -164,6 +165,7 @@ dist: $(BUILD) touch $@/fbzx-wii/scr2/dummy touch $@/fbzx-wii/configurations/dummy touch $@/fbzx-wii/poke/dummy + touch $@/fbzx-wii/rzx/dummy cd $@ && tar -czf ../fbzx-wii-windows-v-bin.tar.gz * distsource: diff --git a/src/emulator.c b/src/emulator.c index c14ef16..74c8783 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -1558,7 +1558,7 @@ int main(int argc,char *argv[]) strcat(path_confs,"configurations"); strcat(load_path_poke,"poke"); strcat(path_tmp,"tmp"); - strcat(path_rzx,"rzx_files"); + strcat(path_rzx,"rzx"); strcpy(load_path_snaps,path_snaps); strcpy(load_path_taps,path_taps); strcpy(load_path_scr1,path_scr1); @@ -1794,7 +1794,7 @@ int main(int argc,char *argv[]) ordenador.readkeyboard = 0; } if (ordenador.playing_rzx) - { + { if (ordenador.icount>=ordenador.maxicount) { int error; @@ -1824,8 +1824,9 @@ int main(int argc,char *argv[]) Z80free_INT(&procesador,bus_empty()); if (!ordenador.precision) ordenador.currpix=64; - end_of_frame(); + if (curr_frames==jump_frames) end_of_frame(); else ordenador.cicles_counter=0; } + if (ordenador.cicles_counter<32) Z80free_INT(&procesador,bus_empty()); } else if(ordenador.interr==1) { diff --git a/src/gui_sdl.c b/src/gui_sdl.c index b8599d5..319a347 100644 --- a/src/gui_sdl.c +++ b/src/gui_sdl.c @@ -1386,7 +1386,7 @@ static void set_port(int which) strcat(load_path_taps,"tapes"); strcat(load_path_scr1,"scr"); strcat(load_path_poke,"poke"); - strcat(load_path_rzx,"rzx_files"); + strcat(load_path_rzx,"rzx"); ordenador.port = which; break; #ifdef HW_RVL @@ -1880,7 +1880,7 @@ static int load_rzx() { int retorno; - const char *filename = menu_select_file(load_path_rzx, NULL, 1); // Load from rzx_files + const char *filename = menu_select_file(load_path_rzx, NULL, 1); // Load from rzx dir if (filename==NULL) // Aborted return -1; @@ -1952,6 +1952,7 @@ static int do_rzx(int which) if (retorno2) break; //Error or no file retorno2 = rzx_update(&ordenador.maxicount); if (retorno2 == RZX_FINISHED) {printf("RZX: Playing finished at fisrt frame\n"); break;} + ordenador.cicles_counter=32; //to avoid the interrupt at first frame ordenador.playing_rzx = 1; retorno = -2; //Come back to the menu break; diff --git a/src/rzx_lib/rzx.c b/src/rzx_lib/rzx.c index 363d686..3cda15c 100644 --- a/src/rzx_lib/rzx.c +++ b/src/rzx_lib/rzx.c @@ -291,7 +291,7 @@ void rzx_close_irb() int rzx_seek_irb() { - int done=0; + int done=0, error; long fpos; FILE *snapfile; while(!done) @@ -358,8 +358,9 @@ int rzx_seek_irb() rzx_snap.options|=RZX_EXTERNAL; } /* tell the host emulator to load the snapshot */ - if (emul_handler(RZXMSG_LOADSNAP,&rzx_snap)) return RZX_INVALID; + error=emul_handler(RZXMSG_LOADSNAP,&rzx_snap); if(rzx_snap.options&RZX_REMOVE) remove(rzx_snap.filename); + if (error) return RZX_INVALID; break; case RZXBLK_DATA: /* recording block found, initialize the values */