dreamcast · #shadow-warrior 2 min read

Shadow Warrior DC: faster on real drives

Shadow Warrior on the Dreamcast: Lo Wang fires two Uzis down a dark grey corridor, with a lit window and red panels on the left.

Since the last post, most of the work has gone into something a GDEMU hides: how long it takes to read from the disc. A real GD-ROM drive and a MODE are much slower than a GDEMU, and Shadow Warrior reads a lot while you play: explosions, fire, debris, sounds, voices. On a slow drive, each of those reads is a stutter.

The testers' videos made all the difference. The test build shows a few counters on screen, so a video of a level tells me where the game stopped and what it was reading at that moment. One of them showed the same sounds being read back 855 times in a single level, 14 to 44 ms each. A sound pulled back from sound RAM was the first thing to be thrown out again. Now it stays in the cache like any other.

Shadow Warrior 30th Anniversary Edition start-up screen: Lo Wang in red and black with a gun in each hand, the game's logo, 'Original game by 3D Realms', 'Dreamcast port by hombreimaginario' and a note that the expansions Twin Dragon and Wanton Destruction are included.
One of four random start-up screens made just for this port.

I also sent a bot through the ten heaviest levels, stopping at 300 spots per map and counting reads. It found 44 to 75 reads per level, 90% of them effect tiles that no precache list named. They now load in the background while you play, whole tiles at a time and in disc order. The graphics are also stored packed in video RAM at about half the size, so even the biggest level fits. With a simulated 120 ms drive, the background loading of one of the heaviest levels finishes in about 45 seconds instead of several minutes, with a quarter of the drive requests.

Performance Mode draws the 3D view at half width and doubles each column. The doubling now reads four pixels at a time and builds the output in registers: about two instructions per pixel instead of five or six. The frame buffer is now aligned so the fast copy path kicks in.

Shadow Warrior on the Dreamcast: Lo Wang fires an Uzi at a brick ramp under a blue neon sign, with orange leaves on the ground.

Last but not least, the menu headers now look the same across the whole game, and where a title or an option was too long, I adjusted the text size so it fits comfortably inside its menu.

As with Cruis'n USA, there are only a few things left on the list. The port should be out soon, most likely with a disc builder right here on the site, as with Tiger Road.

You can follow me on X for more updates!