Fixed bug in custom info tzx, add select block tzx

This commit is contained in:
fabio.olimpieri 2013-01-27 10:27:19 +00:00
parent 531a21e8b9
commit d1412faf6e
3 changed files with 15 additions and 7 deletions

View File

@ -98,8 +98,8 @@ static const char *audio_messages[] = {
/*05*/ " ", /*05*/ " ",
/*06*/ "Audio mode", /*06*/ "Audio mode",
/*07*/ "^|mono|ABC|ACB|BAC", /*07*/ "^|mono|ABC|ACB|BAC",
/*08 " ", /*08 " ", */
/*09 "Beeper low pass filter", /*09 "Beeper low pass filter",*/
/*10 "^|0|1|2|3|4|5|6|7|max",*/ /*10 "^|0|1|2|3|4|5|6|7|max",*/
NULL NULL
}; };
@ -1593,7 +1593,7 @@ static int save_load_snapshot(int which)
break; break;
case -2: case -2:
case -3: case -3:
msgInfo("Error: unsuported snap file",3000,NULL); msgInfo("Error: unsupported snap file",3000,NULL);
break; break;
} }
} }

View File

@ -1568,7 +1568,7 @@ void load_z80file() {
break; break;
case -2: case -2:
case -3: case -3:
print_string(videomem,"Error: unsuported snap file",-1,232,10,0,ancho); print_string(videomem,"Error: unsupported snap file",-1,232,10,0,ancho);
print_string(videomem,"Press any key",-1,248,10,0,ancho); print_string(videomem,"Press any key",-1,248,10,0,ancho);
wait_key(); wait_key();
break; break;

View File

@ -408,6 +408,14 @@ inline void tape_read_tzx (FILE * fichero, int tstados) {
} }
break; break;
case 0x28: // select block
retval=fread(&value2,1,1,fichero);
retval=fread(&value3,1,1,fichero);
bucle2 = ((unsigned int) value2) + 256 * ((unsigned int) value3);
for(bucle=0;bucle<bucle2;bucle++)
retval=fread(&value3,1,1,fichero);
break;
case 0x2A: // pause if 48K case 0x2A: // pause if 48K
if(ordenador.mode128k==0) { if(ordenador.mode128k==0) {
ordenador.pause = 1; ordenador.pause = 1;
@ -448,8 +456,8 @@ inline void tape_read_tzx (FILE * fichero, int tstados) {
retval=fread(&value3,1,1,fichero); retval=fread(&value3,1,1,fichero);
break; break;
case 0x35: // custon info case 0x35: // custom info
for(bucle=0;bucle<10;bucle++) for(bucle=0;bucle<16;bucle++)
retval=fread(&value3,1,1,fichero); retval=fread(&value3,1,1,fichero);
retval=fread(&value,1,1,fichero); retval=fread(&value,1,1,fichero);
retval=fread(&value2,1,1,fichero); retval=fread(&value2,1,1,fichero);
@ -461,7 +469,7 @@ inline void tape_read_tzx (FILE * fichero, int tstados) {
break; break;
default: // not supported default: // not supported
sprintf(ordenador.osd_text,"Unsuported TZX. Contact FBZX autor. %X",value); sprintf(ordenador.osd_text,"Unsupported TZX. Contact FBZX autor. %X",value);
ordenador.osd_time=200; ordenador.osd_time=200;
rewind_tape(fichero,1); // rewind and stop rewind_tape(fichero,1); // rewind and stop
ordenador.tape_current_mode = TAP_TRASH; ordenador.tape_current_mode = TAP_TRASH;