{"id":46,"date":"2010-07-31T18:25:17","date_gmt":"2010-07-31T18:25:17","guid":{"rendered":"https:\/\/blogs.scummvm.org\/pidgeot\/?p=46"},"modified":"2022-05-21T11:50:12","modified_gmt":"2022-05-21T11:50:12","slug":"kyra-disassembled","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/pidgeot\/2010\/07\/31\/kyra-disassembled\/","title":{"rendered":"Kyra disassembled!"},"content":{"rendered":"<p>It&#8217;s a day later than I&#8217;d estimated, but last night, I finished the Kyra disassembler, including function detection.<\/p>\n<p>For now, I&#8217;m only handling one game &#8211; Hand of Fate &#8211; but it would be pretty simple to add the other Kyra games as well, as the only things different between them are the &#8220;magic&#8221; functions, and they&#8217;re all referred to by a parameter to a specific opcode. However, there&#8217;s not much point in doing that right now; it won&#8217;t help me to decompile the bytecode.<\/p>\n<p>Here&#8217;s an excerpt from the disassembly of a small script:<\/p>\n<pre>00000016: jumpTo 0x0 (0)\r\n00000018: push 6 (1)\r\n0000001a: push 3 (1)\r\n0000001c: setCharacterPos (0)\r\n0000001e: addSP 2 (-2)\r\n00000020: push 6 (1)\r\n00000022: push 2 (1)\r\n00000024: setCharacterPos (0)\r\n00000026: addSP 2 (-2)\r\n<\/pre>\n<p>The next step is to get the code flow analysis working with KYRA, and then it&#8217;s on to the code generation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s a day later than I&#8217;d estimated, but last night, I finished the Kyra disassembler, including function detection. For now, I&#8217;m only handling one game &#8211; Hand of Fate &#8211; but it would be pretty simple to add the other Kyra games as well, as the only things different between them are the &#8220;magic&#8221; functions, [&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-46","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":47,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/posts\/46\/revisions\/47"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/pidgeot\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}