merge changes from default experimental_memory_mapper_v2

Wed, 13 Mar 2013 01:10:34 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Wed, 13 Mar 2013 01:10:34 +0000
branch
experimental_memory_mapper_v2
changeset 135
159f937af10d
parent 133
84ed5ec1d1e0
parent 134
b826697f411a
child 140
1e4c45b144c4

merge changes from default

src/main.c file | annotate | diff | revisions
src/wd2010.c file | annotate | diff | revisions
     1.1 --- a/src/main.c	Wed Mar 13 00:40:42 2013 +0000
     1.2 +++ b/src/main.c	Wed Mar 13 01:10:34 2013 +0000
     1.3 @@ -48,7 +48,7 @@
     1.4  		state.hdc_disc0 = NULL;
     1.5  		return (0);
     1.6  	}else{
     1.7 -		wd2010_init(&state.hdc_ctx, state.hdc_disc0, 512, 17, 8);
     1.8 +		wd2010_init(&state.hdc_ctx, state.hdc_disc0, 512, 16, 8);
     1.9  		fprintf(stderr, "Disc image loaded.\n");
    1.10  		return (1);
    1.11  	}
     2.1 --- a/src/wd2010.c	Wed Mar 13 00:40:42 2013 +0000
     2.2 +++ b/src/wd2010.c	Wed Mar 13 01:10:34 2013 +0000
     2.3 @@ -419,7 +419,7 @@
     2.4  								LOG("WARNING: Geometry mismatch. WD2010 Write Sector with secsz %d != phys_secsz %d.", ssz, ctx->geom_secsz);
     2.5  
     2.6  							// Check to see if the cyl, hd and sec are valid
     2.7 -							if ((ctx->track > (ctx->geom_tracks-1)) || (ctx->head > (ctx->geom_heads-1)) || ((ctx->sector + ctx->sector_count - 1) > ctx->geom_spt-1) || (ssz != ctx->geom_secsz)) {
     2.8 +							if ((cmd != CMD_WRITE_FORMAT) && ((ctx->track > (ctx->geom_tracks-1)) || (ctx->head > (ctx->geom_heads-1)) || ((ctx->sector + ctx->sector_count - 1) > ctx->geom_spt-1) || (ssz != ctx->geom_secsz))) {
     2.9  								LOG("*** WD2010 ALERT: CHS parameter limit exceeded! dDrive1=%d CHS=%d:%d:%d, nSecs=%d, endSec=%d maxCHS=%d:%d:%d",
    2.10  										ctx->mcr2_ddrive1,
    2.11  										ctx->track, ctx->head, ctx->sector,