Analyse des Ecat-Interpreters

Accolade Ecat Interpreter

Disassembly Analysis by Daniel Marschall

Misc stuff about the interpreter

Download the Accolade Catalog from Jack Niclaus 4 CD.

GoWin95.exe with 221.184 bytes (CRC32: A425B415, MD5: C68A84D23A90988F896B927B3A7239A0, Timestamp: Januar, 21th 1997 06:52:18). Wail32.dll with 135.680 bytes (CRC32: EFB262E2, MD5: 12F33F95E7E4DF5D34B652631C7BB31B, Timestamp: April, 16th 1996 23:18:16).

Download the Accolade Catalog and the included Interpreter. You can create your own scripts with it.

Script file which will be interpreted is "SEQUENCE" inside the current working dir.

If the application is launched with the parameter "/restart" or "-restart", then the sequence will be interpreted from the "restart" line on. This is probably internally used when switching between the directories.

The script is reinterpreted everytime you do an action like clicking a hotspot.

Lines are separated with CRLF, commands are case-insensitive. The original script files of Accolade had a CRLF-CRLF-0x1A at the end, but it seems not to be important.

Note: If any key is pressed inside a "still" command-block (with or without timeout), a "-next" action will be performed. You can disable it by inserting a "goto" after every "endstill" which leads back to the correspondending "still" line. But then, you cannot use "-next" as action anymore and have to use "-goto" instead.

Invalid commands, sub-commands and sometimes also additional parameters will be accepted without any error notice (awful!). Other failures like missing directories raise an error which usually lets the application shutdown.

Some commands I found out by reading the string literals from 0x288C8 to 0x28CFF of the EXE:

Esc leads to an exit of the application.

White spaces and tabs are allowed in front and back of each command as well as between every parameter.

Note: The title of the window "Accolade" can be changed in the EXE at offset 0x28CE6 and may get a new name with max 8 bytes length. (If shorter, fill with 0x00)

;;[comment]

This marks a line as comment.

Note: It is unknown, if the interpreter explicit knows comments or if it is just ignores the line because it thinks ";;" is a command. The ";;" was seem from an Ecat script of Accolade. In the EXE, a literal ";;" was not found. Probably, the interpreter doesn't know comments.

music [filename] [parameter]

Plays the audio file [filename].wav

[filename] = none???

Where [parameter] is

(nothing)

The file will be played once.

loop

The file will be played infinite times.

wait

If another music file is already played, the script will wait until the music is finished and will play the music then. While the music is waiting, you can still continue with clicking through the hotspots.

Note: Multiple musics can wait and enter the "queue".

fade?

It seems, that fade does tell the previous played music file to fade out. But this is the default

behavior, so I cannot see what functionality this parameter has, if it exists at all!

mix

If another music file is already played, it will be mixed into. Otherwise, the playing music file will be stopped.

cdaudio?

autodigitalaudio?

If the music file does not exists, NO error message is displayed.

Note: There is probably no possibility to combine the parameters "mix" and "loop".

The music will be faded out when the application closes, an "exit" command is performed or another music file is played.

cdaudio ?

Following lines will fade out the current music to silence:

music none
cdaudio

Following lines will fade out the current music to another music

music [filename]
cdaudio

The meaning of "cdaudio" is still unknown. It might be a full command, but the existence is not cleared.

still [filename]

Shows the picture [filename].bmp at the center of the screen and stops the script.

This command introduces a block which has to be finalized with endstill.

Inside this block you can use following sub-commands:

click

hotspot

timeout

Still will also parse all of these sub-commands. If an [action] is invalid, the application will terminate with an error message.

If the file could not be found, the application will termiante with an error message plus three access violations!

click [filename?]

Functionality unknown! Only known parameter: "none".

Click is not a valid command. It is a sub-command of the "still" command-block.

hotspot [x1],[y1],[x2],[y2] [action]

Defines an clickable area with an rectangle from point (x1,y1) to point (x2,y2) inside the current image.

[action] is

-exit

Performs the "exit" command.

-next

Go to the next command.

If there is no next command, "-next" will act like "-exit".

-goto [linenum]

Performs a "goto" command.

-dir [dir]

Go the the relative directory [dir] (without backslash at the end) and interpret the SEQUENCE file there.

WARNING! The target sequence file will return if an "exit" command is executed there (not the closing of the window), it will return to "restart" line at the sequence file of the PARENT directory.

This has 2 critial points in it:

1. If you have no "restart" line in your file, the application will CRASH!

2. If [dir] has a subdirectory, e.g. "-dir directory_a\directory_b", then

"directory_a\directory_b\SEQUENCE" will be executed, but the script will return to

"directory_a\SEQUENCE" and NOT to the caller script in your working directory!

A hotspot do overlay other hotspots. Only the action of the top hotspot is executed.

Hotspot is not a valid command. It is a sub-command of the "still" command-block.

timeout [seconds] [action]

where action is the same as in "hotspot".

Waits [seconds] seconds and executes [action].

Note: Only the last "timeout" sub-command will be interpreted since it overwrites all previous timeouts.

For example if you have

timeout 3 -goto 10
timeout 2 -goto 20
timeout 3 -goto 30

Then "goto 30" will be executed after 3 seconds. The second timeout will be ignored even if it is one second sooner than the following timeout.

Timeout is not a valid command. It is a sub-command of the "still" command-block.

endstill

Defines the end of a still command-block and its sub-commands.

restart

Defines the point where the application is restart if a dir-change performs an exit command.

Accolade made it to the second line of the sequence, but it makes more sense to make it the first line, so "blank" is after "restart"!

NOTE: Even if "restart" stays before "blank", the picture frame of the previous directory will not be resetted. So, if a smaller image is shown, the old picture is still in the background.

NOTE: If the sequence of a directory is executed, ONLY the exit commands to lead back to this restart marker. If the user clicks the close button, the application will terminate directly.

blank

Blank the screen and remove every image.

Accolade made it the first line of the sequence, but it makes more sense to write it after the "restart" line.

exit

If executed directly (or with via working path) -- no "restart" argument given:

Exits the application.

If inside a directory -- "restart" argument given:

Go back to the "restart"-line of the parent sequence and interpret the next command.

WARNING! If there is no "restart" line in the parent sequence, the application will hang!

goto [linenum]

Go to the line number [linenum] and process further.

If this line number does not point to a valid command (e.g. a comment or inside a hotspot-listing), the interpreter will search the next command.

movie [filename]

Plays the movie [filename].flc

run [filename] [[params] ...]

Executes the application [filename].exe

The application will wait for the EXE and is inactive in the playground.

Bug: This function seems to be buggy. The background window is not redrawn while the application is relaunched (window will copy anything from the foreground) and when terminate the launched application, a "unknown state" error message may rise or the application hangs for a specific time. You should think about using the "exec" command, but it will shut down your application after the target was launched.

The working path as well as the path-environment-variable is respected. So, you can use "run notepad" without knowing the position of notepad.

You can define parameters for the executable file!

Note: The windows notification sound (Hinweis) will be played.

If the file could not be found, the application will terminate with an error message.

exec [filename] [[params] ...]

Shut down the application and executes [filename].exe

The working path as well as the path-environment-variable is respected. So, you can use "exec notepad" without knowing the position of notepad.

You can define parameters for the executable file!

Note: The windows notification sound (Hinweis) will be played.

If the file could not be found, the application will terminate with an error message.

pause

Pause the sequence flow and waits for a click to any area of the screen.

Note: If a key is pressed, it passes the pause command AND will perform a "-next" action.

Note: A double-click is handled like a single-click. This means, a double-click will not solve two pause commands.

Note: If there are multiple pause commands, a key can be pressed multiple times and it will perform only one "-next" action.

Bug: If there are multiple pause command and a key is pressed in a pause command which is not the last pause-command, then every mouse click which will break a pause will raise an error message "unrecognized state".

default timeout [?] [action]

where action is the same as in "hotspot".

The functionality of this function is unknown for me. I have found following out:

default timeout [anything] [any action]
still a
...
endstill
still b
...
endstill
still c
timeout ...
...
endstill
still d
...
endstill
still e
...
endstill

Still a and b will work correct. At still c you will have your correct timeout which will also work. But after this timeout has "started", the application behaves different. If the timeout ran out or if you go to another still by clicking hotspots or the keyboard, then you can go to the next still by clicking to any point of the picture or the window (black background). You can still use other hotspots.

The functionality is confusing since the 2nd parameter of default seems to be a "seconds"-parameter and the 3rd paremter has to be an action which seems to have no reproduceable effect where it is getting performed.

cursor [filename?]

Functionality unknown!

sequence ?

The existence of this command unknown! It might exists as command, but it could also be a sub-command or accepted parameter.

rt ?

The existence of this command unknown! It might exists as command, but it could also be a sub-command or accepted parameter.