i = 0;
/* Get in sync with the header, number of 0x16 can't be determined.. */
if (ptr_buffer[i] != 0x16)
{
ShowError("Not an Oric file [Byte 0 is not 0x16]");
}
while(ptr_buffer[++i] == 0x16);
if (i < 3)
{
ShowError("Not an Oric file [Less than 3 0x16]");
}
if (ptr_buffer[i] != 0x24)
{
ShowError("Not an Oric file [0x16 stream is not followed by 0x24]");
}
/* Now we are "synchronized" */
if (ptr_buffer[i+3])
{
ShowError("Not a BASIC file");
}
i += 10;