RZX working in fast mode, keep int signal high for 32 cicles in rzx playing mode

This commit is contained in:
fabio.olimpieri 2015-02-27 21:46:08 +00:00
parent 4eb5142dec
commit d72e42ee2d
6 changed files with 16 additions and 7 deletions

View File

@ -122,6 +122,7 @@ dist: $(BUILD)
mkdir -p $@/fbzx-gc/scr2 mkdir -p $@/fbzx-gc/scr2
mkdir -p $@/fbzx-gc/configurations mkdir -p $@/fbzx-gc/configurations
mkdir -p $@/fbzx-gc/poke mkdir -p $@/fbzx-gc/poke
mkdir -p $@/fbzx-wii/rzx
mkdir -p $@/fbzx-gc/doc mkdir -p $@/fbzx-gc/doc
mkdir -p $@/fbzx-gc/fbzx/allophones mkdir -p $@/fbzx-gc/fbzx/allophones
cp fbzx_gc.dol $@/fbzx-gc/fbzx_gc.dol cp fbzx_gc.dol $@/fbzx-gc/fbzx_gc.dol
@ -151,6 +152,7 @@ dist: $(BUILD)
touch $@/fbzx-gc/scr2/dummy touch $@/fbzx-gc/scr2/dummy
touch $@/fbzx-gc/configurations/dummy touch $@/fbzx-gc/configurations/dummy
touch $@/fbzx-gc/poke/dummy touch $@/fbzx-gc/poke/dummy
touch $@/fbzx-wii/rzx/dummy
cd $@ && tar -czf ../fbzx-gc-vx-bin.tar.gz * cd $@ && tar -czf ../fbzx-gc-vx-bin.tar.gz *
distsource: distsource:

View File

@ -122,6 +122,7 @@ dist: $(BUILD)
mkdir -p $@/fbzx-wii/scr2 mkdir -p $@/fbzx-wii/scr2
mkdir -p $@/fbzx-wii/configurations mkdir -p $@/fbzx-wii/configurations
mkdir -p $@/fbzx-wii/poke mkdir -p $@/fbzx-wii/poke
mkdir -p $@/fbzx-wii/rzx
mkdir -p $@/apps/fbzx-wii/doc mkdir -p $@/apps/fbzx-wii/doc
mkdir -p $@/fbzx-wii/fbzx/allophones mkdir -p $@/fbzx-wii/fbzx/allophones
cp fbzx.dol $@/apps/fbzx-wii/boot.dol cp fbzx.dol $@/apps/fbzx-wii/boot.dol
@ -154,6 +155,7 @@ dist: $(BUILD)
touch $@/fbzx-wii/scr2/dummy touch $@/fbzx-wii/scr2/dummy
touch $@/fbzx-wii/configurations/dummy touch $@/fbzx-wii/configurations/dummy
touch $@/fbzx-wii/poke/dummy touch $@/fbzx-wii/poke/dummy
touch $@/fbzx-wii/rzx/dummy
cd $@ && tar -czf ../fbzx-wii-vx-bin.tar.gz * cd $@ && tar -czf ../fbzx-wii-vx-bin.tar.gz *
distsource: distsource:

View File

@ -132,6 +132,7 @@ dist: $(BUILD)
mkdir -p $@/fbzx-wii/scr2 mkdir -p $@/fbzx-wii/scr2
mkdir -p $@/fbzx-wii/configurations mkdir -p $@/fbzx-wii/configurations
mkdir -p $@/fbzx-wii/poke mkdir -p $@/fbzx-wii/poke
mkdir -p $@/fbzx-wii/rzx
mkdir -p $@/fbzx-wii/doc mkdir -p $@/fbzx-wii/doc
mkdir -p $@/fbzx-wii/fbzx/allophones mkdir -p $@/fbzx-wii/fbzx/allophones
cp fbzx-wii.exe $@/fbzx-wii/fbzx-wii.exe cp fbzx-wii.exe $@/fbzx-wii/fbzx-wii.exe
@ -164,6 +165,7 @@ dist: $(BUILD)
touch $@/fbzx-wii/scr2/dummy touch $@/fbzx-wii/scr2/dummy
touch $@/fbzx-wii/configurations/dummy touch $@/fbzx-wii/configurations/dummy
touch $@/fbzx-wii/poke/dummy touch $@/fbzx-wii/poke/dummy
touch $@/fbzx-wii/rzx/dummy
cd $@ && tar -czf ../fbzx-wii-windows-v-bin.tar.gz * cd $@ && tar -czf ../fbzx-wii-windows-v-bin.tar.gz *
distsource: distsource:

View File

@ -1558,7 +1558,7 @@ int main(int argc,char *argv[])
strcat(path_confs,"configurations"); strcat(path_confs,"configurations");
strcat(load_path_poke,"poke"); strcat(load_path_poke,"poke");
strcat(path_tmp,"tmp"); strcat(path_tmp,"tmp");
strcat(path_rzx,"rzx_files"); strcat(path_rzx,"rzx");
strcpy(load_path_snaps,path_snaps); strcpy(load_path_snaps,path_snaps);
strcpy(load_path_taps,path_taps); strcpy(load_path_taps,path_taps);
strcpy(load_path_scr1,path_scr1); strcpy(load_path_scr1,path_scr1);
@ -1824,8 +1824,9 @@ int main(int argc,char *argv[])
Z80free_INT(&procesador,bus_empty()); Z80free_INT(&procesador,bus_empty());
if (!ordenador.precision) ordenador.currpix=64; 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 else
if(ordenador.interr==1) { if(ordenador.interr==1) {

View File

@ -1386,7 +1386,7 @@ static void set_port(int which)
strcat(load_path_taps,"tapes"); strcat(load_path_taps,"tapes");
strcat(load_path_scr1,"scr"); strcat(load_path_scr1,"scr");
strcat(load_path_poke,"poke"); strcat(load_path_poke,"poke");
strcat(load_path_rzx,"rzx_files"); strcat(load_path_rzx,"rzx");
ordenador.port = which; ordenador.port = which;
break; break;
#ifdef HW_RVL #ifdef HW_RVL
@ -1880,7 +1880,7 @@ static int load_rzx()
{ {
int retorno; 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 if (filename==NULL) // Aborted
return -1; return -1;
@ -1952,6 +1952,7 @@ static int do_rzx(int which)
if (retorno2) break; //Error or no file if (retorno2) break; //Error or no file
retorno2 = rzx_update(&ordenador.maxicount); retorno2 = rzx_update(&ordenador.maxicount);
if (retorno2 == RZX_FINISHED) {printf("RZX: Playing finished at fisrt frame\n"); break;} 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; ordenador.playing_rzx = 1;
retorno = -2; //Come back to the menu retorno = -2; //Come back to the menu
break; break;

View File

@ -291,7 +291,7 @@ void rzx_close_irb()
int rzx_seek_irb() int rzx_seek_irb()
{ {
int done=0; int done=0, error;
long fpos; long fpos;
FILE *snapfile; FILE *snapfile;
while(!done) while(!done)
@ -358,8 +358,9 @@ int rzx_seek_irb()
rzx_snap.options|=RZX_EXTERNAL; rzx_snap.options|=RZX_EXTERNAL;
} }
/* tell the host emulator to load the snapshot */ /* 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(rzx_snap.options&RZX_REMOVE) remove(rzx_snap.filename);
if (error) return RZX_INVALID;
break; break;
case RZXBLK_DATA: case RZXBLK_DATA:
/* recording block found, initialize the values */ /* recording block found, initialize the values */