Contents

Technical Documentation - File Formats - Animation Script (ANIMATE.SCR)

This document explains the structure of the animate.scr file found in Chaos Strikes Back for Atari ST.

Warning: This is a preliminary and incomplete document, it may contain mistakes.

The file is made of big endian words (2 bytes). It is a sequence of instructions.
Each instruction is a word.
Each instruction has a fixed number of parameters which are also words.

Instructions

Done: 00 01
Animation is finished (only at the end of a file).
Load Item: 00 03 XX XX YY YY ZZ ZZ
XX XX: Index of item in ANIMATE.DAT
YY YY: Memory slot to put the item inside
ZZ ZZ: Item type. Image (00 00), Palette (00 01) or Sound (00 02)
Unload Item: 00 04 XX XX
XX XX: Memory slot to unload
Display Image: 00 05 XX XX YY YY ZZ ZZ
XX XX: Memory slot containing the image to display
YY YY: ??? Zero for intro images, non zero for Lord Chaos animation (non full screen images) and IMG 29
ZZ ZZ: ??? Always 00 00 in the file...
Apply Palette: 00 08 XX XX 00 01
XX XX: Memory slot containing the palette to apply
00 01: The slot contains a palette ?
Wait: 00 0A XX XX
XX XX: Time to wait (1/20th of a second: estimation based on credits display time)
Play Sound: 00 0C XX XX
XX XX: Memory slot containing the sound to play
For: 00 13 00 67 XX XX 00 10 00 67
XX XX: Number of times to repeat
Next: 00 11 00 67 00 12 00 67 00 67
Set Display Coordinates of top left corner of image: 00 1E XX XX YY YY ZZ ZZ
XX XX: Memory slot to store/associate coordinates
YY YY: X coordinate from left of screen
ZZ ZZ: Y coordinate from top of screen
Unknown: 00 0E 00 00 FF FF - Configure fade in / fade out speed... ??
Unknown: 00 06 - Animation Lord Chaos...
Unknown: 00 1D - Copy items to other slots? Link?

File content

This section show the entire content of the Animate.scr file found in Chaos Strikes Back for Atari ST with commands separated and commented.

Conventions:
p00 = P4B1 item 0000 in ANIMATE.DAT file
i30 = IMG1 item 0030 in ANIMATE.DAT file
s85 = SND1 item 0085 in ANIMATE.DAT file

LOAD ALL ITEMS IN MEMORY
00 03 00 00 00 05 00 01  0000 p00 (used for i30)
00 03 00 01 00 06 00 01  0001 p01 (i30)
00 03 00 08 00 0D 00 01  0008 p08 (i30)
00 03 00 12 00 17 00 01  0012 p18 (i30)
00 03 00 1E 00 23 00 00  001E i30
00 03 00 1F 00 24 00 00  001F i31
00 03 00 02 00 07 00 01  0002 p02 (i31)
00 03 00 09 00 0E 00 01  0009 p09 (i31)
00 03 00 20 00 25 00 00  0020 i32
00 03 00 03 00 08 00 01  0003 p03 (i32)
00 03 00 0A 00 0F 00 01  000A p10 (i32)
00 03 00 0B 00 10 00 01  000B p11 (i32)
00 03 00 0C 00 11 00 01  000C p12 (i32)
00 03 00 0D 00 12 00 01  000D p13 (i32)
00 03 00 21 00 26 00 00  0021 i33
00 03 00 04 00 09 00 01  0004 p04 (i33)
00 03 00 0E 00 13 00 01  000E p14 (i33)
00 03 00 0F 00 14 00 01  000F p15 (i33)
00 03 00 10 00 15 00 01  0010 p16 (i33)
00 03 00 11 00 16 00 01  0011 p17 (i33)
00 03 00 22 00 27 00 00  0022 i34
00 03 00 05 00 0A 00 01  0005 p05 (i34 i36)
00 03 00 23 00 28 00 00  0023 i35
00 03 00 24 00 29 00 00  0024 i36
00 03 00 06 00 0B 00 01  0006 p06 (i35 i36)
00 03 00 07 00 0C 00 01  0007 p07 (i36)
00 03 00 4C 00 51 00 00  004C i76
00 03 00 4D 00 52 00 00  004D i77
00 03 00 4E 00 53 00 00  004E i78
00 03 00 4F 00 54 00 00  004F i79
00 03 00 50 00 55 00 00  0050 i80
00 03 00 51 00 56 00 00  0051 i81
00 03 00 52 00 57 00 00  0052 i82
00 03 00 53 00 58 00 00  0053 i83
00 03 00 54 00 59 00 00  0054 i84
00 03 00 55 00 5A 00 02  0055 s85
00 03 00 56 00 5B 00 02  0056 s86
00 03 00 15 00 1A 00 01  0015 p21 (i75)
00 03 00 4B 00 50 00 00  004B i75 credits

RELOAD some items (the first 5 items)
00 03 00 00 00 05 00 01
00 03 00 01 00 06 00 01
00 03 00 08 00 0D 00 01
00 03 00 12 00 17 00 01
00 03 00 1E 00 23 00 00


00 08 00 02 00 01
00 05 00 23 00 00 00 00
00 08 00 05 00 01
00 0A 00 12
00 13 00 67    00 04    00 10 00 67  FOR 4 times
00 08 00 17 00 01
00 0A 00 05
00 08 00 05 00 01
00 0A 00 05
00 11 00 67 00 12 00 67 00 67        NEXT
00 08 00 06 00 01
00 13 00 67    00 05    00 10 00 67  FOR 5 times
00 08 00 0D 00 01
00 0A 00 05
00 08 00 06 00 01
00 0A 00 05
00 11 00 67 00 12 00 67 00 67        NEXT

UNLOAD
00 04 00 05
00 04 00 06
00 04 00 0D
00 04 00 17
00 04 00 23

RELOAD
00 03 00 1F 00 24 00 00
00 03 00 02 00 07 00 01
00 03 00 09 00 0E 00 01

00 08 00 02 00 01
00 05 00 24 00 00 00 00
00 08 00 07 00 01
00 13 00 67    00 0A    00 10 00 67  FOR 10 times
00 08 00 0E 00 01
00 0A 00 05
00 08 00 07 00 01
00 0A 00 05
00 11 00 67 00 12 00 67 00 67        NEXT

UNLOAD
00 04 00 24
00 04 00 07
00 04 00 0E 

RELOAD
00 03 00 20 00 25 00 00
00 03 00 03 00 08 00 01
00 03 00 0A 00 0F 00 01
00 03 00 0B 00 10 00 01
00 03 00 0C 00 11 00 01
00 03 00 0D 00 12 00 01

00 08 00 02 00 01
00 05 00 25 00 00 00 00
00 08 00 08 00 01
00 13 00 67    00 04    00 10 00 67  FOR 4 times
00 0A 00 04
00 08 00 0F 00 01
00 0A 00 04
00 08 00 10 00 01
00 0A 00 01
00 08 00 11 00 01
00 0A 00 04
00 08 00 12 00 01
00 0A 00 04
00 08 00 11 00 01
00 0A 00 04
00 08 00 10 00 01
00 0A 00 04
00 08 00 0F 00 01
00 0A 00 02
00 08 00 08 00 01
00 0A 00 04
00 11 00 67 00 12 00 67 00 67        NEXT

UNLOAD
00 04 00 25
00 04 00 08
00 04 00 0F
00 04 00 10
00 04 00 11
00 04 00 12 

RELOAD
00 03 00 21 00 26 00 00
00 03 00 04 00 09 00 01
00 03 00 0E 00 13 00 01
00 03 00 0F 00 14 00 01
00 03 00 10 00 15 00 01
00 03 00 11 00 16 00 01

00 08 00 02 00 01
00 05 00 26 00 00 00 00
00 08 00 09 00 01
00 13 00 67    00 02    00 10 00 67  FOR 2 times
00 0A 00 04
00 08 00 13 00 01
00 0A 00 04
00 08 00 14 00 01
00 0A 00 01
00 08 00 15 00 01
00 0A 00 04
00 08 00 16 00 01
00 0A 00 04
00 08 00 15 00 01
00 0A 00 04
00 08 00 14 00 01
00 0A 00 04
00 08 00 13 00 01
00 0A 00 02
00 08 00 09 00 01
00 0A 00 04
00 11 00 67 00 12 00 67 00 67        NEXT

UNLOAD
00 04 00 26
00 04 00 09
00 04 00 13
00 04 00 14
00 04 00 15
00 04 00 16

RELOAD
00 03 00 22 00 27 00 00
00 03 00 05 00 0A 00 01

00 08 00 02 00 01
00 05 00 27 00 00 00 00
00 08 00 0A 00 01
00 0A 00 8C

RELOAD
00 03 00 22 00 27 00 00
00 03 00 05 00 0A 00 01
00 03 00 23 00 28 00 00
00 03 00 24 00 29 00 00
00 03 00 06 00 0B 00 01
00 03 00 07 00 0C 00 01

00 08 00 02 00 01
00 05 00 28 00 00 00 00
00 05 00 29 00 01 00 00
00 08 00 0B 00 01
00 0A 00 50

00 0E 00 01 00 0C

UNLOAD
00 04 00 28
00 04 00 29
00 04 00 0B
00 04 00 0C

RELOAD SOME ITEMS ?? Useless ??
00 03 00 4C 00 51 00 00
00 03 00 4D 00 52 00 00
00 03 00 4E 00 53 00 00
00 03 00 4F 00 54 00 00
00 03 00 50 00 55 00 00
00 03 00 51 00 56 00 00
00 03 00 52 00 57 00 00
00 03 00 53 00 58 00 00
00 03 00 54 00 59 00 00

COPY ITEMS TO OTHER SLOTS? LINK?
00 1D 00 51 00 5D
00 1D 00 52 00 5E
00 1D 00 53 00 5F
00 1D 00 54 00 60
00 1D 00 55 00 61
00 1D 00 56 00 62
00 1D 00 57 00 63
00 1D 00 58 00 64
00 1D 00 59 00 65

RELOAD
00 03 00 55 00 5A 00 02
00 03 00 56 00 5B 00 02

COPY ITEMS TO OTHER SLOTS? LINK?
00 05 00 51 00 5D 00 00
00 05 00 52 00 5E 00 00
00 05 00 53 00 5F 00 00
00 05 00 54 00 60 00 00
00 05 00 55 00 61 00 00
00 05 00 56 00 62 00 00
00 05 00 57 00 63 00 00
00 05 00 58 00 64 00 00
00 05 00 59 00 65 00 00

SET DISPLAY COORDINATES OF TOP LEFT CORNER OF IMAGE
00 1E 00 5D 00 2B 00 89  X = 43, Y = 137
00 1E 00 5E 00 2A 00 89  X = 42, Y = 137
00 1E 00 5F 00 2A 00 89
00 1E 00 60 00 2A 00 89
00 1E 00 61 00 2A 00 89
00 1E 00 62 00 2A 00 89
00 1E 00 63 00 2A 00 89
00 1E 00 64 00 2A 00 89
00 1E 00 65 00 2A 00 89

00 06 00 5D 00 01 00 01 00 5D
00 0A 00 14
00 06 00 5E 00 01 00 01 00 5E
00 0A 00 14
00 06 00 5F 00 01 00 01 00 5F
00 0A 00 14
00 06 00 60 00 01 00 01 00 60
00 0A 00 14
00 06 00 61 00 01 00 01 00 61
00 0A 00 14
00 06 00 62 00 01 00 01 00 62
00 0A 00 14
00 06 00 5F 00 01 00 01 00 63
00 0A 00 14
00 06 00 5D 00 01 00 01 00 5D
00 0A 00 14
00 06 00 5E 00 01 00 01 00 5E
00 0A 00 14
00 06 00 5F 00 01 00 01 00 60
00 0A 00 14
00 06 00 60 00 01 00 01 00 60
00 0A 00 14
00 06 00 61 00 01 00 01 00 61
00 0A 00 14
00 06 00 60 00 01 00 01 00 60
00 0A 00 14
00 06 00 61 00 01 00 01 00 63
00 0A 00 14
00 0C 00 5B 00 70                    Play sound 5B
00 06 00 64 00 01 00 01 00 64 00 0A 00 14
00 0C 00 5A 00 70                    Play sound 5A
00 06 00 65 00 01 00 01 00 65 00 0A 00 3C
00 06 00 62 00 01 00 01 00 63 00 0A 00 14
00 06 00 61 00 01 00 01 00 63 00 0A 00 14

UNLOAD
00 04 00 5D
00 04 00 5E
00 04 00 5F
00 04 00 60
00 04 00 61
00 04 00 62
00 04 00 63
00 04 00 64
00 04 00 65
00 04 00 51
00 04 00 52
00 04 00 53
00 04 00 54
00 04 00 55
00 04 00 56
00 04 00 57
00 04 00 58
00 04 00 59

00 0A 00 C8
00 03 00 15 00 1A 00 01
00 03 00 4B 00 50 00 00
00 08 00 02 00 01
00 0E 00 00 FF FF
00 05 00 50 00 00 00 00
00 08 00 1A 00 01
00 0A 02 58                          WAIT ?

UNLOAD
00 04 00 5A
00 04 00 5B
00 04 00 50
00 04 00 1A

00 01

Powered by Drupal   Valid XHTML 1.0 Strict