src/wd279x.c

changeset 73
05ef5f3c5246
parent 71
22452603e214
child 77
e7898cbae0c6
child 78
c149c13aff1c
     1.1 --- a/src/wd279x.c	Tue Dec 28 21:47:43 2010 +0000
     1.2 +++ b/src/wd279x.c	Tue Dec 28 22:37:21 2010 +0000
     1.3 @@ -4,7 +4,9 @@
     1.4  #include "musashi/m68k.h"
     1.5  #include "wd279x.h"
     1.6  
     1.7 +#ifndef WD279X_DEBUG
     1.8  #define NDEBUG
     1.9 +#endif
    1.10  #include "utils.h"
    1.11  
    1.12  /// WD2797 command constants
    1.13 @@ -412,7 +414,6 @@
    1.14  
    1.15  					for (int i=0; i<temp; i++) {
    1.16  						// Calculate the LBA address of the required sector
    1.17 -//						lba = ((((ctx->track * ctx->geom_heads) + ctx->head) * ctx->geom_spt) + ((ctx->sector + i - 1) % ctx->geom_spt)) * ctx->geom_secsz;
    1.18  						// LBA = (C * nHeads * nSectors) + (H * nSectors) + S - 1
    1.19  						lba = (((ctx->track * ctx->geom_heads * ctx->geom_spt) + (ctx->head * ctx->geom_spt) + ctx->sector) + i) - 1;
    1.20  						// convert LBA to byte address