We moved to private messages for various reasons but i am proud to say fzabkar helped me fix my drive by updating modules 02 and 32 with an MHDD script.
Firstly let me state that the change at 0x0C i didn't recognize was the module checksum:
Analysis of Western Digital ROYL firmware MOD 02:
http://malthus.zapto.org/viewtopic.php?f=59&t=821I then got my feet wet by reading up on MHDD scripting:
Using MHDD to send Vendor Specific Commands (VSC) to a WD drive:
http://malthus.zapto.org/viewtopic.php?t=987&p=4308After i felt comfortable i proceeded with this script fzabkar kindly made for me:
Code:
; VSC enable
reset
waitnbsy
regs = $45 $0b $00 $44 $57 $a0 $80
waitnbsy
; write 00h to section 0x1b at offset 02h in SA module 02
regs = $d6 $01 $be $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wrt_021b.bin
waitnbsy
regs = $d6 $01 $bf $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wd_021b.bin
; write 3Ch sectors to SA module 32
waitnbsy
regs = $d6 $01 $be $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wrt_32.bin
waitnbsy
regs = $d6 $3c $bf $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wd_32clr.bin
Binary file wrt_32.bin, wrt_021b.bin and wd_021b.bin were made with a hex editor(HxD). Below are the key sectors that need to be in the bin files if you want to make them yourself but i'll also attach all the files to this post. All files should have 512 bytes in them. You can try out one of HxD's features: Edit->Insert bytes...
wrt_32.bin (512 bytes) plus zero padding (the rest 496 bytes = 0x00);
Code:
0x0000 08 00 02 00 32 00 00 00 00 00 00 00 00 00 00 00
wrt_021b.bin (512 bytes) plus zero padding (the rest 496 bytes = 0x00);
Code:
0x0000 2a 00 02 00 02 00 1b 00 02 00 01 00 00 00 00 00
wd_021b.bin (512 bytes)
Code:
512 bytes of zeros
The file wd_32clr.bin is the modified MOD 32 (cleared relo-list) which fzabkar attached earlier above but i will include in attachment also for convenience. Please note that if the bin files are not filled with the 512 bytes the script will fail. The four files above should be in the same directory as MHDD.exe. The script should be in a subfolder called scripts(eg. SCRIPTS\SLOFIX).
Here is a sample log from running the script successfully:
Code:
MHDD>.SLOFIX
16.08.2014 9:50:08 MHDD ATA/SCSI TERMINAL v2.1
16.08.2014 9:50:08 Script: SLOFIX
16.08.2014 9:50:08 LINE 1: RESET
16.08.2014 9:50:08 LINE 2: WAITNBSY
16.08.2014 9:50:08 LINE 3: REGS = $45 $0B $00 $44 $57 $A0 $80
16.08.2014 9:50:08 LINE 4: WAITNBSY
16.08.2014 9:50:08 LINE 5: REGS = $D6 $01 $BE $4F $C2 $A0 $B0
16.08.2014 9:50:08 LINE 6: WAITNBSY
16.08.2014 9:50:08 LINE 7: CHECKDRQ
16.08.2014 9:50:08 LINE 8: SECTORSFROM = WRT_021B.BIN
16.08.2014 9:50:08 LINE 9: WAITNBSY
16.08.2014 9:50:08 LINE 10: REGS = $D6 $01 $BF $4F $C2 $A0 $B0
16.08.2014 9:50:08 LINE 11: WAITNBSY
16.08.2014 9:50:08 LINE 12: CHECKDRQ
16.08.2014 9:50:08 LINE 13: SECTORSFROM = WD_021B.BIN
16.08.2014 9:50:08 LINE 14: WAITNBSY
16.08.2014 9:50:08 LINE 15: REGS = $D6 $01 $BE $4F $C2 $A0 $B0
16.08.2014 9:50:08 LINE 16: WAITNBSY
16.08.2014 9:50:08 LINE 17: CHECKDRQ
16.08.2014 9:50:08 LINE 18: SECTORSFROM = WRT_32.BIN
16.08.2014 9:50:08 LINE 19: WAITNBSY
16.08.2014 9:50:08 LINE 20: REGS = $D6 $3C $BF $4F $C2 $A0 $B0
16.08.2014 9:50:08 LINE 21: WAITNBSY
16.08.2014 9:50:08 LINE 22: CHECKDRQ
16.08.2014 9:50:08 LINE 23: SECTORSFROM = WD_32CLR.BIN
16.08.2014 9:50:09 All done.
Before and after bin files will also be in attachment.
Thank you fzabkar and michael chiklis for all your help. I have definitely learned a lot.