<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gothi &#187; Programming</title>
	<atom:link href="http://www.gothi.co.uk/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gothi.co.uk</link>
	<description>A badly chosen byte</description>
	<lastBuildDate>Sun, 25 Jul 2010 00:39:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Xbox save resigning &#8211; a technical overview</title>
		<link>http://www.gothi.co.uk/2010/06/xbox-save-resigning-a-technical-overview/</link>
		<comments>http://www.gothi.co.uk/2010/06/xbox-save-resigning-a-technical-overview/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 17:52:10 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[Xbox]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=231</guid>
		<description><![CDATA[This article covers the saves signing process used by the original Xbox.  Only the standard signing process is discussed, the &#8220;noroam&#8221; signatures are not covered.  All code is based on my own work or derivative work of others.  The language used in examples is Delphi and assumes a familiarity with programming concepts such as the [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article covers the saves signing process used by the original Xbox.  Only the standard signing process is discussed, the &#8220;noroam&#8221; signatures are not covered.  All code is based on my own work or derivative work of others.  The language used in examples is Delphi and assumes a familiarity with programming concepts such as the use of records or structures for reading in data.</em></p>
<p>The reason I&#8217;ve never previously discussed the Xbox save signing procedure in public is concern that by doing so would negatively impact Xbox Live.  Now that the original Xbox and it&#8217;s games are unable to access the Xbox Live service the following information is relatively harmless.</p>
<h3>A brief history</h3>
<p>The original Xbox used digital signatures to validate not only executables it was loading but save data, with this it was impossible to change or tamper with a save without updating the file&#8217;s digital signature using the correct key.  This key was generated using data contained within the default.xbe and a key used by the Xbox Operating System.  The save data was then run through a <a title="SHA1 HMAC" href="http://en.wikipedia.org/wiki/HMAC" target="_blank">SHA1 HMAC</a> routine and the 20 byte result appended to the save data to confirm integrity.  This result, or digest, was usually found at the beginning or the end of a file although it can potentially be located anywhere in the file if the developer was feeling adventurous.</p>
<h3>Obtaining the XBE key</h3>
<p>Each Xbox game has a default.xbe file, this is the executable that is loaded whenever you start a game. It contains various information including the title ID, age rating, game region and the all important signature key.  Don&#8217;t get confused, this is not the key used to sign the saves but is an essential piece in the process.<br />
The first step is to obtain the key directly from the XBE. This is stored in a certificate area of the file, the address of which is located in the XBE header.  Before we can retrieve the key we need to define the structure of the XBE Header and the Certificate data we will be retrieving:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code6'); return false;">View Code</a> DELPHI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2316"><td class="code" id="p231code6"><pre class="delphi" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// XBE sections</span>
<span style="color: #000000; font-weight: bold;">unit</span> xbestruct<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">interface</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
ByteArray <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">array</span><span style="color: #000066;">&#91;</span><span style="color: #0000ff;">0</span><span style="color: #000066;">..</span>15<span style="color: #000066;">&#93;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000066; font-weight: bold;">byte</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
TxbeHeader <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">record</span>
	m_magic <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                    <span style="color: #808080; font-style: italic;">// magic number [should be &quot;XBEH&quot;]</span>
	m_digsig <span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">array</span><span style="color: #000066;">&#91;</span><span style="color: #0000ff;">0</span><span style="color: #000066;">..</span>255<span style="color: #000066;">&#93;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000066; font-weight: bold;">char</span><span style="color: #000066;">;</span>      <span style="color: #808080; font-style: italic;">// digital signature</span>
	m_base<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                      <span style="color: #808080; font-style: italic;">// base address</span>
	m_sizeof_headers <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>           <span style="color: #808080; font-style: italic;">// size of headers</span>
	m_sizeof_image <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>             <span style="color: #808080; font-style: italic;">// size of image</span>
	m_sizeof_image_header <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>      <span style="color: #808080; font-style: italic;">// size of image header</span>
	m_timedate <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                 <span style="color: #808080; font-style: italic;">// timedate stamp</span>
	m_certificate_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>         <span style="color: #808080; font-style: italic;">// certificate address</span>
	m_sections <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                 <span style="color: #808080; font-style: italic;">// number of sections</span>
	m_section_headers_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>     <span style="color: #808080; font-style: italic;">// section headers address</span>
	m_init_flags <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>
	m_entry <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                         <span style="color: #808080; font-style: italic;">// entry point address</span>
	m_tls_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                       <span style="color: #808080; font-style: italic;">// thread local storage directory address</span>
	m_pe_stack_commit  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                <span style="color: #808080; font-style: italic;">// size of stack commit</span>
	m_pe_heap_reserve <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>               <span style="color: #808080; font-style: italic;">// size of heap reserve</span>
	m_pe_heap_commit  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                 <span style="color: #808080; font-style: italic;">// size of heap commit</span>
	m_pe_base_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                   <span style="color: #808080; font-style: italic;">// original base address</span>
	m_pe_sizeof_image <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>               <span style="color: #808080; font-style: italic;">// size of original image</span>
	m_pe_checksum <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                <span style="color: #808080; font-style: italic;">// original checksum</span>
	m_pe_timedate <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                   <span style="color: #808080; font-style: italic;">// original timedate stamp</span>
	m_debug_pathname_addr  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>            <span style="color: #808080; font-style: italic;">// debug pathname address</span>
	m_debug_filename_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>           <span style="color: #808080; font-style: italic;">// debug filename address</span>
	m_debug_unicode_filename_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>   <span style="color: #808080; font-style: italic;">// debug unicode filename address</span>
	m_kernel_image_thunk_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>        <span style="color: #808080; font-style: italic;">// kernel image thunk address</span>
	m_nonkernel_import_dir_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>      <span style="color: #808080; font-style: italic;">// non kernel import directory address</span>
	m_library_versions <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>               <span style="color: #808080; font-style: italic;">// number of library versions</span>
	m_library_versions_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>          <span style="color: #808080; font-style: italic;">// library versions address</span>
	m_kernel_library_version_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>    <span style="color: #808080; font-style: italic;">// kernel library version address</span>
	m_xapi_library_version_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>      <span style="color: #808080; font-style: italic;">// xapi library version address</span>
	m_logo_bitmap_addr <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>               <span style="color: #808080; font-style: italic;">// logo bitmap address</span>
	m_logo_bitmap_size <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>               <span style="color: #808080; font-style: italic;">// logo bitmap size</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
pTXbeHeader <span style="color: #000066;">=</span> <span style="color: #000066;">^</span>TXbeHeader<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">type</span>
TxbeCertificate  <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">record</span>
	m_size <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                          <span style="color: #808080; font-style: italic;">// size of certificate</span>
	m_timedate <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                     <span style="color: #808080; font-style: italic;">// timedate stamp</span>
	m_titleid <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                       <span style="color: #808080; font-style: italic;">// title id</span>
	m_title_name <span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">array</span><span style="color: #000066;">&#91;</span><span style="color: #0000ff;">0</span><span style="color: #000066;">..</span>63<span style="color: #000066;">&#93;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000066; font-weight: bold;">widechar</span><span style="color: #000066;">;</span>                <span style="color: #808080; font-style: italic;">// title name (unicode)</span>
	m_alt_title_id <span style="color: #000066;">:</span> byteArray<span style="color: #000066;">;</span>            <span style="color: #808080; font-style: italic;">// alternate title ids</span>
	m_allowed_media  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                 <span style="color: #808080; font-style: italic;">// allowed media types</span>
	m_game_region  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>               <span style="color: #808080; font-style: italic;">// game region</span>
	m_game_ratings  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                  <span style="color: #808080; font-style: italic;">// game ratings</span>
	m_disk_number <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                   <span style="color: #808080; font-style: italic;">// disk number</span>
	m_version <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">cardinal</span><span style="color: #000066;">;</span>                       <span style="color: #808080; font-style: italic;">// version</span>
	m_lan_key <span style="color: #000066;">:</span> byteArray<span style="color: #000066;">;</span>                 <span style="color: #808080; font-style: italic;">// lan key</span>
	m_sig_key <span style="color: #000066;">:</span> byteArray<span style="color: #000066;">;</span>                  <span style="color: #808080; font-style: italic;">// signature key</span>
	m_title_alt_sig_key <span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">array</span><span style="color: #000066;">&#91;</span><span style="color: #0000ff;">0</span><span style="color: #000066;">..</span>15<span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">..</span>15<span style="color: #000066;">&#93;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000066; font-weight: bold;">byte</span><span style="color: #000066;">;</span>     <span style="color: #808080; font-style: italic;">// alternate signature keys</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
pTxbeCertificate <span style="color: #000066;">=</span> <span style="color: #000066;">^</span> TxbeCertificate<span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">implementation</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">.</span></pre></td></tr></table></div>

<p>The TxbeHeader record contains a lot of data but the two most important sections are <em>m_certificate_addr</em>, and <em>m_base</em>.  These two values give us the address of the certificate.</p>
<p>The following code retrieves the key from an XBE file:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code7'); return false;">View Code</a> DELPHI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2317"><td class="code" id="p231code7"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span>
    MS <span style="color: #000066;">:</span> TMemoryStream<span style="color: #000066;">;</span>
    xbeHeader <span style="color: #000066;">:</span> pTxbeHeader<span style="color: #000066;">;</span>
    xbeCert <span style="color: #000066;">:</span> pTxbeCertificate<span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
&nbsp;
    MS <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TmemoryStream<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
    MS<span style="color: #000066;">.</span><span style="color: #006600;">LoadFromFile</span><span style="color: #000066;">&#40;</span>FileName<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
    <span style="color: #000066;">new</span><span style="color: #000066;">&#40;</span>xbeHeader<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
    <span style="color: #000066;">new</span><span style="color: #000066;">&#40;</span>xbeCert<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
    <span style="color: #808080; font-style: italic;">//Read in header and certificate</span>
    MS<span style="color: #000066;">.</span><span style="color: #000066;">Read</span><span style="color: #000066;">&#40;</span>xbeHeader<span style="color: #000066;">^</span><span style="color: #000066;">,</span> <span style="color: #000066;">sizeof</span><span style="color: #000066;">&#40;</span>xbeHeader<span style="color: #000066;">^</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
    MS<span style="color: #000066;">.</span><span style="color: #006600;">Position</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> xbeHeader<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">m_certificate_addr</span> <span style="color: #000066;">-</span> xbeHeader<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">m_base</span><span style="color: #000066;">;</span>
    MS<span style="color: #000066;">.</span><span style="color: #000066;">Read</span><span style="color: #000066;">&#40;</span>xbeCert<span style="color: #000066;">^</span><span style="color: #000066;">,</span> <span style="color: #000066;">sizeof</span><span style="color: #000066;">&#40;</span>xbeCert<span style="color: #000066;">^</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></td></tr></table></div>

<p>We can now access the sig_key directly</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code8'); return false;">View Code</a> DELPHI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2318"><td class="code" id="p231code8"><pre class="delphi" style="font-family:monospace;">xbeCert<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">m_sig_key</span></pre></td></tr></table></div>

<h3>Generating the signing key</h3>
<p>The key we retrieved from the XBE is not used to directly sign save data, instead it is used in a SHA1 HMAC with the Xbox key to produce the actual key we need. Thankfully we don&#8217;t need to determine the Xbox key every time we need to sign or verify a save as it is a constant.</p>
<p>The following is a <strong>textual </strong>representation of this key, to use it you must first convert it to a 16 byte array:</p>
<p><strong>5C0733AE0401F7E8BA7993FDCD2F1FE0</strong></p>
<p>Once you have this key in a byte array simply run both the XBE key and the Xbox key through a SHA1 HMAC (referring to the documentation for your SHA1 HMAC function as to whether you need to pass data or memory addresses to the function). The output should be a 160bit digest truncated to 16 bytes (the last 4 bytes are not required and should not be used or present).</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code9'); return false;">View Code</a> DELPHI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2319"><td class="code" id="p231code9"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span>
    digest <span style="color: #000066;">:</span> T160BitDigest<span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
    digest <span style="color: #000066;">:</span><span style="color: #000066;">=</span> CalcHMAC_SHA1<span style="color: #000066;">&#40;</span><span style="color: #000066;">addr</span><span style="color: #000066;">&#40;</span>xboxKey<span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">16</span><span style="color: #000066;">,</span> xbeCert<span style="color: #000066;">^</span><span style="color: #000066;">.</span><span style="color: #006600;">m_sig_key</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">16</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></td></tr></table></div>

<h3>Determining the data to process</h3>
<p>As noted before the digital signature is usually found before or after the actual save data.  It is entirely possible to store this signature at any location in the file and treat this location as all 0&#8242;s during the HMAC process.  Since we cannot rely on all developers using the same location for the signature we must determine the location ourselves.</p>
<p>The fastest and easiest way to do this is to start a new game and make a save at the earliest opportunity.  If the game saves any options you change this is ideal, otherwise start playing and save as soon as you can.  Copy this save to you PC and label is SAVE A.</p>
<p>Load the game again and create another save with as small a difference as you can but ensuring something is different.  As before, if the game saves option changes you should change only a single item and re-save. Copy this save to your PC and label it SAVE B.</p>
<p>Open both saves in a hex editor and visually compare the two, with little differences between them you should easily spot the 20 byte digital signature either at the start or the end of the file.  You can use an automatic file comparison if your editor supports it but in my experience I can find the sig faster by eye.  The signature in both files should be wildly different with the actual save data very consistent, aside from the minor differences you saved earlier.</p>
<p>Once you have found the sig location you should<strong> exclude</strong> this from the HMAC routines.  If the sig is at the end of the file you should HMAC all data <strong>up to</strong> the last 20 bytes, if it is at the beginning then all data <strong>after</strong> the first 20 bytes should be processed.  If the signature is located at another location in the file then you will need to experiment as to what data to HMAC.  A common trick when generating checksum&#8217;s is to treat the area containing the result of the checksum as all 0&#8242;s during the processing stage and write the result back to this location once complete.  Please note, it is rare to see this, most saves store their signature at the beginning or end of the file.</p>
<h3>Generating the signature</h3>
<p>Now you have the correct key and the data to process you can generate or check signatures for that particular games save files.  Similar to how the key was generated, the actual signature generation is a SHA1 HMAC of the save data (excluding the existing signature) with the key.</p>
<p>In the following example the save signature is located at the end of the file and the data is copied to a different memory stream for processing.  The previously generated key is stored in a 16 byte array named<em> sigKey</em></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p231code10'); return false;">View Code</a> DELPHI</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23110"><td class="code" id="p231code10"><pre class="delphi" style="font-family:monospace;">mem <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TMemoryStream<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
mem2 <span style="color: #000066;">:</span><span style="color: #000066;">=</span> TMemoryStream<span style="color: #000066;">.</span><span style="color: #006600;">Create</span><span style="color: #000066;">;</span>
mem<span style="color: #000066;">.</span><span style="color: #006600;">LoadFromFile</span><span style="color: #000066;">&#40;</span>FileName<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
mem<span style="color: #000066;">.</span><span style="color: #006600;">Position</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">;</span>
mem2<span style="color: #000066;">.</span><span style="color: #006600;">CopyFrom</span><span style="color: #000066;">&#40;</span>mem<span style="color: #000066;">,</span> mem<span style="color: #000066;">.</span><span style="color: #006600;">Size</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">20</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
digest <span style="color: #000066;">:</span><span style="color: #000066;">=</span> CalcHMAC_SHA1<span style="color: #000066;">&#40;</span><span style="color: #000066;">addr</span><span style="color: #000066;">&#40;</span>sigKey<span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">16</span><span style="color: #000066;">,</span> mem2<span style="color: #000066;">.</span><span style="color: #006600;">memory</span><span style="color: #000066;">^</span><span style="color: #000066;">,</span> mem2<span style="color: #000066;">.</span><span style="color: #006600;">size</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></td></tr></table></div>

<p>Before making any changes to a save you should confirm that the signature you generate matches that already present on an unaltered save.</p>
<p>It&#8217;s worth bearing in mind that a lot of saves contain a checksum as well as a digital signature.  The most common being a CRC32 or a simple addition of bytes, you must recalculate this <strong>before</strong> the digital signature should you make any changes to the file.</p>
<h2>Conclusion</h2>
<p>The process of creating a digital signature for Xbox saves is fairly simple and can be summarized as</p>
<ul>
<li>SHA1 HMAC &#8220;XBE key&#8221; using &#8220;Xbox key&#8221;</li>
<li>Truncate resulting 160 bit digest to 16 bytes to create the &#8220;signature key&#8221;</li>
<li>SHA1 HMAC Save data using &#8221;signature key&#8221;</li>
<li>Compare resulting 160 bit digest to existing signature or write back to save file.</li>
</ul>
<p>If you use the information above to create anything or produce a unique save, drop me a line in the comments, sometimes the most interesting time in a games life is long after it was released..</p>
<!-- AdSense Now! V1.90 -->
<!-- Post[count: 2] -->
<div class="adsense adsense-leadout" style="text-align:center;margin: 12px;"><script type="text/javascript"><!--
google_ad_client = "pub-5905155743931046";
/* 468x15, created 10/04/10 */
google_ad_slot = "2193001556";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2010/06/xbox-save-resigning-a-technical-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing WP e-Commerce</title>
		<link>http://www.gothi.co.uk/2010/02/fixing-wp-e-commerce/</link>
		<comments>http://www.gothi.co.uk/2010/02/fixing-wp-e-commerce/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 16:48:23 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[e-Commerce]]></category>
		<category><![CDATA[Gold Cart]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=215</guid>
		<description><![CDATA[I&#8217;ve been implementing the WordPress e-Commerce plug-in on another site, it&#8217;s not a bad freebie but if you&#8217;re selling anything more than a handful of items then you&#8217;ll need to let your users search your products.  To add this functionality, along with a few other features, you need to purchase the $50 Gold Cart add-in. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been implementing the WordPress e-Commerce plug-in on another site, it&#8217;s not a bad freebie but if you&#8217;re selling anything more than a handful of items then you&#8217;ll need to let your users search your products.  To add this functionality, along with a few other features, you need to purchase the $50 Gold Cart add-in.</p>
<p>I duly purchased and installed the update only to find that the &#8220;search&#8221; only looked at product titles, meaning that all the description text, additional description text and meta tags were being ignored.   Looking around it appears I wasn&#8217;t the only person who needed this functionality and I was able to get hold of some code to change in gold_shopping_cart.php.  I still didn&#8217;t get the results I was expecting so after checking out the Database table structure I went from</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p215code17'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21517"><td class="code" id="p215code17"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$category_list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_col<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT `id` FROM `&quot;</span><span style="color: #339933;">.</span>WPSC_TABLE_PRODUCT_CATEGORIES<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;` WHERE `name` LIKE '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_string_title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>to</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p215code18'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21518"><td class="code" id="p215code18"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$category_list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_col<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT id FROM `&quot;</span><span style="color: #339933;">.</span>WPSC_TABLE_PRODUCT_LIST<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;` WHERE name LIKE '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_string_title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' OR description LIKE '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_string_title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' OR additional_description LIKE '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$search_string_title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Notice the change in the table being searched.  The original code I found still looked in the WPSC_TABLE_PRODUCT_CATEGORIES table but this does not contain the additional_description field, an oversight on the original modders part.</p>
<p>Yet I still wasn&#8217;t getting the expected results.  A quick count of the $category_list array showed I was getting results but they were getting filtered out further on in the function by this little check:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p215code19'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21519"><td class="code" id="p215code19"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$category_list</span> <span style="color: #339933;">!=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$category_assoc_list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_col</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT DISTINCT `product_id` FROM `&quot;</span><span style="color: #339933;">.</span>WPSC_TABLE_ITEM_CATEGORY_ASSOC<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;` WHERE `category_id` IN ('&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;', '&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$category_list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;')&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$category_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;OR `&quot;</span><span style="color: #339933;">.</span>WPSC_TABLE_PRODUCT_LIST<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;`.`id` IN ('&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;', '&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$category_assoc_list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;')&quot;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Remember that I&#8217;m now searching products directly and the above code is looking to match the products unique ID against a category ID, clearly this will fail on 99% of searches.  A quick change to the search criteria is all that was needed to return valid results:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p215code20'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21520"><td class="code" id="p215code20"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$category_list</span> <span style="color: #339933;">!=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$category_assoc_list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_col</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT DISTINCT `product_id` FROM `&quot;</span><span style="color: #339933;">.</span>WPSC_TABLE_ITEM_CATEGORY_ASSOC<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;` WHERE `product_id` IN ('&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;', '&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$category_list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;')&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$category_sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;OR `&quot;</span><span style="color: #339933;">.</span>WPSC_TABLE_PRODUCT_LIST<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;`.`id` IN ('&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;', '&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$category_assoc_list</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;')&quot;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>With that completed I looked at adding a separate search interface and came across WP e-Commerce Search Widget, a handy bit of code but unfortunately it doesn&#8217;t appear to be compatible with the latest version of WP e-Commerce so I had to quickly update</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p215code21'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21521"><td class="code" id="p215code21"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>form method<span style="color: #339933;">=</span><span style="color: #0000ff;">'GET'</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">'product_search'</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;productsearchform&quot;</span> action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php bloginfo('home');  ?&gt;/&quot;</span><span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>to</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p215code22'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p21522"><td class="code" id="p215code22"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>form method<span style="color: #339933;">=</span><span style="color: #0000ff;">'GET'</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">'product_search'</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;productsearchform&quot;</span> action<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;?php bloginfo('home');  ?&gt;/products-page/&quot;</span><span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>WP e-Commerce is a lot of work, especially considering you have to pay $50 just to get basic functionality and then hack in the desired features.  Lets hope the checkout refresh bug doesn&#8217;t hit again&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2010/02/fixing-wp-e-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halo 3 Asset-O-Matic R.I.P?</title>
		<link>http://www.gothi.co.uk/2009/09/halo-3-asset-o-matic-r-i-p/</link>
		<comments>http://www.gothi.co.uk/2009/09/halo-3-asset-o-matic-r-i-p/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 21:36:03 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=187</guid>
		<description><![CDATA[As expected, the redesign of Bungie.net; has stopped the Halo 3 Asset-O-Matic from working. I&#8217;m not sure if I will be updating the app to support the new layout, I&#8217;ll have to see how inspired I am with the release of ODST&#8230;;)]]></description>
			<content:encoded><![CDATA[<p>As expected, the redesign of <a href="http://www.bungie.net" target="_blank">Bungie.net</a>; has stopped the Halo 3 Asset-O-Matic from working.</p>
<p>I&#8217;m not sure if I will be updating the app to support the new layout, I&#8217;ll have to see how inspired I am with the release of ODST&#8230;;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2009/09/halo-3-asset-o-matic-r-i-p/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halo 3 Asset-O-matic Beta 4</title>
		<link>http://www.gothi.co.uk/2009/05/halo-3-asset-o-matic-beta-4/</link>
		<comments>http://www.gothi.co.uk/2009/05/halo-3-asset-o-matic-beta-4/#comments</comments>
		<pubDate>Tue, 19 May 2009 21:24:21 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Halo 3]]></category>
		<category><![CDATA[Xbox360]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=156</guid>
		<description><![CDATA[Download Halo 3 Asset-O-Matic Beta 4 What happened to Beta 3 you may ask. Well Bungie made a few changes in between me completing Beta 3 and actually finding time to upload it. By that time it no longer worked. So, what you have in your metaphysical hands is Beta 4, it&#8217;s just like Beta [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gothi.co.uk/downloads/h3assetomaticbeta4.zip">Download Halo 3 Asset-O-Matic Beta 4</a></p>
<p>What happened to Beta 3 you may ask. Well Bungie made a few changes in between me completing Beta 3 and actually finding time to upload it.  By that time it no longer worked.</p>
<p>So, what you have in your metaphysical hands is Beta 4, it&#8217;s just like Beta 3 but it works!</p>
<p>The changes are:</p>
<p><strong>*</strong>You can now search Matchmaking <b>or</b> Custom games</p>
<p><strong>*</strong>You can now go directly to the files instead of the match details</p>
<p><strong>*</strong>It is <b>significantly</b> faster (think 5 minutes to search over 2500+ matches..)</p>
<p><strong>*</strong>Templates are working (sorta, no word wrapping enabled and no way to clear the output box). This allows you to enter some text in the top section, hit a button and have your text repeated with the following tokens replaced by data from the currently loaded database: %SCREENS%, %CLIPS%, %GAMEID% (used for linking directly to the game), %GAMETYPE%, %GAMEDATETIME% and %MAP%</p>
<p>Alas, Campaign searching did not make it in.  I wrote half the code and then realised it needs a whole new DB format to support the relevent information found for a Campaign record.  I will add support once my busy work life allows.</p>
<p><b>Databases from previous versions are not compatible with this new release.</b>  A fresh search is always preferred in this house <img src='http://www.gothi.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Give it a try yourself, tell your friends!  Download the <a href="http://www.gothi.co.uk/downloads/h3assetomaticbeta4.zip">Halo 3 Asset-O-Matic Beta 4</a> today!</p>
<p>(Feedback is always appreciated folks! <img src='http://www.gothi.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2009/05/halo-3-asset-o-matic-beta-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Another Bungie.net update, another revision required</title>
		<link>http://www.gothi.co.uk/2009/02/another-bungienet-update-another-revision-required/</link>
		<comments>http://www.gothi.co.uk/2009/02/another-bungienet-update-another-revision-required/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 10:40:18 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=141</guid>
		<description><![CDATA[The latest changes to Bungie.net broke Halo 3 Asset-O-Matic again. I&#8217;m working on a new build featuring: Search Matchmaking or Custom Games Direct linking to the files page Faster searching (5 times more grabbing threads) A problem with increasing the amount of network activity is that the thread checking for the next page of results [...]]]></description>
			<content:encoded><![CDATA[<p>The latest changes to Bungie.net broke Halo 3 Asset-O-Matic <i>again</i>.  I&#8217;m working on a new build featuring:</p>
<ul>
<li>Search Matchmaking or Custom Games</li>
<li>Direct linking to the files page</li>
<li>Faster searching (5 times more grabbing threads)</li>
</ul>
<p>A problem with increasing the amount of network activity is that the thread checking for the next page of results sometimes times out.  It&#8217;s fine if a grabber thread times out because there&#8217;s 24 more left to continue to continue the work but there&#8217;s only one thread looking for the next page.  I&#8217;ll have to see if I can add some fallback code to reinitilise the thread if it falls over.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2009/02/another-bungienet-update-another-revision-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beta 3?</title>
		<link>http://www.gothi.co.uk/2009/02/beta-3/</link>
		<comments>http://www.gothi.co.uk/2009/02/beta-3/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 18:09:14 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=132</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 438px"><img title="Halo 3 Asset-O-Matic Beta 3" src="http://www.gothi.co.uk/wp-content/assetomaticbeta3.jpg" alt="Halo 3 Asset-O-Matic Beta 3" width="428" height="671" /><p class="wp-caption-text">Halo 3 Asset-O-Matic Beta 3</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2009/02/beta-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halo 3 Asset-O-Matic Beta 2</title>
		<link>http://www.gothi.co.uk/2008/10/halo-3-asset-o-matic-beta-2/</link>
		<comments>http://www.gothi.co.uk/2008/10/halo-3-asset-o-matic-beta-2/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 18:50:54 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=129</guid>
		<description><![CDATA[Halo 3 Asset-O-Matic Beta 2 is finished, tested and confirmed working with the redesign of Bungie.net This is a hot fix build, all previously created databases are fully compatible with this version. I&#8217;m considering implementing support for Custom Games and Campaign game history but this will require the existing code being refactored, something I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gothi.co.uk/download/h3assetomaticbeta2.zip">Halo 3 Asset-O-Matic Beta 2</a> is finished, tested and confirmed working with the redesign of Bungie.net <img src='http://www.gothi.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is a hot fix build, all previously created databases are fully compatible with this version.  I&#8217;m considering implementing support for Custom Games and Campaign game history but this will require the existing code being refactored, something I haven&#8217;t yet had time to do&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2008/10/halo-3-asset-o-matic-beta-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bungie updates website, Asset-O-Matic still required</title>
		<link>http://www.gothi.co.uk/2008/10/bungie-updates-website-asset-o-matic-still-required/</link>
		<comments>http://www.gothi.co.uk/2008/10/bungie-updates-website-asset-o-matic-still-required/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 12:33:53 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=122</guid>
		<description><![CDATA[I&#8217;d been holding off on doing more work on the Halo 3 Asset-O-Matic due to Bungie&#8217;s announcement that the File Share system was going to get a major overhaul. Bunige have done a great job of improving the basic system they had in place before but it despite all the improvements they have made it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d been holding off on doing more work on the Halo 3 Asset-O-Matic due to Bungie&#8217;s announcement that the File Share system was going to get a major overhaul.  Bunige have done a great job of improving the basic system they had in place before but it despite all the improvements they have made it&#8217;s still not possible to bring up a list of Assets taken from games you were in, making the Halo 3 Asset-O-Matic still the only way to achieve this.</p>
<p><b>However</b><br />
During the refit of the website Bungie made some major changes to the way Assets are displayed which break Asset-O-Matic <img src='http://www.gothi.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   I&#8217;ll be making a quick fix version to replace the current beta ASAP, a new beta with more features and bug fixes will be available in a month or two&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2008/10/bungie-updates-website-asset-o-matic-still-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selected Asset-O-Matic databases</title>
		<link>http://www.gothi.co.uk/2008/09/selected-asset-o-matic-databases/</link>
		<comments>http://www.gothi.co.uk/2008/09/selected-asset-o-matic-databases/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 16:50:18 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=119</guid>
		<description><![CDATA[I&#8217;ve collected a few Asset-O-Matic search results from a few names you might find familiar I&#8217;ll add a few more from Team Bungie when I get chance]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve collected a few <a href="http://www.gothi.co.uk/selected-halo-3-asset-o-matic-databases/">Asset-O-Matic search results</a> from a few names you might find familiar <img src='http://www.gothi.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   I&#8217;ll add a few more from Team Bungie when I get chance</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2008/09/selected-asset-o-matic-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Halo 3 Asset-O-Matic FAQ</title>
		<link>http://www.gothi.co.uk/2008/09/halo-3-asset-o-matic-faq/</link>
		<comments>http://www.gothi.co.uk/2008/09/halo-3-asset-o-matic-faq/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 14:22:33 +0000</pubDate>
		<dc:creator>gothi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Asset-O-Matic]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[Halo 3]]></category>

		<guid isPermaLink="false">http://www.gothi.co.uk/?p=111</guid>
		<description><![CDATA[As people have been playing with the newly released Asset-O-Matic BETA I posted last night some common questions and problems have popped up.. You must extract the files from the zip before running the program.. You cannot run the file from zip as it may not be able to access the SQLite DLL and the [...]]]></description>
			<content:encoded><![CDATA[<p>As people have been playing with the newly released Asset-O-Matic BETA I posted last night some common questions and problems have popped up..</p>
<ul>
<li>You <b>must</b> extract the files from the zip before running the program..  You cannot run the file from zip as it may not be able to access the SQLite DLL and the search results are saved in the application directory, if this is a temp directory then there&#8217;s a good chance you won&#8217;t be able to find it or it might get deleted!</li>
<li>Once a search is complete the results are <b>not</b> automatically loaded, you must use the <b>Load DB</b> button to open the saved results.</li>
<li>Search results are stored in the application directory and are named <i>gamertag</i>_<i>date</i>_<i>time</i>.h3</li>
<li>Searches do take some time, to scan my game history of 1774 games takes approximately 20 minutes.  Leave it running in the background, you can always load up some other search result files to keep you interested <img src='http://www.gothi.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>If the staus bar is stuck at <i>Scanning Bungie.net game history&#8230;</i> and hasn&#8217;t changed after 5 minutes try closing the program and restarting the search</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gothi.co.uk/2008/09/halo-3-asset-o-matic-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
