public void SetEntryFromSector(DataController dc, int sector, int pos, string Name, string Extension) { this.Name = Name; this.Extension = Extension; EntrySector = sector; EntryPosition = pos; FileMode = dc.GetByte(pos); Password = dc.GetByte(pos + 0x11); Size = dc.GetWord(pos + 0x12); LoadAddress = dc.GetWord(pos + 0x14); ExecuteAddress = dc.GetWord(pos + 0x16); DateTimeData = dc.Copy(pos + 0x18, 6); StartCluster = dc.GetByte(pos + 0x1e); StartCluster |= dc.GetByte(pos + 0x1f) << 7; }
private bool ReadSectorHeader(FileStream fs) { Header = new byte[0x10]; int s = fs.Read(Header, 0, 0x10); if (s < 0x10) { return(false); } var dc = new DataController(Header); Track = dc.GetByte(0); Side = dc.GetByte(1); Sector = dc.GetByte(2); NumOfSector = dc.GetByte(3); SectorsInTrack = dc.GetWord(4); Density = dc.GetByte(6); IsDelete = dc.GetByte(7) != 0x00; Status = dc.GetByte(8); DataSize = dc.GetWord(0x0e); return(true); }