<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6007794715807265125</id><updated>2011-10-25T12:58:57.658+11:00</updated><category term='tSage'/><category term='ScummVM'/><category term='MADS'/><category term='disassembly'/><category term='Ringworld'/><title type='text'>Dreammaster's disassembly blog</title><subtitle type='html'>A blog about my interests in diassembling old adventure games, and what I'm up to</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-8893690539993824326</id><published>2011-10-23T16:48:00.002+11:00</published><updated>2011-10-23T17:17:51.630+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><title type='text'>Two milestones reached</title><content type='html'>Yesterday I was chatting with Md5 about the recent progress in Blue Force, and I thought to myself that I should make a blog posting. Looking back, it seems it was June when I made the previously posting. I hadn't realised that it was that long.&lt;br /&gt;&lt;br /&gt;As those of who frequent the IRC channel or forums would be aware, Ringworld was completed, and will be part of the upcoming official 1.4 release. We'd already had a successful testing period, with several bugs identified and fixed. It'll be nice to see another game I've worked on added to the trunk and become officially supported.&lt;br /&gt;&lt;br /&gt;Now, onto more recent developments. As of yesterday, Strangerke and I have reached two more milestones in the progress of the TsAGE engine.&lt;br /&gt;&lt;br /&gt;The first is that I completed the first complete play-through of Blue Force. This had been a gradual process over the last few weeks, as we identified game stopping bugs and fixed them. The save format also changed several times during this period, as we implemented the final few game scenes, and added missing game state variables. Yes, clone2727, the game is completable. So nyaaa. :)&lt;br /&gt;&lt;br /&gt;The next step will be for us to start playing the game again from the beginning, comparing it against the original and looking for any minor graphics glitches or problems that we missed. We will also ensure that none of the fixes done for the later game scenes had any adverse effect on the earlier scenes. This includes a variety of minor issues that we identified during the first play through, but were deemed too minor to immediately worry about.&lt;br /&gt;&lt;br /&gt;One of the more amusing glitches I came across was a scene in day 2 of Blue Force where a police inspection is done. This particular scene seems to use animation sprites different from anywhere else in both Blue Force and Ringworld. Likely some as yet un-handled flag or sprite offset - the result being that all the officers get drawn with their bodies on top of their head. Picture if you will headless officers walking around balancing on their own heads. :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The second milestone is the commit of the beginnings of the ‘Return to Ringworld’ game - the third and final 2-D TsAGE adventure. I’d previously spent some time on the side starting to look at a disassembly of the game, and identifying all the common engine functions against my disassemblies of Ringworld and Blue Force, and got to the point where all the core functionality had been identified. I started on adding the game classes about a week ago, and have got to the point where I can at least display the first in-game scene.&lt;br /&gt;&lt;br /&gt;I had been holding off on committing this to trunk until after the branch, since it affects a lot of the files, but now the 1.4 branch has been done. It also invalidates the current Blue Force savegame format (but not RIngworld) - since both of them share mostly the same UI code, it made sense to encapsulate it in a common base class. Given that Blue Force isn't official yet, it was easier to break the existing savegame format for it as part of this, then to try and maintain the savegames intact. So it was good that I’ve now completed the first play through of Blue Force, and can start from the beginning of the game again.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have a tendency, for games I plan to work on disassembling, not to play them through using the original executables. That way I can have the fun of gradually playing through the game as I implement the code for it in ScummVM, and get the enjoyment from playing it for the first time in code that I’ve written. It also serves as an inducement to work hard, so I can see what happens in the game. I’m eager to see what happens to Quinn, Miranda, and Seeker in their second foray to the Ringworld.&lt;br /&gt;&lt;br /&gt;Once we've cleaned up the Blue Force code-base a bit more, then work on Return to Ringworld will begin in earnest. Hopefully there won't be too many core engine changes, and work can proceed on it as rapidly as was done for Blue Force.&lt;br /&gt;&lt;br /&gt;On a final note, for those of you wondering about Rex Nebular, I did start to return to looking at it, but I've been away from working on it in earnest for too long. There are still parts of the game not yet dis-assembled, and I'd need time to complete that and re-familiarise with the existing code. So it really needs some time when I'm not actively working on some other game. I'll have to see how I do when the TsAGE games are complete.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-8893690539993824326?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/8893690539993824326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=8893690539993824326' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/8893690539993824326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/8893690539993824326'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2011/10/two-milestones-reached.html' title='Two milestones reached'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-916820230379403171</id><published>2011-06-21T11:02:00.003+10:00</published><updated>2011-06-21T14:14:40.669+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><title type='text'>Let there be sound</title><content type='html'>The TsAGE engine for Ringworld now has sound playing! I'd be hard to pressed to express just how happy I was when I ran ScummVM and finally had correct sound playing back. I was like, Oh My God! it's finally working. After all the time spent re-implementing all the sound code from the original, and then spending nearly as much time slowly tracing through the execution of the original versus ScummVM to try and figuring out the cause of differences, it was a relief to finally have it working.&lt;br /&gt;&lt;br /&gt;As such, the Ringworld game is that much closer to being complete. There are still a few areas left to look into, and polish up, such as:&lt;br /&gt;* Sound fading isn't yet working correctly&lt;br /&gt;* I need to hook the sound manager into the savegame format, and ensure playing sounds are persisted&lt;br /&gt;* There are certain suspect areas in the sound manager's main _sfRethinkVoiceTypes method to review; at least one variable is being assigned to at one point and not currently being used, so I need to double check if that's really the case.&lt;br /&gt;* The sound manager could use an overall clean-up.&lt;br /&gt;&lt;br /&gt;It won't be too much longer until it's ready for public testing. Soon Larry Niven fans will be able to explore the Ringworld, and search for a way to defeat the bloodthirsty Kzins.&lt;br /&gt;&lt;br /&gt;So what's coming next? Well, I've promised myself some time to work on Rex Nebular again, which I've somewhat neglected in my zest to have Ringworld completed. Strangerke is also enthusiastic about working on the other games that used the TsAGE engine, so I'll probably be spending some time on the game Blue Ice to determine what changes have been made to the engine, and provide a basis for being able to re-implement the game scene logic similar to what was done for Ringworld. Finally, I may offer to help out somewhat on the other games the team has received original source for. Gotta keep busy after all. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-916820230379403171?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/916820230379403171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=916820230379403171' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/916820230379403171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/916820230379403171'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2011/06/let-there-be-sound.html' title='Let there be sound'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-4485916681327201990</id><published>2011-06-13T12:09:00.007+10:00</published><updated>2011-06-14T18:51:58.965+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><title type='text'>TsAGE sound support progressing</title><content type='html'>Work on the TsAGE sound has been progressing. I had originally hoped that the raw format used by the game would be a standard Adlib raw format that I could feed into one of the existing Adlib Sound FX classes. I tried to pass the data to the player class in the Cruise engine, which I had previously worked on, but unfortunately, whilst it didn't crash, it didn't play anything. And I'm not familiar enough with sound formats to have been able to diagnose why.&lt;br /&gt;&lt;br /&gt;As such, I've spent some time powering through implementing all the relevant sound code directly from the demo executable. With the symbols identified, I at least had a heads up for the original engine names for a lot of the methods. Plus, we were able to garner some additional information from a demo version of the game Protostar. Whilst it's not an adventure game, the sound code has a lot in common with Ringworld; and not only did it have method names, it also had a lot of field information for the classes and structures. As with the Ringworld demo, it didn't have it for all the classes, but I was at least able to name fields in the sound classes and the sound manager.&lt;br /&gt;&lt;br /&gt;From this basis I've now implemented what I think are all the relevant methods of the demo for both the Adlib sound driver and the sound manager classes - I'm currently using the OPL functionality with OPLWriteReg in place of direct port access. The resulting code I've completed doesn't actually play anything back yet, though. Making a log of the underlying writes to the Adlib port versus my ScummVM code, the results are different, so there's obviously some incorrectly implemented code.&lt;br /&gt;&lt;br /&gt;My current major suspect is a method called _sfRethinkVoiceTypes - it's a enormously big method with over 500 lines, responsible for updating the voice channels based on queued sounds. It's one big mess, with a large pre-processing, post-processing, and main processing areas. I'll have to slowly trace through the execution both in ScummVM and the demo in the DOSBox Debugger to identify the problem. Hopefully once I've identified the differences, I'll finally hear some sound output.&lt;br /&gt;&lt;br /&gt;Fingers crossed. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-4485916681327201990?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/4485916681327201990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=4485916681327201990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4485916681327201990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4485916681327201990'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2011/06/tsage-sound-support-progressing.html' title='TsAGE sound support progressing'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-4127680730073343239</id><published>2011-04-24T20:19:00.009+10:00</published><updated>2011-04-26T16:12:18.081+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><title type='text'>Most wonderful Ringworld demo</title><content type='html'>Hopefully everyone had a happy Easter weekend; or for those of other religions, were able to enjoy a long weekend wherever you are. :)&lt;br /&gt;&lt;br /&gt;It's been a little over a week since the TsAGE engine hit the trunk, and a big thanks go out to everyone who's helped out with commits - fixing compilation problems, and cleaning up the code. Special thanks again go to Strangerke, who has been busy working his way through the Ringworld game to fix bugs and make the game completable. I too have spent most of my time fixing some of the outstanding bugs, as well as newly identified bugs in the core engine.&lt;br /&gt;&lt;br /&gt;On another topic, we've had a stroke of exceptional luck. I had been starting to get bogged down in all the various classes related to sound handling, and I wasn't looking forward to trying to figure out what it all did. But then Strangerke discovered that one of the two available Ringworld demos actually had embedded symbol information for most of the variables and methods of the demo! &lt;br /&gt;&lt;br /&gt;Since the full game engine isn't anticipated to be much different from that used in the demo, it likewise means we've suddenly got a huge jump forward in understanding the remaining sound-related parts of the engine. Fuzzie was able to extract the information into a text file listing, and I wrote a quick and dirty script in IDA's IDC language to load the symbol information into a new IDB file for the demo executable.&lt;br /&gt;&lt;br /&gt;This isn't quite as good as getting the full original source for the game, but it's still a major find. The biggest limitation of the symbol information is that such symbol tables don't include information for fields within structures. So, for example, the 'ASound' class has 282h bytes of information, but the instance of the class only has the symbol for the first byte, not all of the bytes. Therefore, I'll still need to spend a reasonable amount of time figuring out the contents of the various methods. But at least with the method names known, I can more easily figure out what each method actually does.&lt;br /&gt;&lt;br /&gt;In the space of under two days, I've already implemented support for the two Ringworld demos. Luckily, the demos use a single script sequence rather than direct code, which made it very easy to add support for. All that still needs to be implemented for the demo are a few custom dialogs, and ensuring none of the full game functionality, like Saving and Restoring, is enabled for it.&lt;br /&gt;&lt;br /&gt;Implementing support for the demo also identified a key difference between the two versions of the demo - the second demo was similar to the CD version, in that they changed the format of how the data for priority regions and walkable areas was stored. Having a disassembly of the demo with symbols made it easier to identify the relevant areas of code, and figure out the differences.&lt;br /&gt;&lt;br /&gt;In addition to polishing up support for the demo, I'll likely making a branch to work on the sound classes separately. We currently have some hard-coded logic in the existing engine to properly signal actions that any played sound has immediately ended, so I don't want to interface with that whilst working on a proper implementation of the sound system.&lt;br /&gt;&lt;br /&gt;So things are definitely rapidly moving forward. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-4127680730073343239?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/4127680730073343239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=4127680730073343239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4127680730073343239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4127680730073343239'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2011/04/most-wonderful-ringworld-demo.html' title='Most wonderful Ringworld demo'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-9203931729226537575</id><published>2011-04-13T23:32:00.006+10:00</published><updated>2011-04-13T23:53:11.766+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><title type='text'>TsAGE has now hit the trunk</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;I'd been meaning to write a new blog post for a while, but progress was progressing so quickly, that I never quite got around to it. Now, though, work has progressed far enough that the tSage engine has now been merged into trunk. Huzzah! :)&lt;br /&gt;&lt;br /&gt;Many thanks go to Strangerke, who joined me in implementing all the various game scenes of the Ringworld game. Together, we've implemented all the game logic. &lt;br /&gt;&lt;br /&gt;The following is the state of the game:&lt;br /&gt;* All the game scenes for the floppy version of the game are implemented, although some still need some bug-fixing, so the game isn't completable. &lt;br /&gt;* Sound isn't supported yet, and still needs to be reverse engineered in the original game.&lt;br /&gt;&lt;br /&gt;So we have the following goals for the near future:&lt;br /&gt;* We'll be working on fixing the remaining scene bugs, and ensuring the game runs smoothly from start to finish.&lt;br /&gt;* Implementing the sound code.&lt;br /&gt;* I also want to implement support for the original game's cheating/debug functionality.&lt;br /&gt;* Add support for the CD version of the game, which has some minor differences.&lt;br /&gt;* And add support for the demo version, if possible.&lt;br /&gt;&lt;br /&gt;All in all, it's a celebration for another engine being added to the ScummVM universe. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-9203931729226537575?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/9203931729226537575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=9203931729226537575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/9203931729226537575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/9203931729226537575'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2011/04/tsage-has-now-hit-trunk.html' title='TsAGE has now hit the trunk'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-7551390069307464055</id><published>2010-12-19T23:55:00.010+11:00</published><updated>2010-12-20T00:21:43.855+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><category scheme='http://www.blogger.com/atom/ns#' term='Ringworld'/><title type='text'>tSage engine proceeding quickly</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;I've really been making some great strides forward with my implementation of the tSage engine. I offer the two screenshots below. One is from the first game scene when run in DOSBox, the other under ScummVM:&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;br /&gt;&lt;a style="" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_I8Kh-PtgCgY/TQ4BJloMlQI/AAAAAAAAABU/g7NBJGHLSOI/s1600/ring_dosbox.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 198px;" src="http://3.bp.blogspot.com/_I8Kh-PtgCgY/TQ4BJloMlQI/AAAAAAAAABU/g7NBJGHLSOI/s320/ring_dosbox.png" alt="" id="BLOGGER_PHOTO_ID_5552376654825559298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td valign="top"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_I8Kh-PtgCgY/TQ4BcB-u_FI/AAAAAAAAABc/e2JhVHFbyiY/s1600/ring_scummvm.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 200px;" src="http://3.bp.blogspot.com/_I8Kh-PtgCgY/TQ4BcB-u_FI/AAAAAAAAABc/e2JhVHFbyiY/s320/ring_scummvm.png" alt="" id="BLOGGER_PHOTO_ID_5552376971673926738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;Hard to tell them apart, isn't it? :). The one on the left is from DOSBox, and the one on the right is ScummVM. All the initial hotspots in the first game room are now set up, are being drawn on the screen, and have correct look descriptions. The only exception is a minor graphic glitch with the doorway - the current drawing code doesn't yet support clipping objects based on priority calculations, so the top of the doorway isn't correctly clipped off.&lt;br /&gt;&lt;br /&gt;One of the next major steps from here is to delve further into the movement classes and code. Whilst the player is now drawn on-screen, I don't yet have any code responsible for moving the player, such as when you manually walk somewhere, or when the computer moves the player to a set location, such as when you use the door beam.&lt;br /&gt;&lt;br /&gt;From what little I've looked into the movement code so far, the game maintains a set of classes responsible for moving objects within the scene. For the player specifically, there's a lot of code that seems to make use of special 'walk regions', which indicate where on the screen the user can walk. The movement code is tied into this, and uses them to determine both where the player can move to, and for pathfinding to move the player to the given destination.&lt;br /&gt;&lt;br /&gt;Given the pace I've been having recently in other areas of the engine, I don't anticipate that it will take too long. Hopefully, soon I'll be able to move the player about on the screen. Then I can start delving into implementing all the logic involved in the first cut-scene, where the Kzin comes to the door and speaks with the player. It's so much more fun working on an engine when you can almost day-by-day make visible progress in it's implementation.&lt;br /&gt;&lt;br /&gt;PS: I've been making such rapid progress with tSage, I've been somewhat neglecting work on the MADS engine. I hope any fans of Rex Nebular will be patient with me.. I will get back to work on it eventually. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-7551390069307464055?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/7551390069307464055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=7551390069307464055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/7551390069307464055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/7551390069307464055'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/12/tsage-engine-proceeding-quickly.html' title='tSage engine proceeding quickly'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_I8Kh-PtgCgY/TQ4BJloMlQI/AAAAAAAAABU/g7NBJGHLSOI/s72-c/ring_dosbox.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-4514052249170900026</id><published>2010-11-21T17:48:00.003+11:00</published><updated>2010-11-21T18:17:30.662+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><title type='text'>Update on the game engines</title><content type='html'>Hi all,&lt;br /&gt;&lt;br /&gt;It's been a while since my last blog posting, so I figure it was time to wax poetic on what I'm currently up to.&lt;br /&gt;&lt;br /&gt;I've  spent some considerable time working on the Broken Sword 2.5 engine  with Sev. As has happened previously, what I originally intended as something else to work on alongside Rex Nebular, quickly overshadowed it, and I ended up spending most of my recent holiday just  working on it. It's now available in the public SVN, and is running  fairly well, so I'm going to leave any remaining work to any other  interested parties, and have returned to work on my other engines.&lt;br /&gt;&lt;br /&gt;-----&lt;br /&gt;&lt;br /&gt;Rex Nebular is coming along nicely. As I've mentioned  in the past, I've been creating a custom script engine, based on the  Tinsel script interpreter, to handle interpretation of game scripts.  I've then created a custom script program that iterates over specified  functions in the Rex Nebular disassembly, and converts them to a script  text file. I then have a simple script compiler I've developed that  compiles the scripts, and creates a new 'mads.dat' file.&lt;br /&gt;&lt;br /&gt;As of right now, I've only converted the scripts associated with the  first game room. The scripts associated with scene entry and 'scene  tick/step' are working properly, so Rex is now waking up and standing  entirely based on script execution, rather than the hard coded behaviour  I previously had. I consider this a big step, since it validates the  entire process of converting original executable instructions to script  code, and final execution works properly.&lt;br /&gt;&lt;br /&gt;The next step is to implement some remaining missing pieces of the  action dispatch code so that Rex can actually do actions, rather than  just walking about. Right now, I'm aiming for right-click Look actions  to work properly. Then it should only be minor further changes to have  other actions work as well. Soon Rex will be able to do all the various  things in the first room. And I'm looking forward to the day when Rex  will finally be able to take his first steps into a bigger world and  finally leave the cockpit.. :)&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;Another game engine I'm currently working on is the  tSage engine, which is used by the Ringworld game. Previously, the fact  that it was so Object Oriented annoyed me, because it made it harder to  understand the game flow since some classes, such as the event manager,  had four descendant classes, making it difficult to understand what each  class in the hierarchy did. Now, though, I'm actually starting to see  some benefit from it.&lt;br /&gt;&lt;br /&gt;The classes related to handling the game state are very clean. For  example, there is a generic 'Scene' class, from which each game scene  dervices a specific implementation class. So, there is a 'Scene30' class  for the first scene in the game, and it has fields for the various  hotspots and objects within the scene. Speaking of hotspots, there too  is a hierarchy, with a base 'SavedObject' (used for object persistence),  which subclasses to a 'SceneHotspot' (used for basic hotspots), which  subclasses to a SceneObject (which is an object in the scene that is  drawn into it, rather than being part of the background). From there, a  SceneObject is sub-classed to the NPC class - this is where the  encapsulation really helps, since all logic related to drawing NPC's is  already handled by the SceneObject class, so didn't need to be  disassembled multiple times for different kinds of things in the scene.  The NPC class only has to implement the additional logic for moving  character around the scene.&lt;br /&gt;&lt;br /&gt;In fact, the NPC class also further sub-classes to the 'Player'  class, which has extra logic to handle allowing the player to interact  within the game. A lot of the logic for handling the player is thus  already handled by the NPC class, so the Player class only has to add on  the extra logic for allowing direct player control.&lt;br /&gt;&lt;br /&gt;Because of this OO model, all the game logic is implemented by  deriving new custom classes from these base classes, and then adding  them into a particular scene. So, for example, the first scene in the  game has the player having to ring a doorbell by 'using' a motion  sensing beam. This beam is implemented as a 'SceneObject' derived custom  class, which overrides the 'action' method to either provide a  description on-screen for the 'Look' action, and start the 'kzin  answering the door' sequence in response to a 'Use'.&lt;br /&gt;&lt;br /&gt;I'm still undecided about whether I'll re-implement the game by  manually converting all the game logic to C++ code, or try to create a  process, as with Rex Nebular, to convert the game executable routines  into equivalent scripts that could be interpreted. The OO nature of the  game engine would make it trickier to convert to scripts. I'm planning  to at least, eventually, converting the logic for the first scene to  full C++, and see how it looks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-4514052249170900026?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/4514052249170900026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=4514052249170900026' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4514052249170900026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4514052249170900026'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/11/update-on-game-engines.html' title='Update on the game engines'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-5420373333467598329</id><published>2010-07-27T13:34:00.004+10:00</published><updated>2010-07-27T16:04:59.307+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='MADS'/><title type='text'>Rex can now walk about on-screen</title><content type='html'>Here I was bracing myself for the imagined complexities of  movement logic, and it turned out to be a whole lot simpler than I  imagined. Probably blame it on the other two engines I've had experience  with path-finding for: Lure, and Tinsel, both of which have their share  of complicated logic. For Rex Nebular, though, the implementation was a  lot more elegant than I'd expected.&lt;br /&gt;&lt;br /&gt;What the MADS engine does for walkable areas is to have two parts.  The first is a priority/depth surface, which had already been previously  implemented. This is a surface which both specifies the walkable areas,  and is also used to determine which parts of an object, at a given 'depth',  should be drawn on-screen. In the first room, for example, the area  comprising the chair has some varying levels so that the player gets  drawn behind it.&lt;br /&gt;&lt;br /&gt;The other part to the movement functionality is a series of 'scene  nodes'. These are a series of points distributed across the scene to  represent appropriate intermediate points in movement. If a straight  line between the start and end point isn't possible, because of a marked  obstruction, then the engine calculates the distance between each node  in the scene, including both the start and end points as two extra  nodes. It then calculates which series of nodes will take the shortest  amount of time to traverse, and uses that as the basis for movement -  the actual walking then moves the player from node to node until the  destination is reached.&lt;br /&gt;&lt;br /&gt;This works well for the game since, unlike in Tinsel or Lure, there  aren't ever any moving actors that could interrupt the walking path. The  only NPC character movement that ever happens is in cut-scenes, where the  player is either not moving, or is being controlled by the computer  (such as when Rex is taken to the cells).&lt;br /&gt;&lt;br /&gt;Now that I've got Rex moving around on the screen, the next  immediate step is to get the hotspot and selection code working.  Somewhat ironically, this is turning out to be more complicated than the  walking code itself. I'm currently working my way through disassembling the various routines and implementing comparable code. Hopefully, I'll soon have enough implemented that I can properly implement some actual actions in the first room.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-5420373333467598329?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/5420373333467598329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=5420373333467598329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/5420373333467598329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/5420373333467598329'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/07/rex-can-now-walk-about-on-screen.html' title='Rex can now walk about on-screen'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-6249871965307767161</id><published>2010-07-12T18:42:00.005+10:00</published><updated>2010-07-12T18:54:36.517+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='MADS'/><title type='text'>MADS/M4 engine now has cutscene support</title><content type='html'>Well, it's been a very productive month for work on the MADS/M4 engine.&lt;br /&gt;&lt;br /&gt;Since the last posting, I started working on the cutscene animation system. This is a separate module to the basic cycled animations that get loaded into a screen.. rather, the game uses an animation manager to handle so-called 'cutscene animations', such as that of Rex waking up in the first room. In this case, the animation manager handles the work of animating the sequence of frames of Rex waking up, looking around, and then getting up. Given that this was the fist major action in the game, it made sense to have that properly implemented first.&lt;br /&gt;&lt;br /&gt;Above and beyond that, the animation manager is also used for handling all the full-screen animations done in both the introduction and ending sequences, so once I had Rex properly animated in the first scene, I moved onto implementing proper support for them. With some help from Md5 on the handling of digital voices during the intro, the introduction sequence now plays completely if you press 'F3' from the main game menu. There are only a minor few issues remaining with the introduction, in that:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The tempo of the intro isn't quite matched to the original yet; I'll need to properly calibrate the timing loops at same stage&lt;/li&gt;&lt;li&gt;I haven't implemented palette cycling, which is used by some scenes within the introduction sequence to simulate basic animation.&lt;/li&gt;&lt;/ul&gt;I consider the above minor things, and I'll get to them eventually. For now, I again got distracted from polishing up the remaining issues by making a breakthrough in my understanding of the code that controls the player (you) within the screen. Within the last week I've implemented a great deal of code associated with player control, and now Rex is corrected displayed when the wakeup animation is completed. Not only that, but the idle animations run for Rex, and you can even turn him around by using the Ctrl-T key.&lt;br /&gt;&lt;br /&gt;The obvious next stage for me to look into is actually starting to give some movement control for Rex, and have him be able to walk around on-screen. This is where I'll need to worry about figuring out the pathfinding algorithm, and how actual movement is done. I've already identified some of the methods associated with handling Rex's movement but, as I expected, there's a lot of calls to unknown sub-methods that I'll need to figure out the purpose of. Since the MADS engine was designed to be generic for multiple games, there's a lot of complexity in both the movement and pathfinding code that I'll need to figure out.&lt;br /&gt;&lt;br /&gt;I'm really looking forward to this. It'll be another major milestone reached when I can move Rex around the room. At that point the game will finally be properly interactive. I'll then be able to work on interacting with objects, which I already understand a lot about, and maybe even moving between rooms and/or teleporting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-6249871965307767161?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/6249871965307767161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=6249871965307767161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6249871965307767161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6249871965307767161'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/07/madsm4-engine-now-has-cutscene-support.html' title='MADS/M4 engine now has cutscene support'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-9074342863556854769</id><published>2010-05-23T17:47:00.014+10:00</published><updated>2010-05-23T18:14:47.712+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='MADS'/><title type='text'>MADS engine reaches a milestone</title><content type='html'>Well, it's been a busy last month at work, but with things starting to settle down, I've finally had some free time to start working on the MADS engine again. And as of  this weekend, I've just reached an important milestone in the development of the  ScummVM engine implementaiton - the core graphics display framework is now working properly.&lt;br /&gt;&lt;br /&gt;That's right.. the game logic for the first screen setup is still hardcoded, but the engine now properly implements all the necessary code to handle the calls to register a sprite sequence animation, and drawing elements on the screen; so animation sequences are now properly animated.&lt;br /&gt;&lt;br /&gt;I consider that this reperesents a great step forward, since the entire game is based on the display of graphics - so I finally have a working core from which to build on further functionality with. This includes areas such as the logic for the player character itself.&lt;br /&gt;&lt;br /&gt;The graphics core in the MADS engine has been more complicated then I've previously dealt with - the functionality is split between a main sequencing list for scheduling animations, graphics display logic, and various suppport classes, such as for dirty area handling. There's a whole mess of inter-relating code, which meant that I had to disassemble a lot of the code before I was able to implement something that works. There are still some fields that I've yet to figure out that handle certain special cases, such as the ability of dynamic hotspots to move their position, but that'll come in time.&lt;br /&gt;&lt;br /&gt;If there's one thing that annoys me about the MADS engine it's the number of data variables that seem to get set everywhere. I'm presuming the original engine was designed to be generic for multiple games, but there seems to be a ridiculously large number of data values being set throughout the engine. It'll be interesting to find out whether the the majority of them are part of the 'core' MADS engine, or represent a whole lot of game-specific hacks for the Rex Nebular game.&lt;br /&gt;&lt;br /&gt;I've included a screenshot from the first game room from Rex Nebular below. It may not be obvious from a still picture, but the various status displays now display flashing lights, and bubbles are escaping from the hull into the water.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_I8Kh-PtgCgY/S_jeWrQh_gI/AAAAAAAAABE/o9j3M1XHxGA/s1600/rex_screen.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 200px;" src="http://2.bp.blogspot.com/_I8Kh-PtgCgY/S_jeWrQh_gI/AAAAAAAAABE/o9j3M1XHxGA/s320/rex_screen.png" alt="" id="BLOGGER_PHOTO_ID_5474369828219387394" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-9074342863556854769?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/9074342863556854769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=9074342863556854769' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/9074342863556854769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/9074342863556854769'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/05/mads-engine-reaches-milestone.html' title='MADS engine reaches a milestone'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_I8Kh-PtgCgY/S_jeWrQh_gI/AAAAAAAAABE/o9j3M1XHxGA/s72-c/rex_screen.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-3769773818580656749</id><published>2010-03-01T20:54:00.005+11:00</published><updated>2010-03-01T21:02:03.673+11:00</updated><title type='text'>MADS disassembly is back on track</title><content type='html'>Since it's been a month since my last posting, I thought it was time to post a status update. The work on disassembly of the MADS (Rex Nebular) engine has been going well.. I've made a lot of progress on various areas of the game logic.&lt;br /&gt;&lt;br /&gt;I haven't actually added much code to the ScummVM engine yet, since I decided it would be better to fully understand a given area before I implement it. At the moment, my reverse engineering has been some undirected - it's obviously more effective to work on whatever areas you can find that are easiest to disassemble, which in turn may make other areas easy to disassemble later on. However, it does mean that there are bits and pieces across the entire engine that are now understood better.&lt;br /&gt;&lt;br /&gt;One area of the game engine that's going to prove interesting is all the hard-coded game logic - each scene has several routines associated with it for scene loading, scene animations, and handling interaction with elements. Obviously it would be preferable not to completely reimplement these in code, since it would take a lot of code space, and there are two other games whose code would also need to be reimplemented.&lt;br /&gt;&lt;br /&gt;What will probably need to be done is to create some kind of basic script interpreter engine, and convert the various scene routines to an interpretable script. Luckily, most of the routines seem to use a fairly simple subset of x86 instructions, so it shouldn't prove an impossible task. In any case, that's something for the future, when I fully understand all the various routines the methods call. For now, I've set a short term goal of manually implementing the logic for the first game room, and will return to the idea of scripts at a later date.&lt;br /&gt;&lt;br /&gt;On a final note, for those of you who like pictures, see below for an example of the scene walkable areas for the fist scene of Rex Nebular.  It also has a slightly weird sprite frame from Rex inserted into the picture - Rex isn't movable yet, though.. it's just a test from some of the loaded sprites:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_I8Kh-PtgCgY/S4uPjisd7wI/AAAAAAAAAA8/M0HQNBdhciQ/s1600-h/rex_codes.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="http://1.bp.blogspot.com/_I8Kh-PtgCgY/S4uPjisd7wI/AAAAAAAAAA8/M0HQNBdhciQ/s320/rex_codes.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443602415378886402" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-3769773818580656749?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/3769773818580656749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=3769773818580656749' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/3769773818580656749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/3769773818580656749'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/03/mads-disassembly-is-back-on-track.html' title='MADS disassembly is back on track'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_I8Kh-PtgCgY/S4uPjisd7wI/AAAAAAAAAA8/M0HQNBdhciQ/s72-c/rex_codes.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-2938238446149432333</id><published>2010-01-29T13:00:00.017+11:00</published><updated>2010-01-29T13:58:32.173+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='tSage'/><category scheme='http://www.blogger.com/atom/ns#' term='MADS'/><title type='text'>Roadblocks in the path of tSage</title><content type='html'>Those of you who have been following the IRC channels will know that I made some real progress in the disassembly of the tSage engine, used by the Ringworld - Revenge of the Patriarch game, as well as several others. I hadn't really gotten into any of the game logic, but I'd made great strides in decoding the image formats and graphics display, so much so that my engine on &lt;a href="http://scummvm-misc.sf.net/"&gt;Scummvm-misc&lt;/a&gt; could display test dialogs, as well as the right-click game dialog with proper highlighting and everything. Sample screenshots below:&lt;br /&gt;&lt;br /&gt;&lt;table width="100%"&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_I8Kh-PtgCgY/S2JEPrfR8SI/AAAAAAAAAAk/vhFAxhnnXmc/s1600-h/ringworld1.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="http://4.bp.blogspot.com/_I8Kh-PtgCgY/S2JEPrfR8SI/AAAAAAAAAAk/vhFAxhnnXmc/s320/ringworld1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5431979136724889890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_I8Kh-PtgCgY/S2JEZC-vPtI/AAAAAAAAAAs/6ZaqoN86WrE/s1600-h/ringworld2.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 200px;" src="http://4.bp.blogspot.com/_I8Kh-PtgCgY/S2JEZC-vPtI/AAAAAAAAAAs/6ZaqoN86WrE/s320/ringworld2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5431979297649671890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;However, given the perversity of life, I should have known better than to announce on the channel that I was making real progress. :(. Because as I was getting into the game execution logic, I began to realise just how complicated they made the engine. Whilst using C++ has it's advantages from the perspective of RE, since it does group related functions close together with the variables they use, in this case, they seemed to go overboard with it.&lt;br /&gt;&lt;br /&gt;A preliminary look at the main event loop of the game shows they implemented a stack of "action objects" - multiple independent event handlers can be registered and control swapped form one to the other. I'm not sure, but I presume that this is to allow for things like cutscenes, where standard game operation is superseded.&lt;br /&gt;&lt;br /&gt;For even more complexity, they went with a class hierarchy for the action objects which is at least four levels deep!.&lt;br /&gt;The classes, as far as I've been able to determine, are as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;http="http: net="" misc=""&gt;They have a core 'SavedObject' class, which has some internal logic for registering each object instance in a central list. I presume this is for automating saving and loading.&lt;/http="http:&gt;&lt;/li&gt;&lt;li&gt;A child class which I'll call "SmartPointer". This class seems to encapsulate a pointer to a secondary object, and provides core logic for 'fixing' up the pointer reference. I can't be sure yet, but there's a lot of 'fixup' code in the engine, which I presume handles restoring pointer references between objects when a savegame is loaded, and all the objects are re-constructed. This class also implement a basic virtual table of processing and dispatch methods that automatically defer to the foreign object if one is set&lt;/li&gt;&lt;li&gt;Yet another child class which introduces basic event manager functionality amongst other things&lt;/li&gt;&lt;li&gt;A concrete fourth child class which seems to further override some of the event manager functionality, and is what gets added to the game's "action list".&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;As you can imagine, all this makes it somewhat different to understand what the blazes is going on. I've also examined the engine from some other points, such as scene loading, and even that seems to be overly complex, with method calling method - they really went in the direction of generalised/generic functionality, with the result that the code seems to be much more complex than it should otherwise need to be.&lt;br /&gt;&lt;br /&gt;&amp;lt;/whinge&amp;gt;&lt;br /&gt;&lt;br /&gt;In any case, the tSage engine was only meant to be a part-time RE effort for when I needed a break from the MADS engine. I did somewhat get carried away with it for the last few weeks, but that was only because the areas I was looking at proved so easy to reverse engineer. Now that I'm running into more complex code, I've decided that the break's over, and I'm returning to work on the MADS engine again. For that, at least, the code seems somewhat simpler, even if it can be a pain to run in the DOSBOX debugger because the segments keep getting shifted around in memory. ;)&lt;br /&gt;&lt;br /&gt;For those of you who are Ringworld fans, don't worry, I'll still be working on the engine. It's just there won't be as rapid a progress on it as I'd recently hoped.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-2938238446149432333?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/2938238446149432333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=2938238446149432333' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/2938238446149432333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/2938238446149432333'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2010/01/roadblocks-in-path-of-tsage.html' title='Roadblocks in the path of tSage'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_I8Kh-PtgCgY/S2JEPrfR8SI/AAAAAAAAAAk/vhFAxhnnXmc/s72-c/ringworld1.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-4212488419785344056</id><published>2009-12-07T19:41:00.003+11:00</published><updated>2009-12-07T19:44:29.602+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><title type='text'>Working on Rex Nebular</title><content type='html'>The &lt;a href="http://scummvm-misc.sf.net/"&gt;Scummvm-misc&lt;/a&gt; listing welcomes the new work in progress Dark Seed 2 engine by DrMcCoy. It looks very promising.&lt;br /&gt;&lt;br /&gt;I've returned to spending a lot of my time working on the disassembly of Rex Nebular, and implementing it's functionality into the M4 engine. It's likely going to be an extended process, because the game engine is unbelievably complex. It likely comes from the MADS engine being designed as a generic game engine rather than just for single games specifically.&lt;br /&gt;&lt;br /&gt;For example, I only just last night disassembled some of the code associated with displaying messages. Any given message is represented by a unique 'Message Id', which in turn loads a message resource that can contain an entire series of control elements for formatting dialogs. A sample message resource for looking at the curtains in the starting room is as follows:&lt;br /&gt;&lt;br /&gt;[title25][sentence].Wincing at the "Drapes Of Wrath", you swear&lt;br /&gt;to use them to light the fire when&lt;br /&gt;you burn your ex-decorator at the stake&lt;br /&gt;&lt;br /&gt;I'm dreading how complicated the actual script interpreter is going to be. :P&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-4212488419785344056?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/4212488419785344056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=4212488419785344056' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4212488419785344056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/4212488419785344056'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2009/12/working-on-rex-nebular.html' title='Working on Rex Nebular'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-7982975302815826665</id><published>2009-10-31T20:01:00.012+11:00</published><updated>2009-10-31T20:41:57.371+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><title type='text'>New SourceForge project - Scummvm-misc</title><content type='html'>It's been a busy month. As those of you who follow the mailing list will be aware, I finished work on an engine module called Gargoyle over a month ago, that allows the playing of Infocom z-code text adventure games. Unfortunately, the consensus was that it really didn't fit in with the ScummVM theme of point and click adventure games. So I created a new project on SourceForge named Scummvm-misc to host the project. But I'd been so busy that I've only now had time to create a proper homepage for the project.&lt;br /&gt;&lt;br /&gt;See &lt;a href="http://scummvm-misc.sf.net/"&gt;Scummvm-misc&lt;/a&gt; for the project's new website. Rather than just create a project specifically for Gargoyle, I decided to keep the project name generic.. Gargoyle isn't the first non-point 'n click adventure engine, and there may be more in the future. ScummVM provides such a solid base for creating games that can run on multiple systems, I figured it would be good to keep track of other such engines. &lt;br /&gt;&lt;br /&gt;The index page I've created also lists all the other publicly known ScummVM engines that are either in development or for which work has stalled. Anybody in the future who'd like to start work on any new engine, and wants the source to be publically available, is welcome to share SVN space on the project.&lt;br /&gt;&lt;br /&gt;Finally, two screenshots from the later Infocom games, that used a combination of graphics and text:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_I8Kh-PtgCgY/SuwBMnFFQhI/AAAAAAAAAAM/i6xQs_ZSqVA/s1600-h/gargoyle_journey.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 217px; height: 145px;" src="http://2.bp.blogspot.com/_I8Kh-PtgCgY/SuwBMnFFQhI/AAAAAAAAAAM/i6xQs_ZSqVA/s320/gargoyle_journey.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5398691369470738962" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_I8Kh-PtgCgY/SuwBfY0I5AI/AAAAAAAAAAU/7wBHtSjdAYw/s1600-h/gargoyle_shogun.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 217px; height: 145px;" src="http://4.bp.blogspot.com/_I8Kh-PtgCgY/SuwBfY0I5AI/AAAAAAAAAAU/7wBHtSjdAYw/s320/gargoyle_shogun.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5398691692059091970" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-7982975302815826665?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/7982975302815826665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=7982975302815826665' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/7982975302815826665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/7982975302815826665'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2009/10/new-sourceforge-project-scummvm-misc.html' title='New SourceForge project - Scummvm-misc'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_I8Kh-PtgCgY/SuwBMnFFQhI/AAAAAAAAAAM/i6xQs_ZSqVA/s72-c/gargoyle_journey.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-3290633296141261128</id><published>2009-07-08T11:11:00.010+10:00</published><updated>2009-07-08T12:06:01.039+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><title type='text'>Cruise for a Corpse Complete</title><content type='html'>After many months of work, the Cruise for a Corpse engine plays the PC version of the game all the way through without any bugs.. I was also able to figure out and implement music and sound effects as well, although currently only the PC Adlib player is supported. &lt;br /&gt;&lt;br /&gt;The Amiga and Atari ST versions of the game will probably play all the way through, although music and sound effects handling will need to be implemented for them.. I'll leave it up someone else more familiar with those systems to take care of that sometime in the future.&lt;br /&gt;&lt;br /&gt;It's when you're diving into fixing and extending engine code like this, the old maxim 'The devil is in the details' comes to mind. Even the smallest mis-print or mistake in the code can cause errors that are hard to track down. It's actually kind of a relief that, as far as I know, it's all over and done with now.&lt;br /&gt;&lt;br /&gt;Anyway, I plan to spend the rest of my vacation time (I'm on holiday until the 22nd) getting in some R&amp;R, and some more generic mucking around on ScummVM - this will probably include some time spent working on the MADS disassembly, so people can look forward to further work on Rex Nebular in the near future. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-3290633296141261128?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/3290633296141261128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=3290633296141261128' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/3290633296141261128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/3290633296141261128'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2009/07/cruise-for-corpse-complete.html' title='Cruise for a Corpse Complete'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-8909532812947019193</id><published>2009-05-22T14:10:00.003+10:00</published><updated>2009-05-22T14:21:07.777+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><title type='text'>Foray into Cruise for a Corpse</title><content type='html'>Hello everyone. It's been a while since my last blog posting.. I really should get into a better habit of posting updates more often.&lt;br /&gt;&lt;br /&gt;Having largely finished adding Discworld 2 support to the ScummVM Tinsel engine some months ago, rather than immediately returning to work on MADS, or some other project, I decided to take a detour and work on the existing 'Cruise' engine, which plays the game 'Cruise for a Corpse'. This was an existing incomplete engine in the ScummVM SVN, which had been languishing for a while without any significant progress being done.&lt;br /&gt;&lt;br /&gt;Having been working on it since late February, it's now in a somewhat cleaner and more stable state than it was previously. A lot of bugs have been fixed, and I've also done a lot of cleanup of the code as well, such as giving structure variables more proper names, fixing up variable types, etc.&lt;br /&gt;&lt;br /&gt;I'd originally hoped to have reached a milestone of having played the game all the way through to the end before I made this blog posting, but my debugging practices almost demand that I fix these bugs before carrying on with the game.. those remaining bugs tend to be annoying buggers.. I'm currently grappling with two really nasty ones:&lt;br /&gt;* I've got an animation of a moving handle in the engine room that is drawn incorrectly for only two of it's frames.. it could be a problem with the transparency mask for the image, but all fixes I've tried so far screw up the decoding/display of every other image in the game.&lt;br /&gt;* There's a bug in the path-finding code code that's particularly noticeable in the area below the top deck, in that you can walk through walls directly from one exit to another.&lt;br /&gt;&lt;br /&gt;I was really on a roll up until I discovered those bugs.. I had reached the 1:30pm segment (the game is divided into time segments that only advance once you've done certain actions) and had fixed several crashing bugs, and was hoping the end of the game was in sight. Now it will have to wait until I've fixed these bugs.&lt;br /&gt;&lt;br /&gt;I'm hoping to get Cruise to a nicely completable stage soon. The only other major remaining area in the game after that, apart from some minor ones like getting the game speed exactly the same as the original, will be the sound support. I was given a suggestion that I might be able to copy and paste the code from the previous version of the engine (cine), but whilst the formats seem similar, and I was able to get some sound playing in my experiments, the sounds played are incorrect. &lt;br /&gt;&lt;br /&gt;As I've always been on record as saying, music handling is my least favourite area to work in. I may try some further experiments to get it working, and if i still have trouble, I may simply drop it completely, and leave it to anyone else who might be interested in taking it up in the future. At least they'll have a more solid game base to add onto.&lt;br /&gt;&lt;br /&gt;On a final note, my holidays for this year were severely delayed, so I'm still looking forward to a month's holiday at some point. I anticipate some productive time spent happily disassembling and implementing games for ScummVM. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-8909532812947019193?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/8909532812947019193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=8909532812947019193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/8909532812947019193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/8909532812947019193'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2009/05/foray-into-cruise-for-corpse.html' title='Foray into Cruise for a Corpse'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-6492098518242082132</id><published>2008-12-14T15:40:00.002+11:00</published><updated>2008-12-14T15:44:50.404+11:00</updated><title type='text'>Discworld 1 Demo support added to SVN</title><content type='html'>Whilst it's nowhere near as spectacular as adding support for Discworld 2, the latest SVN code now supports the original Discworld 1 Demo.&lt;br /&gt;&lt;br /&gt;This demo is somewhat interesting in that it was built at an early stage during the development of the first game. As such, it used a more primitive version of the source code used in the final game. Luckily, it didn't prove too hard to cross-reference a disassembly of the demo executable and identify commonalities between it and the DW1 v1 source code, and from there work out what had changed.&lt;br /&gt;&lt;br /&gt;The demo version I used during development was downloaded from &lt;a href="http://www.adventure-treff.de/specials/dl_demos.php"&gt;Adventure-Treff&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There were actually two demos released for DW1 - this first one contained only the two 'rooms'.. the Fishmonger's and Alley, and the single objective of getting the belt buckle. Please note that this version does not have any sound.&lt;br /&gt;&lt;br /&gt;The second demo released apparently contained most of Act I, and featured full voices and SFX. If anyone knows where a copy of that version can be located, I'd be interested in making sure that that version also works with our Tinsel engine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-6492098518242082132?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/6492098518242082132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=6492098518242082132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6492098518242082132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6492098518242082132'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2008/12/discworld-1-demo-support-added-to-svn.html' title='Discworld 1 Demo support added to SVN'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-6531412954525287933</id><published>2008-12-02T14:27:00.004+11:00</published><updated>2008-12-02T15:43:13.835+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><title type='text'>Discworld 2 support added to SVN</title><content type='html'>Well, it's been a little over three months since my last posting, and now my current efforts are finally complete.. as of last night, Discworld 2 support has been committed into the ScummVM trunk.&lt;br /&gt;&lt;br /&gt;First things first - setup instructions will probably be added into the main README shortly, but for those of you who just can't wait to get it up and running need to do the following steps:&lt;br /&gt;copy the contents of both CDs into a folder on your hard disk, and rename the ENGLISH.* files on both CDs into ENGLISH1.* and ENGLISH2.* respectively. That goes for other foreign language versions the same, with whatever the language name being.&lt;br /&gt;&lt;br /&gt;Remember that Discworld 2 isn't officially supported by ScummVM yet. To play it, you'll need the latest daily build from at least 2/12/08, or build it yourself. We also don't have a Discworld category under the ScummVM Bug Tracker, so any issues would be best discussed in the IRC channel or on the forums.&lt;br /&gt;&lt;br /&gt;Special thanks go to DrMcCoy, who pitched in and implemented the changes to the sound/music handling for Discworld 2. Also to the rest of the team who participated in the Discworld 1 development, who provided the occasional code additions and testing during integration of the Discworld 2 code. &lt;br /&gt;&lt;br /&gt;In case anyone's been wondering about my progress on the M4 engine, well, my apologies, but wouldn't you know that barely a few days had passed after my last blog posting when we got the Discworld 2 source. So I never really had a chance to delve much further into the graphics system like I said I would. Never fret, though, it's still a long term goal to finish disassembling Rex Nebular and start adding support for it, although I'll probably put it on hiatus again if the team gets given the source code for any other game that needs implementing. As fun as reverse engineering is for me, it's nice to work on a project where you can see rapid results from your work.&lt;br /&gt;&lt;br /&gt;What's next for me? Now that the code's been publically released, I plan to move onto adding support for the Discworld 1 demo. I've already been spending some off time working on a disassembly of the executable, cross-referencing methods against the Discworld 1 source, and it shouldn't be long before I can start adding demo-specific code to the Tinsel engine.&lt;br /&gt;&lt;br /&gt;Oh, and of course, I've still got copies of LittleBigPlanet and Fallout 3 on the shelf waiting to be played. They've been calling out to me in the middle of the night, saying 'Play me, play me', but I've been firm.. I wasn't going to play them until Discworld 2 was finished. Now that it has, I expect to spend some quality time this Christmas traversing the wasteland, and blowing the crap out of stuff. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-6531412954525287933?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/6531412954525287933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=6531412954525287933' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6531412954525287933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6531412954525287933'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2008/12/discworld-2-support-added-to-svn.html' title='Discworld 2 support added to SVN'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-2501221522158971516</id><published>2008-07-23T19:47:00.003+10:00</published><updated>2008-07-23T19:53:01.019+10:00</updated><title type='text'></title><content type='html'>Well, it's been a little under two months, and now the Tinsel engine has been released to an eagerly awaiting public. I just hope people don't get too distracted playing it that they forego testing the other games for the 0.12 release. :) Currently Discworld 1 is supported, but not the demo. Kudos to everyone else involved in bringing the conversion to ScummVM to fruition so quickly.&lt;br /&gt;&lt;br /&gt;On a more technical note, those of you who are proficient with using the debugging console may wish to experiment with the console in this game.. there are several commands, such as "scene", which allows you to jump to any particular scene number. Another nice one is the "sound" command.. I particularly like "sound 5931". :)&lt;br /&gt;&lt;br /&gt;Given the amount of time spent on the Tinsel engine, I haven't had much time to work on the disassembly of Rex Nebular. So there hasn't been much to talk about on my blog. But now I'm back into it again. When last I left, I was starting to plunge into the depths of the dialog display code. This actually proved a useful starting point because:&lt;br /&gt;&lt;br /&gt;1) The difficulty dialog is the first thing displayed by the game as it starts, which makes it easy and quick to trace to when running the game in the debugger.&lt;br /&gt;&lt;br /&gt;2) We already more or less know both the screen and sprite format used by the engine, which makes it easier to understand and decode the related routines.&lt;br /&gt;&lt;br /&gt;3) It also uses font display, which again, allows me to quickly identify the appropriate routines.&lt;br /&gt;&lt;br /&gt;4) It allows me a starting point for identifying various other routines, such as mouse/cursor handling, event loops, and graphics routines.&lt;br /&gt;&lt;br /&gt;As you can see, the dialog code provides a useful starting point for understanding core functionality used by the game. By identifying these routines, it will make it easier later on to understand other game routines that make use of them. The only problem is that the dialog display code seems to be unreasonably complicated - it seems they tried to used the same code to potentially handle various dialog text, such as headers, control options, and savegame names.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-2501221522158971516?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/2501221522158971516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=2501221522158971516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/2501221522158971516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/2501221522158971516'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2008/07/well-its-been-little-under-two-months.html' title=''/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-6892484950214359548</id><published>2008-05-23T19:40:00.003+10:00</published><updated>2008-05-23T19:46:34.947+10:00</updated><title type='text'></title><content type='html'>It's a real pleasure to be able to be able to return to proper disassembly work after the interval I had to spend writing the delinker tool. Subjectively, I know that writing the tool was a necessary step that would save me issues in the long run, but it was still annoying to have to write and then spend all the time fiddling with it to get it work, particularly since I'd never really bothered to look at the structure of executables, and was learning from scratch.&lt;br /&gt;&lt;br /&gt;Getting stuck into Rex Nebular, I've started debugging it using the DOSBOX debugger. I was a bit unsure about using it at first, but it's turned out to be an excellent tool. Back when I was disassembling Lure of the Temptress, I made do with DEBUG, which wasn't bad, but obviously had issues with trying to debug graphics programs.. I'd actually had to hack the game executable to stop it setting graphics mode so that I could use DEBUG to trace through all the startup code. Now with DOSBOX, I can trace anywhere in the program, since the debugger itself is in a separate window, which is wonderful.&lt;br /&gt;&lt;br /&gt;About the only real annoyance remaining is the RTLink library itself. Although I do have a full disassembly based on a processed executable, I still need to do my debugging on the original executable (if the game worked without the extra space it provides, they wouldn't have needed it in the first place). The issue is that due to the way RTLink works, a call through a proxy stub can actually unload the calling code, which then gets reloaded when the called function exits.. but not necessarily in the same place.&lt;br /&gt;&lt;br /&gt;Which means that you might try stepping over a function call, and suddenly the entire game sequence will play out, because the location returned to after the function call may now be at another segment address. Confused me at first, until I happened to trace out of a method and realised what was happening. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-6892484950214359548?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/6892484950214359548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=6892484950214359548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6892484950214359548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/6892484950214359548'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2008/05/its-real-pleasure-to-be-able-to-be-able.html' title=''/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6007794715807265125.post-8974884485821942106</id><published>2008-05-14T18:47:00.004+10:00</published><updated>2008-05-14T20:32:18.565+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ScummVM'/><category scheme='http://www.blogger.com/atom/ns#' term='disassembly'/><category scheme='http://www.blogger.com/atom/ns#' term='MADS'/><title type='text'>My first posting</title><content type='html'>Welcome, everyone, to my new blog. I figured that since blogs have been becoming popular in the &lt;a href="http://scummvm.org/"&gt;ScummVM&lt;/a&gt; community lately, I might as well start my own as well. My interests lie in disassembling and reverse engineering old adventure games, and then re-implementing them in ScummVM.&lt;br /&gt;&lt;br /&gt;For this inaugural blog post, I'd like to talk about one of my latest projects - working on the MADS/M4 engine. I'm concentrating mainly on the MADS side of the engine at the moment, which was the game engine used for the three games - &lt;a href="http://www.mobygames.com/game/dos/rex-nebular-and-the-cosmic-gender-bender"&gt;Rex Nebular&lt;/a&gt;, &lt;a href="http://www.mobygames.com/game/dos/dragonsphere"&gt;Dragonsphere&lt;/a&gt;, or &lt;a href="http://www.mobygames.com/game/dos/return-of-the-phantom"&gt;Return of the Phantom&lt;/a&gt;, what the current status is of the engine.&lt;br /&gt;&lt;br /&gt;I've been concentrating primarily on disassembling Rex Nebular - the game itself is split into a series of executables to save space:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;mainmenu.exe - Which contains the logic for the main menu&lt;/li&gt;&lt;li&gt;animview.exe - Which contains the logic for displaying cutscenes, like the intro and ending animations&lt;/li&gt;&lt;li&gt;textview.exe - Which contains the logic for displaying scrolling text, as in the credits and quotes.&lt;/li&gt;&lt;li&gt;nebular.exe - The actual game itself.&lt;/li&gt;&lt;/ul&gt;So far, I've spent time disassembling the various executables, excluding the game executable, which I'll get onto in a moment, and along with work done by MD5 and others, we've got the main menus showing for Rex Nebular and Dragonsphere, as well as the scrolling credits and partial support for the cut-scene animations.&lt;br /&gt;&lt;br /&gt;The next big step now was to start disassembling the main game executables to figure out all the in-game logic. This was when I'd hit a big stumbling block.. In order to properly understand a game, you have to be able to disassemble it in a dissassembler in it's entirety, so you can start identifying methods and variables, and gradually build up an understanding of how the game works. In the case of the actual game executable, though, all three games had been compiled with an overlay manager called RTLink/Plus, which was designed to save memory by swapping parts of the program code in and out of memory on the fly at runtime.&lt;br /&gt;&lt;br /&gt;This therefore made the game difficult to disassemble, because:&lt;br /&gt;1) The functions calls and jumps between code in different segments went via an intermediate table which was dynamically filled in at runtime&lt;br /&gt;2) The data segment was in the middle of the program - this posed a problem because programs typically have the data segment at the end of the program, to allow for uninitialised data areas - space for variables which don't have an explicit value set at startup, so don't need to be part of the executable image.&lt;br /&gt;&lt;br /&gt;As such, I was forced to write a program, which I've named rtlink_decode to handle these executables. I'm really quite proud of it - it takes in an executable, and presuming that it detects that is was compled with RTLink/Plus, creates a new executable with the following changes:&lt;br /&gt;1) It detects all the dynamic segments and adds in relocation entries to the executable so that all segment references within these segments are treated like normal code segments&lt;br /&gt;2) Processes the table used for inter-segment calls to fix them to go to the correct segment (what RTLink would have done dynamically at runtime wherever it loaded a segment)&lt;br /&gt;3) Shifts the data segment to the end of the executable, and adjusts any data segment references in the executable to point to the new position.&lt;br /&gt;&lt;br /&gt;The result is a new executable which was able to be fully disassembled by &lt;a href="http://www.hex-rays.com/idapro/idadownfreeware.htm"&gt;IDA Free&lt;/a&gt; - which I strongly recommend as a wonderful disassembler for anyone who's thinking about experimenting with reverse engineering.&lt;br /&gt;&lt;br /&gt;Now that I've got a clean complete disassembly to work with, I can start figuring out the game logic. This time, though, I won't be starting from scratch - there is shared code between the game executables and the menu, credits, and animation executables, so I've already been able to identify a lot of runtime library methods, as well as other MADS methods I'd previously   already figured out.&lt;br /&gt;&lt;br /&gt;Nevertheless, it's likely still going to be a while before there's enough disassembled that any major functionality can be implemented into ScummVM, so you'll need to be patient.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6007794715807265125-8974884485821942106?l=dm-notes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dm-notes.blogspot.com/feeds/8974884485821942106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6007794715807265125&amp;postID=8974884485821942106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/8974884485821942106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6007794715807265125/posts/default/8974884485821942106'/><link rel='alternate' type='text/html' href='http://dm-notes.blogspot.com/2008/05/my-first-posting.html' title='My first posting'/><author><name>Dreammaster</name><uri>http://www.blogger.com/profile/09618034545788778027</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
