Skip to content

0.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@doomhack doomhack released this 10 Oct 22:53
· 355 commits to master since this release

Doom on GBA WIP build.

The last few days I have been concentrating on getting the performance up. The entire renderer (Everything from R_RenderBspNode() down) and it's associated data is now compiled to ARM code and running from IWRAM.

We're seeing playable framerates now. E1M1 still has some pretty serious sags, but MAP01 runs about the same as the commercial Doom2 release. Overall, its running about the same as SNES Doom. Not great but tolerable.

I've used the 16Kb of OBJ Tile VRAM as a column cache where we composite and store 1 pixel wide strips of texture. The hit-rate on this cache is now about 90% but it's still a performance hotspot so I should be able to improve it further.

A fast division routine would give a decent performance improvement too. At the minute, I've pulled in 32bit divides and 64bit fixed point divides from Jaguar Doom. These are simple implementations but still out-perform the runtime functions.

Further improvements can be made by leaning on the GBA hardware. There is a Bios divide function, and a DMA controller that are not being used yet.

There have been some performance cutbacks made:

The Z-Depth lighting is gone. The GBA screen is pretty dark so this is not a great loss. It also allows me to copy the colormap to IWRAM because we are drawing whole sectors with the same colormap now. The colormap gets read for every single pixel so this gives a good boost, saving around 4 cycles per pixel.

To get a decent hit rate on the column cache, compositited texture resolution is sampled at half horizontal resolution and there is a rough mipmapping that causes distant wall textures to be sampled at 1/8th or 1/16th resolution. The effect is similar to the commercial Doom2 release but a little less obvious.

Lots of bugs too!

We're still over-budget on memory. More levels will load and run now, but big levels like E1M6 or E2M2 won't load yet. This release has slashed another 60-70kb of memory off, but I need to find the same again to get all levels to load. Finding savings that won't throw the performance off a cliff is becoming tricky.

The statusbar isn't drawn at the min. There is a buffer overrun bug somewhere that was causing crashes so it's commented out until I can trace the issue and fix it. This also disables palette flashes.

There is also a bug with colormap selection on sprites. For some reason, it seems to be selecting the wrong sector colormap. Not sure why this is yet.

No sound and music yet.