<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Dr Sly's Technical Ramblings - DOS</title>
    <link>https://blog.f000.dev/</link>
    <description>a place for programming on the web...</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.3.5 - http://www.s9y.org/</generator>
    <pubDate>Fri, 17 Nov 2023 05:15:51 GMT</pubDate>

    <image>
    <url>https://blog.f000.dev/templates/2k11/img/s9y_banner_small.png</url>
    <title>RSS: Dr Sly's Technical Ramblings - DOS - a place for programming on the web...</title>
    <link>https://blog.f000.dev/</link>
    <width>100</width>
    <height>21</height>
</image>

<item>
    <title>A quick look into the DOS exe header and relocation table</title>
    <link>https://blog.f000.dev/index.php?/archives/35-A-quick-look-into-the-DOS-exe-header-and-relocation-table.html</link>
            <category>DOS</category>
            <category>Reverse Engineering</category>
    
    <comments>https://blog.f000.dev/index.php?/archives/35-A-quick-look-into-the-DOS-exe-header-and-relocation-table.html#comments</comments>
    <wfw:comment>https://blog.f000.dev/wfwcomment.php?cid=35</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.f000.dev/rss.php?version=2.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    

    <author>nospam@example.com (Sylvester Rac)</author>
    <content:encoded>
    &lt;p&gt;Continuing from where we left off, let&#039;s examine USNF.EXE in a hex editor, to get a better understanding of the file structure. The &lt;strong&gt;file&lt;/strong&gt; command identifies the executable as&amp;#160;MS-DOS executable. Loading into a hex editor:&lt;/p&gt;

&lt;p&gt;&lt;!-- s9ymdb:31 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; src=&quot;https://blog.f000.dev/uploads/usnf_hexdump_01.png&quot; style=&quot;width:884px&quot; /&gt;&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://blog.f000.dev/index.php?/archives/35-A-quick-look-into-the-DOS-exe-header-and-relocation-table.html#extended&quot;&gt;Continue reading &quot;A quick look into the DOS exe header and relocation table&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 12 Nov 2023 08:51:00 +0000</pubDate>
    <guid isPermaLink="false">https://blog.f000.dev/index.php?/archives/35-guid.html</guid>
    
</item>
<item>
    <title>Reverse Engineering with DOSBox debug build</title>
    <link>https://blog.f000.dev/index.php?/archives/33-Reverse-Engineering-with-DOSBox-debug-build.html</link>
            <category>DOS</category>
            <category>Emulation</category>
            <category>Reverse Engineering</category>
    
    <comments>https://blog.f000.dev/index.php?/archives/33-Reverse-Engineering-with-DOSBox-debug-build.html#comments</comments>
    <wfw:comment>https://blog.f000.dev/wfwcomment.php?cid=33</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.f000.dev/rss.php?version=2.0&amp;type=comments&amp;cid=33</wfw:commentRss>
    

    <author>nospam@example.com (Sylvester Rac)</author>
    <content:encoded>
    &lt;p&gt;DosBox comes with it&#039;s own built-in debugger, which can be useful when reversing&amp;#160;old DOS games.&lt;/p&gt;

&lt;p&gt;This feature needs to be&amp;#160;enabled at build time (--enable-debug or --enable-debug=heavy), so either download the special binary or build it from source.&amp;#160;I went through the build process in a previous post:&amp;#160;&lt;a href=&quot;https://blog.aupcgroup.com/index.php?/archives/32-Hacking-a-DOS-32-bit-protected-mode-game-from-1997.html&quot;&gt;https://blog.aupcgroup.com/index.php?/archives/32-Hacking-a-DOS-32-bit-protected-mode-game-from-1997.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This gives a nice view with registers, dissassembly and&amp;#160;memory views:&lt;/p&gt;

&lt;p&gt;&lt;!-- s9ymdb:28 --&gt;&lt;img alt=&quot;&quot; class=&quot;serendipity_image_center&quot; src=&quot;https://blog.f000.dev/uploads/dosbox_debugmode.png&quot; style=&quot;width:703px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This VOGONS thread has a&amp;#160;quick summary on the DosBox built-in debugger:&amp;#160;&lt;a href=&quot;https://www.vogons.org/viewtopic.php?t=3944&quot;&gt;https://www.vogons.org/viewtopic.php?t=3944&lt;/a&gt;&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://blog.f000.dev/index.php?/archives/33-Reverse-Engineering-with-DOSBox-debug-build.html#extended&quot;&gt;Continue reading &quot;Reverse Engineering with DOSBox debug build&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 04 Nov 2023 23:43:00 +0000</pubDate>
    <guid isPermaLink="false">https://blog.f000.dev/index.php?/archives/33-guid.html</guid>
    
</item>
<item>
    <title>Hacking a DOS 32 bit protected mode game from 1997</title>
    <link>https://blog.f000.dev/index.php?/archives/32-Hacking-a-DOS-32-bit-protected-mode-game-from-1997.html</link>
            <category>DOS</category>
            <category>Game Hacking</category>
            <category>Reverse Engineering</category>
    
    <comments>https://blog.f000.dev/index.php?/archives/32-Hacking-a-DOS-32-bit-protected-mode-game-from-1997.html#comments</comments>
    <wfw:comment>https://blog.f000.dev/wfwcomment.php?cid=32</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>https://blog.f000.dev/rss.php?version=2.0&amp;type=comments&amp;cid=32</wfw:commentRss>
    

    <author>nospam@example.com (Sylvester Rac)</author>
    <content:encoded>
    &lt;p&gt;It&#039;s been a long time since I&#039;ve looked at X86 assembly, and I thought it might be fun to reverse engineer a game I enjoyed playing when I was much younger - US Navy Fighters.&lt;/p&gt;

&lt;h2&gt;Hacking tools&lt;/h2&gt;

&lt;p&gt;IDA (Interactive Dissassembler) - download&amp;#160;IDA 8.3 from&amp;#160;&lt;a href=&quot;https://hex-rays.com/ida-free/&quot;&gt;https://hex-rays.com/ida-free/&lt;/a&gt;&amp;#160;(free for personal use). I&#039;m using the linux version. To install chmod +xx the installer and accept the license agreement. Choose the install location, I chose&amp;#160;&lt;strong&gt;idafree-8.3&lt;/strong&gt; in my home folder.&lt;/p&gt;

&lt;pre&gt;
chmod +x idafree83_linux.run
./idafree-8.3/ida64&lt;/pre&gt;

&lt;p&gt;Debugger - USNF is a DOS game and won&#039;t run on linux natively, however it runs perfectly fine through DOS-Box. The good news is DOS-Box is available as a special debug build, with an integrated debugger. This allows us to set breakpoints, peek at memory locations, etc, and should very helpful in analysing the game. To get the debug build we&#039;ll need to build DOS-Box from source. Download the source code from &lt;a href=&quot;https://www.dosbox.com/download.php?main=1&quot;&gt;https://www.dosbox.com&lt;/a&gt;. There is some information on the build process on &lt;a href=&quot;https://www.vogons.org/viewtopic.php?t=3944&quot;&gt;VOGONS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Download the file: &lt;strong&gt;dosbox-0.74-3.tar.gz&lt;/strong&gt;, and run the build. Install &lt;strong&gt;autotools&lt;/strong&gt; if it&#039;s missing. Also, note the &lt;strong&gt;SDL 1.2&lt;/strong&gt; and &lt;strong&gt;curses&lt;/strong&gt; dependencies:&lt;/p&gt;

&lt;pre&gt;
sudo apt install autoconf autotools-dev automake
sudo apt install libsdl1.2-dev libncurses-dev
tar xvf dosbox-0.74-3.tar.gz
cd dosbox-0.74-3/
./autogen.sh
./configure --enable-debug=heavy
make
sudo make install&lt;/pre&gt;

&lt;p&gt;By default, the binary is installed into /usr/local/bin. I renamed my binary to dosbox-debug to distinguish it from the standard version:&lt;/p&gt;

&lt;pre&gt;
sudo mv /usr/local/bin/dosbox /usr/local/bin/dosbox-debug&lt;/pre&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;https://blog.f000.dev/index.php?/archives/32-Hacking-a-DOS-32-bit-protected-mode-game-from-1997.html#extended&quot;&gt;Continue reading &quot;Hacking a DOS 32 bit protected mode game from 1997&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 03 Nov 2023 11:41:00 +0000</pubDate>
    <guid isPermaLink="false">https://blog.f000.dev/index.php?/archives/32-guid.html</guid>
    
</item>

</channel>
</rss>
