Showing posts with label GSoC 2009. Show all posts
Showing posts with label GSoC 2009. Show all posts

11 August, 2009

Kyrandia 1 Amiga completable

Today I tried to make a complete playthrough of Kyrandia 1 Amiga. It turned out I had to fix a few things, like the opcode used to display Kallak's Note and some potion animation related code. For the latter it turned out, that some offsets in kyra.dat were wrong, after fixing them up it worked like charm. After that I was finally able to complete the game. Yeah! I did not find any time to fix the credits yet though, so those are still a bit glitchy. I can not await merging of the MaxTrax playback code from the GSoC 2009 mod player branch. That might require some adjustments in the outro though, since unlike all other Kyrandia versions, the Amiga version seems to use a special sound file for that.

Anyway I made some screenshots of my playthrough. I just uploaded the nicest ones (IMHO) though. I hope you will like them :-).


After all the graphics are still nice, despite them using only 32 colors for the game screen.

For those of you who wonder: just because game is completable that does not imply that there is no more work to be done on it. For example I still need to check some bits I noticed in my playthrough, most important the colors of Brandon, when he is poisoned by the snake. The DOS version makes Brandon greenish when that happens, while the Amiga version does not change his colors at all (at least not in ScummVM). I will need to investigate that. Also I need to create an offset table for my German Kyrandia 1 Amiga version, which was kindly donated by sanguine (thanks to him again), so it can be used with ScummVM. And of course the aforementioned credits glitch needs to be fixed. And probably other bits I did not notice yet... :-).

10 August, 2009

Kyrandia 1 Amiga

This time a really long time passed since the last post. I decided to make a new entry now, since there has been finally some progress on Kyrandia 1 Amiga. Some of you might know that we have an GSoC student working on support for various AMIGA sound formats (to be precise: TFMX for Monkey Island 1 Amiga and MaxTrax for Kyrandia 1 Amiga). You can find his blog over here. He already finished MaxTrax support. This gave me enough motivation to look into Kyrandia 1 Amiga again.

First of all I finally managed to implement a font renderer. That was a major PITA at first, but with help from nolange (the GSoC student) I was able to get a bit into how the library code on Amiga works. This helped to RE the font format, since it used blitting of the "graphics.library". With this information I was able to decode all the important information and write an implementation for rendering the fonts in ScummVM.

Here is some screen of a font use in the intro:


As you can see it works fine, even the colors seem correct. I do not have any Amiga to check that though.

Next I implemented some differences in the Amiga palette code. Kyrandia 1 Amiga uses two 32 color palettes. It splits the screen into two areas: the main game screen and the inventory. The first one uses a palette supplied by the scene files, the latter uses a fixed palette, which also includes all colors used by the items. Now the in-game parts looks nice too.

There was a major other palette difference I implemented too: Since the Amiga has not too many free colors, the game overwrites color index 16 with the correct font color every time a text is displayed. The original used some kind of switch statement to determine from the color index passed from the scripts, which color to set up in the palette. I did implement that too, I chose to cleanup the way it is done though. Here comes a funny side note: the Amiga version still uses the 256 color indexes from the DOS version for text processing. It uses fixed colors for the font: 16 and 19. Color 16 is the font color, while color 19 is the outline color, which is usually black. Now the Amiga text palette color setup code takes the DOS color index compares it to certain values and then sets up color 16 accordingly. The font drawing code on the other hand ignores the passed color indices and just uses the aforementioned colors.

Here are two in-game screens of Kyrandia 1 Amiga:



and here is how it looked before:



As you can see the interface changed the colors back then, since the whole screen used the scene palette.

Of course there is still plenty of work to do. For example the in-game GUI is still horribly broken color wise (and text wise). Just take a look at this screenshot:


I will also try to make some more blog updates now in the future. So long. See you in the next blog entry.