Lemmings DAT Anticompressor

Started by Mindless, August 27, 2005, 07:23:00 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ccexplore

Quote from: Shvegait  link=1125127380/15#29 date=1125583475I think I know what the other set of characters is for. Could they be the green text when playing the game in IBM PS2 or "High Performance" mode? (These characters are different from the ones when playing with PC Compatible or AMSTRAD modes).
That sounds quite plausible.  So you got the PS2/High Perf mode to work?  Is it DOSBox or just plain Windows DOS?

Shvegait

DOSBox. I don't think they actually "work", but they at least load up to the level screen, which is enough to see that the letters are in a different font. If I recall correctly, one of the modes doesn't have mouse (clicking) support, one of them will freeze between levels, in one of them the level won't even start (but the graphics will load)... Weird stuff happens for sure.

Mindless

main.dat section 3:
  main screen
    [0x0000] brown background             1 frame, 320x104, 2bpp
    [0x2080] Lemmings logo                1 frame, 632x94,  4bpp

Mindless

main.dat section 4:
  blinking eyes
    [0x0000] blink1         8 frames, 32x12, 4bpp, 192 B/f
    [0x0600] blink2         8 frames, 32x12, 4bpp, 192 B/f
    [0x0C00] blink3         8 frames, 32x12, 4bpp, 192 B/f
    [0x1200] blink4         8 frames, 32x12, 4bpp, 192 B/f
    [0x1800] blink5         8 frames, 32x12, 4bpp, 192 B/f
    [0x1E00] blink6         8 frames, 32x12, 4bpp, 192 B/f
    [0x2400] blink6         8 frames, 32x12, 4bpp, 192 B/f
  scroller (lemmings and reel)
    [0x2A00]  left Lemming 16 frames, 48x16, 4bpp, 384 B/f
    [0x4200] right Lemming 16 frames, 48x16, 4bpp, 384 B/f
    [0x5A00] reel           1 frame,  16x16, 4bpp, 128 B/f
  difficulty selector sign
    [0x5A80] mayhem sign    1 frame,  72x27, 4bpp, 972 B/f
    [0x5E4C] taxing sign    1 frame,  72x27, 4bpp, 972 B/f
    [0x6218] tricky sign    1 frame,  72x27, 4bpp, 972 B/f
    [0x65E4] fun sign       1 frame,  72x27, 4bpp, 972 B/f

Mindless

main.dat section 6:
  skill panel graphics
    [0x0000] skill panel  1 frame, 320x40, 4bpp, 6400 B/f
That about raps it up, except for section 5, which still completely perplexes me.

ccexplore

Actually, I think we're still missing the graphics for the music options (you know, the F3 one where you select between no music [blank], music [music note], or just sound effects ["FX"]).

And technically, there are still bytes at the start of section 2 where we can't find a purpose for, although that does mean we could care less about it for now.

Maybe section 5 is only used in one of the "High Perf" or whatever machine options.  How thoroughly have you tested that section?  I assume you've identified the general contents of each section by zeroing it out and see what parts of the game are affected.  Have you try this:  zero out section 5, pick some level, and then nuke it?  Just a total random (and probably wrong) hunch, see carefully if anything changes.

Mindless

Oh, oops, I forgot about the beginning of section 2...

Section 5 doesn't seem to have any effect on the VGA game, unless it effects the special graphics levels. I've fillled it with both 0x00's and 0x0F's and nothing seems to change, I played the first few levels without noticing anything wrong, and even with the whole main.dat fillled with 0x00's the explosion pixels are still there.

The thing I've noticed is that section 5 is the only one that has a decompressed size which is not divisible by 8, leading me to believe that it is not graphical data.

Mindless

main.dat section 2:
  skill panel (high performance)
    [0x0000] skill panel       1 frame,  320x40, 4bpp

ccexplore

Quote from: ccexplore (not logged in)  link=1125127380/30#35 date=1125654199Actually, I think we're still missing the graphics for the music options (you know, the F3 one where you select between no music [blank], music [music note], or just sound effects ["FX"]).
Never mind, that was my fault, I wasn't paying attention to the offsets (or actually, it's really gxplr's fault for the way it handles the +/-).  It turns out that I actually only read the section up to 0xEA50 or so, but gxplr wraps back to 0 at that point because it's still trying to read a 120x61x4bpp bitmap, which in the process causes it to go off the end of section and so it chooses to wrap around to 0.  So I didn't even realize I haven't actually reach the end of section yet.

Anyway, it turns out the music and FX icons are after the main signs, so here we go, the corrected listing for the end of section 3:

main.dat section 3:
  Lemmmings holding signs
    [0x9488]  F1 sign, 1 frame, 120x61, 4 bpp
    [0xA2D4]  F2 sign, 1 frame, 120x61, 4 bpp
    [0xB120]  F3 sign*, 1 frame, 120x61, 4 bpp
    [0xBF6C]  Difficulty Selection sign**, 1 frame, 120x61, 4 bpp
    [0xCDB8]  Exit to DOS sign, 1 frame, 120x61, 4 bpp
    [0xDC04]  F4 sign, 1 frame, 120x61, 4 bpp
    [0xEA50]  music note icon for F3 sign, 1 frame, 64x31, 4 bpp
    [0xEE30]  "FX" icon for F3 sign, 1 frame, 64x31, 4 bpp
*with the music/fx set to blank
**with the difficulty set to FUN

This time, I used a calculator and so we have indeed reach the real end of section 3.

ccexplore

Quote from: Mindless  link=1125127380/30#36 date=1125661189The thing I've noticed is that section 5 is the only one that has a decompressed size which is not divisible by 8, leading me to believe that it is not graphical data.
Certainly possible.  What I had in mind when I asked about nuking is that instead of storing the explosion's scattered pixels/particles as bitmaps (which hardly makes sense), they could just store a table of (x,y)s and/or velocity vectors to represent the explosion pixels and how they move over time.  But you said you tested explosions, so I guess that isn't it.

Perhaps one way to find out if it is nongraphical data would be to compare the data with the corresponding section in cgamain.dat I guess.  If it's completely unrelated to graphics, then that section should be identical in both files.

ccexplore

Quote from: ccexplore (not logged in)  link=1125127380/30#39 date=1125664722Perhaps one way to find out if it is nongraphical data would be to compare the data with the corresponding section in cgamain.dat I guess. &#A0;If it's completely unrelated to graphics, then that section should be identical in both files.
Ok, I just checked and they are indeed identical.  main.dat section #5 and cgamain.dat section #3 are the same.

Could it have something to do with the copy protection thing?  How does that work in a real, non-cracked version anyway?

Mindless

Quote from: ccexplore (not logged in)  link=1125127380/30#38 date=1125664026...(or actually, it's really gxplr's fault for the way it handles the +/-). &#A0;It turns out that I actually only read the section up to 0xEA50 or so, but gxplr wraps back to 0 at that point because it's still trying to read a 120x61x4bpp bitmap, which in the process causes it to go off the end of section and so it chooses to wrap around to 0. &#A0;So I didn't even realize I haven't actually reach the end of section yet.
I should have listed that in the limitations. It's to prevent crashes, as you've probably guessed. &#A0;;)

Mindless

Quote from: ccexplore (not logged in)  link=1125127380/30#40 date=1125665387
Ok, I just checked and they are indeed identical.  main.dat section #5 and cgamain.dat section #3 are the same.

Could it have something to do with the copy protection thing?  How does that work in a real, non-cracked version anyway?
http://groups.google.com/groups?q=%22russell.dat%22+lemmings&qt_s=Search

ccexplore

I've collected the information on main.dat into one document:

http://www.geocities.com/guestlevels/lemmings/maindat.txt

There are some slightly missing info that I still need to fill in, but everything else is there, including all the tables we posted here for the offsets to the various graphics and animations.

I'm too lazy to manually insert line breaks, so to best view this document, you should save it (right click on the link and choose "Save Target") to your machine and then open it with Notepad or Word.  Make sure to turn word-wrap on in Notepad.

Mindless

Intro Screen Palette
00 [0x000000] r:0   g:0   b:0   black
01 [0x201008] r:128 g:64  b:32  browns
02 [0x180C08] r:96  g:48  b:32  "
03 [0x0C0004] r:48  g:0   b:16  "

04 [0x08021F] r:32  g:8   b:124 purples
05 [0x100B24] r:64  g:44  b:144 "
06 [0x1A1629] r:104 g:88  b:164 "
07 [0x26232F] r:152 g:140 b:188 "

08 [0x001400] r:0   g:80  b:0   greens
09 [0x001804] r:0   g:96  b:16  "
10 [0x001C08] r:0   g:112 b:32  "
11 [0x002010] r:0   g:128 b:64  "

12 [0x343434] r:208 g:208 b:208 white
13 [0x2C2C00] r:176 g:176 b:0   yellow
14 [0x10142C] r:64  g:80  b:176 blue
15 [0x382024] r:224 g:128 b:144 pink