<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>chromadevlabs</title>
    <link>https://blog.chromalabs.co.uk/</link>
    <description>Oliver James personal ramblings</description>
    <pubDate>Wed, 27 May 2026 22:13:14 +0000</pubDate>
    <item>
      <title>Resurrecting the dead with AI</title>
      <link>https://blog.chromalabs.co.uk/resurrecting-the-dead-with-ai?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I’ve always been a bit dubious of LLMs, I have attempted to use them to help me write code, hopefully in a way that allows me to learn or improve my own abilities but I often find myself not quite impressed with the decisions it makes and ultimately the code it generates.&#xA;&#xA;That being said, I recently decided to let claude loose on one my ‘dead’ projects “preem-hle“, a ‘High Level‘ emulator for a device that failed spectacularly in the early 2000’s, the Gizmodo. &#xA;&#xA;My emulator was a few years old at this point, I come back to it every now and then, hoping to tease a little bit of progress out of it but due to its famous (infamous??) failings it’s not a well researched device. I was able to load a WinCE executable into an ARM CPU emulator and correctly (for the most part) map all the code and data sections into virtual memory, I parsed and replicated the imported DLL’s each game expects to find on the device and create a ‘jump table’ so that executable would jump to my code once execution was attempted.&#xA;&#xA;I could run actual Gizmondo game code!.... until It stopped or got locked into a loop forever. I was stumped for a long time, I managed to eek some more progress out by handling ISA switches on the fly, fixing various memory mapping issues (overlapping and handling kernel pages). The emulated code was hitting exceptions internally (I only know this because it would attempt to jump to some exception handling section in memory) but I had not implemented (nor did I want to) exception handling.&#xA;&#xA;This is where I hit a dead end for a long time, I went over the Windows PE spec, hoping to see the error in my implementation, I tried finding information on the state of the CPU when it enters a process (hint: it want’s the instance address), I implemented the WinCE equivalent of the PEB and TEB (processes/thread environment block) called the KDataStruct, this allowed the process to correctly gets its own thread handle etc. All of these were requirements of the emulator but none of them fixed the problem.&#xA;&#xA;So I yielded, I cd’d into the directory and spun up claude, I briefly explained what my emulator \should\ do and asked it to find why it’s not doing that. It found the problem almost immediately, I was clobbering the exception table with my import table jump table.. All I had to change was one number, move the address of the IAT jump table so that it didn’t interfere and wallah it was getting further along that it ever had before. The cherry on top was that my code WAS working correctly, I wasn’t hitting an exception, the code was calling an imported function that had originally been patched into the IAT but was overwritten by the exception table.&#xA;&#xA;So there we are, years of banging my head against the wall solved in roughly 30 seconds.&#xA;&#xA;It feels like a bit of a cheat code really, but.. a tempting one.]]&gt;</description>
      <content:encoded><![CDATA[<p>I’ve always been a bit dubious of LLMs, I have attempted to use them to help me write code, hopefully in a way that allows me to learn or improve my own abilities but I often find myself not quite impressed with the decisions it makes and ultimately the code it generates.</p>

<p>That being said, I recently decided to let claude loose on one my ‘dead’ projects “preem-hle“, a ‘High Level‘ emulator for a device that failed spectacularly in the early 2000’s, the <a href="https://en.wikipedia.org/wiki/Gizmondo" title="Gizmondo">Gizmodo</a>.</p>

<p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Gizmondo.jpg/250px-Gizmondo.jpg" alt=""/></p>

<p>My emulator was a few years old at this point, I come back to it every now and then, hoping to tease a little bit of progress out of it but due to its famous (infamous??) failings it’s not a well researched device. I was able to load a WinCE executable into an ARM CPU emulator and correctly (for the most part) map all the code and data sections into virtual memory, I parsed and replicated the imported DLL’s each game expects to find on the device and create a ‘jump table’ so that executable would jump to my code once execution was attempted.</p>

<p>I could run actual Gizmondo game code!.... until It stopped or got locked into a loop forever. I was stumped for a long time, I managed to eek some more progress out by handling ISA switches on the fly, fixing various memory mapping issues (overlapping and handling kernel pages). The emulated code was hitting exceptions internally (I only know this because it would attempt to jump to some exception handling section in memory) but I had not implemented (nor did I want to) exception handling.</p>

<p>This is where I hit a dead end for a long time, I went over the Windows PE spec, hoping to see the error in my implementation, I tried finding information on the state of the CPU when it enters a process (hint: it want’s the instance address), I implemented the WinCE equivalent of the PEB and TEB (processes/thread environment block) called the KDataStruct, this allowed the process to correctly gets its own thread handle etc. All of these were requirements of the emulator but none of them fixed the problem.</p>

<p>So I yielded, I cd’d into the directory and spun up claude, I briefly explained what my emulator *should* do and asked it to find why it’s not doing that. It found the problem almost immediately, I was clobbering the exception table with my import table jump table.. All I had to change was one number, move the address of the IAT jump table so that it didn’t interfere and wallah it was getting further along that it ever had before. The cherry on top was that my code WAS working correctly, I wasn’t hitting an exception, the code was calling an imported function that had originally been patched into the IAT but was overwritten by the exception table.</p>

<p>So there we are, years of banging my head against the wall solved in roughly 30 seconds.</p>

<p>It feels like a bit of a cheat code really, but.. a tempting one.</p>
]]></content:encoded>
      <guid>https://blog.chromalabs.co.uk/resurrecting-the-dead-with-ai</guid>
      <pubDate>Wed, 27 May 2026 18:05:24 +0000</pubDate>
    </item>
    <item>
      <title>Hello, world</title>
      <link>https://blog.chromalabs.co.uk/hello-world?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Hello!&#xA;&#xA;Hi I&#39;m Oliver James.&#xA;&#xA;I&#39;m a cross platform C++ engineer that specialises in real-time (audio) and general systems programming. When I&#39;m not banging my head against a keyboard I&#39;m often in the gym or walking my rescue dogs.&#xA;&#xA;I recently made the move back into freelance software engineering and consulting after a stint working with the JUCE team.&#xA;&#xA;I&#39;m not that comfortable ‘blogging’ yet, my coding is better than my writing but we have to start somewhere, hey.&#xA;&#xA;I hope to fill this blog with random tidbits and hopefully some progress on my projects.&#xA;&#xA;Cheers]]&gt;</description>
      <content:encoded><![CDATA[<p>Hello!</p>

<p>Hi I&#39;m Oliver James.</p>

<p>I&#39;m a cross platform C++ engineer that specialises in real-time (audio) and general systems programming. When I&#39;m not banging my head against a keyboard I&#39;m often in the gym or walking my rescue dogs.</p>

<p>I recently made the move back into freelance software engineering and consulting after a stint working with the <a href="https://juce.com" title="JUCE">JUCE</a> team.</p>

<p>I&#39;m not that comfortable ‘blogging’ yet, my coding is better than my writing but we have to start somewhere, hey.</p>

<p>I hope to fill this blog with random tidbits and hopefully some progress on my projects.</p>

<p>Cheers</p>
]]></content:encoded>
      <guid>https://blog.chromalabs.co.uk/hello-world</guid>
      <pubDate>Wed, 27 May 2026 16:51:33 +0000</pubDate>
    </item>
  </channel>
</rss>