OpenSNES
Modern Open-Source SNES Development SDK
Loading...
Searching...
No Matches
dsp1.h
Go to the documentation of this file.
1
41#ifndef SNES_DSP1_H
42#define SNES_DSP1_H
43
44#include <snes/types.h>
45
52extern volatile s16 dsp1_o0;
53extern volatile s16 dsp1_o1;
54extern volatile s16 dsp1_o2;
55
64void dsp1Init(void);
65
73
81void dsp1Triangle(u16 angle, s16 radius);
82
93
105void dsp1Attitude(u16 scale, u16 az, u16 ay, u16 ax);
106
117void dsp1Objective(s16 x, s16 y, s16 z);
118
119#endif /* SNES_DSP1_H */
void dsp1Init(void)
Resynchronise the DSP-1 to a known command-wait state.
volatile s16 dsp1_o1
void dsp1Triangle(u16 angle, s16 radius)
Scaled sine and cosine of an angle (DSP-1 command $04, "Triangle").
void dsp1Objective(s16 x, s16 y, s16 z)
Transform a point by matrix A: local → world (DSP-1 command $0D, "Objective").
void dsp1Attitude(u16 scale, u16 az, u16 ay, u16 ax)
Build a 3D rotation matrix into slot A (DSP-1 command $01, "Attitude").
volatile s16 dsp1_o0
Multi-word DSP-1 result registers (written by multi-output commands).
u16 dsp1Multiply(u16 a, u16 b)
Signed 1.15 × 1.15 multiply (DSP-1 command $00).
volatile s16 dsp1_o2
void dsp1Rotate(u16 angle, s16 x, s16 y)
Rotate a 2D point about the origin (DSP-1 command $0C, "Rotate").
static u16 b
Definition main.c:157
static u16 a
Definition main.c:157
signed short s16
16-bit signed integer (-32768 to 32767)
Definition types.h:50
unsigned short u16
16-bit unsigned integer (0 to 65535)
Definition types.h:53
static u16 angle
Rotation step index, 0..47.
Definition main.c:53
OpenSNES Standard Types.