Open main menu

Difference between revisions of "User:Buddha^/GSoC2007-ProjectDiary"

Added info on 2007-06-13's work.
(Added more info on 2007-06-12's work.)
(Added info on 2007-06-13's work.)
Line 141: Line 141:
After this I started looking into AGI256 & AGI256-2 related stuff because
After this I started looking into AGI256 & AGI256-2 related stuff because
that's what's next!
that's what's next!
== 2007-06-13 (Wednesday) - Started looking into AGI256 ==
Read some AGI specifications on the ScummVM wiki. Read some of the ScummVM's AGI engine code.
Now I know that in the ScummVM's AGI engine the priorities ("Sort of a Z-buffer") are saved
in the same buffer as the picture data (Each pixel's lower 4 bits give the picture data and
upper 4 bits give the priority data). So that'll make it a bit more of an effort to support
256 color images in the AGI engine.
Also found that Ctrl-D brings up the debug console and that first 16 colors are for the
EGA/Amigaish-palette and the next 16 colors are for the console's transparency
(So you can still see the underlying game with the console window on top). We'll see
what's to be done with those console transparency colors when we need to use the whole
256 colors for the images' palette. Maybe map them through a table lookup to the static
AGI256 256 color palette?
Looked at the AGI 256 pictures' static palette with GIMP. There's a pattern in it.
Here's my current theory on the subject:
* AGI256 pictures' palette's structure:
** First 16 colors are the default EGA palette.
** Next 16 colors are greyscale colors from black to white.
** Next 72 colors are probably a HSL/HSI (Or something like that) color sweep with full saturation and brightness.
** Then the same color sweep as before but with less saturation and/or brightness.
** And again the same color sweep as before but with even less saturation and/or brightness.
** Last 8 colors are greyscale colors from low intensity grey to almost black.
Also looked at differences in AGI.EXE between the original Sierra On-Line's
AGI interpreter version 2.936 and the hacked AGI256 AGI.EXE. Used [http://hte.sourceforge.net/ HT editor] for that.
Didn't learn much with that approach though. But then I took [http://en.wikipedia.org/wiki/Interactive_Disassembler Interactive Disassembler]
Freeware v4.3 and started looking at AGI256's AGIGRAF.OVL file.
Using IDA I got some info out of the AGIGRAF.OVL. Commented some of the functions in it.
But without understanding what the functions are that are called from outside I can't understand it fully (AGIGRAF.OVL is like a DOS age DLL so it references functions that aren't in AGIGRAF.OVL
but should be in memory when it's loaded into memory).
* Some guesses for the function names from AGI256's AGIGRAF.OVL (*HIGHLY* preliminary and subject to change):
** setVideoMode (320x200x256c)
** setTextMode (40x25x16c)
** showAgi256Pic?
** calcHeightLUT
*** Calculates table of y*320 values in range 0 <= y < 200
** setPalette?
** readNextAgi256Pic?
** readAgi256Pic?
** setClrCurrPixel
** setWhiteMenuBar
417

edits