0% found this document useful (0 votes)
98 views107 pages

Samsung WCUBE User Document

This documentation lays out the “Small-C” language definition. Small-C is developed to serve as a generic test language for Samsung.

Uploaded by

anykey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views107 pages

Samsung WCUBE User Document

This documentation lays out the “Small-C” language definition. Small-C is developed to serve as a generic test language for Samsung.

Uploaded by

anykey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 107

CUBE User Document why cube

CUBE
(Small-C)

User Document

Date last modified: May 25, 2006

Author: Daniel S. Kim

why not! 1 CCC - dkim


CUBE User Document why cube

Blank Page

why not! 2 CCC - dkim


CUBE User Document why cube

Table of Content
1. INTRODUCTION 7

2. PURPOSE 7

3. SCOPE 8

4. IDE/SATA PCI CONTROLLER SUPPORTED 8

5. MAJOR FEATURES SUPPORTED (KEY FEATURES) 8

6. REQUIREMENT 8
6.1. UDMA: 9

7. SETUP 11

8. LANGUAGE SYNTAX (SMALL-C) 12


8.1. RESERVED and KEY WORDs 12

8.2. Variables, Constants, Operations, and Expressions 12


8.2.1. Identifier Names 12
8.2.2. Reserved Identifiers 13
8.2.3. Data Types 13
8.2.4. Declaration 13
 Global declaration 14
 Local declaration 14
8.2.5. Variable Initializations 15
8.2.6. Operators 15
 Arithmetic Operators 16
 Relation and Logical Operations 16
 Bitwise Operators 17
 Assignment statements 17
8.2.7. Precedence and Order of Evaluation 18
8.2.8. Expression & Statement 18

8.3. Program Control Statements 18


8.3.1. IF Statement 20
8.3.1.1. IF 20
8.3.1.2. IF-ELSE 20
8.3.1.3. Nested IF Statement 20
8.3.2. SWITCH Statement 21
8.3.3. WHILE Statement 22
8.3.4. DO-WHILE Statement 22
8.3.5. FOR Statement 23

why not! 3 CCC - dkim


CUBE User Document why cube

8.4. Function 24
8.4.1. Pre-Defined Function 24
8.4.2. User Defined Function 24

8.5. Pre-processor (#include & #define) 25


8.5.1. #include 25
8.5.2. #define 25

9. WCUBE 25
9.1. Overview 25

9.2. Features 26

9.3. Device Configuration 28

9.4. Text Editor Window/Main Window 31


9.4.1. Overview 31
9.4.2. The Interface 32

9.5. The Command Line 35


9.5.1. Overview 35
9.5.2. The Interface 35

9.6. Buffer Editor 37


9.6.1. Overview 37
9.6.2. The Interface 38

9.7. Command History 40

9.8. Disk Status 41

9.9. Disk Info 41

9.10. Flags 42

9.11. Macros 43

9.12. Notes on Compatibility Mode 44

9.13. Known Issues and Notes 46

10. The CUBE 47

10.1. CUBE.INI file 48

10.2. Macro support 49

10.3. CUBE Built-in/Predefined Functions and Variables 51


10.3.1. Predefined Variables 51
10.3.2. Command-line Commands 52
10.3.3. Console: Function Keys 53
10.3.4. Edit 53

why not! 4 CCC - dkim


CUBE User Document why cube

10.3.5. Help 55
10.3.6. Console: Basic I/O Functions 56
10.3.7. Console: Display Functions 58
10.3.8. Run-time Control Flag Switch 58
10.3.9. Trace/Debug functions 60
10.3.10. Buffer functions 60
10.3.10.1. Bedit 63
10.3.11. Power Control Functions 67
10.3.11.1. ATX Power Control Via Parallel Port (PWR_CONTROL = 1) 68
10.3.12. PCI functions 69
10.3.13. Memory Mapped IO 70
10.3.14. Other & Date/ Time 71
10.3.15. Legacy Command Tag-Queue 72
10.3.16. Native Command Queuing 73
10.3.17. Drive Commands 75
10.3.18. Drive Commands (Samsung VU Commands) 81
10.3.19. MISC commands (Math,Test….) 85
10.3.20. Command compatibility between Gemini and Cube 87

10.4. Using CUBE 89


10.4.1. Setting-up test environment by selecting the controller 90
10.4.2. CUBE Test Script Examples 92
10.4.2.1. Sequential Seek Time Measurement: 92
10.4.2.2. Random Seek Time Measurement: 93
10.4.2.3. Do Sequential DMA Write/Read: 94
10.4.2.4. Do Sequential UDMA Write/Read: 95
10.4.2.5. Legacy Command Queuing: 96

11. VTOOL 96
11.1. Overview 96

11.2. Configuration 100

why not! 5 CCC - dkim


CUBE User Document why cube

REVISION HISTORY

Rev Date By Comments


Alpha 04/20/2004 Daniel S. Kim
1.00 11/29/04 Nan K. Hall
2.00 01/28/2005 Derrick Chu
2.01 02/11/2005 Daniel S. Kim Update Small-c changes
2.02 01/27/2006 Nan K. Hall
2.03 05/25/2006 Nan K. Hall Adding file commands

why not! 6 CCC - dkim


CUBE User Document why cube

1. INTRODUCTION
This documentation lays out the “Small-C” language definition.

Small-C is developed to serve as a generic test language for Samsung. Small-C has three
major parts:

 Lexical Analyzer (or, tokenizer)


 Parser (Syntax analyzer based on Small-C grammar)
 Code generator

Of these three, Lexical Analyzer and Parser is a generic Small-C compiler components. The
Code Generator in other hand is micro-processor specific. At the time of this write-up, the
code we are generating is based on CUBE virtual – for Cube related topics, please refer to
section 7.

In short, Small-C is a “C”-like language with some of the C features/syntaxes removed.


Some of the key “C” features/syntaxes you will NOT see in “Small-C” are:

 being able to define structures


 enumerations
 pointers and pointer operations
 variable initialization as it is being defined
 ellipsis

In this documentation, I’ll attempt to describe the follow:

 Reserved words
 Language feature and syntax
 Small-C usage (inputs and outputs)

2. PURPOSE
This document serves as a reference for those who require to write Small-C codes (script),
the syntax and the grammar.

why not! 7 CCC - dkim


CUBE User Document why cube

3. SCOPE
This document is intended for the programmers developing Small-C based test codes. For
those who are doing a Small-C programming can skip the first few sections and move right
into the language syntax section.

You’ll find 5 major sections in this document:


1. Small-C grammer/syntax
2. Cube (DOS version)
3. WCube (Windows version)
4. Command set
5. VTool (embedded in WCube)

4. IDE/SATA PCI controller supported


o All on-board PCI chipset should work in Compatible mode (some may also work in
Native mode)
 VIA, SiS, NVidia (Compat mode)
 ICH4/5 systems (Compat & Native mode – BIOS configured)
 Promise 100Tx2, 133Tx2 (Native mode)
 Promise 33, 66, 100 (Native mode)
 Si3124 – (to support NCQ)
o Special note on Si3124 Driver:
 *** When an error is detected during the drive command execution, the
driver will clear the interrupt, then issue a reset to the card to get the card
into a known good state. This will be done for the given channel only ***
(for more info on this, see Si3124 technical document). An example of this
situation is when an invalid command is issued to the drive.

5. Major Features Supported (Key features)


o UDMA
o Stream command set (including DMA)
o Legacy command queuing (see sample script in Appendix section)
o Command History
o Advanced scripting (Small-C)
o Console functions for user defined screen (user can control the console screen)
o Command execution time measurement to microsecond accuracy
o Macro support
o PCI & related built in function support
o etc…

6. REQUIREMENT

why not! 8 CCC - dkim


CUBE User Document why cube

- Hardware:
 PC (Pentium with 8meg or more memory)
 Storage device (Floppy or resident HDD) – to store the program
 HDD Controller
 On-board PCI chipset (IDE/SATA controller) supported
 All onboard PCI chipset should work in Compatible mode (some
may also work Native mode)
 Tested PCI Chipsets
o VIA
o SiS
o NVidia
o Intel (ICH4 / ICH5) – also can run in native mode
 Promise PATA controller:
 U33 (not tested)
 U66 (not tested)
 U100 - TESTED
 U133 - TESTED
 Optional:
 Power control
 Samsung ISA Power control board
 ATX power supply with Parallel port connection

6.1. UDMA:

 Drive settings and info:


To see/verify that a particular udma mode has been set use the id command (id
1). This will display various information about the drive, including the udma
mode of the drive. Near the bottom of the information you will see the udma
mode:

CMD Defa[87]: 0x4003


Ultra DMA[88]: 0x7F
SCT CMD Supp : 0x0

To interpret the "Ultra DMA[88]" line, you need to understand that the
displayed value is two bytes, any leading zeros are not displayed. So in the
above case, the value we ought to see it as is 0x007F. The left byte (0x00)
represents the udma mode that is set, and the right byte (0x7F) is what the
drive supports.
To understand these values, we must convert the number into binary. To see
what udma mode the drive supports we convert the right byte. Converting
0x7F to binary we get 01111111b. Label the bits right to left from zero (0) to
seven (7). For each bit set represents that that udma mode is supported. So the
right most bit at position zero (0) means udma mode 0 is support, one bit to

why not! 9 CCC - dkim


CUBE User Document why cube

the left at position one (1) means udma mode 1 is supported, and so on a so
forth.
Similarly we do the same for the left byte to see what udma mode is currently
set. Converting 0x00 to binary we get 00000000b, so we see that no udma
mode is set.

Here is another example. Say we do an "id 1" and we see:

Ultra DMA[88]: 0x43F

We convert the right byte to binary, 0x3F = 00111111b. This means that all
only udma modes 5 to 0 are supported. And if we conver the left byte to
binary, 0x04 = 00000100b, we see that the drive is currently operating in
udma mode 2.

 How to set UDMA mode:


By default, the drive will be set to no dma mode. However, if the drive is
plugged in while the system is booting, the drive will automatically be set to
the highest DMA mode possible.

To set udma mode, you use the set features command (setf). setf takes a two
byte argument. It is simplest to input the argument as a hexadecimal number
as you will see why.

The generic command to set udma is:


setf(0x4?03)
where the question mark (?) represents the mode. So to set udma mode 4 you
type:
setf(0x4403)

The left byte (0x4?) represents that you wish to set udma mode and which
mode; the right byte (0x03) represents that you wish to set the transfer mode.
So the left four-? (0x4?) represents udma setting udma with the question mark
signifying which mode. The right zero-three (0x03) represents setting the
transfer mode.

If you attempt to set the drive to an invalid/non-supported udma mode, the


drive will report an error. If you are unsure the set features command went
through, type "id 1" and see what udma mode the drive is set at.

For more information regarding the set features command, refer to the ATA
command spec.

 Limitations:

why not! 10 CCC - dkim


CUBE User Document why cube

For (at least) Promise cards, if a drive is ever disconnected and reconnected, it
is imperative that you set dma mode using the setf() command before issuing
a dma command. Failure to do so may lead to system hang/freeze.

Additionally, for Promise cards, UDMA mode 5 and 6 are supported, with
restrictions. To get the modes to work, you must have the drive plugged in
while the system is booting. If no drive is connected at boot up and you try to
set udma mode 5 or 6, you may recieve CRC errors. Once the system has
booted, you may disconnect and reconnect a different drive if you wish,
provided you set the udma mode again.

- Software:
 Latest CUBE.EXE
 Driver file (*.drv)
 INT_ICH.DRV for ICH 4 or 5 (Native or Compat mode – BIOS
controlled)
 PRO_IDE.DRV for Promise U33/66/100/133 (Native mode)
 Other on-board chipset (Compat mode)
 TNT runtime library
 OS (Dos)
 Optional: Text Editor

7. Setup

why not! 11 CCC - dkim


CUBE User Document why cube

8. Language Syntax (Small-C)


This section describes the Small-C language syntax and its usage.

8.1. RESERVED and KEY WORDs

Following are the key and reserved words for Small-C language.
These words can not be used as a variable name in script files.

The following are Small-C generic reserved words

 break
 case
 char
 continue
 default
 do
 else
 float
 for
 goto
 if
 int
 return
 switch
 void
 while"

8.2. Variables, Constants, Operations, and Expressions

Variables and constants are manipulated by operators to form expressions. These are the
most basic elements of Small-C language. This section will closely examine each.

8.2.1. Identifier Names

In Small-C, the names that are used to reference variables and labels are known as identifiers.
The length of an identifier in Small-C can vary from one to several characters. In all cases the
first character must be a letter, and subsequent characters must be either letters, numbers, or
underscore. Here are some examples of correct and incorrect identifier names.

why not! 12 CCC - dkim


CUBE User Document why cube

Correct Incorrect
num 23num
myid23 myid?23
my_ident my_ident?
my_float my_float@
my_str my_str#

The length of identifier is limited up to 200 characters.

There are two types of identifiers, user defined and reserved (Machine dependent/specific).
Reserved identifiers are the variable names that are predefined for a machine that can be
accessed by script file.

example:

void main(void)
{
int total; // declare a variable of int

total = 1;
return;
}

8.2.2. Reserved Identifiers

For the reserved identifier, see section 7.

8.2.3. Data Types

In Small-C, there are three data types that are supported, and they are as follows:

Type Num of bytes Comment


char 1 Capable of holding one
character
int 4 signed integer
float 4 signed single-precision
floating point number

8.2.4. Declaration

All variables must be declared before use. A declaration specifies a type, and is followed by a
list of one or more variables of that type.

why not! 13 CCC - dkim


CUBE User Document why cube

Example:

char mychar; // declare mychar


float taxRate, total; // Declare taxRate & total

Declaration can be either GLOBAL or LOCAL

You can not re-declare Reserved or Key words.

 Global declaration

When variable or other identifiers are declare as global, these identifiers will be in symbol
table throughout the execution of the program.

Program example:

int gMyGlobalVar; // declare a global variable

void foo(void)
{
int myLocalVar; // declare a local variable
myLocalVar = 1; // initialize local variable

gMyGlobalVar = 2; // Set global variable gMyGlobalVar to 2

return; // When we leave, myLocalVar will be lost


// But, gMyGlobalVar will be alive
}

void main(void)
{
foo( ); // Declare a local variable
return; // When we leave, gMyGlobalVar will be
// lost, too
}

 Local declaration

Unlike Global declaration, variables declared as local will be removed from the symbol
table once the routine that declared the variable(s) exits.

Program example:

int gMyGlobalVar; // declare a global variable

why not! 14 CCC - dkim


CUBE User Document why cube

void foo(void)
{
int myLocalVar; // declare a local variable
myLocalVar = 1; // initialize local variable

gMyGlobalVar = 2; // Set global variable gMyGlobalVar to 2

return; // When we leave, myLocalVar will be lost


// But, gMyGlobalVar will be alive
}

void main(void)
{
foo( ); // Declare a local variable
return; // When we leave, gMyGlobalVar will be
// lost, too
}

8.2.5. Variable Initializations


In Small-C, as soon as variable is declared, it will be initialized to 0. Therefore, programmer
does not have to initialize the variables (need to initialize if initialization value is other then
0).

Program example:

void main(void)
{
int age; // declare a variable
age = 17; // Initialize age to value 17
return;
}

 Identifier (reference): a named memory location


 Variable: an identifier that C / C++ programs use to store values needed by your program.
– Storage
– You create them
– Values can change
– Naming convention
• Consists of letters, numerical digits, and the underscore character.
• Can not start with a digit
• Can not use a Small-C keywords
• Should give your variables meaningful names

8.2.6. Operators

An operator is a symbol that tells the compiler that you want to perform specific
mathematical or logical manipulations. Small-C, just like C, has three general classes of
operators: arithmetic, relational and logical, and bitwise.

why not! 15 CCC - dkim


CUBE User Document why cube

 Arithmetic Operators

Table 6-1 lists the binary arithmetic operators allowed in Small-C. The operators -, +, *, and /
work the same way in Small-C as they do in most other computer languages.

Operator Action

- Subtraction, also unary minus


+ Addition
* Multiplication
/ Division
% Modular division

Table 6-1 Arithmetic Operators

Integer division truncates any fractional part.

Example:
x = 3 / 2;

Above operation will result in 1.

Modulus operator, ‘%’, produces the remainder.

Example:
x = 5 % 3;

Above operation will result in 2

Modulus operator can only be applied to integers; cannot be applied to floating number.

 Relation and Logical Operations

In the term relational operator the word relation refers to the relationships that values can
have with one another. In the term logical operator the word logical refers to the ways these
relationships can be connected together. Because the relational and logical operators often
work together, they will be discussed together here. The key to the concepts that underlie
relational and logical operators are the ideas true and false.

The table 6-2 shows the relational and logical operators.

why not! 16 CCC - dkim


CUBE User Document why cube

Relational Operators

Operator Action

> Greater than


>= Greater than or equal
< Less than
<= Less than or equal
== Equal
!= Not equal

Logical operators

Operator Action

&& and
|| or
! not --- not working yet
~ not --- nor working yet

Table 6-2 Relational and Logical Operators

 Bitwise Operators

The term bitwise operation refers to the shifting of the actual bits. Table 12-3 lists the
operators that apply to bitwise operators.

Operator Action

& and
| or
^ exclusive or --- not working yet
~ not
>> shift right
<< shift left
Table 7-3 The Bitwise Operators

 Assignment statements

why not! 17 CCC - dkim


CUBE User Document why cube

The general form of the assignment statement is

variable_name = expression;

where expression may be as simple as a single constant or as complex as a combination of


variables, operators and constants. Like C, Small-C uses a single equal sign to indicate
assignment. The target, or left part of the assignment, must be a variable and not a constant.

8.2.7. Precedence and Order of Evaluation

The table below lists the rules for precedence and associatively of all operators that are
supported by Small-C.

Operator Associativity
() [] left to right
! ~ ++ -- right to left
* / % left to right
+ - left to right
<< >> left to right
< <= > >== left to right
== != left to right
& | left to right
^ left to right
&& || left to right
= right to left

8.2.8. Expression & Statement

An expression combines variables, constants and operators.


Evaluation of an expression results in a value
Sum = 2 + (3 + num2) * 3;

A statement specifies an action to be carried out by the computer (simple statements must
end with a semicolon)

8.3. Program Control Statements

This section discusses the various program control statements. These includes the conditional
statements
 if

why not! 18 CCC - dkim


CUBE User Document why cube

 switch
, the looping construct
 while
 do-while
 for
, and the statements
 break
 continue
 goto

These statements control the flow of the program.

why not! 19 CCC - dkim


CUBE User Document why cube

8.3.1. IF Statement

8.3.1.1. IF

Syntax:
if (expression)
statement;

Example:
if (age < 5)
put(“Baby”);

if (salary > 40000 || salary < 100000 )


{
printf(“mid class family₩n”);
printf(“can not buy home in bay area₩n”);
}
8.3.1.2. IF-ELSE

Syntax:
if (expression)
statement;
else
statement

Example:
if (age < 18)
printf(“you are still a kid₩n”);
else
printf(“you are on your own₩n”);

if (salary < 100000)


{
printf(“you are poor₩n”);
printf(“you need to make more₩n”);
}
else
{
printf(“ you still might be poor₩n”);
printf(“maybe you can buy a run down home₩n”);
}
8.3.1.3. Nested IF Statement

Syntax:
if ( condition )
statement
else if (condition)
statement
else

why not! 20 CCC - dkim


CUBE User Document why cube

statement

8.3.2. SWITCH Statement

Syntax:
switch (expression)
{
case constant: statement(s);
case constant: statement(s);
default: statement(s);
}

Example:
char selection;

selection = 2;
switch (selection)
{
case 0: printf(”Num is ZERO”); break;
case 1: printf(”Num is ONE”); break;
case 2: printf(“Num is TWO”); break;
default: printf(“Bad data”);

why not! 21 CCC - dkim


CUBE User Document why cube

8.3.3. WHILE Statement


S tart

Syntax: A re w e d o ne?
while (expression) (exp ressio n)
Statement
No
OR
D o S tuff
while (expression) Y es
{
Statement(s);
} C o ntinue w ith
o ther thing s

D o ne

8.3.4. DO-WHILE Statement


S tart

No
D o S tuff
Syntax:
do
{
statement(s);
} while(expression) A re w e d o ne?

Y es

C o ntinue w ith
o ther thing s

D o ne

why not! 22 CCC - dkim


CUBE User Document why cube

8.3.5. FOR Statement

Syntax:
for (exp1; exp2; exp3)
statement;

OR

for (exp1; exp2; exp3)


{
statement(s);
}

exp1 (optional): initialization expression


exp2 (optional): conditional expression (test)
exp3 (optional): loop expression

why not! 23 CCC - dkim


CUBE User Document why cube

8.4. Function

Small-C grammar, like standard C/C++, allows function


implementation. There are two types of functions:

1. Predefined functions

Functions that are predefined by the Virtual machine


library.

2. User defined functions

Functions that are created by the user (written in


Small-C)

Function is equivalent to a subroutine or function in other


languages – or procedure. A function provides a convenient
way to encapsulate some process (statements) in a black box,
which can then be used without worrying about its inner
functionality.

8.4.1. Pre-Defined Function

For the listing of Predefined functions, please refer to


Section 7.

8.4.2. User Defined Function

To write and use user defined function(s), the programmer must do the following

1. Declare
2. Implement
3. Use

 Declare

Syntax:

<return type> <function name>(<parameters>)

 Implementation

why not! 24 CCC - dkim


CUBE User Document why cube

Syntax:

<return type><function name> (<parameters>)


{
<code>
return <return type>
}

Example:

int addTwoNum(int, int); // Declare

void main(void) // Main function


{
int sum;
sum = addTwoNum(2, 3); // Use (make a call)
printf(”Sum = %d”, sum);
}

int addTwoNum(int n1, int2) // Implement


{
int num;
num = n1 + n2;
return num;
}

For more on Function, please refer to C/C++ documentation

8.5. Pre-processor (#include & #define)


8.5.1. #include

Syntax: #include “filename”

8.5.2. #define
Syntax: #define MAX_NUM_OF_READS 1000

9. WCUBE
9.1. Overview
This application is designed to provide a user interface to CUBE in a Windows environment.
Since this tool is designed to manipulate scripts for execution on the drive, it only makes sense to

why not! 25 CCC - dkim


CUBE User Document why cube

emulate a user interface similar to other integrated compilers such as Visual C++. As a result the
application contains a text editor with additional components, specific to CUBE functionality.

9.2. Features
All windows aside from the text editor can be free floating or docked. All windows can be
docked on any side to the main window or other docked windows. This allows for the flexibility
of user preference in the appearance of the application. Each window, including the main
window, remembers its position and visibility when the application is closed. So each time the
application is reopened, the same interface will be seen.
Note: Since windows can be docked on any side, there may be difficulties in docking windows in certain
positions as they may have a tendency to snap to the undesired edges. Watch the outline of the window
when dragging to dock.

The Buffer Editor, Disk Status, and Command History are all free floating while the Command
Line is still docked:

why not! 26 CCC - dkim


CUBE User Document why cube

Additionally, the windows maybe closed/hidden so there is more room for other windows. There
are three ways to toggle the visibility of the various window. You can use the individual close
button on the window, use the toggle buttons on the top, or use the file menu.

why not! 27 CCC - dkim


CUBE User Document why cube

As you can see, the file menu allows you to hide more windows than the toggle bar. If you really
need the space, then they can be closed. However, they are not normally closed since they take
minimal space and provide quicker access to various parts of the application. Once a window is
hidden, reselect from the toggle bar or the file menu to make it reappear.

All toolbar icons and file menu selections have captions assigned to them. If confused about
what a particular command may do, hold the mouse over the item and the status bar will display
a more detailed explanation about its function.

9.3. Device Configuration


In the menu bar there is an pull down menu for IDE Devices. Similar to the command “setha”,
this window allows you to select which device you wish to use.

why not! 28 CCC - dkim


CUBE User Document why cube

A list of the devices detected on your system will be displayed. Selecting one of the devices will
load the appropriate drivers and register the device for usage on with executable commands.
Additionally, there are the options to configure and reduce Windows overhead.
Note: Windows requires an inf installed for each device on the system before you may interact with it. If, in the
Device Manager, there is an exclamation point next to a device you wish you use in WCUBE, it will not show
up until an inf has been installed and the exclamation point is gone.

The configure option will display a new dialog box which will allow you to hide or show devices
on your system.

why not! 29 CCC - dkim


CUBE User Document why cube

You will see a similar listing of devices in this window, however each device has a check box
next to it. By unchecking the box, the device will not appear in the menu. Additionally, you will
be unable to select that device from the command line either. This helps to remove devices you
do not wish to test to prevent accidental data loss or damage, such as the OS’s resident hard drive.

Since Windows requires more resources, there is inherent overhead using Windows versus DOS.
Checking the “Reduce Windows Overhead” will attempt to minimize this overhead. This will not
reduce drive execution time, just the time between each command. Of course, as more system
resources are dedicated to WCUBE, other applications may feel more sluggish with this on than
without. This option will not affect system performance when no scripts/commands are running.
Note: This option may not work on some systems, particularly Windows 98 machines. If you notice command
execution times taking longer than they should with this option, please disable it.

When selecting a device, the name of the window will change. When having multiple WCUBE
windows open, you can more easily distinguish which WCUBE belongs to which host adapter.
Remember, you can only one WCUBE can select each host adapter.

why not! 30 CCC - dkim


CUBE User Document why cube

All of these settings are saved when the application is closed so reselecting and configuring of
devices is unnecessary between application restarts.

9.4. Text Editor Window/Main Window


9.4.1. Overview
At the root of the application is the text editor. One could think of the application as a text editor
with extra windows. The text editor provides an interface to load and manipulate a script before
compilation and execution on the virtual machine. The text editor is very similar to Notepad, but
also integrates several other features.

why not! 31 CCC - dkim


CUBE User Document why cube

9.4.2. The Interface


Since the application is the text editor, most of the toolbar buttons and file menu commands only
pertain to the text editor. The text editor supports multiple open script files and provides a tab bar
for easy navigation between the various each open script. In its maximized state, you can
encompass the entire window with a single script file, switching between each file by clicking its
tab. Additionally, there is support for non-maximized viewing, so multiple scripts can be viewed
side by side.

At the top there is the file menu and toolbar.

why not! 32 CCC - dkim


CUBE User Document why cube

Both provide methods for creating new, opening, and saving files as well as undoing, redoing,
cutting, copying and pasting text for each script. Additionally, in the toolbar, there is support for
flagging of lines. At the bottom, there is a status bar which provides various information such as
the current cursor position, text mode, and key status (num lock, caps lock, etc).

The tabs also provide some repeated functionality. By right clicking on the tab, you can access
the same functionality found in the file menu and toolbar for that particular script (right). Right
clicking on the bar will produce a different list of options (left).

why not! 33 CCC - dkim


CUBE User Document why cube

In addition to basic text entry, the editor supports syntax highlighting, automatic indenting, and
flagging/bookmarking of lines.

why not! 34 CCC - dkim


CUBE User Document why cube

Syntax highlighting - Most basic C commands are recognized by the editor and will
automatically change colors. Such syntax includes: compiler commands (#), quotations (“),
numbers (0-9), comments (both // and /**/) and keywords (int, main, char, etc).
Automatic indenting – Like other programming orientated text editors, this editor will
automatically indent on a carriage return if the previous line was indented.
Note: the editor will *only* indent if the previous line has been indented (first indent is
manually put)
Flagging lines -And finally, one can flag various lines for quick access. This can be done by
selecting the flag button in the toolbar or pressing ctrl+<#> where <#> is a number between 0
and 9. This will create a little bubble in the left margin. By selecting “next flag” or “previous
flag” in the toolbar, you can jump to the next or previous flag set based upon your current
cursor location. If the flag was set by ctrl+<#> you can also press alt+<#> to jump to that
specific flag.

9.5. The Command Line


9.5.1. Overview
The command is modeled from the DOS command shell. It allows the user to execute small-c
commands directly or execute some limited commands within the application that pertain to
script editing.

9.5.2. The Interface


Like typical shell commands are typed in and feedback regarding the command is reported back.

why not! 35 CCC - dkim


CUBE User Document why cube

The above image shows the command line window. At the bottom is the command line itself.
This is the main interface to the CUBE compiler and virtual machine. Any commands which are
understood by the CUBE compiler can be entered at the prompt.

There are two types of commands, built-in commands, and CUBE commands. Although the
built-in commands have very similar, if not exact, counterparts in the DOS CUBE, the
underlying structure is different such that they need to be specially written for WCUBE. All
commands which do not fall into the built-in commands are assumed to be CUBE commands
and automatically compiled.

Built-in Commands:
Command Description
new The application will open a new, empty script file for editing.
No file will be created until explicitly told to save
load The application will open the standard Windows load dialog
for you to select a file to open in the text editor
load <filename> The application will attempt to open the file with the
specified filename in the text editor
loadm <filename> Load the file as a macro
listm Lists all the macros detected
save The application will save the currently selected text editor
window
run The application will run the contents of the currently selected
editor window
exit Exit the application. Will prompt to save any scripts that have
been modified.
cls Clear all text from the command line
* Whatever cannot be understood will be assumed to be a
small-c script and sent to the compiler/virtual machine.
Note: the code will be automatically wrapped in “void main()
{}”

why not! 36 CCC - dkim


CUBE User Document why cube

Since a press of the enter key will start the execution of a command, the command line only
accepts single line commands. For multi-lined commands, use the script editor. Please note for
CUBE commands, there is no need to add “void main() {}”, the text will be automatically
encapsulated so they can be properly executed.

Like a DOS shell, whenever a command is entered, it is displayed along with any output that
may have occurred as a result of the command. Typically an “ok” will display in the window to
indicate the completion of the command. Additionally, the prompt along with a blinking cursor
will appear so another command may be entered.

The command line also support command history. Any command typed during the current
session can be recalled using the down and up arrow keys. The up key will cycle through earlier
commands while the down key will cycle through later commands. Once you reach your desired
command, you may edit it, or keep as is, for execution again.

While a command is processing, the input will disappear. This will prevent multiple commands
being executed on a drive at the same time. Any other part of the application may be used while
a command is processing. That is the beauty of Windows and multithreaded applications. To
cancel a command, press “ESC” which will attempt to halt any commands currently being
executed.

At the top is the CWin (console window). By default it is not shown an the command line
encompasses the entire window. It is another place for output to be displayed per the user
requests. The display window is attached to the command line window and cannot be detached.
Additionally it cannot be resized except through the commands defined by CUBE. The All
supported command, including creating and resizing the window, are described in the CUBE
documentation.

9.6. Buffer Editor


9.6.1. Overview
The buffer editor is designed to provide a method to view and alter the contents of the disk buffer
in its raw format.

why not! 37 CCC - dkim


CUBE User Document why cube

9.6.2. The Interface


This window provides manipulation of a specified buffer. Contained are three tabs to select
between buffers, read buffer, write buffer and compare. For each buffer tab, there are three fields
provided, from left to right: address field, hex field, and ASCII field. Any field is editable and
changes in one will reflect in the others.

The address field will display the range of addresses, in hexadecimal, viewed in the other two
fields. Also, the address field provides quick access to a particular address. Just type in the
address in hexadecimal and press enter, the buffer will jump to the specified address, if it is valid.

why not! 38 CCC - dkim


CUBE User Document why cube

Press escape or click to cancel out. While manipulating the data in the other fields, the address
field will highlight the address of the data being selected.

The hex field displays the contents of the buffer in hexadecimal and likewise the ASCII field
displays it in ASCII. By default the editor is in overwrite mode. Any thing that is typed in will
overwrite the existing values. To switch to insert mode, press insert. This will shift all data after
cursor to the right and inserting the new value. Additionally, the delete be available, which will
shift all data after the cursor to the right
Note: When inserting, the last byte will be “pushed out”. Also, when deleting, the last byte will be shifted
in with value 0x00.

At the top, there is toolbar to provide additional functionality other than insert and overwrite.
The eight buttons are (left to right) Search, Fill, Commit, Revert/Refresh, Clear, Compare, Copy,
and Configure.

Search button – displays a dialog enter either a hex or an ASCII value. This value will be
searched for within the entire buffer.

Fill button – display a similar dialog as the search button. This will to fill the entire buffer with
the specified pattern.
Note: When entering hex, the input must be byte aligned, that is, your searches must be multiples of 8 bits
wide (i.e. “000A” and “0A” is ok, but “00A” or “A” is not).
Commit button – copies all modifications to the actual buffer. No actual modifications are made
to the buffer until the commit button is pushed.
Revert/Refresh button – undoes any changes since last commit and reload the current buffer
values into the window. This is useful if any undesirable modifications were made. Also this
button can be used to get the current state of the buffer.
Clear – This will clear the buffer of all values, replacing everything with zeros. At the bottom,
the status bar displays, from left to right, the mode (insert or overwrite) and the cursor
position in both decimal and hexadecimal values.
Compare – This toggles the compare between read and write buffers, highlighting the differences
in the buffer you are currently in.
Copy – This will pop up a new window to copy various selections from one destination to the
other. The copy range will automatically be filled with the whatever you are selecting.
Warning: Copying large amounts of data from the buffer is not recommended as the process is slow. If you
need to dump the entire read/write buffer, use rdump/ wdump, or rsave/wsave commands.

why not! 39 CCC - dkim


CUBE User Document why cube

Configure – This will open a window to allow you to customize the appearance of the buffer.
The scrollbar range is for making the scroll bar not scroll for the entire buffer. This is useful
when you only want to look at 10 blocks of data, and you don’t need the scroll bar to be
sensitive for the entire 4000 blocks.

9.7. Command History


This is only a window to provide diagnostic information. The window is non editable and
displays a history of the command executed on the drive. The contents of the window update
automatically.

why not! 40 CCC - dkim


CUBE User Document why cube

9.8. Disk Status


Similar to the command history, this window is used to provide diagnostic information about the
drive. There is interface to the user other than what is displayed.
The window shows what the internal c, h, s, and l are set at. Additionally the # of
reads/writes/seeks and corresponding soft and hard errors are reported.

9.9. Disk Info


This window displays information gathered about the drive. It will update whenever the
command “id 1” or “config” is issued. These commands gather information from the drive. The
window will remember the last “id 1” command issued as well as the last “config” command
issued. The output will be the output from “id 1” followed by the output from “config”. If either
of these commands have not been issued, their respective areas in the window will remain blank.
Click on each tab to switch between each view.

why not! 41 CCC - dkim


CUBE User Document why cube

9.10. Flags
This window shows the built in flags in WCUBE. The names are similar to what you would type
in at the command line. If the flag is enabled, there will be a check by it, otherwise it will be
unchecked. The flag will update in “real-time”; whenever the a flag changes, in a script,
command line or mouse click, it will be reflected immediately. All flags can be modified at
anytime, even while a script is running with the exception of logfile. To turn on and off the
logfile, you must type it in at the commandline or within a script.

why not! 42 CCC - dkim


CUBE User Document why cube

9.11. Macros
This window lists all the macros in a file whenever a macro file is loaded either through the file
menu or “loadm”. This is the same list displayed at load time or when the “listm” command is
issued. To run any of the macros, double click on it and the macro will run, as if you had typed
“run <macro name>”

why not! 43 CCC - dkim


CUBE User Document why cube

9.12. Notes on Compatibility Mode


NOTE: We are not responsible for any data lost if you accidentally write over your OS
drive. If you are using Windows 98, proceed with caution as it is not as stringent as Windows
2000/XP to protect the OS drive. If at any time you receive a message that you must reboot, most
likely you have selected an invalid choice. Undo you selection or you risk no longer being able
to boot to the drive. Although not recommended, you can run can use the primary port for the OS
drive and secondary port for the test drive (or the other way around).

If you are using second channel on the board, if you find you are unable to talk to the drive or a
[?] appears instead of [0] in the title bar of WCUBE you need to type DRIVE = 1 (defaulted to
DRIVE = 0) then try selecting the host adapter again. This will cause WCUBE to use the second
port rather than the first. WCUBE does not remember what port you are using from session to
session. It will always default to DRIVE = 0. To remedy this, write a cube.ini which sets DRIVE
= 1 then setha <host adapter number>.

Now for installation. You do not need to install the WCUBE drivers to use the motherboard
controllers. Instead you need to disable the device in device manager. Go to your Device
Manager and find the channel you wish you use:

why not! 44 CCC - dkim


CUBE User Document why cube

Right click on the channel and click Disable. Windows may or may not give you a warning
message that this will make the device no longer function. Click yes and the device should
appear with a red ‘X’ now. You can now use compatibility/onboard in WCUBE.

why not! 45 CCC - dkim


CUBE User Document why cube

9.13. Known Issues and Notes


Marvell Bridge Chip:
There is a known bug regarding SATA drives that use the Marvell bridge chip. When executing
physical commands, sometimes the drive fails to raise an interrupt at the proper times. As a result,
we have implemented a polling mechanism as a work around for this issue. The drivers will poll
once every millisecond when a physical command is issued, up to the user defined timeout.
This works in conjunction with the standard interrupt method, and acts as a failsafe if no
interrupt is seen even though the drive is ready/waiting for the host to take action.
It should be noted that, for drives that affected by this, each “lost” interrupt (usually one interrupt
per block transferred) can add up to ten milliseconds to the overall command time. The
command time reported by WCUBE, under these circumstances, is not reliable.

To disable the DRQ polling, and rely only on interrupts, disable the flag “drqpolling” (drqpolling
0).

why not! 46 CCC - dkim


CUBE User Document why cube

10. The CUBE


The CUBE is drive test software which allows the users to interactively test and FA drives.

Some of its key features are:

- Small-C script language


- ATA-7 Command Set (Both Extended & Non-extended commands)
- Support DMA and UDMA
- Support Power Controller Board:
 Supports Samsung ISA Power Control board
 Support Parallel Power control using the ATX power supply
- Advanced Write/Read buffer management
- Feature to trace (command history) – currently, it is configure to trace upto 100 last
commands executed (command block / error status / execution time)
- Advanced Execute Timer Clock (execution time clock in microseconds)
- Provides Consol Control commands (user can define and display data on a user defined
console window)
- Many other features are available

why not! 47 CCC - dkim


CUBE User Document why cube

10.1. CUBE.INI file

Cube, when loaded, will first look for CUBE.INI. This is CUBE initialization file which
Cube will execute. If the file does not exist, cube will still load but no initialization will take
place. Meaning, the user must set things up manually before drive can be tested.

CUBE.INI file content syntax follows Small-C grammar. The kinds of thing one would do
inside the CUBE.INI will be such a setting as setting up the power controller type, PATA or
SATA controller to load. Below is a sample CUBE.INI for your reference:

//-------------------------------------------
//- By: Daniel
//- Date: 08/08/2003
//-
//- This is the CUBE Initialization file
//-
//- Here, we will scan for controller and
//- set/load driver for the first controller found
//-------------------------------------------
void main(void)
{
scanallpci;
setha(0);
PWR_CONTROL=1;
return;
}

why not! 48 CCC - dkim


CUBE User Document why cube

10.2. Macro support


Macro is a prewritten set of instruction that can be called from command line. To utilize this
feature, the user must first put together a macro file, load macro file, then call the macro
he/she wants to run. There are two commands that must be used when loading and calling of
a macro:
o loadm <macro filename>
 ex: loadm mymacro.mac // file extension can be anything
o to run, type in macro name from the command line
 ex: seektest

Macros will not take in any call parameters. All parameter, argument, passing must be done
using the predefined global variables (ex: R0-R19). Also, macros must not return any return
types. Therefore, all macro definitions must follow the following syntax:

Syntax: void <macroname> (void)

Example” void test1 (void)


{
statement(s);
return;
}

example of macro file:

//-------------------------------------------
//- By: Daniel
//- Date: 07/19/2004
//- FileName MyMacro.MAC
//-
//- Macro file demonstration
//-
//-------------------------------------------
void mytest(void)
{
id 0;
sk( 1,1);
rdmae(1,1);
}

void msg1(void)
{
put(“This is message”); newline;
put(“This is a message”);
}

Above simple example has two macros define, mytest & msg1.

why not! 49 CCC - dkim


CUBE User Document why cube

To use these macros, one CUBE is lunch, you’ll do the following:

o loadm mymacro.mac // load macro file


o msg1 // run’s macro “msg1”
o mytest // run’s macro “mytest”

why not! 50 CCC - dkim


CUBE User Document why cube

10.3. CUBE Built-in/Predefined Functions and Variables


 Command line commands
 Basic IO functions
 Console display functions
 PCI functions
 Drive command functions
 Buffer functions
 Control Flag Switches

10.3.1. Predefined Variables

These variables are predefined and can be accessed by script files.

Identifier Description
R0 – R19 Reserved Variable for the users
VU Vendor Unique mode flag (0 == no, 1 == yes)
DRIVE Drive selector (0 == Primary, 1 == secondary)
SLAVE Drive selector (0 == Master, 1 == slave)
ECC ECC byte count (set when Identify command is issued)
RETRY Retry count
DEVICE_TYPE DUT device type (set when Identify command is issued)
0 == Unknown
1 == PATA
2 == SATA
4 == SDIO
CMD_TIMEOUT Command Timeout value in milliseconds. The default is 10,000. The
value can be modified using cmdtimeout(exp) function.
ex: cmdtimeout(123); // timeout value changed to 123milliseconds
acc Accumulator (was added to support Gemini like parameter passing on
some VU commands)
MAX_C Max cylinder (set when Identify command is issued)
MAX_H Max head (set when Identify command is issued)
MAX_S Max sector (set when Identify command is issued)
MAX_LBA Max lba (set when Identify command is issued)
MAX_Z Max zone (set when “init” command is issued to drive)
MAX_PC Max Physical Cylinder (set when “init” or “inith” is issued to the drive)
MAX_PH Max Physical Head (set when “init” or “inith” is issued to the drive)
MAX_PS Max Physical Sector (set when “init” or “inith” is issued to the drive)
MAX_PBA Max Physical Block Address (set when “init” or “inith” is issued to the
drive)
MIN_PC Minimum Physical Cylinder accessible (set when “init” or “inith” is
issued). Any VU command accessing below this cylinder will be
rejected.

why not! 51 CCC - dkim


CUBE User Document why cube

c Current cylinder addressed (automatically picked up by VU commands,


if used)
h Current head addressed (automatically picked up by VU commands, if
used)
s Current sector addressed (automatically picked up by VU commands, if
used)
l Current lba addressed
TF_ERROR Last error register read (updated when drive cmd is issued or on “rtsk”
TF_STATUS Last status register read (updated when drive cmd is issued or on “rtsk”
Updated when “rtsk” cmd is issued (current register only)
TF_SC Updated when “rtsk” cmd is issued (current register only)
TF_SN
RBUF Read buffer assigned
WBUF Write buffer assigned
PCI_BASE PCU base address selected (set when setha(HA#) is issued)
CMD_TIME Last command execution time (set when cmdtime 1 is issued)
PWR_CONTROL Power controller type specifier (default is set to 1)
0 == No power controller
1 == Parallel control
2 == Samsung ISA power controller
3 ==
4 == Samsung PCI power controller
TREAD Total read count
SREAD Total read soft error count
HEREAD Total Hard error count
TWRITE Total write
SWRITE Total write soft error
HEWRITE Total write hard error
TSEEK Total seek
SSEEK Total seek soft error
HESEEK Total seek hard error
ERRORHALT To Halt the test on user input error (Error register)
erhlt must be set to 1
NOTDONE Used for ADDH, ADDC, when max cylinder is reached for all heads
this variable is cleared to zero.

10.3.2. Command-line Commands


These commands are valid only when used from the console prompt. These commands are not
part of the Small-C language. Therefore, user can not include these commands inside the Small-
C program.

function syntax parameter / description requirement


cls Clear console window content NA

why not! 52 CCC - dkim


CUBE User Document why cube

load <filename> filename: name of the file to load NA


loadm <macro filename> Macro filename: name of the file to
load
run or r Run script Script must be loaded using the “load”
cmd
run <mac func> or Run macro function Macro file must have been loaded and
r <mac func> the macro must exist
edit <filename> Edits a file: If filename exists it loads load editor and edit currently loaded
the file to be edited. If not opens a script. If no file loaded, open an empty
new file file
exit terminate CUBE

10.3.3. Console: Function Keys

Key Description
F1 Toggle Status window
F2 Toggle Console screen mode (size: 25 lines vs 40 lines)
F3 Show command execution trace buffer (this assumes “trace 1” was issued before)
F4
F5
F6
F7
F8
F9 Show symbol table
F10
ESC Stop script execution

10.3.4. Edit
This is a very simple edit that work a barebones of an editor. If large file is used, it is recommended
to use editor outside of Cube.

To use the editor type edit <filename> .


If filename exist, it will load the file, if not, it will open a file with <filename>.
F1 : Help
F3 : Search
F4 : RepeatSearch
F5 : Save
F6 : Mark Block
F7 : New File Save
Ctrl-X: Delete line, or delete Block
Ctrl-V: Paste line, or Paste Block
ESC: quit the editor and bring you back to the command prompt

These are the keys that works in this editor.


Control_X , Control_V, Insert, Delete, Home, PageUp, PageDown, Backspace, UpArrow, Down
Arrow, Left Arrow, and Right Arrow. Of course and all the letters and numbers works also.

why not! 53 CCC - dkim


CUBE User Document why cube

Figure 1 Cube editor


At the top of the editor screen , it shows the file name “c”, and the bottom right corner shows the
current insert key mode.
At the top Right corner shows the current line number.
F1: is the help key
F6: is the mark block function.
To mark, first press F6 and then move your cursor up or down to mark the block and then control _x
to cut and control_v to paste

why not! 54 CCC - dkim


CUBE User Document why cube

Figure 2 Cube Editor Help

10.3.5. Help
Help is for those who needs instant help without going to the cube.doc. The contents of the help file
is same as the cube.doc.
On the console:
‘?’ will print help on help.
‘??’ will invoke the help screen where the help file will be displayed.

why not! 55 CCC - dkim


CUBE User Document why cube

Figure 3 cube help


‘?partial word’ will find string matches the beginning of the partial word.
Example:
?wr
wr(a, h,s,b)
wre(a,b)
wrle(l,s1,s2)
wrtc current
wrxr val
wrxw val
wrbf val
so if you want to find out more about a command get closer to the command as you can
example:
?wr(
wr(a, h,s,b)

0x30 Write Sector - PIO


a: Cylinder or LBA
h: head - valid only in CHS mode
s: sector - valid only in CHS mode
b: #of blocks to read

10.3.6. Console: Basic I/O Functions


Theses commands are used display data unto Cube console window.

function syntax parameter / description requirement

why not! 56 CCC - dkim


CUBE User Document why cube

put(str) Display string to console window NA


putd(fmtStr, int) Display formatted string with integer number to NA
console window
putf(fmtStr,float) Display formatted string with float number to NA
console window
puts(fmtStr,str) Display a fmtStr string with str to console window NA
printf(…) NA
A format specification, which consists of optional and
required fields, has the following form:
%[flags] [width] [.precision] [{h | l | I | I32 | I64}]type
Each field of the format specification is a single
character or a number signifying a particular format
option. The simplest format specification contains only
the percent sign and a type character (for example, %s).
If a percent sign is followed by a character that has no
meaning as a format field, the character is copied to
stdout. For example, to print a percent-sign character,
use %%.
The optional fields, which appear before the type
character, control other aspects of the formatting, as
follows:
type
Required character that determines whether the
associated argument is interpreted as a character, a
string, or a number. c,x,d,s,f
flags
Optional character or characters that control justification
of output and printing of signs, blanks, decimal points,
and octal and hexadecimal prefixes. More than one flag
can appear in a format specification. -,+,0,’ ‘,#
width
Optional number that specifies the minimum number of
characters output.
precision
Optional number that specifies the maximum number of
characters printed for all or part of the output field, or the
minimum number of digits printed for integer values.
h | l | I | I32 | I64
Optional prefixes to type-that specify the size of
argument.
newline Put new-line character to console
getchar(var) Get a byte from the user and store it into var NA
getd(prompt, var) Get a integer from the user into var
prompt: a string to display
var: variable to place data

example:
getd(“Give me data: “, R0);
getf(prompt, var) Get a float number from the user and store it into
var
gets(prompt, var) Get a string from the user and store it into var Not Supported At This Time

why not! 57 CCC - dkim


CUBE User Document why cube

10.3.7. Console: Display Functions


Theses commands are used for controlling/displaying formatted text unto user defined display.
For any of the following functions to work, one must issue cwin( ) function first.

function syntax parameter description requirement


cwin(size) Create user console window NA
gotoxy(x,y) Place user console cursor at x,y cwin
getxy(x,y) Get x,y coordinate where the cursor is cwin
cputs(x,y,str,attr) Place a text at x,y on user defined window cwin
with attribute attr
cputd(x,y,fmtStr,n,attr) Place a text and integer at x,y on user defined cwin
window with attribute attr
cputf(x,y,fmtStr,n,attr) Place a text and float number at x,y on user cwin
defined window with attribute attr
ccls Clear user define window cwin

Color Attributes:

VALUE Background Foreground


0 Black Black
1 Blue BLUE
2 Green Green
3 Cyan Cyan
4 Red Red
5 Magenta Magenta
6 Brown Brown
7 White White
8 Blinking Black Dark gray
9 Blinking Blue Light blue
A Blinking Green Light green
B Blinking Cyan Light cyan
C Blinking Red Light red
D Blinking Magenta Light magenta
E Blinking Brown Yellow
F Blinking White Bright white

ex:
void main(void)
{
cwin(5); // create a user console window of size 5 (max of 5 lines)
cputs(1,1,”Hello!”, 0x35); // Display “Hello” at xy coordinate with attribute of 0x35)
return;
}

10.3.8. Run-time Control Flag Switch

Following function calls turn run-time flag switches ON or OFF

function syntax parameter description requirement

why not! 58 CCC - dkim


CUBE User Document why cube

logfile <0/1> Turn logfile logging feature on or off (log data is


saved to CUBE.LOG) – User defined console
outputs are not put into log file.
0 – Turn it off
1 – Turn it on
dtsk <0/1> Turn on/off TF echoing (TF will be echoed before
TF is sent to the drive)
0 – Turn it off
1 – Turn it on
tag <0/1> Turn on/off write buffer data tagging
0 – Turn it off
1 – Turn it on
trace <0/1> Turn on command tracing (upto 100 last cmds will
be captured)
0 – Turn it off
1 – Turn it on
erhlt Turn on/off stop on error feature (when drive error
is encountered, or buffer miscompare, the script
will halt)
0 – Turn it off
1 – Turn it on
slba Turn on/off LBA addressing (used with drive
commands)
0 – Turn it off
1 – Turn it on
bcmp Turn on/off buffer comparing (works with drive
data read commands) – if the feature is on, and
miscompare occurs, cube will show the
miscompare data
0 – Turn it off
1 – Turn it on
cmdtime Measure command time and store the data to
CMD_TIME global variable (user can access this
variable to obtain the command execution time in
microseconds)
0 – Turn it off
1 – Turn it on
verbose Turn on/off verbose mode (system messages)
0 – Turn it off
1 – Turn it on
updatestat Turn on/off visual updating of status of disk
(c/h/s/l, errors). Can improve performance but no
visual indication that script is running.
0 – turn off updating
1 – turn on updating
updateec Turn on/off updating EC
When there is a error,
1: will set the Global variable EC
0: will not set Global variable EC
drqpolling Turn on/off polling of DRQ on data transfers. Used
incase of missed interrupts
0 – turn off polling
1 – turn on polling
exit Exits the cube

ex:
void main(void)
{

why not! 59 CCC - dkim


CUBE User Document why cube

cmdtime 1; // Turn on command time measurement


sk(1,1); // seek to cyl=1, head=1
putd(”CMD EXCUTION TIME: %d”, CMD_TIME);
return;
}

When “erhlt 1” is issued and we get an error, the system will halt with option of either to STOP
or to CONTINUE. If Continue is selected, Cube will read and dump TF contents and dump the
trace buffer – if tracing is enabled.

10.3.9. Trace/Debug functions

function syntax parameter description requirement


trace <0/1> 0 - turn off command tracing
1 – turn on command tracing
trace_show(n) show n number of traced data (the last n). If “trace 1” must be issued before
n==0, show all captured traced data. hand
trace_clear clear trace buffer
trace_lastcmd(var) store last command issued into var “trace 1” must be issued before
hand
debug <0/1> 0 - turn debugging off This option should be used only by
1 – turn debugging on CUBE developers

From the console window, you can also use F3 key to displace trace buffer

ex:
void main(void)
{
trace 1; // Enable tracing
id(1); // Issue identify command
sk(1,1); // Seek to cyl=1, head=1
trace_show(10); // Display upto 10 last cmds issued
return;
}

When “erhlt 1” is issued and we get an error, the system will halt with option of either to
STOP or to CONTINUE. If Continue is selected, Cube will read and dump TF contents
and dump the trace buffer – if tracing is enabled.

10.3.10. Buffer functions

In Cube, there are 2 predefined buffer.


ex: buf1, buf2.

why not! 60 CCC - dkim


CUBE User Document why cube

The user can map read/write buffer to one of the predefined buffer.
ex:
setrbuf(1); // sets read buffer to buf1
setwbuf(2); // sets write buffer to buf2

By default, when Cube is loaded, read buffer is set to buf1 and write buffer is set to buf2
Example:
To tag and fill write buffer:
tag 1;
wfill(0xffffffff);

function syntax parameter description requirement


atoi(str1,offset,radix,rtnval); Changes str into a number
Changes str1 from offset to change to a
number using radix as the base.

strcmp(str1,str2,len,rtnval); Compares str1 to str2 of length len


Rtnval=0 if equal
Rtnval non zero otherwise
strcat(str1,str2); Concats str2 to end of str1
strcpy(str1, str2); Copies str2 to str 1
setrbuf(exp) set read buffer to predefined buffer id
“exp”
exp can be 1 or 2 (there are 2
predefined buffers)
strlen(str1,rtnval) Puts strlen(str1) into returnval
setwbuf(exp) set write buffer to predefined buffer id
“exp”
exp can be 1 or 2 (there are 2
predefined buffers)
wfill(pattern) Fill write buffer with data pattern Pattern must be in the
hex format
rfill(pattern) Fill read buffer with data pattern Pattern must be in the
hex format
wfillb(string, num) Fills the buffer with the string pattern,
containing num of bytes
Example: wfillb(“aabbccddeeff1100”,8)
wdump(start, count) Dump write buffer content from offset
start for count number of bytes
rdump(start, count) Dump read buffer content from offset
start for count number of bytes
bdump(start, count) Dump write & read buffer content from
offset start for count number of bytes
(side-by-side)
Bswap Swap write buffer and read buffer (read
buffer becomes write buffer and visa-
versa)
rpeekb(var, offset) Get a byte from the read buffer at offset
offset
rpeekw(var, offset) Get a word from the read buffer at offset
offset
wfillsp(pat) pat:
1: Incremental
01020304….
2: Address pattern

why not! 61 CCC - dkim


CUBE User Document why cube

FFEEDDCC
3: ID pattern
using c/h/s/b writes in in
BCD,hex, and inverse of
c/h/s/b
4: IQ pattern
fills in sector with the
current
LBA and subsequently
increments the value.
5: Random pattern

wpeekb(var,offset) Get a byte from the write buffer at offset


offset
wpeekw(var,offset) Get a word from the write buffer at
offset offset
rpokeb(offset, var) Put a byte into read buffer at offset
offset
rpokew(offset, var) Put a word into read buffer at offset
offset
wpokeb(offset, var) Put a byte into write buffer at offset
offset
writeb(offset,data) Puts data string into the write buffer
Example:
writeb(0,”aabbccddeeff11002233”);
wpokew(offset, var) Put a word into write buffer at offset
offset
bedit bufferId Edit the buffer referred to by buffer ID.
Buffer ID =1 for read buffer, or 2 for
write buffer
brload filename Loads the read buffer with entire File must exist
contents of file referred to by filename
or 0x400000 bytes which ever is less.
bwload filename Loads the write buffer with entire File must exist
contents of file referred to by filename
or 0x400000 bytes which ever is less.
brsave filename Saves read buffer content to the file with
filename. Whole 0x400000 bytes are
saved.
bwsave filename Saves write buffer content to the file
with filename. Whole 0x400000 bytes
are saved.
bsave ( Saves buffer content to the file with
BufID, filename.
FileName, BufID 1=read, 2=Write
from, FileName : name of the file to save to
to) From: offset
To: length
Example: bsave(1,”save.bin”,0,512);
brloadtrace Loads the trace command buffer into the
read buffer
bw2r(count) Copy write buffer to read buffer
Count : sector count
br2w(count) Copy read buffer to write buffer
Count : sector count
bcopy(desBufId, desOffset, Buffer copy from srcBufId to desBufId
srcBufId, SrcOffset, count) desBufId : buffer # 1 ~ 3
SrcBufId : buffer # 1 ~ 3
desOffset : byte offset from the
beginning
srcOffset : byte offset from the

why not! 62 CCC - dkim


CUBE User Document why cube

beginning
count : byte count # to copy

fopen(filename,mode) Filename: name of the file to open


Mode: 1=binary, 0 for text
fclose(); Close the opened file
ftell(rtnval); Rtnval: returns the current file position
fseek(pos); Sets the file pointer to pos
Pos: file pointer position

fwrite(BufNum,offset,len); Writes the length of buffer from the


offset
BufNum:Buffer Number, 1,2,3
Offset: offset of the buffer to write
Len: length of the data to write
fread(BufNum,offset,len); reads the file into the buffer starting
offset of the buffer with the length of
len
BufNum:Buffer Number, 1,2,3
Offset: offset of the buffer to read in
Len: length of the data to read

10.3.10.1. Bedit
When the user type Bedit with parameter ‘1’ or ‘2’, a buffer editor will popup.
Buffer size is limited to 8192 blocks = 4194304 bytes.

2.

3.

Figure 4 Buffer Editor

why not! 63 CCC - dkim


CUBE User Document why cube

1. Shows the offset of the data at the cursor, value is the current data value of where the
cursor is.(see Figure 4 Buffer Editor)
2. Shows the data as ascii format.(See Figure 4 Buffer Editor)
3. This is the menu for the buffer editor. (See Figure 4 Buffer Editor)
F1: will toggle the cursor between ASCII area anf HEX area
F2: Put the cursor at a data and press F2 will fill that line with the same data as where the
cursor is. (See Figure 5 Fill Line :F2)
F3. Search the buffer the data
F4. Swaps buffer between Write Buffer, and Read Buffer
F5. Saves the buffer
F6. Sets all the data back to zero
F7. Compares Data between Write Buffer and Read buffer. The mis compared data will
be in purple(See Figure 7 Comparing the buffer F7).
F8. Clears the buffer
F9. Put the cursor at a data and press F9 will fill the whole buffer with the same data as
where the cursor is. (See Figure 6 Fill Whole Buffer :F3)
ESC: Quits the buffer and go back to the cube command prompt
PgDn: Goes to next 512 bytes of data when full screen. If pass the limit, it will go back
to offset zero.
PgUp: Goes to previous 512 bytes of data when full screen. If pass zero, it will go the
1ff00.
Home: Goes to the beginning of the offset for that screen.
End : Goes to the end of the offset for that screen .
Insert key: Toggles insert/overwrite.

why not! 64 CCC - dkim


CUBE User Document why cube

Figure 5 Fill Line :F2

why not! 65 CCC - dkim


CUBE User Document why cube

Figure 6 Fill Whole Buffer :F3

why not! 66 CCC - dkim


CUBE User Document why cube

Figure 7 Comparing the buffer F7

10.3.11. Power Control Functions

User can attach a power control board to a test system to turn power on or off.

function syntax parameter description requirement


PWR_CONTROL this is a predefined
variable for defining the
type of power controller is
installed. The definitions
are as follows:
0 == No power
controller
1 == Parallel control
(using ATX power
supply)
2 == Samsung ISA
power card
power 1/0 Turn on/off power PWR_CONTROL must be set to
0 – Turn it off appropriate controller value. If
1 – Turn it on PWR_CONTROL setting is set to 0
(no power controller), then the
program will prompt the user to
either turn power on manually or off
when power command is received
powermargin (switch, 5V, 12V, Switch Turn on/off power PWR_CONTROL must be set to

why not! 67 CCC - dkim


CUBE User Document why cube

port, comport) 0 – Turn it off appropriate controller value. For


1-- Turn it on Flexstar power, margining. Power
5V: value for 5V, in 100’s can be turned off either by using
example: for 5.25V ->525 “powermargin(0,0,0,0,0)” or
12V:value for 12V, in “power 0”
100’s
example: for 12.75 V -
>1275
port – port number of
serial 8 port power card—
0, if N/A
comport – comport of the
powercard
0, if N/A
powr 1/0 Turn on/off power PWR_CONTROL must be set to
0 – Turn it off appropriate controller value
1-- Turn it on If PWR_CONTROL setting is set to
Waits for start up time. 0 (no power controller), then the
Displays the time to ready program will prompt the user to
in seconds either turn power on manually or off
when power command is received
ispower(port,rtnval) Sets the rtnval to 1 if the FOR PWR_CONTROL TYPE 5
drive exist in the power
port
spower(chkrdy,onoff,port,comport) Turns power on and off PWR_CONTROLTYPE=5
Chkrdy: 1: wait for drive
ready
Onoff: turn on or off
Port: power port 1-8
Comport: comport to
control power card

10.3.11.1. ATX Power Control Via Parallel Port (PWR_CONTROL = 1)

why not! 68 CCC - dkim


CUBE User Document why cube

C U B E: A TX P o w er co ntro l via P arallel P o rt

13
25
12
10 20 24
11
9 19 23
G ND 10
8 18 22
9

P C P arallel P o rt
7 17 21
8
6 A TX P o w er 16 20
G ND 7
5 C o nnecto r 15 19
6
4 14 P C _O N 18
5
3 13 17
4
2 12 16
3
1 11 15
D A TA 0
2
14
1
[no te]

P in 14 P in 2
P in 15 P in 23

Figure 8 ATX power Control card

10.3.12. PCI functions

Before CUBE can communicate with the drive under test, the user must detect and load
appropriate driver (PATA/SATA). This can be done by using PCI functions

function syntax parameter description requirement


scanpci Scan the PCI bus for predefined SATA/PATA
controller (If found, it will display the
controller with HA#)
scanallpci Scan the PCI bus for any controller (all found
devices will have HA# assigned)
setha(HA#) Sets and load device driver for the HA#
pciread(var, When setha(HA#) is issued and appropriate Must first identify the controller by
offset) driver is loaded, the predefined variable issuing
PCI_BASE will be set. scanpci or scanallpci. Then,
This command will allow the user to access Load appropriate driver by issuing
the register at offset – read in dword data from setha(HA#)
offset into var

pciwrite(dword, Write dword data to pci register at offset offset


offset)

why not! 69 CCC - dkim


CUBE User Document why cube

10.3.13. Memory Mapped IO

If you are working with a new hardware where writing and reading of data to the HW is done
via the memory mapped IO, you must use the following predefined functions to operate on it.
Memory mapped IO operations are done in conjunction with PCI function (see PCI functions
section for more info)

function syntax parameter description requirement


map_phys(mapped_addr, map physical (HW) memory io space into Caller should have used pciread()
phys_addr, size) software accessable memory space. function to obtain the physical
mapped_addr: mapped address (returned address to map prior to calling this
value from the function) function.
phys_addr: physical memory space to map
size: amount of data bytes to map (must be
in blocks of 0x1000 bytes)
free_phys(mapped_addr) Free mapped memory. This function must assumes memory was already
be called at the end of your program to free mapped before freeing
up the memory space.
mapped_addr: address to free
gmem32(var, Read DWORD worth of data from mapped memory was mapped –
mapped_addr) address into var. map_phys(…)
var: returned data
mapped_addr: memory location to read
from
smem32(data, Write DWORD worth of data to mapped memory was mapped –
mapped_addr) address space. map_phys(…)
data: DWORD data to write
mapped_addr: memory location to write to

*** It is important to note that when mapping a physical memory space, it must be mapped in
blocks of 0x1000. ie. you must mask the hardware address with 0xFFFFF000 prior to calling
the map_phys(..) function.
ex: if your HW memory address is 0x1FC13204, and want to read offset 0x10 from it, you must
do the following:

hw_addr = 0x1FC13204;
hw_addr = hw_addr & 0xFFFFFFF0; // must always mask of last 4 bits
new_hw_addr = hw_addr & 0xfffff000;
difference = hw_addr – new_hw_addr;

map_phys(mappedAddr, new_hw_addr, 0x8000); // map memory

new_mappedAddr = mappedAddr + difference; // compute new addr

gmem32(data, new_mappedAddr + 0x10); // get data

free_phys(mappedAddr); // free up memory space

why not! 70 CCC - dkim


CUBE User Document why cube

Running code example (Reading & Writing using memory mapped io


scheme on Si3124 controller):

//==========================================================
//= By: Daniel
//=
//= Memory mapped io example using CUBE
//=
//= - we will flash the LED of Si3124 card (Silicon Image SATA-II card)
//=
//==========================================================

void main()
{
int BAR1; // PCI config space BAR1 register
int mappedAddress; // Will hold mapped io space addr
int difference;
int offset;

put("BAR1 - LRAM dump");newline;

pciread(BAR1, 0x18); // Read BAR1 (PCI Configuration Space)

R0 = BAR1 & 0xFFFFF000;


difference = BAR1 & 0x00000FF0;

map_phys(mappedAddress, R0, 0x8000);

R0 = mappedAddress + difference;

newline;
putd(" mapped io address: R0 = %X", R0); newline;newline;
offset = 0;

for (R10=0; R10 < 20; R10++)


{
smem32(0x8000, R0+0x1000); // LED on
delaym(50);
smem32(0x8000, R0+0x1004); // LED off
delaym(50);
}

free_phys(mappedAddress);
}

10.3.14. Other & Date/ Time

function syntax parameter description requirement


randomize NA NA
rand(var, minV, maxV) var: place to store random number NA
minV: lower limit
maxV: upper limit
timestamp(str1) Sets str1 with the current time (hh/mm/ss)

why not! 71 CCC - dkim


CUBE User Document why cube

time display current time (hh/mm/ss) NA


gettime(var) get system elapsed time (elapsed since Jan.
1, 1970) in seconds.

example:

void main()
{
int sTime;
int eTime;

gettime(sTime);

delays(10); // delay for 10 seconds

gettime(eTime);

putd(”Diff: %d”, eTime-sTime;


}

datestamp(str1) Sets str1 with the current date (mm/dd/yy)


date display current date (mm/dd/yy) NA
delays(sec) delay sec seconds
delaym(msec) delay msec milliseconds
clock display current time in milliseconds
cmdtimeout(msec) Set drive command timeout value to msec
Default is 10,000 milliseconds
starttimer Save current clock into global variable
“TICK”. This is a prerequisite for
“ts“ command.
stoptimer Get and show the elapsed time since
previous “st” command.

10.3.15. Legacy Command Tag-Queue

function syntax parameter description requirement


showq Show outstanding queue cmds that has yet
to be serviced – cmd issued but waiting to
be serviced
checkq check DUT to see whether it has any cmds
to service. If so, service it.
debug_cmdq <0/1> enable/disable debug verbose mode (for
cmdq)
0 – Disable
1 – Enable

rdmaqe(lba, b, tagId) issue extended read cmdq with tagId.


Cmd will be serviced when checkq cmd
from script is issued
wdmaqe(lba,b,tagId)
rdmaq(lba,b,tagId)
wdmaq(lba,b,tagId)

why not! 72 CCC - dkim


CUBE User Document why cube

example:
//=================================================
//= By: Daniel
//=
//= Tag Cmd Queue example using CUBE
//=
//=================================================
void main(void)
{
int tagId, lba;

id(0); // Device identify

trace 1; // Turn on TRACE (for debugging)


cmdtime 1; // Enable cmd time measurement
// (to see execution time)

for (tagId=1; tagId<10; ) // for tag ID 1 to 30


{
rand(R0, 0, MAX_LBA); // Obtain random LBA
rdmaq(R0,1,tagId); // Issue ReadCmdQ
tagId++;
}

for (R0=10; R0; R0--)


{
delaym(500); // Wait for 500 milliseconds
checkq; // Check to see whether we have any
// outstanding cmdq that needs
// servicing. If so, checkq will
// service it
}
showq; // see if anything is left in the Q
// If so, it means not all command was serviced
return;
}

10.3.16. Native Command Queuing

In order to use Serial ATA Native Command Queuing commands over a particular Serial ATA
port, three requirements must be met:

 The host controller NCQ feature (must support the DMA Setup FIS and the Set Device Bits
FIS in order to enable First Party DMA transfers and efficient command completion)
 The software driver must support the Read FPDMA Queued and Write FPDMA Queued
commands.
 The drive must support Serial ATA Native Command Queuing.

function syntax parameter description requirement


gettagid(var) var: tag id available

why not! 73 CCC - dkim


CUBE User Document why cube

rfpdma(lba, nb, Read First Party DMA SATA drive supporting


tagId) tagId: cmd tag id Native command queueing.
lba: lba location to read Must provide valid tagId
nb: num of blocks to – user should make a
read call to gettagid(var) to
request for an available
tag id
wfpdma(lba, nb, Write First Party DMA SATA drive supporting
tagId) tagId: cmd tag id Native command queueing.
lba: lba location to read Must provide valid tagId
nb: num of blocks to – user should make a
read call to tagid(var) to
request for an available
tag id
scontrol(var, dir) dir: direction bit (0 ==
read, else write)
var: if dir==0, var will
have scontrol read value.
Else, var is the data to be
written to SCONTROL register
sstatus(var) var: data read from SSTATUS
register
serror(var, dir) dir: direction bit (0 ==
read, else write)
var: if dir==0, var will
have serror read value. Else,
var is the data to be written
to SERROR register (writing
will clear the bit in SERROR
register bit field)
sactive(var) var: data read from SACTIVE
register
satapm var var: HIPM mode Supported only on ICH6R
(1 : active, 2 : partial, 6 : with int_ahci.drv
slumber mode)
comreset var var : reset mode int_ahci.drv supports
(0 : port reset, 1 : HBA comreset 0 & 1.
reset - all port) int_ich.drv supports
only comreset 1.
ahci 1/0 ahci 0 : Standard ATA mode User must make a call to
(default) scanallpci and setha()
ahci 1 : AHCI mode after ahci command.

ncq 1/0 Flag, to send ncq array


command
clearncq Clears ncq array ncq flag =1
sendncq 1/0 Sends the ncq array queue ncq flag =1
Clears the ncq array
sendncq 0: do not wait for
command completion
sendncq 1: wait for command
completion

More to be done….

why not! 74 CCC - dkim


CUBE User Document why cube

10.3.17. Drive Commands

Before any drive command is issued, the user must make sure the controller is selected and the
driver is loaded by issuing following two PCI functions
1 – scanpci or scanallpci
2 – setha(HA#)

For DMA functions/commands, the user must make sure the following are true:
- Controller supports DMA and/or UDMA
- Transfer mode is set by issuing setf(m) function

For Extended command, you must make sure your controller supports extended mode

[note] any drive command having CHS or LBA mode addressing option, to issue command in
LBA mode, the user must issue “slba 1” prior to issuing the drive command. Or, if user wants
to use CHS mode, you’ll are required to issue “slba 0” prior to issuing the drive command

The command execution timeout is based on the CMD_TIMEOUT global variable; the value is
in milliseconds. User can modify the timeout value using cmdtimeout(exp) function.

ex: cmdtimeout(123); // change cmd timeout value to 123 milliseconds

All drive commands will be affected.

function syntax OP parameter/description


cmd(op,fe,sc,sn,cl,ch,dh,bs user Create and issue user defined drive command. User
,xb,dir) can use this function to issue Vendor Unique
commands.
op: drive opcode
fe: feature (16bit)
sc: sector count (16bit)
sn: sector number (16bit)
cl: cylinder low (16bit)
ch: cylinder high (16bit)
dh: device/head (16bit)
bs: block size (32bit)
xb: blocks to transfer (32bit)
dir:data transfer direction (8bit)
0 – No data transfer
1 – Data in (from drive)
2 – Data out (to drive)

[note]
“bs” & “xb” has no meaning if “dir” is set to ZERO

example: to unlock Samsung Drive

void main()
{
int CMD_UNLOCK;

why not! 75 CCC - dkim


CUBE User Document why cube

int PASS_FE;
int LOCK;

CMD_UNLOCK = 0xC0;
PASS_FE = 0x22;
LOCK = 0;

cmd(CMD_UNLOCK,PASS_FE,LOCK, 0,0,0,0xA1,0,0,0);
}
To set the

By function name
function syntax OP parameter/description requirement
cfa_es(lba, s) 0xC0 CFA Erase sector
lba:
s: sector
dcfg(f) 0xB1 Device Configuration
f: Feature
0xC0 – Restore
0xC1 – Freeze lock
0xC2 – Identify
0xC3 – Set
ckpw 0xE5 Check Power Mode
diag 0x90 Diagnostic
dreset 0x08 NA
dw fn 0x92 Download Micro Code (Diskware)
fn: filename

example: dw “palo.dn2”;
idle t 0xE3 Idle
t: timer period value
0 // Timeout disabled
1-240 // (t * 5) seconds
241-251 // ((t-240)*30) minutes
252 // 21 minutes
253 // between 8 and 12 hours
254 // Reserved
255 // 21 min 15 seconds
flush 0xE7 Flush Cache
flushe 0xEA Flush Cache Extended
id m 0xEC Device Identify
m: display mode
0 == Do not display data
1 == Display data
idlei 0xE1 Idle Immediate
nop 0x00 NA
nvcache(fea,lba,sc) 0xB6 Send Non-Volatile CACHE command to For Hybrid-HDD
drive. Features register controls what
type of NVCACHE command.
0x00 : Set NV Cache Power Mode
0x01 : RETURN From NV Cache Power Mode
0x10 : Add LBA(s) to NV Cache Pinned
0x11 : Remove LBA(s) From NV Cache
Pinned Set
0x12 : Query NV Cache Pinned Set
0x13 : Query NV Cache Misses
0x14 : Flush NV Cache
rbuf 0xE4 Read Buffer
reset NA reset device – issue soft reset to
controller/drive
rd(c_lba, h, s, b) 0x20 Read sector - PIO

why not! 76 CCC - dkim


CUBE User Document why cube

c_lba: cylinder or lba


h: head – valid if not in lba mode
s: sector – valid if not in lba mode
b: #of blocks to read
rde(lba, b) 0x24 Read sector extended – PIO
lba : lba location to read
b: #of blocks to read
rdlg (l,h,s) 0x22 Read Long Id or init
l: cylinder or lba
h: head
s:sector

rdle(l,s1,s2) 0x2F Read Log Extended


l: logAddress
s1: sector offset
s2: sector count
rdma(a,h,s,b) 0xC8 Read DMA setf()
a: cylinder or lba
h: head – valid if CHS mode enabled
s: sector – valid if CHS mode enabled
b: #of blocks to xfer
rdmae(lba, b) 0x24 Read DMA extended - setf()
lba: lba location to read - Controller
b: #of blocks to read with DMA
support
rdmaq(lba, b, tag) 0xC7 Read DMA Queued - setf()
lba: -
b: #of blocks to xfer
tag: tag id
rdmaqe(lba, b, tag) 0x26 Read DMA Queued extended - setf()
lba: lba location to read -
b: #of blocks to read
tag: tag id
rm(a,h,s,b) 0xC4 Read Multiple sm( )
a: Cylinder or LBA
h: head – valid if CHS mode enabled
s: sector – valid if CHS mode enabled
b: #of blocks to xfer
rme(lba, b) 0x29 Read Multiple Extended Must have
issued set
multiple
command
rnma 0xF7 Read Native Max Address
rnmae 0x27 Read Native Max Address Extended
rtsk NA read and display current device TF
rv(a,h,s,b) 0x40 Read Verify
a: Cylinder or LBA
h: head – valid only in CHS mode
s: sector – valid only in CHS mode
b: #of blocks to xfer
rve(lba,b) 0x42 Read Verify Extended
lba:
b: #of blocks to xfer
rw fn 0x92 Download Micro Code (Ramware)
fn: filename

example: rw “palo.dn2”;
scdp 0xF6 Security – Disable password
scep 0xF3 Security - Erase Prepare
sceu 0xF4 Security – Erase Unit
scfl 0xF5 Security – Freeze Lock

why not! 77 CCC - dkim


CUBE User Document why cube

scsp 0xF1 Security - Set Password


scul 0xF2 Security - Unlock
serv 0xA2 Overlap * Queued service
setf(f) 0xEF Set Features
f: Feature value
01h: Enable 8-bit data transfers
02h: Enable write cache
03h: Set transfer mode based on value in Sector
Count register
33h: Disable retry
42h: Enable AAM
44h: Length of vendor specific bytes on READ
LONG/WRITE LONG commands
54h: Set cache segments to Sector Count register
value
55h: Disable read look-ahead feature
66h: Disable reverting to power on defaults
77h: Disable ECC
81h: Disable 8-bit data transfers
82h: Disable write cache
88h: Enable ECC
99h: Enable retries
AAh: Enable read look-ahead feature
ABh: Set maximum prefetch using Sector Count
register value
BBh: 4 bytes of vendor specific bytes on READ
LONG/WRITE LONG commands
C2h: Disable AAM
CCh: Enable reverting to power on defaults
f0h: disable dummy RG, VU
f1h: disable s/w ecc function, VU
f2h: disable defect management, VU
f3h: disable offtrack write, VU
f4h: Go back to non volatile capacity on hard reset
fbh: Keep current volatile capacity on hard reset
for Time's request
fch: enable offtrack write, VU
fdh: enable defect management, VU
feh: enable s/w ecc function, VU
ffh: enable dummy RG, VU
03h - Set Transfer mode in Sector Count Reg
value
00h=PIO deflt, 01h=PIO deflt/disbl IORDY,
00001nnn=PIO w/ IORDY, 00100nnn=MW DMA
TO Set mode
setf(0x0003) Pio default mode
setf(0x0103) Pio default mode, disable IORDY
setf(0x0903) Pio flow control transfer mode 1
setf(0x0A03) Pio flow control transfer mode 2
setf(0x0B03) Pio flow control transfer mode 3
setf(0x2103) Multiword DMA mode 1
setf(0x2203) Multiword DMA mode 2
setf(0x2303) Multiword DMA mode 3
setf(0x4103) Ultra DMA mode 1
setf(0x4203) Ultra DMA mode 2
setf(0x4303) Ultra DMA mode 3
setf(0x4403) Ultra DMA mode 4
setf(0x4503) Ultra DMA mode 5
setf(0x4603) Ultra DMA mode 6
54h - Set cache segments to Sector Count
Reg ABh - Set max prefetching using
Sector Count Reg value
For more detail for setting udma mode refer
to section 6.1
setp(param) 0x91 Set parameter
Param: parameter
sk(a,h) 0x70 Seek
a: Cylinder or LBA
h: head – valid only in CHS mode
sleep 0xE6 Sleep
sm(m) 0xC6 Set Multiple
m: multiple value
smart(f,opt1,opt2) 0xB0 Smart
f: feature

why not! 78 CCC - dkim


CUBE User Document why cube

D0 – SMART Read Data


( SRAV )
D1 – SmartReadAttributeThresholds
( SRAT )
D2 – Enable/Disable Attrib
( SAAS (opt) )
D3 – SmartSaveAttributeValues
( SSAV )
D4 – Execute Off-line immediate
( SAST : abort self test)
( SCTC : Comprehensive
test )
( SCTO : Comprehensive
test )
( SEOI : Offline Immediate )
( SQTC : Quick self test )
( SQTO : Quick self test )
( SSTC : Save attr value )
( SSTO : Save attr value )
D5 – Read Log
( SRLS ( opt1, opt2 ) )
( SRST : Read self test
sec )
( SRLC : Read Log Record )
D6 – Write Log
( SWLS ( opt1, opt2 ) )
( SWST ( opt1, opt2 ) )
D7 – Obselete
D8 – Enable operation
( SESO )
D9 – Disable operation
( SDSO )
DA – Return status
( SRSS )
DB –
SmartEnableDisableAutoOffline
( SAOL(opt) )
DE – VU
( SISV )
opt1: option1 – used with D2, D5, & D6
This value sets the SectCount
opt2: option2 – used with D4, D5, & D6
This value sets the SectNum
smax(f,mlba,f) 0xF9 Set Max Address
f: feature
00 - Obsolete (I will use it for
Set Max Address)
01 - Set Max Set password
02 - Set Max Lock
03 - Set Max Unlock
04 - Set Max Freeze lock
mlba: max lba to set to
f: flag
0 == volatile
1 == non-volatile
smaxe(mlba, flag) 0x37 Set Max Address Extended
mlba: max lba
flag: 0 == volatile
1 == non-volatile
stbi 0xE0 Standby Immediate
stby t 0xE2 Standby
t: time perior value

why not! 79 CCC - dkim


CUBE User Document why cube

stconfig(i,s,t,f) 0x51 Config Stream


i: stream id
s: size
t: timeout
f: feature option
strdma(i,s,t,l,f) 0x2A Read Stream DMA
i: stream id
s: size
t: timeout value
l: lba
f: featureOption
strpio(i,s,t,l,f) 0x2B Read Stream PIO
i: stream id
s: size
t: timeout value
l: lba
f: featureOption
stwdma(i,b,t,l,f) 0x3A Write Stream DMA
i: stream id
b: #of blocks to xfer
t: timeout
l: lba
f: feature option
stwpio(i,b,t,l,f) 0x3B Write Stream PIO
i: stream id
b: #of blocks to xfer
t: timeout
l: lba
f: feature option
wbuf 0xE8 Write Buffer
wdma(a,h,s,b) 0xCA Write DMA
a: cylinder or lba
h: head – valid if CHS mode enabled
s: sector – valid if CHS mode enabled
b: #of blocks to xfer
wdmae(lba,b) 0x35 Write DMA Extended
lba:
b: #of blocks to read
wdmafe(lba, b) 0x3D Write DMA FUA Extended
lba:
b: #of blocks to xfer
wdmaqfe(lba,b) 0x3E Write DMA Queued FUA Extended
lba:
b: #of blocks to xfer
wdmaq(lba,b,tag) 0xCC Write DMA Queued
lba:
b: #of blocks to xfer
tag: tag id
wdmaqe(lba,b,tag) 0x36 Write DMA Queued Extended
lba:
b: #of blocks to read
tag: tag id
wfldma(lba, nb, 0x61 Write First Party DMA
tagId) tagId: cmd tag id
lba: lba location to read
nb: num of blocks to read
wm(a,h,s,b) 0xC5 Write Multiple
a: Cylinder or LBA
h: head – valid if CHS mode enabled
s: sector – valid if CHS mode enabled
b: #of blocks to xfer

why not! 80 CCC - dkim


CUBE User Document why cube

wme(lba,b) 0x39 Write Multiple Extended


lba:
b: #of blocks to read
wmfe(lba, b) 0xCE Write Multiple FUA Extended
lba:
b: #of blocks to xfer
wr(a, h,s,b) 0x30 Write Sector – PIO
a: Cylinder or LBA
h: head – valid only in CHS mode
s: sector – valid only in CHS mode
b: #of blocks to read
wre(a,b) 0x34 Write Sector Extended
a: Cylinder or LBA
b: #of blocks to read
wtlg (l,h,s) 0x32 Write Long Id or init
l: cylinder or lba
h: head
s:sector
wrle(l,s1,s2) 0x3F Write Log Extended
l: log address
s1: sector offset
s2: sector count

10.3.18. Drive Commands (Samsung VU Commands)


function syntax OP parameter/description requirement
unlk Unlock VU mode
lock Lock VU mode
snde Send drive error code none
config Display drive’s VU data which “init”
includes zone table
r2b FID Load code from Ref-MC to Boot FW must support DL-PTR
location
FID: MCFS file id
r2mc FID Copy code from Ref-MC to MC FW must support DL-PTR
FID: MCFS file id
mc2b(FID) Load code from MC to Boot location FW must support DL-PTR
FID: MCFS file id
h2mc(filename, Load code from HOST to MC FW must support DL-PTR
FID) filename: file to download
FID: MCFS file id
Chrb val 9Ah/ Read Channel Buffer [0-ffffh]
17h
Chrp(val,Rturn 9Ah/ Read Channel Preamp [0-ffffh]
Val 1Ah returns the data on ReturnVal
Chrr(val,Retur 9Ah/ Read Channel Register[0-ffffh],
nVal) 16h returns the data on ReturnVal
Chud Read Channel Record none Uses channel table in
Buffer
Chwb val 9Ah/ Write channel Buffer [0-ffffh]
15h
chwp val 9Ah/ Write channel Preamp [0-ffffh]
19h
chwr val 9Ah/ Write channel Register [0-ffffh]
14h

why not! 81 CCC - dkim


CUBE User Document why cube

clearncq n/a Clears ncq command queue ncq flag=1


conv val 9Ah/ val = [0/1/2]0 = LBA to physical
1Eh 1 = physical to LBA
2 = LBA to physical with defect
mapping: Drive type/FW dependent
val = [0/1/2]
filt (s,cyl) C2h Write filter register. The R/W
channel registers are addressed
through ASIC register 1032h
S: sector number
Cyl: cylinder
fmtu opt 8Fh Format Unit [options 0- 255] opt can be greater
Defect List Utility than 255.
1.Create D list from the burn-in (LSB of opt : feature
error log register,
2.Create R and S list from the D MSB of opt : sector
list. count register)
3.Add the defect specified by the
(C,H,S) to the A list.
4.Initialize the A list.
5.DC erase the Track.
9. Read Servo Writer Record

fmtd opt 8Ch Format track with Defect [0/1]


fmtg 8Dh Format Gap
folw FBh Get PES distribution :test
getmodel(str1) Puts model to str1 Must do id/init first
getfw(str1) Puts fw version into str1 Must do id/init first
getsn(str1) Puts serialnumber into str1 Must do id/init first
getengver(str1 Puts engineering firmware version Must do init first
) into str1
getmaxhead Var Returns max head for current drive,
findlastcyl Returns last cylinder
var
getmaxzone var Returns max zone
chs2pba var Returns pba for current chs
cs2lba var Returns lba for current chs
calczone var Returns currentzone for current cyl,
current head
calcwedge(wedg Returns current wedge number using
e) current cylinder, head,sector.
wedge: Returned Wedge number
getsect4cyl Returns sector number for current
var cylinder
floatcmp(float Compares two float a and b and return
a,float b,int c as the result.
c) c == 1 if a is greater than b,
c == 0 if a is equal to b,
c == -1 if a is less than b.
str2float(str Changes string to a float
a,float b); String a: float in a string format
Float b: a float number
Example: float a; str2float(“1.0”,a);
// a is equal to 1.0
newlogfile Set filename to the logfile instead
“filename” of cube.log
If filename = “serialnumber”
Then the actual file name will be the

why not! 82 CCC - dkim


CUBE User Document why cube

serial number of the testing drive


You will need to do identify before
this command.
Example: id 0;
newlogfile “serialnumber”;
logfile 1;
delfile Deletes the file named filename
“filename”
showstat Replaces the previous command summ.
Prints the status of read/write/seek
count
zerostat Replaces the previous command zero.
Zeros out the read/write/seek count
Addh val Adds the val the head, increments it
until max head, then increments the
cylinder until max cylinder for all
head
Addc val Adds the val to cylinder until the
max cylinder
gettf(RegNum, GETTF -- Gets the taskfile register
ReturnVal); Parameter: int RegNum, int Val
RegNum :1 ->returns the feature/Error
register to Val
RegNum :2 ->returns the Sector Count
register to Val
RegNum :3 ->returns the Sector Number
register to Val
RegNum :4 ->returns the Cylinder Low
register to Val
RegNum :5 ->returns the Cylinder High
register to Val
RegNum :6 ->returns the Device Head
register to Val
RegNum :7 ->returns the command/
Status register to Val
default: returns 0 to Val
example: gettf(1,R0);// R0 contains
feature/error register value
gird 9Ah/ Get Read Current
04h
giwt 9Ah/ Get Write Current
03h
idto opt 9Ah/ Idle Seek Timeout
0Eh [Enable=1,Disable=0]
init zone C0h/ Initialize Drive Zone Limits [0-255]
ECh zn: zone id. If 0, init full user
accessable zone
This command will unlock the drive
and retrieve VU specific info from
the drive. It will also update
MAX_PC, MAX_PH, MAX_PS, MAX_PBA, and
MIN_PC
inith zn hd C0h/ Initialize Drive Zone Limits “init” must have been
ECh [zone][hd] issued for correct
zn: zone to init to functionality
sn+100 will set the c to max_cyl for
that head
hd: head to init to
This command DOES NOT issue drive
command. This will use zone table
info retrieved by issuing “init” and

why not! 83 CCC - dkim


CUBE User Document why cube

will update MAX_PC, MAX_PS, MAX_PBA,


and MIN_PC for zn & hd

loadcompat func Loads the compat driver for dos cube


ltsk func Gets the last set of command taskfile
mput fid 0x9A/ Write MCFS File (fid)
0x22
mget fid 0x9A/ Read MCFS File [fid]
0x22
offt offset FDh Set track offset percentile (0-31)
phrd sectorC 80h Physical Read Sectors (0-255) Physical C/H/S should
be set
phrv sectorC 81h Physical Read Verify Sectors (0-255) Physical C/H/S should
be set
phwr sectorC 82h Physical Write Sectors (0-255) Physical C/H/S should
be set
prdl sectorC 22h Physical version of ATA Read Long Must do set feature
( read 1 sector plus ECC bytes) 0x44 and then id in
order to use this
command to set actual
ECC #
prlu 84h Physical read long Reads two sectors of
data including ecc
bytes
prtk 86h Physical Read Track Physical C/H should be
set
psek mode 8Eh Physical Seek (Mode: 0=write/1=read) Physical C/H/S should
be set
pwrl sectorC 32h Physical version of ATA Write Long Must do set feature
( write 1 sector plus ECC bytes) 0x44 and then id in
order to use this
command to set actual
ECC #
pwtk 85h Physical Write Track Physical C/H/S should
be set
rchd hd 9Ah/ RCO test for specific Head [head 0-
0Ch max]
rcoa hd 9Ah/ RCO test for Drive Generate RCO test for
0Bh all zone s and heads
rczh zone 9Ah/ RCO test for specific zone/Head[zone
0Ah 0-max]
rczn zone 9Ah/ RCO test for specific zone [zone 0-
09h max]
Rdib 1Ah Read Bias Current Currently calculated
for agere only, more
to come
Rdiw 1Ah Read write Current Currently calculated
for agere only, more
to come
rdbf val 88h Read Buffer Block Page [page ffffh]
Rdhv 9Ah/ Read Buffer Head Voltage
0Dh
rdxr val F0h Read External Memory byte [0-ffffh] The disk memory
location [nn] is read
ans displayed
rdxw 9Ah/ Read external memory word 2-bytes The disk memory
(val,RtnVal) 11h [mem location] location [nn] is read
RtnVal: value returned to use ans displayed
Rpes FBh Read PES amplitude
scra n/a Servo calibration

why not! 84 CCC - dkim


CUBE User Document why cube

Sendncq n/a Sends ncq commands to the driver ncq flag=1

sgry opt FAh Scan Grey Code: The 13 bit gray code
at DSP memory address 0205h is read
and displayed. The ACC is set equal
to the 16 bit contents of DSP address
0205h.
[0-255]

shrr opt FFh/ Set Hidden Retry count – Read [0-10]


80h
shrw opt FFh/ Set Hidden Retry count – Write [0-10]
C0h
sird current 9Ah/ Set Read channel Current [current] Uses current
02h cylinder/Head
siwt current 9Ah/ Set Write channel Current [10h-98h] Uses current
01h cylinder/head
Skew F7h Head skew calibration
test 9Ah Create and issue user defined vendor
unique drive command.
Subop: drive subopcode (8 bit)
sc: sector count (16bit)
sn: sector number (16bit)
cl: cylinder low (16bit)
ch: cylinder high (16bit)
dh: device/head (16bit)

tnmr (repeat, 9Ah/ Tune MR Head [repeat count 1-255]


pass) 05h [pass]
tone val 8Ah Tone Fill Gap
wrtc current Set Write current value [0-ffh]
wrxr val Write External Register(byte)[0-
ffffh]
wrxw Write external Register(word)[0-
(address,val) ffffh]
Address: Register address
Val: value
wtrk val Write Track(starting sector)[0 – 255] The command argument
specifies the starting
sector to write. All
sectors of the track
are written starting
at the sector
number[nn].
wrbf val 0x89 Write buffer block [0-0xffff]

10.3.19. MISC commands (Math,Test….)


function syntax O parameter/description requirement
P
Sqrt(val,RtnVal) Val: value to be square rooted Val , and RtnVal is
RtnVal: Value returned both type float
log(val, RtnVal) Val: value to be log Val , and RtnVal is
RtnVal: Value returned both type float
log10(val, RtnVal) Val: value to be log10 Val , and RtnVal is
RtnVal: Value returned both type float
sktm(mode) 1. mode: 0=write/1=read)
2. “s” should be set up as test type.

why not! 85 CCC - dkim


CUBE User Document why cube

TRK_TRK 0x01
TWO_TRK 0x02
ONE_THIRD 0x04
FULL_TRACK 0x08
AVG_SEEK 0x10
WEIGHTED_AVG_SEEK 0x20
All test 0xff
3. “acc” should be set up as repeat
count when we test WEIGHTED_AVG_SEEK.
showdefect(“filenam Displays the defect list to the Must use after burin
e”) file :filename in
createfile(handle, The createfile function creates or
name) opens a file, directory, physical
disk, volume, console buffer, tape
drive, communications resource,
mailslot, or pipe.
- parameter / description
@ handle: Variable to contain an
open handle to the specified file.
@ name: Pointer to a null-terminated
string that specifies the name of the
object to create or open.
- warning : This function can damage
your hard disk drive if you use it
for a wrong purpose.
closehandle(handle) The closehandle function closes an
open object handle.
- parameter / description
@ handle: Handle to an open object.
- warning : This function can damage
your hard disk drive if you use it
for a wrong purpose.
readfile(handle, The readfile function reads data from
lba, count) a file, starting at the position
indicated by the lba.
- parameter / description
@ handle: Handle to the file to be
read.
@ lba : File LBA position to be
read.
@ count : Number of sectors to be
read from the file.
- warning : This function can damage
your hard disk drive if you use it
for a wrong purpose.
writefile(handle, writefile function writes data to a
lba, count) file.
- parameter / description
@ handle: Handle to the file to be
written.
@ lba : File LBA position to be
written.
@ count : Number of sectors to be
written from the file.
- warning : This function can damage
your hard disk drive if you use it
for a wrong purpose.

why not! 86 CCC - dkim


CUBE User Document why cube

10.3.20. Command compatibility between Gemini and Cube

Gemini commands Cube Commands


summ showstat
zero zerostat
ldac N/A This is obsolete for Example:
cube, since cube have more Ldac 9; wtrg f2h;
than one parameters fmtu 3;
Do
cmd(0x8f,3,9,0,0,0,5
12,1,0);
wtrg Use cmd to input the register Example:
value see example below Ldac 9; wtrg f2h;
fmtu 3;
Do
cmd(0x8f,3,9,0,0,0,5
12,1,0);
spsz tnmr

10.3.21. Error code definition

Error code Error Number Definition


EC_NOERROR 0x00 Pass, no error
EC_ERROR 0x01 Error, undefined
EC_KEYBOARD_INTERRUPTION 0x02 Keyboard interruption
EC_ERRORHALT 0x03 Error halt, set by the user
EC_FAILED_TO_OPEN_LOGFILE 0x04 Failed to open logfile
EC_CMD_FAIL_TO_OPEN_FILE 0x05 Fail to open file
EC_CMD_FAIL_TO_READ_FILE, 0x06 Fail to read file
EC_CMD_FAIL_TO_WRITE_FILE, 0x07 Fail to write file
EC_CMD_FAIL_IDENTIFY_DRIVE, 0x08 Failed to identify the drive
EC_BUFFER_MISCOMPARE 0x2000 Buffer miscompare
EC_ALLOC_MEMORY 0x4000 Cannot allocate memory
EC_ALLOC_BUF1 0x4001 Cannot allocate buffer 1
EC_ALLOC_BUF2 0x4002 Cannot allocate buffer 2
EC_ALLOC_BUF3 0x4003 Cannot allocate buffer 3
EC_DRIVER_NOT_LOADED 0x4004 Driver not loaded
EC_DRIVER_NO_SETHA 0x4005 Driver User has yet to issue
SETHA
EC_DRIVER_NO_HOST_ADAPTER 0x4006 Driver No host adaptor found
EC_DRIVER_NO_STATUS 0x4007 Driver No Status found
EC_DRIVER_FAILED_TO_RESET 0x4008 Driver Failed to reset

why not! 87 CCC - dkim


CUBE User Document why cube

EC_DRIVER_FAILED_TO_ABORT 0x4009 Driver Failed to abort


EC_DRIVER_FAILED_TO_OPEN_FILE 0x4010 Driver Failed to open file
EC_DRIVER_WRONG_FILE_FORMAT 0x4011 Driver Wrong file format
EC_DRIVER_FAILED_TO_READ_FILE 0x4012 Driver Failed too read driver
file
EC_DRIVER_FILE_ID_NOT_FOUND 0x4013 Driver File Id not found
EC_DRIVER_FILE_LENGTH_ZERO 0x4014 Driver File Length is zero
EC_DRIVER_FILE_ACCESS 0x4015 Driver no file access
EC_DRIVER_FAILED_TO_ALLOCATE 0x4016 Driver failed allocate
_MEM memory
EC_DRIVE_MCFS_ERROR 0x6000 Mcfs error
EC_DRIVE_MCFS_READ_FAILED 0x6001 MCFS read failed
EC_DRIVE_MCFS_WRONG_SPT 0x6002 MCFS wrong script
EC_DRIVE_ERROR 0x8000 Drive Error
EC_DRIVE_CMD_TIMEOUT 0x8001 Command timeout
EC_DRIVE_DRQ_TIMEOUT 0x8002 DRQ timeout
EC_DRIVE_IRQ_TIMEOUT 0x8003 IRO timeout
EC_DRIVE_BUSY_TIMEOUT 0x8004 Busy timeout
EC_DRIVE_HOST_RESET_TIMEOUT 0x8005 Host Reset Time Out
EC_DRIVE_ST_WRITE_FAULT 0x8006 Status Write fault error
EC_DRIVE_ST_NOT_READY 0x8007 Status Drive not ready
EC_DRIVE_ST_SEEK 0x8008 Status Seek error
EC_DRIVE_ST_DATA_CORRECTED 0x8009 Status Data corrected
EC_DRIVE_ST_BUSY 0x8010 Status busy
EC_DRIVE_ER_SECTOR 0x8011 Error Reg sector
EC_DRIVE_ER_ECC 0x8012 Error Reg ECC
EC_DRIVE_ER_UNDEFINED 0x8013 Error Reg undefined
EC_DRIVE_ER_ID_NOT_FOUND 0x8014 Error Reg ID not found
EC_DRIVE_ER_ABORT_COMMAND 0x8015 Error Reg abort command

EC_DRIVE_ER_SEEK 0x8016 Error Reg seek error


EC_DRIVE_ER_ADDRESS_MARK 0x8017 Error Reg Address Mark not
found
EC_CMDQ_TOO_MANY_ENTRY 0x8018 CommandQ Too Many Entry
EC_CMDQ_TAG_NOT_FOUND 0x8019 CommandQ Tag not found
EC_DOWNLOAD_INVALID_FLASH_I 0x8020 Download invalid Flash ID
D
EC_DOWNLOAD_DATA_MISCOMPAR 0x8021 Download Data Miscompare
E
EC_DOWNLOAD_WRONG_MODE 0x8022 Download Wrong mode
EC_DRIVE_BUSY_NOT_CLR 0x8023 Drive busy not clear

why not! 88 CCC - dkim


CUBE User Document why cube

10.4. Using CUBE

fig 8-1
(Cube console window)

Assuming Hardware & Software requirement is met, start the CUBE and you will see a screen
similar to fig 8-1.

By default, at the CUBE load time, it will load Compat.DRV. Default driver loaded will run on
on-board interface connector.

why not! 89 CCC - dkim


CUBE User Document why cube

10.4.1. Setting-up test environment by selecting the controller

Before the users of CUBE can exercise the drive, you must setup the controller first. To do this,
please follow the following steps (if default driver is not desired):

Step1: scan for the PCI controller card by issuing

> scanpci // If your card is not found, issue scanallpci command


// See fig 8-2

fig 8-2
(scanning for Controller)

why not! 90 CCC - dkim


CUBE User Document why cube

Step2: Load appropriate driver by issuing

> setha(0) // To load and setup for controller Intel ATA(ICH4)


// See fig 8-3

fig 8-3
(Selecting Controller)

Once the controller is selected and appropriate driver is loaded, the user can now issue
commands to drive.

Commands can be issued from the command-line, or you can load pre-written Small-C script
and run. To load and run, do the following

 load myscript // loads script call “myscript”


 run // If the script was loaded successfully, test will start

why not! 91 CCC - dkim


CUBE User Document why cube

10.4.2. CUBE Test Script Examples

10.4.2.1.Sequential Seek Time Measurement:

void DoSequantialSeek();

void main(void)
{
int counter;

cwin(5); // Create User defined console window


id(1); // Issue Identify

cputs(1,1,"Sequantial Seek Test", 0x20);


DoSequantialSeek();
}

void DoSequantialSeek()
{
int c, h;
int totalTime;

slba 0; // Disable LBA addressing mode

cmdtime 1; // Enable command time measuring clock

//----------------------------------------------
//- Do Sequential seek (all cyl, then heads)
//----------------------------------------------
for(h=0; h<2;h++) // Head loop
{
totalTime=0; // Initialize totalTime
for(c=0; c< 1000; c++) // We will seek from C=0 to 1000
{
sk(c, h); // Seek
totalTime = totalTime+CMD_TIME; // Accumulate test time
}
cputd(30,h,"SingleTrackSeek: %d microsec", totalTime/c, 0x60);
}

return;
}

why not! 92 CCC - dkim


CUBE User Document why cube

10.4.2.2.Random Seek Time Measurement:


void DoRandomSeek(int loopCount);

void main(void)
{
int counter;

cwin(5); // Create User defined console window


id(1); // Issue Identify

cputs(1,1,"Random Seek Time Test", 0x20);


DoRandomSeek(1000); // Do 1000 Random seeks
}

void DoRandomSeek(int loopCount)


{
int c, h;
int i;
int totalTime;
totalTime = 0;

randomize; // Randomize
cmdtime 1; // Enable the clock(microsecond clock
slba 1;
for(i=0;i<loopCount;i++)
{
cputd(5,4,"%ld",i, 0x35); // Show loop count
rand(R0, 0, MAX_LBA); // Generate random LBA
sk(R0, 1); // Seek
totalTime=totalTime+CMD_TIME; // Accumulate the total time
}
cputd(30,4,"RandomSeekTime: %d usec", totalTime/loopCount, 0x60);

return;
}

why not! 93 CCC - dkim


CUBE User Document why cube

10.4.2.3.Do Sequential DMA Write/Read:

void main()
{
int lba;
int startLBA;

id(1); // Identify

erhlt 1; // Enable error halt (halt when error occurs


slba 1; // Enable LBA addressing mode
bcmp 1; // Enable Buffer compare when data is read
wfill(0x12345678); // Fill write buffer with pattern 0x12345678

MAX_LBA = MAX_LBA - 1000;// when id(1) is called, MAX_LBA was set


startLBA = 0;

putd("MAX_LBA = %ld", MAX_LBA); newline;

setf(0x2203); // Set transfer mode to DMA mode 2


time;newline;date;newline; // Time stamp
for(lba=startLBA; lba < MAX_LBA; lba = lba+255)
{
wdma(lba, 0, 0, 255); // Write DMA
}

setf(0x2103); // Set transfer mode to DMA mode 1


time;newline;date;newline; // Time stamp
for(lba=startLBA; lba < MAX_LBA; lba = lba+255)
{
wdma(lba, 0, 0, 255); // Write DMA
}

time;newline;date;newline; // Time stamp


for(lba=startLBA; lba < MAX_LBA; lba=lba+255)
{
rdma(lba, 0, 0, 255); // Read DMA – data compare will be
// done since we set the dcmp 1
}
time;newline;date;newline; // Time stamp
return;
}

why not! 94 CCC - dkim


CUBE User Document why cube

10.4.2.4. Do Sequential UDMA Write/Read:


void main()
{
int lba;
int startLBA;

id(1); // Drive identify

erhlt 1; // Enable error halt


slba 1; // Enable LBA mode addressing
wfill(0x12345678); // Fill Write buffer with pattern 0x12345678

MAX_LBA = MAX_LBA - 1000;


startLBA = 0;

putd("MAX_LBA = %ld", MAX_LBA); newline;

setf(0x4403); // Set transfer mode to UDMA mode 4


time;newline;date;newline;
for(lba=startLBA; lba < MAX_LBA; lba = lba+255)
{
wdma(lba, 0, 0, 255); // Do UDMA Write
}

setf(0x4503); // Set transfer mode to UDMA mode 5


time;newline;date;newline;
for(lba=startLBA; lba < MAX_LBA; lba = lba+255)
{
wdma(lba, 0, 0, 255); // Do UDMA Write
}

time;newline;date;newline;
for(lba=startLBA; lba < MAX_LBA; lba=lba+255)
{
rdma(lba, 0, 0, 255); // Do UDMA Read – do buffer compare
// since we enabled bcmp 1
}
time;newline;date;newline;
return;
}

why not! 95 CCC - dkim


CUBE User Document why cube

10.4.2.5.Legacy Command Queuing:


//=================================================
//= By: Daniel
//=
//= Tag Cmd Queue example using CUBE
//=
//=================================================
void main(void)
{
int tag1, lba;

id(0); // Device identify

trace 1; // Turn on TRACE (for debugging)


cmdtime 1; // Enable cmd time measurement
// (to see execution time)

for (tag1=1; tag1<10; ) // for tag ID 1 to 30


{
rand(R0, 0, MAX_LBA); // Obtain random LBA
rdmaq(R0,1,tag1); // Issue ReadCmdQ
tag1++;
}

for (R0=10; R0; R0--)


{
delaym(500); // Wait for 500 milliseconds
checkq; // Check to see whether we have any
// outstanding cmdq that needs
// servicing. If so, checkq will
// service it
}
showq; // see if anything is left in the Q
// If so, it means not all command was serviced
return;
}

11. VTOOL
11.1. Overview
This is overview of VTOOL Windows version. This document doesn’t explain the whole of
VTOOL usage. This just explains how we can run VTOOL inside W-Cube and how we can run
each menu.
W-Cube includes Windows version of VTOOL. It’s almost similar to Dos version of VTOOL.
When we click “VTOOL” button, VTOOL menu tree will appear inside W-Cube as follows.

why not! 96 CCC - dkim


CUBE User Document why cube

Before we click “VTOOL” button, we should connect a drive. If not, we can see some kind of
error message.

Now we can expand each VTOOL directory as follows.

why not! 97 CCC - dkim


CUBE User Document why cube

Now we can click “DEFECT” menu, and then we can watch Defect Statistical Chart as follows.

why not! 98 CCC - dkim


CUBE User Document why cube

If we want to save this data, just hit F9 key and enter appropriate file name.

[NOTE] We can open multiple lists in Windows 2000, XP at the same time.
But we cannot open multiple lists in Windows 98, ME at the same time.

And if we select “SPAT” menu, we can run SPAT test.


To start test, just click “RUN” button.

why not! 99 CCC - dkim


CUBE User Document why cube

There are two ways of saving a screen.


(1) To save whole test screen.
a. Select the “Capture” menu and select the “Window” sub-menu.
(2) To save the selected area.
a. Drag a mouse to select the area to capture.
b. Select the “Capture” menu and select the “Selection” sub-menu or press “Ctrl+C”.

[NOTE] Now, W-Cube supports jpg, gif, bmp file format. To decide which file format we save a
screen as, we just enter appropriate file extension.

11.2. Configuration

Windows VTOOL has some kinds of configuration option. To change them, we can use
configuration dialog box. We can find it in a sub-menu of W-Cube.

Here we can change “MC Access Mode”, some kinds of operation option, identify the drive
under testing, send reset to it.

why not! 100 CCC - dkim


CUBE User Document why cube

[NOTE] MC Access Mode


a. DISK I/O
This is default I/O mode. In this mode, VTOOL communicate the drive directly to read M/C
data.
b. MCF I/O
When we select this mode, we need to specify MCF file which was made from “M/C DATA
– DISK TO MCF” menu. In this mode, VTOOL communicate the file to read M/C data instead
of reading DRIVE directly.
c. FILE I/O
In this mode, VTOOL use separate files to read M/C data. This mode is for VTOOL
debugging.

[NOTE] Windows VTOOL supports MCF file and MCF mode. It’s similar to Dos version MCR
file but the file format is different.

11.3. VTOOL API Layer

We can run almost VTOOL functions in W-CUBE command line.

why not! 101 CCC - dkim


CUBE User Document why cube

11.3.1. Functions

11.3.1.1. vtoolgetdata : gather specified data and save it into file.


1. Syntax: vtoolgetdata(func, directory_name, file_name);
2. parameters :
a. func : function name in VTOOL menu.
"" to remove the specified file.
b. directory_name : directory name for output file.
"" to use a serial number of connected drive.
c. file_name : output file name.
"" to use a serial number of connected drive.
Using the existing file name, new output will be added to it.

The list of functions which aren’t supported is as follows.

1. All functions under M/C DATA


2. All functions under VISUAL TEST

And VTOOL API layer has following special functions.


a. "GET_DLIST_MAP" : Capture D-List map.
b. "GET_VLIST_MAP" : Capture V-List map.
c. "GET_ELOG_MAP" : Capture E-Log map.
d. “RUN_SPAT” : Run SPAT & capture the screen.
e. “RUN_TET” : Run TET & capture the screen.

11.3.1.2. vtoolstepmask : select or deselect Burn-in step mask.


1. Syntax: vtoolstepmask(mode, step);
2. Parameters :
a. mode
0 to select a step
1 to deselect a step
2 to select all step
3 to deselect all step
b. step
if mode is 0 or 1, this is step to add or remove.

11.3.2. Examples

1. vtoolgetdata("ANALYSIS₩DEFECT", "", "_DMAP.TXT");


// Save “ANALYS₩DEFECT” into “serialnumber₩_DMAP.TXT”.

2. vtoolgetdata("ANALYSIS₩DEFECT", ".", ""); // “.” means the current directory.


// Save “ANALYSIS₩DEFECT” into “serialnumber.txt”

why not! 102 CCC - dkim


CUBE User Document why cube

3. vtoolgetdata("GET_ELOG_MAP", "", "ELOG.GIF");


// Before we run this, we should set up all environment such as B/I step mask.

4. SPAT
void main()
{
R0 = 100; // Cylinder
R1 = 0; // Head
R2 = 0; // Offtrack
R3 = 1000; // Iteration
R4 = 200; // Src Cyl
R5 = 0; // Src Head
R6 = 10; // Interval
R7 = 10; // # of Cyl
R8 = 0; // Type : Following(0), Random(1), Indicate(2), Rand Indicate(3), Seq
Following(4)
R9 = 1; // Mode : Read(2), Write(1), Real Write(5)
R10 = 0; // TraceData : PERR(0), PRAW(1), USER(2)
R11 = 1; // Srv RCC : OFF(0), ON(1)
R12 = 0; // FFT Avg : TIME(0), FREQ(1)
R13 = 0; // FFT Axis : Lin(0), dB(1)
R14 = 0; // Reserved
R15 = 0; // Reserved
R16 = 0; // Reserved
R17 = 0; // Reserved
R18 = 0; // Reserved
R19 = 0; // Reserved
vtoolgetdata("RUN_SPAT", "", "SPAT.GIF");
return;
}

5. TET
void main()
{
R0 = 100; // Cylinder
R1 = 0; // Head
R2 = 1; // Sector
R3 = 1; // Step
R4 = 0; // User Retry
R5 = 0; // HR Retry
R6 = 5; // Read #
R7 = 40; // Max offt
R8 = 130; // Cell #
R9 = 0; // ECC
R10 = 0; // Adjacent Track
R11 = 1; // DataPtn

why not! 103 CCC - dkim


CUBE User Document why cube

R12 = 0; // Reserved
R13 = 0; // Reserved
R14 = 0; // Reserved
R15 = 0; // Reserved
R16 = 0; // Reserved
R17 = 0; // Reserved
R18 = 0; // Reserved
R19 = 0; // Reserved
vtoolgetdata("RUN_TET", "", "TET.GIF");
return;
}

6. Saving all data as separate files in a directory named as serial number.

void main()
{
vtoolstepmask(2, 0); // select all step.
vtoolgetdata("GET_ELOG_MAP", "", "ELOG.GIF");
vtoolgetdata("GET_VLIST_MAP", "", "VLIST.GIF");
vtoolgetdata("GET_DLIST_MAP", "", "DLIST.GIF");

vtoolgetdata("", "", "_DMAP.TXT"); // delete existing output file.


vtoolgetdata("ANALYSIS₩DEFECT", "", "_DMAP.TXT");

vtoolgetdata("", "", "_RESULT.TXT");


vtoolgetdata("ANALYSIS₩BURN-IN RESULT", "", "_RESULT.TXT");

vtoolgetdata("", "", "_WHT.TXT");


vtoolgetdata("ANALYSIS₩WEAK HEAD TEST RESULT", "", "_WHT.TXT");

vtoolgetdata("", "", "_STEPT.TXT");


vtoolgetdata("ANALYSIS₩BURN-IN STEP TIME", "", "_STEPT.TXT");

vtoolgetdata("", "", "_STEP.TXT");


vtoolgetdata("ANALYSIS₩BURN-IN STEP", "", "_STEP.TXT");

vtoolgetdata("", "", "_SMART.TXT");


vtoolgetdata("ANALYSIS₩SMART RESULT", "", "_SMART.TXT");

vtoolgetdata("", "", "_SELOG.TXT");


vtoolgetdata("ANALYSIS₩SMART ERROR LOG", "", "_SELOG.TXT");

vtoolgetdata("", "", "_MNT.TXT");


vtoolgetdata("ANALYSIS₩PARAMETER MONITORING", "", "_MNT.TXT");

vtoolgetdata("", "", "_BISCRT.TXT");

why not! 104 CCC - dkim


CUBE User Document why cube

vtoolgetdata("VIEW/EDIT LIST₩BURN-IN SCRIPT₩VIEW BURNIN SCRIPT", "",


"_BISCRT.TXT");

vtoolgetdata("", "", "_CHNT.TXT");


vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W CHANNEL TABLE", "", "_CHNT.TXT");

vtoolgetdata("", "", "_MATRIX.TXT");


vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W CHANNEL MATRIX", "", "_MATRIX.TXT");

vtoolgetdata("", "", "_PMP.TXT");


vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W PREAMP VALUES", "", "_PMP.TXT");

vtoolgetdata("", "", "_CHNV.TXT");


vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W CHANNEL VALUES", "", "_CHNV.TXT");

vtoolgetdata("", "", "_FIRV.TXT");


vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W FIR VALUES", "", "_FIRV.TXT");

vtoolgetdata("", "", "_SERR.TXT");


vtoolgetdata("VIEW/EDIT LIST₩SORTED ERROR LOG", "", "_SERR.TXT");

vtoolgetdata("", "", "_SERVO.TXT");


vtoolgetdata("VIEW/EDIT LIST₩SERVO INFORMATION", "", "_SERVO.TXT");

vtoolgetdata("", "", "_DSBER.TXT");


vtoolgetdata("VIEW/EDIT LIST₩ERROR RATE TEST RESULT₩Zone Error Rates
(First)", "", "_DSBER.TXT");

vtoolgetdata("", "", "_2NDBER.TXT");


vtoolgetdata("VIEW/EDIT LIST₩ERROR RATE TEST RESULT₩Zone Error Rates
(Second)", "", "_2NDBER.TXT");

vtoolgetdata("", "", "_10SBER.TXT");


vtoolgetdata("VIEW/EDIT LIST₩ERROR RATE TEST RESULT₩Zone Error Rates
(Third)", "", "_10SBER.TXT");

vtoolgetdata("", "", "_MRTUNE.TXT");


vtoolgetdata("VIEW/EDIT LIST₩MR TUNE LOG DATA", "", "_MRTUNE.TXT");

vtoolgetdata("", "", "_747TPI.TXT");

why not! 105 CCC - dkim


CUBE User Document why cube

vtoolgetdata("VIEW/EDIT LIST₩VIEW TPI 747 RESULT₩TPI LOG from [TPI_WRW ]",


"", "_747TPI.TXT");

vtoolgetdata("", "", "_BPICSM.TXT");


vtoolgetdata("VIEW/EDIT LIST₩BPI RESULT₩BPI CSM RESULT", "",
"_BPICSM.TXT");

vtoolgetdata("", "", "_GEOM.TXT");


vtoolgetdata("VIEW/EDIT LIST₩CURRENT GEOMETRY", "", "_GEOM.TXT");

vtoolgetdata("", "", "_NPV.TXT");


vtoolgetdata("VIEW/EDIT LIST₩NPV TEST", "", "_NPV.TXT");

vtoolgetdata("", "", "_SPIKE.TXT");


vtoolgetdata("VIEW/EDIT LIST₩AMPLITUDE SPIKE TEST", "", "_SPIKE.TXT");

vtoolgetdata("", "", "_SDLST.TXT");


vtoolgetdata("VIEW/EDIT LIST₩SERVO DEFECT LIST", "", "_SDLST.TXT");

vtoolgetdata("", "", "_TDLST.TXT");


vtoolgetdata("VIEW/EDIT LIST₩TRACK DEFECT LIST", "", "_TDLST.TXT");

vtoolgetdata("", "", "_DLIST.TXT");


vtoolgetdata("VIEW/EDIT LIST₩PRIMARY DEFECT LIST", "", "_DLIST.TXT");

vtoolgetdata("", "", "_ARLIST.TXT");


vtoolgetdata("VIEW/EDIT LIST₩AUTO REASSIGN LIST", "", "_ARLIST.TXT");

vtoolgetdata("", "", "_TA.TXT");


vtoolgetdata("VIEW/EDIT LIST₩TA DEFECT LIST", "", "_TA.TXT");

vtoolgetdata("", "", "_SN.TXT");


vtoolgetdata("VIEW/EDIT LIST₩DRIVE SERIAL NUMBER", "", "_SN.TXT");
}

Example script 2) Saving all data as a file named as serial number.

void main()
{
vtoolgetdata("", ".", ""); // delete existing output file.
vtoolgetdata("ANALYSIS₩DEFECT", ".", "");
vtoolgetdata("ANALYSIS₩BURN-IN RESULT", ".", "");
vtoolgetdata("ANALYSIS₩WEAK HEAD TEST RESULT", ".", "");
vtoolgetdata("ANALYSIS₩BURN-IN STEP TIME", ".", "");
vtoolgetdata("ANALYSIS₩BURN-IN STEP", ".", "");
vtoolgetdata("ANALYSIS₩SMART RESULT", ".", "");

why not! 106 CCC - dkim


CUBE User Document why cube

vtoolgetdata("ANALYSIS₩SMART ERROR LOG", ".", "");


vtoolgetdata("ANALYSIS₩PARAMETER MONITORING", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩BURN-IN SCRIPT₩VIEW BURNIN SCRIPT", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W CHANNEL TABLE", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W CHANNEL MATRIX", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W PREAMP VALUES", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W CHANNEL VALUES", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩R/W CHANNEL MENU₩CHANNEL TABLE 1
[CHN_TBL ]₩R/W FIR VALUES", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩SORTED ERROR LOG", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩SERVO INFORMATION", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩ERROR RATE TEST RESULT₩Zone Error Rates
(First)", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩ERROR RATE TEST RESULT₩Zone Error Rates
(Second)", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩ERROR RATE TEST RESULT₩Zone Error Rates
(Third)", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩MR TUNE LOG DATA", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩VIEW TPI 747 RESULT₩TPI LOG from [TPI_WRW ]",
".", "");
vtoolgetdata("VIEW/EDIT LIST₩BPI RESULT₩BPI CSM RESULT", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩CURRENT GEOMETRY", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩NPV TEST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩AMPLITUDE SPIKE TEST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩SERVO DEFECT LIST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩TRACK DEFECT LIST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩PRIMARY DEFECT LIST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩AUTO REASSIGN LIST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩TA DEFECT LIST", ".", "");
vtoolgetdata("VIEW/EDIT LIST₩DRIVE SERIAL NUMBER", ".", "");

vtoolgetdata("GET_DLIST_MAP", "", "DLIST.GIF");


vtoolgetdata("GET_VLIST_MAP", "", "VLIST.GIF");
vtoolgetdata("GET_ELOG_MAP", "", "ELOG.GIF");
}

---------------------------------end of file--------------------------------------

why not! 107 CCC - dkim

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy