EGA Colour Palette Extraction

Started by Minim, September 25, 2009, 07:43:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Minim

I was wondering, I have seen images of EGA lemmings levels converted from VGA graphics.

Fortunately, I know the colour codes for EGA Lemmings (I've posted it below) and I know a program called Adobe ImageReady; That was the helpful program that can convert VGA into EGA (Despite having to do a lot of hard work to get it done!).

The problem is, for each level set, I can't remember for each terrain piece, how the VGA colours of each piece were originally changed into EGA.

Firstly I must ask this question: Does anyone still have EGA DOS lemmings?
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

The Doctor

If you have the copy of Lemmings from the LFA, just run VGALEMMI.EXE in DosBOX and choose to use EGA colours?

Sorry to sound like an a*se, but get the pictures yourself. http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" />
This Lemmings forum is simply *fabulous*!

Minim

Well, even though I have Windows XP, I can't get DOS to work, just to let you know, so that means I can't upload EGA images of levels.

Here are the colours used in the EGA version of the game. I'll find the colour codes from my ImageReady program right now.

http://www.javalemmings.com/DMA/myimages/EGAPal.png" alt="" class="bbc_img" />
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

The Doctor

If you can't get DOSBox to work, try using a front-end.

Quote from: minimac
I can't get DOS to work
Who's talking about DOS on its own? I said DOSBox.
This Lemmings forum is simply *fabulous*!

Minim

Who's talking about DOS on its own? I said DOSBox.

Oops, I didn't realise it was DOSbox, still I can't get that thing to work, but don't tell me how. Otherwise this would be going off topic.

Anyway, I found all the colour codes. They are displayed in this quote.

Quote from: EGA colours
F0F0F0=white
000000=black
0000A0=dark blue
00A000=dark green
00A0A0=dark teal
505050=dark grey
5050F0=light blue
50F050=light green
50F0F0=light teal
A00000=dark red
A000A0=dark magenta
A05000=brown
A0A0A0=light grey
F05050=light red
F050F0=light pink
F0F050=yellow
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

ccexplore

http://www.lemmingsforums.com/index.php?topic=197.msg5537#msg5537">Quote from: minimac on 2009-09-25 09:45:01
Here are the colours used in the EGA version of the game.

I'm not sure this is entirely accurate.  I know for a fact that the EGA hardware allows changeable palettes just like the VGA, just that each palette entry can only be 1 of 64 colors rather than the 250000 or so for VGA.  I also know that each GROUNDxO.dat file has an EGA palette in addition to the standard VGA palette.  The only question is how fully the game utilizes the palette capabilities of the EGA.  For example, it could conceivably still limit itself to the 16 colors you've shown despite being able to support up to 64, and the palettes in the GROUNDxO.dat are simply used to shuffle the colors around to make each particular style looks best.

Anyway, your best bet is to run Lemmings in EGA mode using DOSBox.  Failing that, someone here or I can probably extract for you the colors in the EGA palettes stored in each GRONDxO.dat files.  When I have time and interest to do so, for example.

Minim

Sorry to sound like an a*se, but get the pictures yourself. http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" />

I don't care. That is rude to someone who's in need for assistance.

Anyway, I'm interested about GroundxO.dat files for some odd reason. You know what, I think the way you're doing it is better and quicker than what I was planning to do: Get all different terrain and objects out on a map and print screenshots.

EDIT: I just thought of something: If someone does one graphic set converted into EGA will they tell me how? Maybe it's possible for me to do the next but just remember: I can't get the DOSbox to work.
Level Solving Contest creator. Anybody bored and looking for a different challenge? Try these levels!

Neolemmix: #1 #4 #5 #6
Lix: #2  #7
Both Engines: #3

Dullstar

I'd like to see TGA sets for Lemmix...  what does TGA use?

covox

If I recall correctly, the GROUNDxO.DAT files have four palettes in them; one used for the preview screen and one used during the game for both EGA and VGA.

The extractor script I wrote for Tundra lets you export PNGs of all the graphics using whatever colour scheme you want. Unfortunately, since it was released the Python guys deprecated the XML SAX library the game uses for just about frigging everything, and because of all the wide-eyed (read: crap) design decisions, I have little interest in touching the code without the aid of a long pointed stick.

That said, here's a stripped down version of the script I used. Go get http://www.python.org/" class="bbc_link" target="_blank">Python 2.6 and http://www.pythonware.com/products/pil/" class="bbc_link" target="_blank">PIL, then download http://rebui.ld.net.au/covox/lemresgrab.tar.bz2" class="bbc_link" target="_blank">this package. Extract it somewhere, then run the Python interpreter and type in the following:

>>> import os
>>> os.chdir("c:\\path\\to\\where\\you\\put\\lemresgrab\\")
>>> from decrunchedit import *
>>> fullAuto("c:\\path\\to\\lemmings1\\", PALETTE)

     (where PALETTE is one of "ega", "ega_prev", "vga", "vga_prev")

>>> fullAutoONML("c:\\path\\to\\onml\\", PALETTE)

This will dump all of the Lemmings graphics as PNGs into the included "style" folder. Hope this helps.

(For the two people that care, the Tundra site has been dead due to my ultra-reliable webhost repasswording my SQL database every two weeks http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" /> I just finished my thesis, so next project is to port LemmingsDS to the N900...)