Hi everyone,
Just to introduce myself, I am a longtime lurker on these boards and having read BigNailCow's thread with great interest (massive SFII fan) I decided to have a go at hacking my all-time favourite game, Landstalker, in IDA.
For those of you that don't know, Landstalker is a relatively unknown action RPG released for the Sega MegaDrive/Genesis by Climax all the way back in 1993.
This is the first time I have ever attemped any ROM hacking other than simple text/graphic substitutions, and I had never programmed in assembler or knew much about Megadrive hardware, so this has been a huge learning experience for me.
The game itself is HUGE - there are over 800 room maps - and as a consequence pretty much everything is compressed in one way or another. The text is compressed using Huffman (in exactly the same way as Shining Force) so with the help of BigNailCow's posts I figured out how the compression routines worked and managed to dump the raw text.
Next came the graphics. These are compressed with a type of RLE, and it wasn't too bad to figure out having worked out the Huffman compression previously. The graphics compressed in this manner include the level tilesets (excluding animated tiles - these are stored raw), some sprite graphics, the Island map and Lithograph, Sega and Climax logos, Intro Sequence, Inventory window tilemap (strangely enough...), magic sword effects, falling coins (for the end), end credit font and logos and the little animations that appear above Nigel's head when he is cursed, etc. (IDA XRefs are great!). The room tileset palettes are also stored in this area as well.
The tilemaps (2d and 3d) are a bit trickier and there is all sorts of things going on with stackframes etc. I haven't figured it all out yet, but it hopefully will just be a matter of sitting down with a cup of coffee and going through the trace logs until I figure it all out. However,I do know how the uncompressed data is stored in RAM (more on this later).
I do know how the graphical sprite data is stored, and I have made a viewing utility for this data - Landstalker Sprite Viewer 1.0 -
landstalker.hostsnake.com/download.php. It wouldn't be too difficult to save edited data to ROM, but the ROM itself would need to be modified and expanded so that the new uncompressed data would fit. Details of the sprite data and sprite palette format - which at one time gave me massive headaches - are included with the download.
I am also working on a map editor (screenshot below), which uses the data in RAM as input, the idea being that it can be linked up to my own decompression routines when I have figured them out, thus removing the headaches involved in trying to work out if it is the editor or the decompressor that is generating bugs. It will also mean that when I have solved the codecs I will already have the required frontend for editing.
http://landstalker.hostsnake.com/imgs/leveleditor.gifI have also unlocked the inbuilt test mode - see
landstalker.hostsnake.com for details.
My ideal ambition for this hack is to enable
anything to be edited: maps, dialogue, enemy stats, tilesets, sprites, palettes, character interactions, cutscenes, and more. However,it may be a long time before these can be edited.
EDIT: Fixed image (apparently not)
DOUBLE EDIT: crappy free host doesn't support remote image linking