diff options
Diffstat (limited to 'arm9/source/devices/math.h')
-rw-r--r-- | arm9/source/devices/math.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arm9/source/devices/math.h b/arm9/source/devices/math.h new file mode 100644 index 0000000..ae52a10 --- /dev/null +++ b/arm9/source/devices/math.h @@ -0,0 +1,19 @@ +#ifndef MATH_H_ + #define MATH_H_ + + typedef struct { + u16 op1, op2; + u16 sqrt, atan; u32 prod; u16 quot, rem; // read + bool sqrt_rc, atan_rc, prod_rc, quot_rc, rem_rc; // read cached + } MathDevice ; + + void set_op1_high(MathDevice *math, u8 high); + void set_op1_low(MathDevice *math, u8 low); + void set_op2_high(MathDevice *math, u8 high); + void set_op2_low(MathDevice *math, u8 low); + u16 get_sqrt(MathDevice *math); + u16 get_atan(MathDevice *math); + u32 get_prod(MathDevice *math); + u16 get_quot(MathDevice *math); + u16 get_rem(MathDevice *math); +#endif |