public static DiscStream Open_LBA_2048(Disc disc) { var ret = new DiscStream(); ret._Open_LBA_2048(disc); return(ret); }
/// <summary> /// Attempts to determine the type of the disc. /// In the future, we might return a struct or a class with more detailed information /// </summary> public DiscType DetectDiscType() { //sega doesnt put anything identifying in the cdfs volume info. but its consistent about putting its own header here in sector 0 if (DetectSegaSaturn()) { return(DiscType.SegaSaturn); } // not fully tested yet if (DetectMegaCD()) { return(DiscType.MegaCD); } // not fully tested yet if (DetectPSX()) { return(DiscType.SonyPSX); } //we dont know how to detect TurboCD. //an emulator frontend will likely just guess TurboCD if the disc is UnknownFormat var iso = new ISOFile(); bool isIso = iso.Parse(DiscStream.Open_LBA_2048(this)); if (isIso) { var appId = System.Text.Encoding.ASCII.GetString(iso.VolumeDescriptors[0].ApplicationIdentifier).TrimEnd('\0', ' '); //NOTE: PSX magical drop F (JP SLPS_02337) doesn't have the correct iso PVD fields //if (appId == "PLAYSTATION") // return DiscType.SonyPSX; if (appId == "PSP GAME") { return(DiscType.SonyPSP); } return(DiscType.UnknownCDFS); } return(DiscType.UnknownFormat); }
public static DiscStream Open_LBA_2048(Disc disc) { var ret = new DiscStream(); ret._Open_LBA_2048(disc); return ret; }