mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-11-28 02:54:15 +01:00
Record RZX frame only when interrupt acnoldge or framcount >0
This commit is contained in:
parent
d84f553d81
commit
a4dd41f9b4
@ -1833,7 +1833,11 @@ int main(int argc,char *argv[])
|
|||||||
if(ordenador.interr==1) {
|
if(ordenador.interr==1) {
|
||||||
Z80free_INT(&procesador,bus_empty());
|
Z80free_INT(&procesador,bus_empty());
|
||||||
if ((ordenador.precision==0)||(jump_frames>0)) ordenador.interr=0;
|
if ((ordenador.precision==0)||(jump_frames>0)) ordenador.interr=0;
|
||||||
if (ordenador.recording_rzx) {if (ordenador.icount != 0xFFFF) rzx_update(&ordenador.icount);ordenador.icount=0;}
|
if (ordenador.recording_rzx)
|
||||||
|
{
|
||||||
|
if (ordenador.icount == 0xFFFF) ordenador.icount=0;
|
||||||
|
else if (test_IFF1(&procesador)||(ordenador.icount>10)) {rzx_update(&ordenador.icount);ordenador.icount=0;}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1952,7 +1952,7 @@ static int do_rzx(int which)
|
|||||||
ordenador.frames_count_rzx=1;
|
ordenador.frames_count_rzx=1;
|
||||||
retorno2 = load_rzx();
|
retorno2 = load_rzx();
|
||||||
if (retorno2) break; //Error or no file
|
if (retorno2) break; //Error or no file
|
||||||
retorno2 = rzx_update(&ordenador.maxicount);
|
retorno2 = rzx_update(&ordenador.maxicount); //The first frame does not generate interrupt
|
||||||
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.cicles_counter=32; //to avoid the interrupt at first frame
|
||||||
ordenador.playing_rzx = 1;
|
ordenador.playing_rzx = 1;
|
||||||
|
@ -293,6 +293,8 @@ void rzx_close_irb()
|
|||||||
block.start=pos;
|
block.start=pos;
|
||||||
/* signal that we have exited the IRB */
|
/* signal that we have exited the IRB */
|
||||||
rzx_status&=~RZX_IRB;
|
rzx_status&=~RZX_IRB;
|
||||||
|
INcount=0;
|
||||||
|
INold=0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -678,7 +680,6 @@ int rzx_update(rzx_u16 *icount)
|
|||||||
rzx_popen(fpos,"wb");
|
rzx_popen(fpos,"wb");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
INcount=0;
|
|
||||||
INold=0xFFFF;
|
INold=0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +67,11 @@ int Z80free_step(Z80FREE *processor) {
|
|||||||
return (retval);
|
return (retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
byte test_IFF1 (Z80FREE *processor)
|
||||||
|
{
|
||||||
|
return processor->IFF1;
|
||||||
|
}
|
||||||
|
|
||||||
int Z80free_ustep(Z80FREE *processor) {
|
int Z80free_ustep(Z80FREE *processor) {
|
||||||
|
|
||||||
static byte opcode,d1;
|
static byte opcode,d1;
|
||||||
|
@ -147,6 +147,7 @@ void Z80free_Wr_fake (register word Addr, register byte Value);
|
|||||||
byte Z80free_In (register word Port);
|
byte Z80free_In (register word Port);
|
||||||
void Z80free_Out (register word Port, register byte Value);
|
void Z80free_Out (register word Port, register byte Value);
|
||||||
void Z80free_Out_fake (register word Port, register byte Value);
|
void Z80free_Out_fake (register word Port, register byte Value);
|
||||||
|
byte test_IFF1 (Z80FREE *);
|
||||||
|
|
||||||
/* Opcode functions */
|
/* Opcode functions */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user