This may be the right time to revisit the Amiga port of Dethrace with the help of modern AI-assisted code analysis.
The current Dethrace engine is primarily designed around x86 CPU architecture and its cache behavior. While the code is portable enough to compile for the Motorola 68060, many of its low-level assumptions are not well suited for classic Amiga hardware.
Some of the performance issues likely stem from architectural differences:
- The engine appears to rely on cache usage patterns that are efficient on x86 processors but inefficient on the Motorola 68060.
- Memory access patterns may generate excessive cache misses on the 68060.
- Some algorithms were designed assuming superscalar x86 execution characteristics rather than the 68k pipeline.
- Data structures and memory layouts may not be optimized for the Amiga memory hierarchy.
- The renderer performs a large number of small memory accesses that are expensive on the 68060.
Rather than only optimizing the existing C code manually, AI-assisted code analysis could help identify x86-specific assumptions and suggest algorithms or data layouts that are better suited to the Motorola 68060 architecture.
The goal would not be to change the gameplay, but to create an Amiga-specific executable that uses the same game engine while taking advantage of the strengths of the 68060.
Possible optimization areas include:
- Cache-friendly data layout for the 68060.
- Reduced memory bandwidth requirements.
- Better instruction scheduling for the 68060 pipeline.
- Improved fixed-point math where appropriate.
- More efficient rendering loops.
- Removal of x86-oriented implementation details that provide little benefit on 68k CPUs.
With modern AI tools, it may now be practical to perform a deeper architectural review of the engine and automatically identify optimization opportunities that would have required significant manual effort in the past.
The objective is not simply to compile Dethrace for Amiga, but to create a version that behaves as if the engine had originally been designed for the Motorola 68060.