Skip to content

Linear Algebra and math library for the Hitachi SuperH4 Processor (used by the Sega Dreamcast).

Notifications You must be signed in to change notification settings

gyrovorbis/sh4zam

Repository files navigation

Sh4zam

SH4ZAM!

Fast math library for the Sega Dreamcast's SH4 CPU.


NOTE: This repo is still undergoing rapid changes as we pull in these routines from various places, get them exposed via both C and C++ APIs, and get them unit tested. It is not advised that you use it just yet, as we have yet to rigorously validate things; however, please do open tickets if you are in need of any math routines or operations that you aren't seeing as part of the API!

Overview

Sh4zam is a hand-optimized, general-purpose math and linear algebra library for harnessing the floating-point power of the SH4 processor in the Sega Dreamcast. It originally began as a collection of inline assembly routines developed specifically to accelerate the math in the Grand Theft Auto 3 and Vice City DC ports. These routines, along with many others from various contributors, have been separated and combined into a single standalone library, which can be leveraged to bring gainz to the Dreamcast community at large.

Features

  • floating-point math intrinsics
  • API for directly manipulating the XMTRX FP registers
  • 2D, 3D, 4D vector APIs
  • 2x2, 3x3, 3x4, and 4x4 matrix APIs
  • quaternion API

Contributors

Special thanks to the following individuals who have either directly or indirectly contributed to sh4zam:

  • Falco Girgis
  • Paul Cercueil
  • Oleg Endo
  • jnmartin64
  • Stefanos Kornilios Mitsis Poiitidis
  • MoopTheHedgehog
  • Mikael Kalms
  • Twada
  • TapamN
  • yomboprime
  • David Reichelt
  • Luke Benstead
  • Ian Michael
  • HailToDodongo
  • Jesse Stojan

About

Linear Algebra and math library for the Hitachi SuperH4 Processor (used by the Sega Dreamcast).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published