Captain's Log / star date 2009.0118

|
As I mentioned in my previous post I've decided to patch Secret of Monkey Island in order to make it work on my CDTV. The first problem I noticed was that there was a problem in getting the controls to work. Mouse button clicks weren't registered correctly it seems. Intent on fixing this problem I thought it would be a good idea to add some more functionality to the game that would benefit CDTV users (well, me anyway)! 

The game requires moderate keyboard action at some places. For example, you're required to enter a numerical security code at the beginning of the game, which serves as a crude copy protection device. Also, whenever you want to save the game you need to press the F5 key and pausing the game requires pressing the spacebar. Although Commodore has released a CDTV keyboard, it would be much nicer to have this functionality by pressing buttons on the standard CDTV remote controller! So besides making sure the games runs on the CDTV I will be adding some features to make the CDTV experience of this game as good as possible. :-)










Well then, the recipe for disassembling and patching code is as follows. A good A500, a disassembler, a freezer cartridge that allows you to interrupt the Amiga and examine code and step through it in trace mode, and lots of documentation about the Amiga system and the Amiga's processor, the Motorola 68000. So I dug out my trusty old Action Replay MKIII cartridge and plugged it into my A500. I also pulled the Amiga ROM Kernel Reference Manuals from my bookshelf and stacked them on my desk. I also have a very nice book about the 68000 processor by Tim King and Brian Knight called "Programming the 68000", which I pulled too.

Right, armed with these tools I set to the task of downloading a disassembler so that I could disassemble the main executable of Secret of Monkey Island. Off to a visit to the wonderful Aminet archive with my A500 and I soon found D68k, which is a nice and fast 68k family disassembler by Denis Ahrens. I downloaded and extracted the package and disassembled the game file. I've been freezing the game, cross referencing the disassembled code with the Amiga ROM Kernel Reference Manuals and the "Programming the 68000" book and had a wonderful time learning about 68000 assembler and Amiga system programming at the same time! I've dissected lots of code inside the game. The Action Replay cartridge is wonderful and allows me to trace through the game one instruction at a time and set memory watch points to monitor any change in specific memory locations. I used to have an Action Replay cartridge back in my early Amiga days, but all I used it for in those days was to save screen dumps and to rip samples and modules from memory! :-) It's nice to finally make use (and understand) some of the more advanced features of this cartridge.










In just the space of an evening and an afternoon I have already located and dissected the code that starts the game, opens system libraries like intuition.library and graphics.library and the console.device, the main loop that waits for input and some of the system message processing code. There remains a lot to be analysed, but I'm positive I'll be able to pinpoint the sections of code that I need to adapt to my needs very soon. I think I've already located the portion of code that handles keyboard input, which would allow me to implement a workaround to accept CDTV remote input instead of keyboard input. I'll report further progress here as I have it! 

About this Entry

This page contains a single entry by cf published on January 18, 2009 6:37 PM.

Captain's Log / star date 2009.0117 was the previous entry in this blog.

Captain's Log / star date 2009.0129 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01