Exemplo n.º 1
0
 // Methods
 public XFSInputFile(XboxISOFileSource xbdvd, int SizeOfRoot, int StartBlock)
 {
     this.SourceISO   = xbdvd;
     this.attributes  = 0x10;
     this.filename    = "XDFS Root";
     this.filelength  = SizeOfRoot;
     this.StartSector = StartBlock;
 }
Exemplo n.º 2
0
        public XFSInputFile(XboxISOFileSource xbdvd, byte[] buffer, int fsOffset)
        {
            this.SourceISO   = xbdvd;
            this.StartSector = BitConverter.ToInt32(buffer, fsOffset + 4);
            this.filelength  = BitConverter.ToUInt32(buffer, fsOffset + 8);
            byte count = buffer[fsOffset + 13];

            this.filename   = Encoding.ASCII.GetString(buffer, fsOffset + 14, count);
            this.attributes = buffer[fsOffset + 12];
        }
Exemplo n.º 3
0
        public static XboxISOFileSource TryOpen(Stream inStream)
        {
            string fname = "azusa_dummy.iso";

            if (inStream is FileStream fileStream)
            {
                inStream.Position = 0;
                fname             = Path.GetFileName(fileStream.Name);
            }

            try
            {
                XboxISOFileSource result = new XboxISOFileSource(inStream, fname, inStream.Length);
                return(result);
            }
            catch (Exception)
            {
                inStream.Position = 0;
                return(null);
            }
        }