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