301 (2e + ff) set at 12, vd D8 $FF rink may be 64 ($40) FOR 0 LENGTH BYTE = 256 + 64 = 320 A6 03 Size E8 232 pixels skipped 42 09 2 $09 03 Skip 3 44 0E 4 $0E 04 Skip 4 42 00 2 $00 FF 2E 00 002E skipped TOTAL: 293 C3 00 3 $00 21 Skip 1 03 Skip 3 06 09 0A 0B 0D 0E 8F ###First contradiction!### Previous byte sig bit is to blame? 03 Skip 3 02 0E 0E Read next two FF 2F 00 A3 Skip 3 (Use anim color) 07 8F 0D 0B 0A 09 09 0A FF 37 00 0037 skipped A3 05 00 0E 0D 0B 0A Read 01 Skip 1 05 09 0A 0B 0D 0E Read FF 33 00 Row 5 A4 Skip 4 04 00 0E 0C 0A 01 07 09 09 0A 0B 0C 0E 8F FF 31 00 A5 84 8F 0D 0B 0A Note only $84 works here A2 07 09 0A 0B 0C 0D 0E 8F FF 2F 00 A5 85 00 0E 0D 0B 0A A2 81 09 C2 0A 05 0B 0C 0D 0E 8F FF 2D 00 A6 03 00 0E 0D 01 81 0A A2 Drawline vals: 42 01000010 C3 11000011 Skip vals: 04 00000100 21 00100001 E8 11101000 +==========================================================================================+ |Jazz Jackrabbit cutscene format: | +==========================================================================================+ ? 1 Sig 2 Screen transition signature ($3F, Optional) +1 1 Trans Transition, 0 = none, 1 = speckle 2 = circle ? 4 ??? Value? $4C\$1A6 are valid The headers head the movie file and mostly point to various sub-headers, or identify resources to be used in the movie (Font, music, etc.) First there is a signature, then a pointer to the image header, then the page and image headers. +================================+ |Headers | +================================+ 0 19 Signature File signature 'Digital Dimensions' 19 4 Img point Pointer to start of image data header 23 4x + 2 Page header Header for pages ? 4x + 2 Img header Image header **************************************************************************************************** **************************************************************************************************** +--------------------------------+ | Page header | +--------------------------------+ Similar format to image heaader. Heads data for each 'page' of the movie. First page can load music and fonts needed for file. 0 2 Pagenum Number of pages in file 2 4x Pointers Pointers to page data **************************************************************************************************** **************************************************************************************************** +--------------------------------+ | Page data | +--------------------------------+ The page data for each page is of unknown function. It contains the music and font headers, for the first page. 0 1 Sig Signature 'P' 2 2 Pagenum Page number, as value, not string, starts with $0001 4 2 Pal Palette used? 6 ? Mus str Music string (Optional) ? ? Font strs Font strings, (Can be several, optional) ? 1 Sig 2 Screen transition signature ($3F, Optional) +1 1 Trans Transition, 0 = none, 1 = speckle 2 = circle ? 1 Graph sig Graphics signature; $4C for still screens, $A6 for animated screens Every page must have this +1 4 Anim loop For animated screens, loops the animation. If no loop, page must move on before loop ends or Jazz will crash Loop value is 1 +5 2 Graph type Type of graphic being displayed, $0000 for still screens. $0E00 for animated screens +6 2 Graphnum Graphic to use, 0 is black screen, palettes cannot be used. Must thus be a still screen or animated screen Text data .. .. . 1 Time sig ']' before page duration 2 Page duration How long in seconds page stays before transitioning 1 Mus trans sig Music transition signature, 'Q' 1 Music trans Music transition, $2D stops music on page transition 1 End End of page data 'E' #Text data: #Reading list from order -> starts with pagenum txt ? 4 List? An optional list? (For font?) +2 2 Fontloc Location of sentence END on screen as pixels +4 2 ??? Value +6 2 Shadow $1DB for font to have shadows (Alters shadow's color?) +7 1 End End of font start? <> +8 1 Sig F 'F'; indicates font to be used +10 2 Font Font to use for sentence +12 2 Sig J 'J' + $x; Changes font pos, almost unalterable (0 or 1 only?) +13 1 Sig A 'A' indicates palette to be used +14 2 Pal Font colored starting with this value as 0 +16 1 ??? $5E, last byte makes odd things happen +18 1 Len Length of sentence +19 len Words Sentence, each letter a byte value taken from the font file (7f = space?) ($8A = pagenum) <> x 2 Sig J (Can alter +2 2 Sig F (Doesn't seem to alter font type though) +4 3 Sig A Palette +7 2 Sig J <> -> Here font is set 1 lower (No adr?) at edge of screen (How?) x 2 Sig F +2 1 ??? $40, Same as $5E earlier, also causes bck probs +3 1 0 +4 1 ??? $40, Also same +5 1 Len (29) <> $40 $00 is line return! #Current loc is $DD 1: $185 2: $258 +--------------------------------+ | Music string | +--------------------------------+ Indicates what music file will play during the movie. Only one allowed. 0 1 ID Id $2A; this is a music string 1 1 Len Length of music file name 2 len Name Name of music file, inc .PSM +--------------------------------+ | Font string | +--------------------------------+ Indicates what fonts will be used in the movie, several allowed. 0 1 ID Id $58; this is a font string 1 2 Fontnum What number this font is 3 1 Len Length of font name 4 len Name Font name, excluding extension **************************************************************************************************** **************************************************************************************************** +--------------------------------+ | Image header | +--------------------------------+ This identifies where images (Still screens or animations) are loaded from. It consists of a series of dwords, each pointing to a location in the file. The movie reads dwords until it comes to the first address in the list. This means that this sub-header must always be the last header in the file. 0 2 ??? Number of sub segments in list? (Screen changes?) 2 4x Pointers Pointers to palette, screen or animation data, the list ends when the first value has been reached **************************************************************************************************** **************************************************************************************************** +================================+ |Palettes | +================================+ Palettes are used to color graphics. They are RLE compressed and concist of 256 3-byte RGB 0-63 entires, the standard Jazz palette. They thus decompress to 768 bytes. Palettes may occur on their own, but any graphics will be preceeded by a palette. +================================+ |Static screens | +================================+ Static screens are RLE compressed. When decompressed they consist of a width word, a height word, and the screen data. Usually screens are 320x200, decompressing to 64004 bytes. Screens must follow a palette. DECOMPRESSED: 0 2 Width Width of following screen 2 2 Height Height of following screen 4 hw Data Screen data +================================+ |Animating screens | +================================+ Animating screens are the most common type of graphic, unfortunately. They are indicated by the word 'AN' at the start of the data. 0 2 Sig Signature 'AN' 2 2 ? Must be $0002? 4 2 ? Is always $0007? 6 2 Pal sig Palette signature 'PL' 8 2 Palsize Size of following unused palette 10 768 Palette Unused(?) palette, uncompressed 778 ? Anims Animation sequence ? 4 End End of anim sequence, $5F $45 $00 $00 '_E ' +--------------------------------+ |Animation sequence | +--------------------------------+ An animation sequence consists of a series of special RLE blocks, terminated with the signature $5F $45 $00 $00. Animations loop at a regular speed until the page ends. 0 2 Set screen What to do to the screen before the image is displayed. $3131 is 'reset' $4646 means 'leave as is' and so on. The first is often a reset, the remaining animations usually leave the screen as-is, drawing over the previous animations 782 2 Anim size Size of animation data to follow 784 ? data Image data DATA FORMAT: Is a form of RLE. The image is drawn by drawing columns of pixels DOWN from the current position to the bottom of the screen. The lower rows overwrite the upper rows. So for example, to draw a single pixel of color, a column of color is drawn then 2 rows beneath that position another column is drawn, leaving a 'column' of color 1 pixel high. Data is written in lines, 320 for each screen, usually. Each line starts with a control byte. There are several types of control byte: #Screen mode $3131: $0x $... Next x + 1 bytes are 'literals'; each byte colors 1 column (Max val $3F) $4x $yy Next x + 1 columns drawn in color yy (Max value $7E) $7F $xxxx $yy Next xxxx columns colored with color yy $8x Next x + 1 pixels are skipped, they're already the right color (Max val $FE) $FF $xxxx Skip next xxxx pixels of picture, they're already the right color #Screen mode $4646: $0x Skip next x pixels of picture $4x $yy Next x columns drawn in color yy (Max value $7E) $Cx $yy Next x columns drawn in color yy $FF $xxxx Skip next xxxx pixels of picture, they're already the right color $7F $xxxx $yy Next xxxx columns colored with color yy $8x Next x + 1 pixels are skipped, they're already the right color (Max val $FE) CONFLICT: 1st byte $E8 should be $Cx or even $8x, but is $E8 skipped pixels Color 255 is transparent. There is no control byte for 'stop reading here' * * * $80 + x -> Use next x pixels as a line $C0 + x -> Repeat next pixel x times $00 + x -> Use next x pixels as a line $00 -> Skip next 16 bytes as transparent (If followed by $80+?) $A0 -> Ditto $xx -> Mask, start on this color? But how many to skip? $FF $xx $xx -> Terminates a line and starts a new one? $57d7 (Image starts ~273C from screen top; header $FFs total this - 766!) First few lines make sense as blank spacers ($FF $xx) with two pixels present, but never viewed. Small values like $00 are used BEFORE a compression byte to indicate a space, thus $01 $C0 indicates that there is a space of 1 transparent pixel between the last byte and the next byte Possibly $FF means 'add 256 to white spacer'? (Because 3 x 256 = 768!) (Note loss of 2 bytes every FF) 7F E4 00 00 Read long, $E4 as color 0 44 0E Read 5 as color E 00 0D Literal, read next 1 bytes 45 09 Read 6 as color 9 00 0B Literal read next 1 bytes 45 0E Read 6 as color e 7F 49 00 00 Read long, $49 as color 0 FF E4 00 Skip next $E4 pixels 06 8F FF 0D 0C Literal read next 7 pixels ...0B 0A FF 41 08 Read 2 as color 8 03 FF 0A 0B 0D Read next 4 45 00 Read 6 as 0 FF 2D 01 Read long $12D as ff 04 0E 0D 0B 0A 09 41 08 82 02 0B 0D 0E FF 34 01 Screen tans byte and c 1: 3f 02 4c 00 00 00 00 2: 3f 00 46 01 00 4a 01 (3F 00 46 01 00 4A 00 41 00 00) 3F 02 4C 00 00 00 00 01 00 57 14 00 00 00 36 01 BE 3F 00 46 01 00 4A 01 41 00 00 4A 00 46 02 00 40 00 40