Some questions re: graphics files

Started by Lemmingologist, August 20, 2005, 02:43:43 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

ccexplore

I was talking about the VGASPEC when I said only 1 VGA palette.

Anyway, regarding the GROUND files, can you find out which entries in the preview palettes (both EGA and VGA) are actually honored by the game?  I'm not sure, but it would seem that the game needs to reserve some of it for the color of the text and the background behind the text.  Or perhaps it's possible to affect their colors as well?

Lemmingologist

Quote from: ccexplore (not logged in)  link=1124549023/15#15 date=1124878952I was talking about the VGASPEC when I said only 1 VGA palette.

Anyway, regarding the GROUND files, can you find out which entries in the preview palettes (both EGA and VGA) are actually honored by the game? &#A0;I'm not sure, but it would seem that the game needs to reserve some of it for the color of the text and the background behind the text. &#A0;Or perhaps it's possible to affect their colors as well?
Colors 8-F in the title screen are only used for drawing the preview, and are taken from the preview palette. Colors 0-7 (used for both preview and level info) alternate quickly between the 0-7 specified by the preview palette and the following built-in title screen palette:
0 = VGA 00 00 00 = EGA 00
1 = VGA 20 10 08 = EGA 14
2 = VGA 18 0C 20 = EGA 20
3 = VGA 0C 00 04 = EGA 00
4 = VGA 08 04 20 = EGA 08
5 = VGA 10 0C 24 = EGA 21
6 = VGA 1C 18 28 = EGA 31
7 = VGA 28 24 30 = EGA 07
At least, this is what happens in my version of Lemmings. I'm not really sure it's supposed to work this way, as the flashing between palettes creates a bizarre-looking title screen. But I don't think it's possible to display both palettes at once, as that would require 24 colors. What happens in your version?

ccexplore

Hmm, so it flashes on your machine too.

Too bad I don't have the means to try it in real DOS.  In Windows DOS I get that flashing behavior, and in DOSBox it doesn't flash (it seems to be stuck with the build-in palette, since the blue water comes out brown).  Even with the flashing I predominantly see the blue water as brown.

But neither is known to be cycle-accurate in their handling of either the game or the video.  Plus I'm using a laptop, which technically doesn't even do raster scans like a CRT monitor does.

I wonder if the game is trying some trick of timing and tries to switch the palette in the middle of a screen refresh?  If so maybe it'd work in real DOS on a CRT monitor.  Then again, I thought the VGA hardware doesn't even reload the palette until the end of each screen refresh, so somehow I don't think that should work.  Wonder if the wikipedia has anything to say.

Mindless

Quote from: ccexplore (not logged in)  link=1124549023/15#17 date=1124890588I wonder if the game is trying some trick of timing and tries to switch the palette in the middle of a screen refresh?  If so maybe it'd work in real DOS on a CRT monitor.  Then again, I thought the VGA hardware doesn't even reload the palette until the end of each screen refresh, so somehow I don't think that should work.
I had some old DOS demos that would change the pallette (16 colors, chosen from 256) for every refresh and run at such a high fps that it could blend the colors together to produce colors that were never actually there.

Mindless

My last post was wrong... but still has the right idea...

Here's the explanation of the demo I had.
  What you are just watching are called raster or copper bars. Originally 1st
seen in Amiga demos, giving to the machine the opportunity to display more than
the theoritical maximum number of colors (This is text mode!) in the screen (But
mostly used as horizontal colorfull lines and not per pixel. Do you remember
Shadow of the Beast or Agony, which used to have extra colors upon a colorfull
sky in the background?)
   They are so simple fx, just changing the RGB values of just one color several
times in a frame, synced with the raster beam of the CRT (You can use the &HDA
port address you know from Vsync to use for horizontal syncing too, by checking
the 1st bit, in the similar way you did that for the 4th bit for Vsync!)

ccexplore

Although that's possible, I think what the game was trying to do is merely to allow the level preview (at the top part of the screen) to use a different palette than the level info (the text etc. below the level preview).

Since it takes time for the monitor to refresh each row of pixels, with the right timing, all you have to do is to switch the palette twice per screen refresh, once after the monitor finishes scanning the last row of level-preview pixels, and again after scanning the last row of pixels on the screen.

And you get flashing in modern PCs because I think the timing no longer works correctly.

JM

So is this topic and the the other topic Instructions for editing graphics files suppose to help people edit the terrain pieces and objects of Lemmings?