If You Give A Dev A Tricked Out Xbox, They’ll Patch Halo 2

[Ryan Miceli] had spent a few years poring over and reverse-engineering Halo 2 when a friend asked for a favor. His friend created an improved Xbox with significant overclocks, RAM upgrades, BIOS hacks, and a processor swap. The goal was simple: patch the hardcoded maximum resolution from 480p to 720p and maybe even 1080p. With double the CPU clock speed but only a 15% overclock on the GPU, [Ryan] got to work.

Step one was to increase the size of the DirectX framebuffers. Increasing the output resolution introduced severe graphical glitches and rendering bugs. The game reuses the framebuffers multiple times as memory views, and each view encodes a header at the top with helpful information like width, height, and tiling. After patching that, [Ryan] had something more legible, but some models weren’t loading (particularly the water in the title screen). The answer was the texture accumulation layer. The Xbox has a hardware limitation of only sampling four textures per shader pass, which means you need a buffer the size of the render resolution to accumulate the textures if you want to sample more than four textures. Trying to boot the game resulted in an out-of-memory crash. The Xbox [Ryan] was working on had been upgraded with an additional 64MB of RAM, but the memory allocator in Halo 2 wasn’t taking advantage of it. Yet.

To see where the memory was going, [Ryan] wrote a new tool called XboxImageGrabber to show where memory was allocated and by whom. Most games make a few substantial initial allocations from the native allocator, then toss it over to a custom allocator tuned for their game. However, the extra 64MB of RAM was in dev consoles and meant as debug RAM, which meant the GPU couldn’t properly access it. Additionally, between the lower 64MB and upper is the Xbox kernel. Now, it became an exercise of patching the allocator to work with two blobs of memory instead of one contiguous one. It also moved runtime data into the upper 64MB while keeping video allocations in the lower. Ultimately, [Ryan] found it easier to patch the kernel to allow memory allocations the GPU could use in the upper 64MB of memory. Running the game at 720p resulted in only a semi-playable framerate, dropping to 10fps in a few scenes.

After some initial tests, [Ryan] concluded that it wasn’t the GPU or the CPU that was the bottleneck but the swap chain. Halo 2 turns VSync on by default, meaning it has to wait until a blank period before swapping between its two framebuffers. A simple tweak is to add a third frame buffer. The average FPS jumped 10%, and the GPU became the next bottleneck to tweak. With a light GPU overclock, the game was getting very close to 30fps. Luckily for [Ryan], no BIOS tweak was needed as the GPU clock hardware can be mapped and tweaked as an MMIO. After reverse engineering, a debugging feature to visual cache evictions, [Ryan] tuned the texture and geometry cache to minimize pop-ins that the original game was infamous for.

Overall, it’s an incredible hack with months of hard work behind it. The code for the patch is on Github, and there’s a video after the break comparing the patched and unpatched games. If you still need more Halo in your life, why not make yourself a realistic battle rifle from the game?

Continue reading “If You Give A Dev A Tricked Out Xbox, They’ll Patch Halo 2

The BR55 battle rifle held in its creator's hands during test firing

Making The Halo 2 Battle Rifle Real

We’ve just been shown a creation that definitely belongs on the list of impressive videogame replicas. This BR55 rifle built by [B Squared Mfg] not only looks exactly like its in-game Halo 2 counterpart, it’s also a fully functional firearm chambered in 5.56. The attention to detail even brings us a game-accurate electronic ammo counter.

The rifle and magazine communicate over three pins.

Unfortunately, the only information we have on the weapon currently is the video below. But he does at least go into detail about the practical aspects: caliber choice, the arduous journey of bolt carrier sourcing, and how the ammo counter works.

Each magazine has a potentiometer built into it to detect the number of rounds loaded, but there’s a bit of trickery involved. In the real world, there’s no way a magazine this size could hold the 36 rounds of ammunition depicted in the game, so for each shot fired, the counter subtracts three. It takes a little imagination, but this way it looks as close to the game version as possible.

There will be no published files due to legal concerns, but there’s nothing you couldn’t build yourself, as long as said legal concerns are sorted out for yourself. Depending on where you live, you might have to settle for building a Gauss gun in the same frame, we’ve even seen slimmer ones done commercially. Whatever you build, make sure you store it in a way others can’t access it easily — not all gun safes pass this test.

Continue reading “Making The Halo 2 Battle Rifle Real”

Building An Energy Sword Replica From Halo

A good many of us whiled away the hours of our youths playing Swords Only deathmatch in Halo 2. The Energy Sword, aka the Plasma Sword, was the star of the show, with its devastating glowing blades granting us scoreboard domination. [Arnov Sharma] has now built a quality replica of this science-fiction weapon.

The build starts with a 3D design drawn up in Fusion 360. The parts are then 3D printed, with opaque filament used for the handle and translucent PLA filament for the “blade”. Inside the blade elements are twenty WS2812B LEDs, creating the characteristic glow that made the Energy Sword so tantalizing to find in game. An ATtiny85 is charged with running the LEDs, with the aid of an IP5306 chip to act as a boost converter for the lithium-ion battery supplying the juice.

[Anton] admits that the sword was built for the sole purpose of beautifying his maker space. That’s something we can respect, because we’d love to have one hanging on the wall at home. We’ve featured some other fun gaming replicas before, too.

Continue reading “Building An Energy Sword Replica From Halo