public override void addROMInfo(ROMInfo info, ROMFile file) { info.addInfo("Platform", "Nintendo 64"); WrappedInputStream s = file.stream; byte[] header = s.read(4); N64ROMFormat format = detectFormat(header); info.addInfo("Detected format", detectFormat(header)); if (!isDiskFormat(format) && isDiskExtension(file.extension)) { //Some kind of 64DD disk with an unknown format (might be a dev disk or something, or a bad dump with no system area) return; } else if (isDiskFormat(format)) { parse64DDDiskInfo(info, s); } else if (format == N64ROMFormat.V64) { ByteSwappedInputStream swappedInputStream = new ByteSwappedInputStream(s); parseN64ROM(swappedInputStream, info); } else { parseN64ROM(s, info); } //Haha I'm sure word swapping will be a lot of fun }
static bool isDiskFormat(N64ROMFormat format) { return(format == N64ROMFormat.JAPAN_NDD || format == N64ROMFormat.USA_NDD); }