Recovering lost programs


 

 

Computer-related Problems

Our team has had a few computer-related problems:

 

Writing it down on Paper 

 

Extracting the program from the NXT Robot Brain

 

Hacking on Binary Programs

There are tools here to extract the RXE file from your robot's brain:

 

 

http://bricxcc.sourceforge.net/index.html

http://bricxcc.sourceforge.net/utilities.html

 

NeXTExplorer

NeXTExplorer is a Windows program which lets you explore files on the NXT and PC with drag-and-drop support between the two systems. You can execute programs on the NXT, play sounds on the NXT, defragment the NXT filesystem, delete selected files or all files, and much more. This is a standalone version of the NXT Explorer tool built into BricxCC.

http://bricxcc.sourceforge.net/nextexplorer.zip

 

RXEDumper

RXEDumper is a simple Windows program which can be used to edit and compile Next Byte Codes (NBC) programs. It also lets you decompile NXT executable programs (.rxe, .rtm, and .sys). If you want a full-featured IDE for writing NBC programs you would be better off using BricxCC

http://bricxcc.sourceforge.net/rxedumper.zip

 

Reverse Engineering a Binary Program Dump

The best you can probably hope for is to extract the motor move durations from the program.  But those are the most valuable.

 

RXEDumper will show you a text listing that has these sections:

 

Below is an example of the declarations section.  In there you will see motor commands -- durations and power levels.  The durations are usually the largest numbers.  The power levels were 75 for this program, so you can spot them.  It may also be possible to figure out which motors and directions are being driven:


;------- declarations -------
sl0000    sdword    1800  <---
sl0001    sdword    
sl0002    sdword    75
sl0003    sdword    
sl0004    sdword    
sl0005    sdword    75
m0006    mutex
sl0007    sdword    -1
ul0008    dword    75
ul0009    dword    
ul000A    dword    90
ul000B    dword    360   <---
sl000C    sdword    
m000D    mutex
sl000E    sdword    -1
sl000F    sdword    
sl0010    sdword    
sl0011    sdword    
ul0012    dword    
sl0013    sdword    
sl0014    sdword    
m0015    mutex
sl0016    sdword    -1
m0017    mutex
sl0018    sdword    -1
sl0019    sdword    -100   <--- ?
sl001A    sdword    
sl001B    sdword    100
m001C    mutex
sl001D    sdword    -1
sl001E    sdword    
sl001F    sdword    
sl0020    sdword    
sl0021    sdword    
sl0022    sdword    100
ul0023    dword    
sl0024    sdword    
sl0025    sdword    
sl0026    sdword    100
m0027    mutex
sl0028    sdword    -1
sl0029    sdword    4
sl002A    sdword    2
sl002B    sdword    1
m002C    mutex
sl002D    sdword    -1
ul002E    dword    
ul002F    dword    
m0030    mutex
sl0031    sdword    -1
m0032    mutex
sl0033    sdword    -1
sl0034    sdword    1
sl0035    sdword    
m0036    mutex
sl0037    sdword    -1
m0038    mutex
sl0039    sdword    -1
sl003A    sdword    
sl003B    sdword    1
m003C    mutex
sl003D    sdword    -1
sl003E    sdword    1620   <---
sl003F    sdword    
sl0040    sdword    -75
uw0041    word    1