/[projet1]/public/pc/tools/osdk/main/FloppyBuilder/Floppy.h
Defence Force logotype

Diff of /public/pc/tools/osdk/main/FloppyBuilder/Floppy.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1392 by dbug, Mon Jan 25 18:22:13 2016 UTC revision 1393 by dbug, Sat Mar 18 19:32:02 2017 UTC
# Line 37  public: Line 37  public:
37    void SetGeometry(int geometry);    void SetGeometry(int geometry);
38    int GetGeometry() const;    int GetGeometry() const;
39    
40    int FindNumberOfSectors(int& firstSectorOffset,int& sectorInterleave) const;    ///< Note: This function will expect valid data to exist past the padding because it needs to scan the data...    int FindNumberOfSectors(int& firstSectorOffset,int& sectorInterleave,std::vector<int>& sectorOrder) const;    ///< Note: This function will expect valid data to exist past the padding because it needs to scan the data...
41    
42  private:  private:
43    char          m_Signature[8];   // (MFM_DISK)    char          m_Signature[8];   // (MFM_DISK)
# Line 88  public: Line 88  public:
88    Floppy();    Floppy();
89    ~Floppy();    ~Floppy();
90    
91    bool CreateDisk(int numberOfSides,int numberOfTracks,int numberOfSectors);    bool CreateDisk(int numberOfSides,int numberOfTracks,int numberOfSectors,int interleave);
92    bool LoadDisk(const char* fileName);    bool LoadDisk(const char* fileName);
93    bool SaveDisk(const char* fileName) const;    bool SaveDisk(const char* fileName) const;
94    bool SaveDescription(const char* fileName) const;    bool SaveDescription(const char* fileName) const;
# Line 126  public: Line 126  public:
126    {    {
127      m_CurrentSector++;      m_CurrentSector++;
128    
129      if (m_CurrentSector==m_SectorNumber+1) // We reached the end of the track!      if (m_CurrentSector==m_SectorCount+1) // We reached the end of the track!
130      {      {
131        m_CurrentSector=1;        m_CurrentSector=1;
132        m_CurrentTrack++;        m_CurrentTrack++;
133        if (m_CurrentTrack==m_TrackNumber)        if (m_CurrentTrack==m_TrackCount)
134        {        {
135          // Next side is following on the floppy in the DSK format, so technically we should have nothing to do          // Next side is following on the floppy in the DSK format, so technically we should have nothing to do
136          // All the hard work is in the loader          // All the hard work is in the loader
137        }        }
138        if (m_CurrentTrack==(m_TrackNumber*2))        if (m_CurrentTrack==(m_TrackCount*2))
139        {        {
140          // We have reached the end of the floppy...          // We have reached the end of the floppy...
141          return false;          return false;
# Line 152  private: Line 152  private:
152  private:  private:
153    void*       m_Buffer;    void*       m_Buffer;
154    size_t      m_BufferSize;    size_t      m_BufferSize;
155    int         m_TrackNumber;          // 42    int         m_TrackCount;           // 42
156    int         m_SectorNumber;         // 17    int         m_SectorCount;          // 17
157    int         m_SideNumber;           // 2    int         m_SideCount;            // 2
158    int         m_OffsetFirstSector;    // 156 (Location of the first byte of data of the first sector)    int         m_OffsetFirstSector;    // 156 (Location of the first byte of data of the first sector)
159    int         m_InterSectorSpacing;   // 358 (Number of bytes to skip to go to the next sector: 256+59+43)    int         m_InterSectorSpacing;   // 358 (Number of bytes to skip to go to the next sector: 256+59+43)
160      std::vector<int> m_SectorOffset;
161    
162    int         m_LoaderTrackPosition;    int         m_LoaderTrackPosition;
163    int         m_LoaderSectorPosition;    int         m_LoaderSectorPosition;

Legend:
Removed from v.1392  
changed lines
  Added in v.1393

  ViewVC Help
Powered by ViewVC 1.1.26