Jayanky / pspla

A VFPU accelerated linear algebra & quaternion library for the PlayStation Portable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pspla

A VFPU accelerated linear algebra & quaternion library for the PlayStation Portable.

Usage

Getting Started

All you need to do to get started is to include the pspla2.h header file, and to link with the pspla library.

Data Formatting

All functions are divided into A and U variants, standing for Aligned and Unaligned.

Aligned functions require vector data to be 16-byte aligned, or a fault will be generated by the VFPU.

Unaligned functions only require data to be aligned to word-sized boundaries, but are slower due to how unaligned loading works on the hardware.

pspla comes with the PSPLA_ALIGN define to align vector data.

Example:

float vectorU[4];              // Can only be used with unaligned functions
float vectorA[4] PSPLA_ALIGN;  // Can be used with both aligned and unaligned functions

Finding a function

All functions are prefixed with pspla, and are then followed by the type of data they are used for.

The types of data are Vec2, Vec3, Vec4, Mat2, Mat3, Mat4, and Quat. Functions that work with any vector size are given the type VecV.

Functions that work with scalar values don't have a type prefix or an alignment suffix (i.e. psplaArccosine, psplaRandom, etc.)

About

A VFPU accelerated linear algebra & quaternion library for the PlayStation Portable.

License:MIT License


Languages

Language:C 55.0%Language:Assembly 44.5%Language:Makefile 0.6%