src/wd279x.h

changeset 111
4c85846b09cd
parent 79
674226015c8a
     1.1 --- a/src/wd279x.h	Thu Dec 08 23:44:19 2011 +0000
     1.2 +++ b/src/wd279x.h	Sat Nov 17 19:13:08 2012 +0000
     1.3 @@ -25,6 +25,8 @@
     1.4  typedef struct {
     1.5  	// Current track, head and sector
     1.6  	int						track, head, sector;
     1.7 +	// Track and sector registers
     1.8 +	int						track_reg, sector_reg;
     1.9  	// Geometry of current disc
    1.10  	int						geom_secsz, geom_spt, geom_heads, geom_tracks;
    1.11  	// IRQ status
    1.12 @@ -42,6 +44,12 @@
    1.13  	size_t					data_pos, data_len;
    1.14  	// Current disc image file
    1.15  	FILE					*disc_image;
    1.16 +	// Write protect flag
    1.17 +	int						writeable;
    1.18 +	// LBA at which to start writing
    1.19 +	int						write_pos;
    1.20 +	// True if a format command is in progress
    1.21 +	int						formatting;
    1.22  } WD2797_CTX;
    1.23  
    1.24  /**
    1.25 @@ -88,7 +96,7 @@
    1.26   * @param	heads	Number of heads (1 or 2).
    1.27   * @return	Error code; WD279X_E_OK if everything worked OK.
    1.28   */
    1.29 -WD2797_ERR wd2797_load(WD2797_CTX *ctx, FILE *fp, int secsz, int spt, int heads);
    1.30 +WD2797_ERR wd2797_load(WD2797_CTX *ctx, FILE *fp, int secsz, int spt, int heads, int writeable);
    1.31  
    1.32  /**
    1.33   * @brief	Deassign the current image file.
    1.34 @@ -111,5 +119,5 @@
    1.35   */
    1.36  void wd2797_write_reg(WD2797_CTX *ctx, uint8_t addr, uint8_t val);
    1.37  
    1.38 -
    1.39 +void wd2797_dma_miss(WD2797_CTX *ctx);
    1.40  #endif