Re: Ferrari F355 Challenge/w Anamorphic widescreen & 3rd person rear camera mod
Posted: Wed Jan 06, 2021 9:45 pm
Hi: is it working on Dreamshell ?
https://www.dreamcast-talk.com/forum/
Probably not as the first 256 bytes have unprintable characters. I don't really know what that means though.Ro Magnus Larsson wrote:Hi: is it working on Dreamshell ?
this problem only applies to GDEMU_SDRoareye wrote:Probably not as the first 256 bytes have unprintable characters.
By non-printable characters he is referring to the IP.BIN file in a hex editor. I have no idea how he knows that the first 256 bytes of the IP.BIN file has non-printable symbols unless he checked or guessed. If he checked idk why he didn't edit the IP.BIN file in a hex editor after going through the process of checking in one, and if he guessed idk how he thought of something that specific unless this was a common problem. The GDemu is much more common and used compared to Dreamshell, so it is a possibility.Roareye wrote:Is someone able to do this and re-upload? I don't know what counts as a "not printable symbol", and opening the file in Notepad just brings up a load of gibberish. I would assume the problem is the up arrows and yen symbols, but there are so many other odd symbols in there that I wouldn't know where to begin.megavolt85 wrote:GDEMU_SD crash if first 256 bytes of IP.BIN have not printable symbols
all not printable symbols need replace to space (0x20 in hex)
The first 256 characters inside IP.BIN are as follows;Which symbol is GDEMU_SD not able to understand?SEGA SEGAKATANA SEGA ENTERPRISES598F GD-ROM1/1 E 0799A10 T8118D 50V1.00120001003 1ST_READ.BIN SEGA LC-T-81 F355 CHALLENGE
Code: Select all
#include <ctype.h>
#include <stdio.h>
int main(int argc, char **argv)
{
FILE *fp;
unsigned char buf[256];
int i, fix = 0;
if (!(fp = fopen("IP.BIN", "r+b")))
{
return -1;
}
fread((void *) buf, 1, 256, fp);
for (i = 0; i < 256; i++)
{
if(!isprint((int) buf[i]))
{
fix = 1;
buf[i] = 0x20;
}
}
if (fix)
{
fseek(fp, 0, SEEK_SET);
fwrite((void *) buf, 1, 256, fp);
}
fclose(fp);
return 0;
}
sorry I reread my original reply to the other poster and it sounded WAY more snippy than I intended. Will see if I can do this but probably wont be apt at this.megavolt85 wrote:two errors, the first in the IP.BIN 4 Win program, which adds garbage to IP.BIN, the second problem in the GDEMU_SD program, it does not check the contents of IP.BIN
here is the simplest example that will solve this problem
Code: Select all
#include <ctype.h> #include <stdio.h> int main(int argc, char **argv) { FILE *fp; unsigned char buf[256]; int i, fix = 0; if (!(fp = fopen("IP.BIN", "r+b"))) { return -1; } fread((void *) buf, 1, 256, fp); for (i = 0; i < 256; i++) { if(!isprint((int) buf[i])) { fix = 1; buf[i] = 0x20; } } if (fix) { fseek(fp, 0, SEEK_SET); fwrite((void *) buf, 1, 256, fp); } fclose(fp); return 0; }