Sunday 7 December 2008

TeenAgent Thoughts, Status and TODO

TeenAgent Status:

Currently the following is possible :-

*Viewing room images
*Viewing first static image resource in UNLOGIC.RES
*Viewing the Polish versions CD PROJEKT image from CDLOGO.RES
*Viewing main characters sprites
*Viewing room overlay images
*Viewing inventory item images
*Viewing and using Cursor images (PC or Amiga)
*Listening to music

TeenAgent TODO:

The following needs to be implemented before all the resource files are fully handled :-

*Implement support for animated inventory sprites
-The inventory images are mainly static, however Metropolis decided to animate six of them.
-The inventory images are stored as sprites inside VARIA.RES, specifically in resource number 4.
-The frame numbers for the animated inventory images are as follows :-

7(fan)
14(drunken chainsaw)
47(mouse)
49(nugget)
67(burning paper)
91(bird).

*Implement support for animated Union Logic Logo
-The Union Logic Logo is stored in UNLOGIC.RES, which contains 11 resources.
-The first resource in UNLOGIC.RES is a static image which fills the screen.
-The animated section of this introduction relies on support for resources 2-11.
-The code required is simple as it just cycles through the other resources.

*Implement support for the animated Metropolis/TeenAgent Logo
-This logo requires resource numbers 6,5,9 from VARIA.RES.

*Implement support for the image resources in ONS.RES
-These are apparently sprites.

*Implement support for LAN_000.RES and LAN_500.RES
-These are apparently animations.

*Implement support for sound effects from SAM_SAM.RES
-These form the PC speaker sound effects heard throughout the game.

*Figure out where the font data is, and how to implement this in ScummVM
-I would like to be able to display a few strings in the correct font/font palette

*Figure out how to handle loading of text strings/item descriptions/conversations etc..
-These are stored in the executable which is unfortunately packed with LZEXE 0.91
-This will most likely require an external data file such as with the other engines
-TEEN.DAT will contain strings, cursor image, font etc
-The conversations should not be too hard to handle, however the room items have some extra
data with them.
-I'll need to get benjamin to explain those a little more, perhaps he has
some ideas of how to handle these static resources in a better manner.

*Begin to implement gameplay code
-I would like to fully support all the English PC resources before I attempt to create a room.
-This will mean that I can then show a full room off.

*Figure out how to how to handle Czech, Polish and English demo version strings.
-Im not entierly sure if they are in the same order or not.
-In the demo there is a string to tell you that you have reached the end of the demo.
-This demo string does not appear in the other versions.

*Figure out how to handle the Polish VOICES.RES
-This resource file is in the Polish PC version and the Amiga CD version.
-I plan to support PC Polish before I look at Amiga version.

*Figure out how to correctly load the Amiga version in IDA
-This will allow me to figure out inventory differences.

*Begin to add support for Amiga versions if feasible.
-This will require me to attempt to understand how the Amiga disk dumps work.
-Basic support should be possible since the resources are likely to match in size so I can at least try.
-It may not be worth the extra effort since the ability to dump the disks will
be required.

Thats all for now, I hope the formatting doesnt die.

Friday 28 November 2008

Cursor Madness!!!!!!

A tiny update with something quite insignificant
Im only updating because it excited me a little bit
johndoe123 managed to find the cursor image data
what I wasnt prepared for was exactly where he found it
I was expecting to find the cursor image stored as a sprite
in one of the resource files, however it was stored hardcoded in the
executable, the most interesting part for me was that I could actually
see it there in the hex, Ive seen strange patterns in hex before but this
was clearly a mouse cursor, you wouldnt notice it unless you knew it was there.
and even then you'd need to focus on it pretty hard.

The image here shows the hex for the cursor from the executable, it also shows the cursor image
in TeenAgent in DOSBox on the left, and on the right you will find the cursor image data in ScummVM and below that the loaded cursor image data running in ScummVM.






The way I created the cursor image in ScummVM replicates the original strucutre of the cursor
image, however it contains no copyrighted material. I borrowed the idea from the AGI engine so
thanks for whoever made it obvious.

For some strange reason the cursor data in the executable shows 0xDF as the shade of gray
I run the game in DOSBox and the cursor loads up however when I load the cursor
image in ScummVM the palette uses 0xDF but the colours in DOSBox and ScummVM do not match
it seems that the cursor loaded in DOSBox is using 0xAE for gray, I have adjusted the palette
in ScummVM but it begs the question, why arent the right colours showing up?
Ive included a swatch to show the differences maybe someone can explain why..


The image below shows the cursor in the current build of the engine.






This may seem very trivial but I think I can finally get some sort of interactivity going soon.

Rob

Wednesday 8 October 2008

TeenAgent rooms for your enjoyment

Well, it comes time for another update on TeenAgentIm made a little progress with the disassembly, its becoming clearer and clearer how this game works every time I look at it. with thanks to a tip off from clone2727(sorry) I was able to see that john_doe had infact made some TeenAgent resource tools before.
Now while the tools themselves werent anything new to me(I already had displaying and loading code) It was very interesting to find out that his OFF.EXE tool read and displayed the game room background resources from the file OFF.RES.
It hadnt crossed my mind that the background resources were stored in this file I was looking at LAN_500.RES for those.

so now where do I stand

TeenAgent engine in ScummVM currently loads and displays the Union Logic logo from UNLOGIC.RES in a static form(I need to figure out how to load the overlay graphics data properly and then get it animating)
after displaying this logo it then allows the user to run through the games ordering info resources held in ADVERT.RES(this is working 100% like the original) and finally when leaving the ordering info the engine allows the user to scroll through the background images in their plain form(again I need to sort out the overlays before they will animate)

Ive included a few screenshots of the backgrounds running in ScummVM, its nothing major and not really much of an achievement in ScummVM but at least I was able to map the OFF.RES resource numbers to a particular scene. this has helped me figure out which functions call which room in the disassembly and has given me a little more enthusiasm for the task.

so right now Im stuck. I keep getting mental blocks when it comes to the overlay graphics.

I'd like to get this out the way if possible so I can accurately get some animations working in ScummVM, the overlay gfx should be a big milestone too since It 'should' allow me to browse through the rest of the game graphics resources and view them. effectively allowing me to map the rest of the resources and find things like cursor image and actor images.

If anyone fancies helping out I'd be very greatful. see what I need is to take the stream of graphics data I have read in from the file and from this I need to extract three uint16's width,height and destination offset on VGA.then I need to make pixel 255 transparent.

Its not much code to write but for now either im not skilled enough or I am approaching it completely wrong, either way its stopping me from moving on.
well enjoy the screenshots..

Monday 8 September 2008

The Teen Agent is showing signs of life...

Well, Its not much of an update but a small update is better than no update, and its got me pretty excited. This blog post is about the status of TeenAgent if you hadnt guessed it and Id like to mention that It is now possible to view image resources in ScummVM, at first with the help of salty-horse I was able to get a resource loader working, This resource loader simply found the location of a resource from a given resource number
not that great I hear you say.. well after that I decided it was time to actually use some of these resources, I mean whats the point in loading them if you dont know how to use them. This is where I decided to look at TeenAgents ADVERT.RES, which corresponds to the ordering info page visible from the main menu, this ordering info page consists of a function which allows the user to move between the 11 resources in the ADVERT.RES file (which magically correspond to the 11 pages of the ordering info page) and then displays them to the screen.
With the help of _sev It became clear that the image resources were very simple and consisted of nothing but image data and pallete data(duh)
Within 20 minutes _sev had provided code which would then display my image resources to the screen in ScummVM, right now its currently possible to move between the ordering info pages EXACTLY like in the original game.
So many thanks for all the help I have recieved so far, its got me to a point where I have something that I think is worthwhile to show.
I hope you enjoy as much as I do :)

Tuesday 2 September 2008

TeenAgent

Im not sure if anybody actually knows about my blog, but I thought I would introduce my new project here, Currently I am looking at the game TeenAgent by metropolis software, Its a point and click adventure game and was the first game produced on CD in Poland. This project is an attempt to implement a TeenAgent engine in ScummVM.

There are two main approaches, the first is that I am currently in discussion with Metropolis about a source code release, they are yet to respond with anything more than 'we will speak to you about this soon' however Im reading into that as 'we are interested and when we get a chance we will sort it out.'

The second approach is through reverse engineering the TeenAgent executable.
I've made a little progress on this and since its my first real x86 reversing project Ive relied on a lot of help from Buddha^, jvprat and salty-horse.

currently I can tell when certain resource files are loaded I have located the pallete functions the file reading function, menu functions for save/load,quit,display ordering info,adjust music volume, adjust sound effects volume, adjust text speed, adjust game speed, adjust hero speed and change graphics mode.(greyscale/colour) I also have a few base functions recognised to control interrupts keyboard input and various other functions which arent really much use in creating the engine, rather I just named them to get them out of the way(so I know what they do and can ignore them for now)

with thanks to salty-horse I am now able to understand the file loading function and locate some of the various resources in VARIA.RES, the task now is to find out what these resources are by looking at the functions they reside in.

I hope to find some code which will allow me to figure out how one of the graphics resources is displayed, that way I can dump a graphics resource from VARIA.RES and write some code to load this in ScummVM that way I will feel like I have achieved something worthwhile.

Heres hoping that the next couple of weeks will bring some visual teenagent sexyness to ScummVM, or at least a start since I go back to university in about three weeks and I wont be able to work on it every day then :(

fingers crossed for a response from Metropolis and double fingers crossed for finding some graphics displaying code and ScummVMifying it.

Rob

Saturday 19 April 2008

Maniac Mansion Famicom

Some people may know I was working on reverse engineering Maniac Mansion for the Famicom, If you know that then you probably know that its remarkably different to the version for the NES, the only thing that could be compared to the other versions of this game is the storyline.

My reverse engineering attempt for this game is quite slow and often stalls for months on end.
I will try and get an idea of where I am uploaded within the next month or so.

Incase anyone reads this and thinks they might be able to help out then feel free to comment.

Loom TG16/PC Engine.

Over the past week I have been attempting to rally up some support to get this game supported properly in ScummVM.
tomaitheo from Efnet #utopiasoft has been invaluable and Is currently working at figuring out the image format for the oi(object images) and smap(backgrounds) scumm resources.
http://gracesdisposal.bpweb.net/LOOM/

Also on the site is the legendary dumpcd software, in DOS/WIN32 and also includes linux source.
However if you cant get that to run there is also TurboRip, if you need to use TurboRip there are also instructions included for how to edit the output iso file to make it compatible with extract_loom_tg16.exe
Also included is a text file with the correct md5 checksums for the ripped iso, and for the output from the extract tool on 00.lfl
No doubt with tomaitheo's skill there will be some interesting work on this version of Loom

Now just to work out where the sound effects lay :)