![]() |
Since I get a new page claim, I thought I'd occupy this with one of JJ2's most elusive file formats -- the Jazz2 Cinematic Files (or J2Vs).
The J2V File Format Like all other file formats, the file begins with a J2V Header, followed by 4 ZLIB streams. It's worth noting that the ZLIB streams are sync flushed every few frames, which explains the 00 00 FF FF at the end of every stream. So essentially the 4 streams are interleaved: Data1, Data2, Data3, Data4, back to Data1 etc. With the compressed size preceding each stream. Another thing to note is that it only contains video data. I will talk about where the audio data comes from towards the end of the post. The Header Code:
struct J2V_Header {Data1 contains frame data given as instructions per row, Data2 contains absolute x offsets, Data3 contains relative y offsets, and Data4 contains raw palette and pixel data. Data1 - Frame Data This starts with a codebyte of either 0x00 (which means no palette), or 0x01 (which means read 1024 bytes from Data4 and update palette), followed by Height (i.e. 480 or 200) sets of instructions. Here are the possible instructions: 0x00: Read the next two bytes, then copy that many bytes from Data4. 0x01-0x7F: Copy this many bytes from Data4. 0x80: End of line. 0x81: Read the next two bytes, then copy that many bytes from some offset given by Data2 and Data3. 0x82-0xFF: Read the next two bytes, then copy that many bytes minus 106 from some offset as above. Data2 - Absolute X Offset Just a bunch of offsets, in shorts. Data3 - Relative Y Offset Another bunch of offsets, in bytes. Data4 - Raw Palette and Pixel Data Palette data is pretty much 256 colours in RGBA format, for a total of 1024 bytes. Pixels are 1 byte each. How the copying from Data2/Data3 is done If you're copying to (x, y) on the current frame, you want to copy from (read(data2), y + read(data1) - 127) from the previous frame. Sound Data This is obtained from the corresponding SoundFXList.Name from Data.J2D, where it can be read as the following struct: Code:
struct SoundFXList {Finally, here's some C# code which needs nothing but the .NET framework and compilation under unsafe code: Code:
using System; |
Nice neobeo, will try that out someday!
Anyway, got a message from Michiel today. You know, the creator of JCS. But also some bad news, but we've heard that before. I quote: Quote:
Quote:
Code:
#ifndef __FILEFORMATS_H__Quote:
|
So the null layer properties (discounting z-index/depth) are Type, Detail Level, and Wave X and Wave Y. Fascinating. I am tempted to try one last time to get them to do something.
|
So really, no one has ever thought of mailing Michiel before? :lol:
Well, it's good to know what names they've given those unknown parts, I'm curious about what you'll find :) |
Quote:
Saw his name in JCS's about dialog, added him on google+ and showed him WebJCS. He was impressed. Now we keep in contact on fb chat. If you have something you want to ask him, add him or send me a PM. |
I mean, if he has any old prototypes of anything (the game, tilesets, whatever) that would be great, but I think really what's important is that he continue to nag Arjan to nag Guerrilla Games or whatever to get you the source code, because most anything else of interest is going to be included in that. The sooner we can try to figure out how to reconcile 1.23 (or 1.20? note that those structs he gave don't include passwords) source code with TSF and JJ2+, the better.
|
Doesn't JJ2+ already have an option to host TSF as 1.23?
What's the actual benefit of having the source code? People seem to be able to do stuff without it just fine (f.ex. Neobeo in the recent cheating thread) |
Quote:
Quote:
|
Quote:
|
Quote:
|
Could you post an example .j2l? I looked at a few levels with fewer than 256 words and couldn't figure out what you meant.
|
I think he just means it probably can't reference words past 256 since it is only one byte and thus only has 256 possible values.
|
Quote:
|
Quote:
If you're interested in how it works, check out the source links! Here's a link that maybe is interesting: http://djazz.mine.nu/lab/j2d/ I have only tested it in Google Chrome. Enjoy! Some exported images: [IMG]http://djazz.mine.nu/lab/j2d/img/Picture.Title.png[/IMG] [IMG]http://djazz.mine.nu/lab/j2d/img/Picture.Continue.png[/IMG] [IMG]http://djazz.mine.nu/lab/j2d/img/Order.Newspaper.png[/IMG] This is actually six images: [IMG]http://djazz.mine.nu/lab/j2d/img/Menu.Texture.128x128.png[/IMG][IMG]http://djazz.mine.nu/lab/j2d/img/Menu.Texture.128x128.png[/IMG][IMG]http://djazz.mine.nu/lab/j2d/img/Menu.Texture.128x128.png[/IMG] [IMG]http://djazz.mine.nu/lab/j2d/img/Menu.Texture.128x128.png[/IMG][IMG]http://djazz.mine.nu/lab/j2d/img/Menu.Texture.128x128.png[/IMG][IMG]http://djazz.mine.nu/lab/j2d/img/Menu.Texture.128x128.png[/IMG] |
Wait, are you saying this Picture.thanks OEM screen is still in our J2D's? Or was that extracted from 1.00g/h?
|
Quote:
|
The J2S file format
Behold, a complete JJ2 language editor!
http://djazz.mine.nu/lab/j2s/ I made it on request from Grytolle, who wanted to improve his Swedish translation of JJ2. Here it is, including translation of the helpstrings in the default levels: http://www.jazz2online.com/downloads...language-file/ Some are really funny, if you speak Swedish. Quote:
|
Quote:
|
Quote:
|
Quote:
|
No knowledge here. Just experience.
Yeah JJ2 does use the J2S basing on some not entirely specified level name data that causes conflicts. That's why at first the levels of my levelpack were using filenames in Polish. Anyway, it's a pretty neat concept that does work good on a vanilla JJ2 (entirely vanilla, meaning no custom levels etc.). What I could propose, is that given we seem to have conquered J2S as a group (lol claiming rights oh well), we could incorporate new elements like pregame or new gamemode prompts into the language files! Because... uh... we can. AAAAND there could be people out there who use JJ2+ and yet barely know English! (just a guess but it could very well be true) if I sound unreasonable well then I have my reasons I'm an artist and all |
Quote:
Code:
uint32_t lookup[] = {0x00000000, 0x77073096, 0x0EE0E612C, 0x990951BA, 0x76DC419, 0x706AF48F,can probably still be optimized and written better as I translated it myself from ASM. |
Also known as the CRC algorithm ;)
|
it is the normal CRC? God damnit I should have looked first^^
Edit: It indeed is but just 3 Bytes are actually used. But now atleast everyone knows First post and already posted bullshit^^ |
|
So, how would one come around to extracting all the sprites in the game? Trying to work on a fan-game here.
|
Here you go
or Spriters Resource has a lot of stuff too, if you'd find that format more convenient (although, I don't know if you can beat this) |
Quote:
|
I wrote a Python script to extract the sound effects from Anims.j2a. Information on the Jazz2's sample format is scarce, so I ended up relying heavily on DJazz's PHP code. Anyway, here it is:
Code:
#!/usr/bin/env python2 |
Well done!
|
thank you now i can play my favorite game again and get back to 2001
|
| All times are GMT -8. The time now is 10:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online