{"id":25,"date":"2008-06-27T10:45:01","date_gmt":"2008-06-27T08:45:01","guid":{"rendered":"https:\/\/blogs.scummvm.org\/buddha\/?p=25"},"modified":"2022-04-15T12:50:21","modified_gmt":"2022-04-15T10:50:21","slug":"got-into-reverse-engineering-mode","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/buddha\/2008\/06\/27\/got-into-reverse-engineering-mode\/","title":{"rendered":"Got into reverse engineering mode"},"content":{"rendered":"<p>Hi! Got the Operation Stealth versions\u2019 opcode comparison done after all (It took an awful lot of time with all the procrastination and indecision thrown in and it wasn\u2019t very inspiring work) and now I\u2019ve been mostly reverse engineering Operation Stealth\u2019s missing opcodes or fixing existing ones\u2019 implementations. Feels a lot better now :-). Reverse engineering is fun!<\/p>\n<p><a href=\"http:\/\/www.hex-rays.com\/idapro\/\">IDA<\/a>\u2018s <a href=\"http:\/\/www.hex-rays.com\/idapro\/freefiles\/ida5preview.htm\">graph view<\/a> has proven extremely useful. It helps a lot in understanding what a function does and how it does it by giving a flow chart view of the function. It wouldn\u2019t be easy to go back to using <a href=\"http:\/\/www.hex-rays.com\/idapro\/\">IDA<\/a> without it, I\u2019ll say! The graph view is one good reason for getting a license for IDA Pro as the <a href=\"http:\/\/www.hex-rays.com\/idapro\/idadownfreeware.htm\">freeware version 4.9 of IDA<\/a> doesn\u2019t have it.<\/p>\n<p><!--more--><\/p>\n<h3>Mid-term goals<\/h3>\n<p>Talked with <a href=\"http:\/\/wiki.scummvm.org\/index.php\/User:Sev\">Sev<\/a> and he urged me onwards as I was still fiddling with the opcode comparison on Monday evening. So we set a new goal for the <a href=\"http:\/\/code.google.com\/opensource\/gsoc\/2008\/faqs.html#0.1_timeline\">mid-term<\/a>: All unimplemented opcodes that are used in Operation Stealth\u2019s intro have to be implemented by mid-term (And fix an animation related regression). Here\u2019s the goal in parts:<\/p>\n<h4>Implement unimplemented opcodes used in intro:<\/h4>\n<ul>\n<li>40h: Undefined opcode (Was o1_closePart in Future Wars)<\/li>\n<li>A1h: o2_removeGfxElementA0<\/li>\n<li>A2h: o2_opA2<\/li>\n<li>A3h: o2_opA3<\/li>\n<\/ul>\n<p>And fix the animation regression in Operation Stealth\u2019s very first room (The actor just slides around unanimated).<\/p>\n<h3>Recent achievements<\/h3>\n<p>So here\u2019s what I\u2019ve got done recently:<\/p>\n<h4>Fixed already existing opcodes:<\/h4>\n<ul>\n<li>08h: o1_checkCollision in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/1339a55389efa97e484457a8963b69364a98452d\" target=\"_blank\" rel=\"noopener\">r32790<\/a><\/li>\n<li>83h: o2_isSeqRunning in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/971f27beb27cd853df7f20dbd21dc92e88b3f697\" target=\"_blank\" rel=\"noopener\">r32804<\/a><\/li>\n<li>9Ah: o2_wasZoneChecked in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/1339a55389efa97e484457a8963b69364a98452d\" target=\"_blank\" rel=\"noopener\">r32790<\/a><\/li>\n<li>A0h: o2_addGfxElementType20 (Renamed opcode) in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/f1cacafc466ac8689a286d1e712f0ada67e9a994\" target=\"_blank\" rel=\"noopener\">r32769<\/a><\/li>\n<\/ul>\n<h4>Implemented missing opcodes:<\/h4>\n<ul>\n<li>82h: o2_modifySeqListElement (Renamed opcode) in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/d5d09208b4a03eb55697d8831bf87ba8a43385ec\" target=\"_blank\" rel=\"noopener\">r32786<\/a><\/li>\n<li>8Dh: o2_op8D (No good name yet) in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/a2e6f35310b7f4fc4f4a1aa6ca3d5e7ab618b85d\" target=\"_blank\" rel=\"noopener\">r32785<\/a><\/li>\n<li>A1h: o2_removeGfxElementType20 (Renamed opcode) in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/f1cacafc466ac8689a286d1e712f0ada67e9a994\" target=\"_blank\" rel=\"noopener\">r32769<\/a><\/li>\n<li>A2h: o2_addGfxElementType21 (Renamed opcode) in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/f1cacafc466ac8689a286d1e712f0ada67e9a994\" target=\"_blank\" rel=\"noopener\">r32769<\/a><\/li>\n<li>A3h: o2_removeGfxElementType21 (Renamed opcode) in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/f1cacafc466ac8689a286d1e712f0ada67e9a994\" target=\"_blank\" rel=\"noopener\">r32769<\/a><\/li>\n<\/ul>\n<h4>Added Operation Stealth support for:<\/h4>\n<ul>\n<li>zoneQuery in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/1339a55389efa97e484457a8963b69364a98452d\" target=\"_blank\" rel=\"noopener\">r32790<\/a> (Only used in Operation Stealth)<\/li>\n<li>addOverlay in <a href=\"https:\/\/github.com\/scummvm\/scummvm\/commit\/8cd03780f68a8558fd6b816629b0c2e3c9517a41\" target=\"_blank\" rel=\"noopener\">r32816<\/a> (Was previously Future Wars specific)<\/li>\n<\/ul>\n<h3>What\u2019s still left of the mid-term goals:<\/h3>\n<p>As the opcode 40h turned out to be a no-operation in Operation Stealth\u2019s PC version (It was o1_closePart in Future Wars) it only leaves me an actor animation regression to fix (Previously actor animation worked in the very first room in Operation Stealth, but now it bugs, the actor isn\u2019t animated, he just slides around like on wheels). So that\u2019s to go and then I\u2019ve got my mid-term goals done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi! Got the Operation Stealth versions\u2019 opcode comparison done after all (It took an awful lot of time with all the procrastination and indecision thrown in and it wasn\u2019t very inspiring work) and now I\u2019ve been mostly reverse engineering Operation Stealth\u2019s missing opcodes or fixing existing ones\u2019 implementations. Feels a lot better now :-). Reverse [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":3,"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":122,"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/posts\/25\/revisions\/122"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/buddha\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}