mirror of
https://github.com/zeldaret/tp
synced 2026-08-17 13:30:07 -04:00
Work on dvdlow, OSTime fix and various nonmatching
This commit is contained in:
@@ -55,9 +55,25 @@ struct TVec3<f32> {
|
||||
void zero() { x = y = z = 0.0f; }
|
||||
|
||||
void mul(const TVec3<f32>& a, const TVec3<f32>& b) {
|
||||
x = a.x * b.x;
|
||||
y = a.y * b.y;
|
||||
z = a.z * b.z;
|
||||
register f32* dst = &x;
|
||||
const register f32* srca = &a.x;
|
||||
const register f32* srcb = &b.x;
|
||||
register f32 a_x_y;
|
||||
register f32 b_x_y;
|
||||
register f32 x_y;
|
||||
register f32 za;
|
||||
register f32 zb;
|
||||
register f32 z;
|
||||
asm {
|
||||
psq_l a_x_y, 0(srca), 0, 0
|
||||
psq_l b_x_y, 0(srcb), 0, 0
|
||||
ps_mul x_y, a_x_y, b_x_y
|
||||
psq_st x_y, 0(dst), 0, 0
|
||||
lfs za, 8(srca)
|
||||
lfs zb, 8(srcb)
|
||||
fmuls z, za, zb
|
||||
stfs z, 8(dst)
|
||||
};
|
||||
}
|
||||
|
||||
inline TVec3<f32>& operator=(const TVec3<f32>& b) {
|
||||
|
||||
@@ -53,10 +53,10 @@ public:
|
||||
|
||||
f32 get_rndm_zh() {
|
||||
f32 f = get_rndm_f();
|
||||
return f - 1.0f;
|
||||
return f - 0.5f;
|
||||
}
|
||||
|
||||
s16 get_rndm_ss() { return ((s16)get_rndm_u()) >> 16; }
|
||||
s16 get_rndm_ss() { return (s16)(get_rndm_u() >> 16); }
|
||||
|
||||
public:
|
||||
u32 mSeed;
|
||||
@@ -161,8 +161,8 @@ struct JPAEmitterWorkData {
|
||||
/* 0x34 */ f32 mVolumeSize;
|
||||
/* 0x38 */ f32 mVolumeMinRad;
|
||||
/* 0x3C */ f32 mVolumeSweep;
|
||||
/* 0x40 */ u32 mEmitCount;
|
||||
/* 0x44 */ u32 mVolumeEmitIdx;
|
||||
/* 0x40 */ s32 mEmitCount;
|
||||
/* 0x44 */ s32 mVolumeEmitIdx;
|
||||
/* 0x48 */ Mtx mDirectionMtx;
|
||||
/* 0x78 */ Mtx mRotationMtx;
|
||||
/* 0xA8 */ Mtx mGlobalRot;
|
||||
|
||||
@@ -38,7 +38,9 @@ extern "C" {
|
||||
#define OS_BASE_CACHED (OS_CACHED_REGION_PREFIX << 16)
|
||||
#define OS_BASE_UNCACHED (OS_UNCACHED_REGION_PREFIX << 16)
|
||||
|
||||
#define OS_BUS_CLOCK (*(u32*)0x800000F8)
|
||||
extern u32 __OSBusClock : 0x800000F8;
|
||||
|
||||
#define OS_BUS_CLOCK (__OSBusClock)
|
||||
#define OS_CORE_CLOCK (*(u32*)0x800000FC)
|
||||
#define OS_TIMER_CLOCK (OS_BUS_CLOCK / 4)
|
||||
#define OS_TIMER_CLOCK_MS (OS_TIMER_CLOCK / 1000)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
vu32 __PIRegs[12] : 0xCC003000;
|
||||
|
||||
#define OS_RESETCODE_RESTART 0x80000000
|
||||
#define OS_RESETCODE_SYSTEM 0x40000000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user