100% match and link JASTrack (#772)

* Almost fully match JASTrack, regalloc in writeRegParam

* 100% match JASTrack

* Move constructor to header to link successfully
This commit is contained in:
Ammar Askar
2025-05-27 21:02:24 -04:00
committed by GitHub
parent 693c92638f
commit 255d01c6db
7 changed files with 508 additions and 53 deletions
+20 -6
View File
@@ -22,14 +22,28 @@ namespace JASystem {
JUT_ASSERT(131, index < 4);
return field_0x20[index];
}
void setAddress(int, u32) {}
void setAddress(int index, u32 value) {
JUT_ASSERT(124, index >= 0);
JUT_ASSERT(125, index < 4);
field_0x20[index] = value;
}
void getBendSense() const {}
void getPanPowerBank() const {}
void getPanPowerExt() const {}
void getPanPowerOsc() const {}
void getPanPowerParent() const {}
void getPanPowerTrack() const {}
u16 getPanPowerBank() const {
return mPanPower[0];
}
u16 getPanPowerExt() const {
return mPanPower[1];
}
u16 getPanPowerOsc() const {
return mPanPower[2];
}
u16 getPanPowerParent() const {
return mPanPower[3];
}
u16 getPanPowerTrack() const {
return mPanPower[4];
}
void getPriority() const {}
u16 getFlag() const { return field_0x0[3]; }
void setFlag(u16 flag) { field_0x0[3] = flag; }
+19 -2
View File
@@ -119,7 +119,24 @@ namespace JASystem {
class AInnerParam_ {
public:
AInnerParam_();
AInnerParam_()
: mVolume()
, mPitch()
, mFxmix()
, mPan()
, mDolby()
, _50()
, mOsc0Width()
, mOsc0Rate()
, mOsc0Vertex()
, mOsc1Width()
, mOsc1Rate()
, mOsc1Vertex()
, mIIRs()
, _100()
, _110()
{
}
/* 0x000 */ MoveParam_ mVolume;
/* 0x010 */ MoveParam_ mPitch;
@@ -306,7 +323,7 @@ namespace JASystem {
/* 0x37E */ u8 field_0x37e;
/* 0x37F */ u8 mCalcTypes[3];
/* 0x382 */ u8 mParentCalcTypes[3];
/* 0x385 */ u8 mIsPaused;
/* 0x385 */ bool mIsPaused;
/* 0x386 */ u8 field_0x386;
/* 0x387 */ bool field_0x387;
/* 0x388 */ u8 field_0x388;
@@ -4,6 +4,17 @@
#include "dolphin/types.h"
namespace JASystem {
enum RequestId {
REQUEST_UNK_0 = 0,
REQUEST_UNK_1 = 1,
REQUEST_UNK_2 = 2,
REQUEST_UNK_3 = 3,
REQUEST_UNK_4 = 4,
REQUEST_UNK_5 = 5,
REQUEST_UNK_6 = 6,
REQUEST_UNK_7 = 7,
};
class TIntrMgr {
public:
void disable() { field_0x0 = 0; }
+21
View File
@@ -155,6 +155,27 @@ inline void OSf32tou8(f32* f, u8* out) {
*out = __OSf32tou8(*f);
}
inline s8 __OSf32tos8(register f32 inF) {
register u8 out;
u32 tmp;
register u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
psq_st inF, 0(tmpPtr), 0x1, 4
lbz out, 0(tmpPtr)
extsb out, out
}
#endif
// clang-format on
return out;
}
inline void OSf32tos8(f32* f, s8* out) {
*out = __OSf32tos8(*f);
}
static inline void OSInitFastCast(void) {
// clang-format off
#ifdef __MWERKS__