========================================

 Quick guide for RTools Ver1.0
 
========================================

This file (QuickGuide) describes how to execute contents with R-CODE.

[+] Steps
The following steps describe how to execute contents using R-CODE.

 - Create contents. 
    (contents are element files that make AIBO do something.
     *.led, *,mid, *.wav, *.mtn files are contents.)

 - Convert contents to ODA files.

 - Edit a command list (MWC.CFG) that lists the new contents.
    (a command list associates command IDs with contents.)

 - Convert the command list (MWC.CFG) to ERS-7.MWC.

 - Copy ODA files and ERS-7.MWC to a Memory Stick media that contains the R-CODE system

 - Invoke the command that you created using the PLAY command of R-CODE.

[+] Create contents
There are three types of contents,  MOTION, AUDIO, and LED.
File name extensions are *.mtn for MOTION, *.wav/*.mid for AUDIO, and *.led for LED.

To make each content, please use MEdit and commercial applications.
 - Use MEdit to create MOTION contents (motion file).
 - Use commercial sound creation applications to make AUDIO (MIDI and WAV) contents.
    The following WAV and MIDI formats can be used in AIBO.
    WAV:
         8k  8bit MONO PCM
        16k 16bit MONO PCM
         8k  4bit MONO IMA ADPCM
        16k  4bit MONO IMA ADPCM
        
    MIDI:
        SMF Format0

 - Use commercial sound creation applications to make LED contents. *.led uses the same
   file format as MIDI.
    The following MIDI format can be used in AIBO.
      SMF Format0
      Only Track1 is effective.

[+] Convert contents to ODA files.
Convert many contents to an ODA file.
MOTION contents are archived to MOTION.ODA, AUDIO contents are archived to AUDIO.ODA,
LED contents are archived to LED.ODA.

Steps to convert contents

 - Copy each content to an appropriate folder.
   * Sample contents are available in the following folders in RTool.

   ODA\AUDIO\soc_d00greetso0r_x1x.mid
   ODA\MOTION\a_stand#stand_so0r_greet.mtn
   ODA\LED\so12_d00greetso0r_l1f.led

 - Run RTool.exe
 - [MOTION Data Path] Select the folder that has MOTION contents files. Default settings can be used.
 - [AUDIO Data Path] Select the folder that has AUDIO contents files. Default settings can be used.
 - [LED Data Path] Select the folder that has LED contents files. Default settings can be used.
 - [Output File:] Select the output folder for ODA files. Default settings can be used.
 - [Make ODA] Create ODA files that have checks in their check boxes.


[+] Edit a command list that has the new contents.
Edit a command list (MWC.CFG) to add the new commands for the new contents.
You should determine a unique MWCID for each command.
Use a text editor to modify the command list (MWC.CFG).
MWCID should start from 26000.

This is an example that has a command with three contents. The MWCID is 26000.

a_stand#stand_so0r_greet.mtn  <- MOTION
soc_d00greetso0r_x1x.wav      <- AUDIO
so12_d00greetso0r_l1f.led     <- LED
MWCID=26000 command has three (MOTION, AUDIO, and LED) contents.

--------------------------------------------------------------
#MWC 1.0
1 3
26000 3
cmagentMOTIONPERFORMER a_stand#stand_so0r_greet 1 1 0x0 0x0 0
cmagentSOUNDPERFORMER soc_d00greetso0r_x1x 1 1 0x0 0x0 0
cmagentFACELIGHT so12_d00greetso0r_l1f 1 1 0x0 0x0 0
--------------------------------------------------------------
* Please refer to the appendix for a description of MWC.CFG.

[+] Convert the command list (MWC.CFG) to ERS-7.MWC.
Use RTool to convert the text command list (MWC.CFG) to the binary command list (ERS-7.MWC).

 - Run RTool.exe.
 - [Base BASE-7.MWC:] Select base command list (BASE-7.MWC) that contains system commands.
     Default settings can be used.
 - [Input File:] Select the MWC.CFG file that you have edited.
 - [Output File:] Select the path to where ERS-7.MWC will be created by RTool.
 - [Make MWC] Button to create ERS-7.MWC.


[+]  - Copy ODA files and ERS-7.MWC to a Memory Stick media that contains the R-CODE system.
The following files should be copied to AIBO's Memory Stick media.

The file names to copy (E: drive is your AIBO's Memory Stick media drive letter.)
E:/OPEN-R/MW/CONF/ERS-7.MWC
E:/OPEN-R/MW/DATA/P/MOTION.ODA
E:/OPEN-R/MW/DATA/P/LED.ODA
E:/OPEN-R/MW/DATA/P/AUDIO.ODA


[+] Invoke the command that you created using the PLAY command of R-CODE.

Create an R-CODE script to test your MWCID=26000 command.

R-CODE.R
------------------------
//
// MWCID=26000 PLAY test
//

PLAY:MWCID:26000
WAIT

------------------------

Copy this file to AIBO's Memory Stick media.

The file name to copy (E: drive is your AIBO's Memory Stick media drive letter.)
E:/OPEN-R/APP/PC/AMS/R-CODE.R

Insert AIBO's Memory Stick media into your AIBO and boot.
AIBO will start with a boot sound. AIBO will be in the LIE posture and play the MWCID=26000 command once.
And do nothing after that.

[+] Appendix
You should edit the MWC.CFG file to PLAY new commands in AIBO.
Each new command should have a unique number (MWCID) to PLAY from R-CODE.
RTool converts the MWC.CFG file to ERS-7.MWC that is used in AIBO's Memory Stick media.

MWC.CFG
------------------------------------------------------------
#MWC 1.0  <- Don't change
35 39
a) b)
26000 1
c)    d)
cmagentMOTIONPERFORMER  a_sit#sit_null  1  0  0x0  0x0  0
e)                      f)              g) h) i)   j)   k)


a) Number of MWCommands included in this file.
   This is the number of c) that are defined in MWC.CFG.
b) Number of CMAgent Commands included in this file.
   This is the number of e) that are defined in MWC.CFG.
c) ID of MWCommands
   The rage should be 26000 - 27999
d) Number of CMAgent Commands in the same MWCommand
e) Type of CMAgent Performer
   The name of CMAgent Performer depends on the type of content.

   cmagentMOTIONPERFORMER    All body motion
   cmagentMOUTHPERFORMER     Mouth motion
   cmagentHEADPERFORMER      Head motion
   cmagentLEGPERFORMER       Legs motion
   cmagentTAILPERFORMER      Tail motion
   cmagentEARPERFORMER       Ear motion
   cmagentSOUNDPERFORMER     Sound
   cmagentMODELIGHT          Mode LED
   cmagentFACELIGHT          Face LEDs
   cmagentEARLIGHT           Head LEDs
   cmagentBACKLIGHT          Back LEDs
   cmagentLIVELIGHT          Wireless LAN LED

f) The filename of CMAgent Command
   Content file name without filename extension.

g) Repeat number of the CMACommand. Usually, 1
h) Synchronous CMACommand.
   If one command has one content, it should be 0. (No Sync)
   If one command has two or more contents, it should be 1.  (Sync)

i) Parameter (Internal use). It should be 0x0
j) Parameter 0x01=this command can be stopped at anytime. 
             0x0=this command cannot be stopped until the end.
   Recommend 0x0. You should be careful when making stoppable motions.

k) It should be 0


MWC.CFG Sample
-------------------------------------------------------------
#MWC 1.0
5 8
26000 3
cmagentMOTIONPERFORMER a_stand#stand_so0r_greet 1 1 0x0 0x0 0
cmagentSOUNDPERFORMER soc_d00greetso0r_x1x 1 1 0x0 0x0 0
cmagentFACELIGHT so12_d00greetso0r_l1f 1 1 0x0 0x0 0
26001 1
cmagentMOTIONPERFORMER a_stand#stand_so0r_greet 1 0 0x0 0x0 0
26002 1
cmagentSOUNDPERFORMER soc_d00greetso0r_x1x 1 0 0x0 0x0 0
26003 1
cmagentFACELIGHT so12_d00greetso0r_l1f 1 0 0x0 0x0 0
26004 2
cmagentSOUNDPERFORMER soc_d00greetso0r_x1x 1 1 0x0 0x0 0
cmagentFACELIGHT so12_d00greetso0r_l1f 1 1 0x0 0x0 0
---------------------------------------------------------------
