Ejemplo n.º 1
0
 public void Close()
 {
     this.volDesc = new GDFVolumeDescriptor();
     this.Exceptions.Clear();
     this.type = IsoType.Gdf;
     this.rootDir.Clear();
     this.fr.Close();
     this.file.Close();
 }
Ejemplo n.º 2
0
 public GDFStats(GDFVolumeDescriptor volDesc)
 {
     this.SectorSize = volDesc.SectorSize;
     this.MaxSectors = volDesc.VolumeSectors;
     this.MaxBytes = volDesc.VolumeSize;
     this.Bmp = new Bitmap((int) (this.MaxSectors / 0x800), 0x800);
     for (int i = 0; i < this.Bmp.Width; i++)
     {
         for (int j = 0; j < this.Bmp.Height; j++)
         {
             this.Bmp.SetPixel(i, j, Color.Black);
         }
     }
 }
Ejemplo n.º 3
0
 private void readVolume()
 {
     this.volDesc = new GDFVolumeDescriptor();
     this.volDesc.SectorSize = 0x800;
     this.fr.Seek((long) (0x20 * this.volDesc.SectorSize), SeekOrigin.Begin);
     if (Encoding.ASCII.GetString(this.fr.ReadBytes(20)) == "MICROSOFT*XBOX*MEDIA")
     {
         this.type = IsoType.Xsf;
         this.volDesc.RootOffset = (uint) this.type;
     }
     else
     {
         this.file.Seek((long) ((0x20 * this.volDesc.SectorSize) + 0xfd90000), SeekOrigin.Begin);
         if (Encoding.ASCII.GetString(this.fr.ReadBytes(20)) == "MICROSOFT*XBOX*MEDIA")
         {
             this.type = IsoType.Gdf;
             this.volDesc.RootOffset = (uint) this.type;
         }
         else
         {
             this.type = IsoType.XGD3;
             this.volDesc.RootOffset = (uint) this.type;
         }
     }
     this.file.Seek((long) ((0x20 * this.volDesc.SectorSize) + this.volDesc.RootOffset), SeekOrigin.Begin);
     this.volDesc.Identifier = this.fr.ReadBytes(20);
     this.volDesc.RootDirSector = this.fr.ReadUInt32();
     this.volDesc.RootDirSize = this.fr.ReadUInt32();
     this.volDesc.ImageCreationTime = this.fr.ReadBytes(8);
     this.volDesc.VolumeSize = (ulong) (this.fr.BaseStream.Length - this.volDesc.RootOffset);
     this.volDesc.VolumeSectors = (uint) (this.volDesc.VolumeSize / ((ulong) this.volDesc.SectorSize));
 }