| HDD GURU FORUMS http://forum.hddguru.com/ |
|
| reading data with MHDD scripts http://forum.hddguru.com/viewtopic.php?f=7&t=11452 |
Page 1 of 1 |
| Author: | drc [ February 28th, 2009, 16:35 ] |
| Post subject: | reading data with MHDD scripts |
Alright, so I can read the first 100 sectors of a drive with this script which was included with mhdd 4.5. Code: regs = 00 100 00 00 00 $e0 $20 waitnbsy checkerr checkdrq sectorsto = lba0-99.bin How would I go about modifying this script to read an arbitrary amount of data to a file? Would I have to read 256 sectors from start position 0, then read 256 from start position 256, and so on? |
|
| Author: | drc [ February 28th, 2009, 16:52 ] |
| Post subject: | Re: reading data with MHDD scripts |
Let me amend that by saying... I know it is possible that way, but is there a better way? Also, how can I get it to append the file instead of making a new one every time? |
|
| Author: | xsoliman [ May 20th, 2009, 15:29 ] |
| Post subject: | Re: reading data with MHDD scripts |
Any chance of a follow up about writing data with MHDD scripts Bth to normal sectors and especially to selected SA blocks eg block 42 as per the opposite of the following read script ; rm modul id 42 reset waitnbsy regs = $57 $44 $43 $00 $00 $a0 $8a waitnbsy regs = $00 $02 $00 $00 $0F $E0 $21 waitnbsy checkdrq sectorsto = 42.bin ; End. Thanks |
|
| Author: | xsoliman [ May 20th, 2009, 16:29 ] |
| Post subject: | Re: reading data with MHDD scripts |
ok, yes I appreciate that and wasnt expecting to get any complete list just some hints But would be interested in how to script whdd to write normal sectors eg the opposite of the read first 100 sectors script mentioned at the top of this topic, and reprinted here regs = 00 100 00 00 00 $e0 $20 waitnbsy checkerr checkdrq sectorsto = lba0-99.bin obviously need to specify the data file first (how?) then do some regs command that specifies the loaction and the write maybe sectorsfrom = xxx.bin And yes, I know it would be easier to use a normal disk editor for the normal sectors |
|
| Author: | derp [ May 20th, 2009, 17:32 ] |
| Post subject: | Re: reading data with MHDD scripts |
Hi Spildit, I think you overglorify some DR companies, they often just buy vendor commands. Except for a few recent drives you could, with time and trust get just about all the commands needed to produce your own DR bundle. Maybe BlackST will pm you some nice code |
|
| Author: | xsoliman [ May 20th, 2009, 18:47 ] |
| Post subject: | Re: reading data with MHDD scripts |
ok I wasnt asking for the special write commands to SA areas [yet I was just asking if mhdd has a way of writing normal sectors to do the opposite of the normal read eg the opposite of the read first 100 sectors script mentioned at the top of this topic, and reprinted here regs = 00 100 00 00 00 $e0 $20 waitnbsy checkerr checkdrq sectorsto = lba0-99.bin |
|
| Author: | drc [ May 20th, 2009, 19:08 ] |
| Post subject: | Re: reading data with MHDD scripts |
The script I posted isn't anything secret... its just a standard ATA command. |
|
| Author: | xsoliman [ May 20th, 2009, 19:29 ] |
| Post subject: | Re: reading data with MHDD scripts |
$20 is ATA read sectors (pio mode) the equivalent write sectors is $30 $e0 is STANDBY IMMEDIATE So we just need to know if mhdd has a way to fill its internal buffer first with specified data (something like sectorsfrom ==xxx.bin) then presumably regs = 00 100 00 00 00 $e0 $30 waitnbsy checkerr checkdrq |
|
| Author: | xsoliman [ May 21st, 2009, 4:45 ] |
| Post subject: | Re: reading data with MHDD scripts |
Looks like mhdd does have a SECTORSFROM command so I'll try it out (probably tomorrow) |
|
| Author: | derp [ May 21st, 2009, 8:42 ] |
| Post subject: | Re: reading data with MHDD scripts |
www.elektroda.pl/rtvforum/topic1180059.html |
|
| Author: | xsoliman [ May 26th, 2009, 14:32 ] |
| Post subject: | Re: reading data with MHDD scripts |
Just to confirm you can write (to normal sectors)(the first 100 sectors here) with regs = 00 100 00 00 00 $e0 $30 waitnbsy checkerr checkdrq sectorsfrom = lba0-99.bin The sectorsfrom has to be *after* the checkdrq It uses sector numbering starting from 0 (ie LBA) If want to write 2 sectors at LBA 1, the regs command is regs = 00 02 01 00 00 $e0 $30 Not sure what the first 00 is, maybe some lead-in meaning normal cmds not special ones But when I put the 01 there initially as a test it 'ignored' it and still worked |
|
| Author: | xsoliman [ May 26th, 2009, 15:21 ] |
| Post subject: | Re: reading data with MHDD scripts |
regs fields for normal read/write 1st - 00 ? (to be determined) 2nd - size in sectors (use 00 for 256 sectors) 3rd - LBA (lowest byte, 0- 255 decimal) 4th - LBA second lowest byte 5th - LBA third lowest bytes 6th - $E0 standby immediate 7th - $20 read, $30 write can only do 24bit LBA addressing ie max 16million sectors = 8GB Looks like there is also a regs48 command, which presumably can do 48 bit LBA's |
|
| Author: | drc [ May 26th, 2009, 16:14 ] |
| Post subject: | Re: reading data with MHDD scripts |
PDFs outlining the whole of standard ATA command use are freely available out there on the 'net. |
|
| Author: | xsoliman [ May 27th, 2009, 12:37 ] |
| Post subject: | Re: reading data with MHDD scripts |
Indeed, the ATA command spec and codes is available on the Web But few new vistors to this site know how to apply them the MHDD scripts, until now The seven bytes of the regs are as follows (and their names are derived from the orgininal CHS terminology) F (or FR) Features SC Sector Count (0=256 sectors) SN (or LL) Sector Number (or LBA low byte) CL (or LM) Cylinder Low CH (or LH) Cylinder High DH Device/Head CMD (nb some terminology writes them in the opposite order, with CMD first) I was wrong about the DH one ($E0 in my examples) It contains the bit specifying LBA mode, and also contains the highest LBA bits 27:24 for the full 28 bit LBA addressing = 128GB aka '137GigaBytes' |
|
| Author: | Nirvanowiec [ May 29th, 2009, 17:55 ] |
| Post subject: | Re: reading data with MHDD scripts |
http://yura.projektas.lt/KALB/pol/info/SA.html http://yura.projektas.lt/files/wd/hddlsct/index.html http://yura.projektas.lt/files/wd/mhdd/index.html http://yura.projektas.lt/files/wd/mhdd/wd_royl_rom.html http://yura.projektas.lt/lit/WD64.html |
|
| Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|