A
Akari
Guest
What program is used to view the 3d files and stuff?
Thanks,?
~SKy
Every programm written by the people themselves. Most of them are specialized to view only one thing. Tell what do you want to see?
What program is used to view the 3d files and stuff?
Thanks,?
~SKy
Store an MD5 checksum of the executable and use that to identify the game. If a user reports that his game isn't identified let him select it from a list, and ask him to send the MD5 checksum to you to use in new versions.So apart from knowing each Disks SLUS SLSP SLEU etc. IDs (it's a joke). I can't think of a way to indentify the PS1 disk the volume ID isn't filled on several of Square's disks (woo mutter).
// C interface#include <cstdio>#include <cstring>// C++ interface#include <string>// Unix interface#include <unistd.h>#include <fcntl.h>#include <errno.h>#include <paths.h>#include <sys/ioctl.h>#include <sys/param.h>#include <sys/types.h>#include <sys/uio.h>#include <sys/stat.h>typedef unsigned long int u32;typedef signed long s32;typedef unsigned char u8;#define BLOCKSIZE 2352using namespace std;void * getFile(FILE * file, u32 sector, u32 length, bool raw){ if (raw) { u32 numSectors = (length + 2048 - 1) / 2048; u8 * data = (u8*)malloc(numSectors * BLOCKSIZE); fseek(file, sector * BLOCKSIZE, SEEK_SET); fread(data, numSectors * BLOCKSIZE, 1, file); return data; } else { u8 * data = (u8*)malloc(length); u32 numSectors = (length + 2048 - 1) / 2048; fseek(file, sector * BLOCKSIZE, SEEK_SET); for (int i=0; i<numSectors; i++) { u8 block[BLOCKSIZE]; fread(block, BLOCKSIZE, 1, file); u32 remainingSize = length - i * 2048; u32 dataSize = remainingSize > 2048 ? 2048 : remainingSize; memcpy(data + i * 2048, block + 16 + 8, dataSize); } return data; }}int main (const int argc, char const * const argv[]) { FILE * file = fopen(<path to your disk image>, "rb"); string root = "<path to the root of the extracted files>"; string directory = ""; u8 * fileTable = (u8*)getFile(file, 24, 16 * 2048, false); int index = 0; bool end = false; int directoryCount = 0; int fileCount = 0; bool movies = false; do { u32 startSector = fileTable[index * 7 + 0] | (fileTable[index * 7 + 1] << 8) | (fileTable[index * 7 + 2] << 16); s32 fileSize = fileTable[index * 7 + 3] | (fileTable[index * 7 + 4] << 8) | (fileTable[index * 7 + 5] << 16) | (fileTable[index * 7 + 6] << 24); if (startSector != 0xFFFFFF) { if (fileSize < 0) { char tmp[256]; sprintf(tmp, "dir%i", directoryCount); fileCount = 0; directory = tmp; mkdir((root + directory).c_str(), 0777); movies = directoryCount == 0; directoryCount ++; } else if (fileSize > 0) { char tmp[256]; sprintf(tmp, "file%2.2x.bin", fileCount);// printf("%8.8x %8.8i\n", startSector, fileSize);#if 1 void * data = getFile(file, startSector, fileSize, movies); FILE * dataFile = fopen((root + directory + "/" + string(tmp)).c_str(), "wb"); fwrite(data, fileSize, 1, dataFile); fclose(dataFile); free(data);#endif fileCount++; } } else { end = true; } index++; } while (!end); free(fileTable); fclose(file);}