/[gxemul]/trunk/src/devices/dev_wdc.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_wdc.c

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

revision 31 by dpavlin, Mon Oct 8 16:20:40 2007 UTC revision 32 by dpavlin, Mon Oct 8 16:20:58 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: dev_wdc.c,v 1.68 2006/08/14 17:45:47 debug Exp $   *  $Id: dev_wdc.c,v 1.69 2006/08/30 17:14:25 debug Exp $
29   *   *
30   *  Standard "wdc" IDE controller.   *  Standard "wdc" IDE controller.
31   */   */
# Line 294  void wdc__read(struct cpu *cpu, struct w Line 294  void wdc__read(struct cpu *cpu, struct w
294          int i, cyl = d->cyl_hi * 256+ d->cyl_lo;          int i, cyl = d->cyl_hi * 256+ d->cyl_lo;
295          int count = d->seccnt? d->seccnt : 256;          int count = d->seccnt? d->seccnt : 256;
296          uint64_t offset = 512 * (d->sector - 1          uint64_t offset = 512 * (d->sector - 1
297              + d->head * d->sectors_per_track[d->drive] +              + (int64_t)d->head * d->sectors_per_track[d->drive] +
298              d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);              (int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
299    
300  #if 0  #if 0
301          /*  LBA:  */          /*  LBA:  */
# Line 341  void wdc__write(struct cpu *cpu, struct Line 341  void wdc__write(struct cpu *cpu, struct
341          int cyl = d->cyl_hi * 256+ d->cyl_lo;          int cyl = d->cyl_hi * 256+ d->cyl_lo;
342          int count = d->seccnt? d->seccnt : 256;          int count = d->seccnt? d->seccnt : 256;
343          uint64_t offset = 512 * (d->sector - 1          uint64_t offset = 512 * (d->sector - 1
344              + d->head * d->sectors_per_track[d->drive] +              + (int64_t)d->head * d->sectors_per_track[d->drive] +
345              d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);              (int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
346  #if 0  #if 0
347          /*  LBA:  */          /*  LBA:  */
348          if (d->lba)          if (d->lba)

Legend:
Removed from v.31  
changed lines
  Added in v.32

  ViewVC Help
Powered by ViewVC 1.1.26