All times are UTC - 5 hours [ DST ]


Forum rules


Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Samsung terminal commands
PostPosted: November 24th, 2013, 9:02 
Offline

Joined: October 22nd, 2013, 5:27
Posts: 236
Location: Spain
Hello everybody,

I'm just building up a list of common terminal commands available across all Samsung [SpinPoint] hard drives, together with their meaning or usage. I don't know the meaning of them all, so if you feel you can help a bit with some of them, please post them and I'll add them to the list!

Note that not all the commands will be available for all Samsung drives on market. Note also that some commands will only be available from a specific terminal level (ENG>, BOOT>, DBG>, SRV>).

Cheers


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 9:43 
Offline

Joined: October 22nd, 2013, 5:27
Posts: 236
Location: Spain
****************
* ENG> COMMANDS *
****************

HE -> Show a list of available commands.
BT -> Enter BOOT> level (for downloading ROM, etc.).
ESC KEY -> Go to debug (DBG>) mode.
RT -> Software Reset.
D start [size = 8] -> Read size words or bytes (depending on model) from RAM beginning from word/byte start and output them.
DP start [size = 8] -> Read size words from ROM beginning from word start and output them in Big Endian (ROM dump flips every two bytes, so natural byte order seems to be the one output with this command). Working on old models.
DB start [size = 8] -> Read size bytes from RAM beginning from byte start and output them.
DW start [size = 8] -> Read size words from RAM beginning from word start and output them.
DF start [size = 8] -> Read size words from ROM beginning from word start and output them. Working on old models.
M start [data...] -> Edit RAM from start word/byte. Anter ENTER, write N bytes in hex format (e.g., F8). Press ENTER to move forward to next byte/word if needed without changes to current byte/word. Input a full stop (.) followed by an ENTER to finish.
MD start [Wdata...] -> Edit RAM from start word/byte. Anter ENTER, write N bytes/words in hex format (e.g., F8). Press ENTER to move forward to next byte/word if needed without changes to current byte/word. Input a full stop (.) followed by an ENTER to finish.
MB start [Bdata...] -> Edit RAM from start byte. Anter ENTER, write N bytes in hex format (e.g., F8). Press ENTER to move forward to next byte if needed without changes to current byte/word. Input a full stop (.) followed by an ENTER to finish. Example: MB 0 A0 12 FF
MW start [Wdata...] -> Edit RAM from start word. Anter ENTER, write N words in hex format (e.g., F804). Press ENTER to move forward to next word if needed without changes to current word. Input a full stop (.) followed by an ENTER to finish.. Example: MB 0 A012 FFA0
FB start pattern size -> 'Fill Bytes', fill size words/bytes of RAM from start with pattern. Example: FB 0 CAFE 20
FW start pattern size -> 'Fill Words', fill size words of RAM from start with pattern.
LW start size [z...] -> Write size words fromstart into RAM. If z exists, input is in hex. If not, input is ASCII text. Ends when size is reached. Example: LW 0 3 [ENTER] Hello! [ends].
UW start size -> After hit ENTER and ^F, shows in ASCII text RAM from start to end.
RS x Hd y z w -> Read using Head Hd. The command might specify a C H S address, but haven't understood it correctly yet.
SK Hd Cyl [sector] -> Could be "Seek cylinder Cyl and set head Hd", but on newer model requires a third param. Outputs the time needed to complete in old models. Need to understand better.
SD -> Spin down.
SU -> Spin up.
RN -> I don't know what it does, but causes my test drive to sweep a quite loud tone 4 times, 10 seconds each.
RE -> Like RN, but sweeps once.


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 10:12 
Offline

Joined: October 22nd, 2013, 5:27
Posts: 236
Location: Spain
*****************
* DEBUG DBG> LEVEL *
*****************
You can use DBG> level to debug program code. My test drive can be debugged while online, and it permits up to 3 software breakpoints.

GO -> Go back to ENG> level and exit debugging.
BD -> Show current breakpoints.
BS x -> Set a new breakpoint at x. Example: BS 92FA
BC x -> Clear breakpoints. If x==0, it clears all breakpoints. Otherwise, x has to be the program memory address you want to clear the breakpoint from.
R2 x -> Seems to be a "RETURN" instruction, but I have to go a bit deeper on this one. Goes back to ENG> on my tests.
DA [x] -> Show code program in assembly from x with mnemonics (awesome). My test drive uses OakDSPCore instructions and mnemonics.
DR [x] -> Show the contents of all current CPU registers, or just the x one.
MR x y -> Load CPU register x with y value.
TB x -> It seems to "Test Memory Block" X times, but must research a bit more.
SS -> While debugging, it can be used to step forward to the next instruction.


Last edited by deftrue on November 24th, 2013, 10:14, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 10:12 
Offline

Joined: August 8th, 2013, 6:12
Posts: 21
Location: france
Hi,
Interesting post, you can update with my little contribution:

viewtopic.php?f=1&t=26366

Coptere


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 10:18 
Offline
User avatar

Joined: December 19th, 2006, 8:49
Posts: 9510
Location: Portugal
Thanks for this nice find :)

_________________
1Q9xrDTzTddUXeJAFRn37aqh1Yr6buDCdw - (Bitcoin Donations)
paypal.me/Spildit - (PayPal Donations)
The HDD Oracle - Platform for OPEN research on Data Recovery.


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 10:23 
Offline

Joined: October 22nd, 2013, 5:27
Posts: 236
Location: Spain
*************
* ERROR CODES *
*************
Here are some error codes I've figured out so far:

E:0001 -> Command not valid
E:0003 -> Different number of arguments required
E:0004 -> Command not permitted in this level
E:0005 -> Argument value not in valid range.



Thanks for your comments and help!


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 19:30 
Offline

Joined: October 22nd, 2013, 5:27
Posts: 236
Location: Spain
*******************
* TEST COMMANDS (1) *
*******************


XT [x] -> Show table of available servo tests. If x is provided, it performs the test with ID x.

XL -> As per patent US 5969899 A from Samsung, this may be a way of measuring the Latch force in emergency parking operations (the patent, by the way, is an interesting article about how hard drives switch to take DC power from the yet spinning spindle when sudden losses of power occur). I don't think this is relevant for data recovery, but at least, it is for testing drive's health. My test drive outputs Ivcm(DAC) = 6064; Latch Force = 13087 [gf(*100)] and Ivcm(DAC) = 6097; Latch Force = 13143 [gf(*100)] in two consecutive tests.

XC -> Test spin current. My test drive outputs 403 mA and 406 mA in two consecutive tests.


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 24th, 2013, 19:39 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 10764
Location: Australia
Thanks very much. Very interesting.

BTW, here is the patent in PDF format:
http://patentimages.storage.googleapis. ... 969899.pdf

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: Samsung terminal commands
PostPosted: November 27th, 2013, 20:47 
Offline
User avatar

Joined: December 19th, 2006, 8:49
Posts: 9510
Location: Portugal
ENG>HE
DC MC BT PK DM MM SD SM VU TO CC EP EC CE SV XN
XW XR XS XC XF XH XT XD HP HE RT D DP DB DW DF
DI M MD MB MW MP MI FB FW SB CA RC BI DN DU LW
LP LD FI BD BS BC GO R2 T2 SS NS DA DR MR
ENG>

Attachment:
SamTerm.jpg
SamTerm.jpg [ 56.14 KiB | Viewed 10921 times ]


ENG>HE1
DC <addr> Display Channel
MC addr data Modify Channel
BT ?? SEE MANUAL
PK ?? SEE MANUAL
DM <addr> Display Channel
MM addr data Modify Channel
SD ?? SEE MANUAL
SM ?? SEE MANUAL
VU ?? SEE MANUAL
TO ?? SEE MANUAL
CC ?? SEE MANUAL
EP ?? SEE MANUAL
EC ?? SEE MANUAL
CE ?? SEE MANUAL
SV ?? SEE MANUAL
XN ?? SEE MANUAL
XW ?? SEE MANUAL
XR ?? SEE MANUAL
XS ?? SEE MANUAL
XC ?? SEE MANUAL
XF ?? SEE MANUAL
XH ?? SEE MANUAL
XT ?? SEE MANUAL
XD ?? SEE MANUAL
HP ?? SEE MANUAL
HE
RT
D
DP
DB
DW
DF ?? SEE MANUAL
DI ?? SEE MANUAL
M
MD
MB
MW
MP
MI
FB
FW
SB
CA
RC ?? SEE MANUAL
BI ?? SEE MANUAL
DN ?? SEE MANUAL
DU ?? SEE MANUAL
LW ?? SEE MANUAL
LP ?? SEE MANUAL
LD ?? SEE MANUAL
FI ?? SEE MANUAL
BD
BS
BC
GO
R2 ?? SEE MANUAL
T2 ?? SEE MANUAL
SS
NS
DA
DR
MR

ENG>

_________________
1Q9xrDTzTddUXeJAFRn37aqh1Yr6buDCdw - (Bitcoin Donations)
paypal.me/Spildit - (PayPal Donations)
The HDD Oracle - Platform for OPEN research on Data Recovery.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group