mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 14:13:27 -04:00
JASTrackPort, JASSeqCtrl.h, JASSeqParser (#1904)
* JASTrackPort OK * JASSeqCtrl.h * JASSeqParser * progress * Move JSU inlines
This commit is contained in:
@@ -23,7 +23,7 @@ struct JASCalc {
|
||||
f32 fake2(long x);
|
||||
f32 fake3();
|
||||
|
||||
static u8 const CUTOFF_TO_IIR_TABLE[1024];
|
||||
static s16 const CUTOFF_TO_IIR_TABLE[128][4];
|
||||
};
|
||||
|
||||
#endif /* JASCALC_H */
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
struct JASRegisterParam {
|
||||
class JASRegisterParam {
|
||||
public:
|
||||
enum RegID {
|
||||
|
||||
REG0,
|
||||
REG1,
|
||||
REG2,
|
||||
REG3,
|
||||
};
|
||||
|
||||
/* 80293644 */ JASRegisterParam();
|
||||
|
||||
@@ -1,5 +1,75 @@
|
||||
#ifndef JASSEQCTRL_H
|
||||
#define JASSEQCTRL_H
|
||||
|
||||
#include "JSystem/JAudio2/JASSeqReader.h"
|
||||
|
||||
class JASTrack;
|
||||
class JASSeqParser;
|
||||
|
||||
class JASSeqCtrl {
|
||||
public:
|
||||
enum IntrType {
|
||||
INTRTYPE_VALUE_0,
|
||||
INTRTYPE_VALUE_1,
|
||||
INTRTYPE_VALUE_2,
|
||||
INTRTYPE_VALUE_3,
|
||||
INTRTYPE_VALUE_4,
|
||||
INTRTYPE_VALUE_5,
|
||||
INTRTYPE_VALUE_6,
|
||||
};
|
||||
|
||||
/* 802938BC */ JASSeqCtrl();
|
||||
/* 80293924 */ void init();
|
||||
/* 80293980 */ void start(void*, u32);
|
||||
/* 802939C4 */ int tickProc(JASTrack*);
|
||||
/* 80293ABC */ void interrupt(JASSeqCtrl::IntrType);
|
||||
/* 80293AE0 */ void setIntrMask(u32);
|
||||
/* 80293AF0 */ void clrIntrMask(u32);
|
||||
/* 80293B00 */ int retIntr();
|
||||
/* 80293B28 */ int findIntr();
|
||||
/* 80293B78 */ void checkIntr();
|
||||
/* 80293BE8 */ void timerProcess();
|
||||
|
||||
const JASSeqReader* getSeqReader() const { return &mReader; }
|
||||
void* getBase() { return mReader.getBase(); }
|
||||
void* getAddr(u32 param_0) { return mReader.getAddr(param_0); }
|
||||
u8 getByte(u32 param_0) { return mReader.getByte(param_0); }
|
||||
u16 get16(u32 param_0) { return mReader.get16(param_0); }
|
||||
u32 get24(int param_0) { return mReader.get24(param_0); }
|
||||
u32 get32(u32 param_0) { return mReader.get32(param_0); }
|
||||
void* getCur() { return mReader.getCur(); }
|
||||
u32 readByte() { return mReader.readByte(); }
|
||||
u32 read16() { return mReader.read16(); }
|
||||
u32 read24() { return mReader.read24(); }
|
||||
bool call(u32 param_0) { return mReader.call(param_0); }
|
||||
bool ret() { return mReader.ret(); }
|
||||
void jump(u32 param_0) { mReader.jump(param_0); }
|
||||
bool loopStart(u32 param_0) { return mReader.loopStart(param_0); }
|
||||
bool loopEnd() { return mReader.loopEnd(); }
|
||||
int readMidiValue() { return mReader.readMidiValue(); }
|
||||
void wait(s32 param_0) { field_0x40 = param_0; }
|
||||
void clrIntr() { field_0x44 = NULL; }
|
||||
void setIntrTable(u32 param_0) { field_0x48 = param_0; }
|
||||
void setIntrTimer(u32 param_0, u32 param_1) {
|
||||
field_0x50 = param_0;
|
||||
field_0x54 = param_1;
|
||||
field_0x58 = param_1;
|
||||
}
|
||||
void waitNoteFinish() { field_0x51 = 1; }
|
||||
|
||||
/* 0x00 */ JASSeqReader mReader;
|
||||
/* 0x3c */ JASSeqParser* field_0x3c;
|
||||
/* 0x40 */ s32 field_0x40;
|
||||
/* 0x44 */ void* field_0x44;
|
||||
/* 0x48 */ u32 field_0x48;
|
||||
/* 0x4c */ u16 field_0x4c;
|
||||
/* 0x4e */ u16 field_0x4e;
|
||||
/* 0x50 */ u8 field_0x50;
|
||||
/* 0x51 */ u8 field_0x51;
|
||||
/* 0x52 */ u16 field_0x52;
|
||||
/* 0x54 */ u32 field_0x54;
|
||||
/* 0x58 */ u32 field_0x58;
|
||||
static JASSeqParser sDefaultParser;
|
||||
};
|
||||
|
||||
#endif /* JASSEQCTRL_H */
|
||||
|
||||
@@ -3,4 +3,92 @@
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class JASTrack;
|
||||
|
||||
class JASSeqParser {
|
||||
public:
|
||||
enum BranchCondition {};
|
||||
|
||||
struct CmdInfo {
|
||||
s32 (JASSeqParser::*field_0x0)(JASTrack*, u32*);
|
||||
u16 field_0xc;
|
||||
u16 field_0xe;
|
||||
};
|
||||
|
||||
/* 80293CAC */ virtual ~JASSeqParser() {}
|
||||
/* 802958D4 */ virtual s32 parse(JASTrack*);
|
||||
/* 80295540 */ virtual s32 execNoteOnMidi(JASTrack*, u32, u32, u32);
|
||||
/* 80295498 */ virtual s32 execNoteOnGate(JASTrack*, u32, u32, u32, u32);
|
||||
/* 80295570 */ virtual s32 execNoteOff(JASTrack*, u32);
|
||||
/* 8029559C */ virtual s32 execCommand(JASTrack*, s32 (JASSeqParser::*)(JASTrack*, u32*), u32, u32*);
|
||||
|
||||
/* 80293CF4 */ bool conditionCheck(JASTrack*, JASSeqParser::BranchCondition);
|
||||
/* 80293DC4 */ void writeReg(JASTrack*, u32, u32);
|
||||
/* 80293FC8 */ u32 readReg(JASTrack*, u32) const;
|
||||
/* 80294188 */ s32 cmdOpenTrack(JASTrack*, u32*);
|
||||
/* 802941F0 */ s32 cmdCloseTrack(JASTrack*, u32*);
|
||||
/* 8029421C */ s32 cmdCall(JASTrack*, u32*);
|
||||
/* 80294248 */ s32 cmdCallF(JASTrack*, u32*);
|
||||
/* 8029429C */ s32 cmdRet(JASTrack*, u32*);
|
||||
/* 802942D4 */ s32 cmdRetF(JASTrack*, u32*);
|
||||
/* 80294328 */ s32 cmdJmp(JASTrack*, u32*);
|
||||
/* 80294340 */ s32 cmdJmpF(JASTrack*, u32*);
|
||||
/* 80294398 */ s32 cmdJmpTable(JASTrack*, u32*);
|
||||
/* 802943CC */ s32 cmdCallTable(JASTrack*, u32*);
|
||||
/* 8029441C */ s32 cmdLoopS(JASTrack*, u32*);
|
||||
/* 80294448 */ s32 cmdLoopE(JASTrack*, u32*);
|
||||
/* 80294470 */ s32 cmdNote(JASTrack*, u32*);
|
||||
/* 802944B4 */ s32 cmdNoteOn(JASTrack*, u32*);
|
||||
/* 802944F4 */ s32 cmdNoteOff(JASTrack*, u32*);
|
||||
/* 80294528 */ s32 cmdReadPort(JASTrack*, u32*);
|
||||
/* 80294588 */ s32 cmdWritePort(JASTrack*, u32*);
|
||||
/* 802945BC */ s32 cmdParentWritePort(JASTrack*, u32*);
|
||||
/* 802945F8 */ s32 cmdChildWritePort(JASTrack*, u32*);
|
||||
/* 80294644 */ s32 cmdParentReadPort(JASTrack*, u32*);
|
||||
/* 802946AC */ s32 cmdChildReadPort(JASTrack*, u32*);
|
||||
/* 80294724 */ s32 cmdCheckPortImport(JASTrack*, u32*);
|
||||
/* 80294770 */ s32 cmdCheckPortExport(JASTrack*, u32*);
|
||||
/* 802947BC */ s32 cmdWait(JASTrack*, u32*);
|
||||
/* 802947F4 */ s32 cmdWaitByte(JASTrack*, u32*);
|
||||
/* 80294804 */ s32 cmdSetLastNote(JASTrack*, u32*);
|
||||
/* 8029483C */ s32 cmdEnvScaleSet(JASTrack*, u32*);
|
||||
/* 8029488C */ s32 cmdEnvSet(JASTrack*, u32*);
|
||||
/* 802948C8 */ s32 cmdSimpleADSR(JASTrack*, u32*);
|
||||
/* 8029491C */ s32 cmdBusConnect(JASTrack*, u32*);
|
||||
/* 8029494C */ s32 cmdSetIntTable(JASTrack*, u32*);
|
||||
/* 8029495C */ s32 cmdSetInterrupt(JASTrack*, u32*);
|
||||
/* 80294988 */ s32 cmdDisInterrupt(JASTrack*, u32*);
|
||||
/* 802949B4 */ s32 cmdClrI(JASTrack*, u32*);
|
||||
/* 802949E4 */ s32 cmdRetI(JASTrack*, u32*);
|
||||
/* 80294A20 */ s32 cmdIntTimer(JASTrack*, u32*);
|
||||
/* 80294A3C */ s32 cmdSyncCPU(JASTrack*, u32*);
|
||||
/* 80294AA4 */ s32 cmdTempo(JASTrack*, u32*);
|
||||
/* 80294AD4 */ s32 cmdFinish(JASTrack*, u32*);
|
||||
/* 80294ADC */ s32 cmdNop(JASTrack*, u32*);
|
||||
/* 80294AE4 */ s32 cmdFIRSet(JASTrack*, u32*);
|
||||
/* 80294B1C */ s32 cmdIIRSet(JASTrack*, u32*);
|
||||
/* 80294B70 */ s32 cmdIIRCutOff(JASTrack*, u32*);
|
||||
/* 80294BB4 */ s32 cmdBankPrg(JASTrack*, u32*);
|
||||
/* 80294BD0 */ s32 cmdBank(JASTrack*, u32*);
|
||||
/* 80294BE4 */ s32 cmdPrg(JASTrack*, u32*);
|
||||
/* 80294BF8 */ s32 cmdParamI(JASTrack*, u32*);
|
||||
/* 80294C54 */ s32 cmdParamII(JASTrack*, u32*);
|
||||
/* 80294CB0 */ s32 cmdParamE(JASTrack*, u32*);
|
||||
/* 80294D2C */ s32 cmdParamEI(JASTrack*, u32*);
|
||||
/* 80294DA8 */ s32 cmdReg(JASTrack*, u32*);
|
||||
/* 80294F10 */ s32 cmdRegLoad(JASTrack*, u32*);
|
||||
/* 80294F40 */ s32 cmdRegUni(JASTrack*, u32*);
|
||||
/* 80294FB4 */ s32 cmdRegTblLoad(JASTrack*, u32*);
|
||||
/* 80295088 */ s32 cmdDump(JASTrack*, u32*);
|
||||
/* 8029526C */ s32 cmdPrintf(JASTrack*, u32*);
|
||||
/* 802955C8 */ s32 parseNoteOff(JASTrack*, u8);
|
||||
/* 80295600 */ s32 parseNoteOn(JASTrack*, u8);
|
||||
/* 802956B0 */ s32 parseCommand(JASTrack*, u8, u16);
|
||||
/* 80295864 */ s32 parseRegCommand(JASTrack*, int);
|
||||
|
||||
static CmdInfo sCmdInfo[96];
|
||||
static CmdInfo sExtCmdInfo[255];
|
||||
static u16 (*sCallBackFunc)(JASTrack*, u16);
|
||||
};
|
||||
|
||||
#endif /* JASSEQPARSER_H */
|
||||
|
||||
@@ -26,13 +26,24 @@ public:
|
||||
}
|
||||
|
||||
u32* getBase() { return field_0x00; }
|
||||
void* getAddr(u32 param_0) { return (u8*)field_0x00 + param_0; }
|
||||
u8 getByte(u32 param_0) { return *((u8*)field_0x00 + param_0); }
|
||||
u16 get16(u32 param_0) { return *(u16*)((u8*)field_0x00 + param_0); }
|
||||
u32 get32(u32 param_0) { return *(u32*)((u8*)field_0x00 + param_0); }
|
||||
u8* getCur() { return field_0x04; }
|
||||
|
||||
u8 readByte() {
|
||||
u8* tmp = field_0x04;
|
||||
field_0x04 += 1;
|
||||
u32 readByte() { return *field_0x04++; }
|
||||
u32 read16() {
|
||||
u16* tmp = (u16*)field_0x04;
|
||||
field_0x04 += 2;
|
||||
return *tmp;
|
||||
}
|
||||
u32 read24() {
|
||||
field_0x04--;
|
||||
u32* tmp = (u32*)field_0x04;
|
||||
field_0x04 += 4;
|
||||
return *tmp & 0x00ffffff;
|
||||
}
|
||||
u16 getLoopCount() const { return field_0x08 == 0 ? 0 : field_0x2c[field_0x08 - 1]; }
|
||||
|
||||
/* 0x00 */ u32* field_0x00;
|
||||
/* 0x04 */ u8* field_0x04;
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
#include "JSystem/JAudio2/JASGadget.h"
|
||||
#include "JSystem/JAudio2/JASOscillator.h"
|
||||
#include "JSystem/JAudio2/JASRegisterParam.h"
|
||||
#include "JSystem/JAudio2/JASSeqCtrl.h"
|
||||
#include "JSystem/JAudio2/JASTrackPort.h"
|
||||
|
||||
struct JASSoundParams;
|
||||
|
||||
@@ -73,13 +76,13 @@ struct JASTrack {
|
||||
/* 80291AC8 */ void close();
|
||||
/* 80291B8C */ void connectChild(u32, JASTrack*);
|
||||
/* 80291BB8 */ void closeChild(u32);
|
||||
/* 80291C30 */ void openChild(u32);
|
||||
/* 80291C30 */ JASTrack* openChild(u32);
|
||||
/* 80291DAC */ void connectBus(int, int);
|
||||
/* 80291DBC */ void setLatestKey(u8);
|
||||
/* 80291DF8 */ void channelStart(JASTrack::TChannelMgr*, u32, u32, u32);
|
||||
/* 80291F38 */ void noteOn(u32, u32, u32);
|
||||
/* 80292008 */ void gateOn(u32, u32, f32, u32);
|
||||
/* 80292198 */ void noteOff(u32, u16);
|
||||
/* 80291F38 */ int noteOn(u32, u32, u32);
|
||||
/* 80292008 */ int gateOn(u32, u32, f32, u32);
|
||||
/* 80292198 */ int noteOff(u32, u16);
|
||||
/* 80292220 */ bool checkNoteStop(u32) const;
|
||||
/* 8029226C */ void overwriteOsc(JASChannel*);
|
||||
/* 802922D8 */ void updateTimedParam();
|
||||
@@ -95,10 +98,10 @@ struct JASTrack {
|
||||
/* 80292808 */ void setOscAdsr(s16, s16, s16, s16, u16);
|
||||
/* 8029285C */ void setFIR(s16 const*);
|
||||
/* 8029289C */ void setIIR(s16 const*);
|
||||
/* 802928D0 */ void readPortSelf(u32);
|
||||
/* 802928D0 */ u16 readPortSelf(u32);
|
||||
/* 802928F4 */ void writePortSelf(u32, u16);
|
||||
/* 80292918 */ void writePort(u32, u16);
|
||||
/* 8029297C */ void readPort(u32);
|
||||
/* 8029297C */ u16 readPort(u32);
|
||||
/* 802929A0 */ void setChannelPauseFlag(bool);
|
||||
/* 80292A3C */ void pause(bool);
|
||||
/* 80292AA4 */ void getTransposeTotal() const;
|
||||
@@ -118,33 +121,72 @@ struct JASTrack {
|
||||
static u8 sDefaultBankTable[1036];
|
||||
static u8 sTrackList[16];
|
||||
|
||||
JASSeqCtrl* getSeqCtrl() { return &mSeqCtrl; }
|
||||
u16 getPort(u32 param_0) { return mTrackPort.get(param_0); }
|
||||
void setPort(u32 param_0, u16 param_1) { mTrackPort.set(param_0, param_1); }
|
||||
u32 checkPortIn(u32 param_0) { return mTrackPort.checkImport(param_0); }
|
||||
u32 checkPort(u32 param_0) { return mTrackPort.checkExport(param_0); }
|
||||
u32 readReg(JASRegisterParam::RegID param_0) { return mRegisterParam.read(param_0); }
|
||||
void writeReg(JASRegisterParam::RegID param_0, u32 param_1) { mRegisterParam.write(param_0, param_1); }
|
||||
JASTrack* getParent() { return mParent; }
|
||||
JASTrack* getChild(u32 index) { return mChildren[index]; }
|
||||
int getChannelMgrCount() { return channelMgrCount; }
|
||||
f32 getVibDepth() const { return mVibDepth; }
|
||||
void setVibDepth(f32 param_0) { mVibDepth = param_0; }
|
||||
f32 getVibPitch() const { return mVibPitch; }
|
||||
void setVibPitch(f32 param_0) { mVibPitch = param_0; }
|
||||
f32 getTremDepth() const { return mTremDepth; }
|
||||
void setTremDepth(f32 param_0) { mTremDepth = param_0; }
|
||||
f32 getTremPitch() const { return mTremPitch; }
|
||||
void setTremPitch(f32 param_0) { mTremPitch = param_0; }
|
||||
u16 getVibDelay() const { return mVibDelay; }
|
||||
void setVibDelay(u32 param_0) { mVibDelay = param_0; }
|
||||
u16 getTremDelay() const { return mTremDelay; }
|
||||
void setTremDelay(u32 param_0) { mTremDelay = param_0; }
|
||||
u8 getStatus() const { return mStatus; }
|
||||
JASTrack* getChild(u32 index) { return field_0x130[index]; }
|
||||
inline void setAutoDelete(u8 param_0) {
|
||||
field_0x216.autoDelete = param_0;
|
||||
}
|
||||
void setAutoDelete(u8 param_0) { field_0x216.autoDelete = param_0; }
|
||||
f32 getPanPower() const { return mPanPower; }
|
||||
void setPanPower(f32 param_0) { mPanPower = param_0; }
|
||||
u32 getSkipSample() const { return mSkipSample; }
|
||||
void setSkipSample(u32 param_0) { mSkipSample = param_0; }
|
||||
u16 getDirectRelease() const { return mDirectRelease; }
|
||||
void setDirectRelease(u16 param_0) {mDirectRelease = param_0; }
|
||||
u16 getTimebase() const { return mTimebase; }
|
||||
s8 getTranspose() const { return mTranspose; }
|
||||
void setTranspose(u32 param_0) { mTranspose = param_0; }
|
||||
u16 getBankNumber() const { return mBankNumber; }
|
||||
void setBankNumber(u16 param_0) { mBankNumber = param_0; }
|
||||
u16 getProgNumber() const { return mProgNumber; }
|
||||
void setProgNumber(u16 param_0) { mProgNumber = param_0; }
|
||||
u8 getBendSense() const { return mBendSense; }
|
||||
void setBendSense(u8 param_0) { mBendSense = param_0; }
|
||||
u8 getNoteOnPrio() const { return mNoteOnPrio; }
|
||||
void setNoteOnPrio(u8 param_0) { mNoteOnPrio = param_0; }
|
||||
u8 getReleasePrio() const { return mReleasePrio; }
|
||||
void setReleasePrio(u8 param_0) { mReleasePrio = param_0; }
|
||||
u8 getGateRate() const { return mGateRate; }
|
||||
void setGateRate(u8 param_0) { mGateRate = param_0; }
|
||||
|
||||
/* 0x000 */ u8 field_0x0[0x5c]; // JASSeqCtrl
|
||||
/* 0x05C */ u8 field_0x5c[0x24]; // JASTrackPort
|
||||
/* 0x080 */ u8 field_0x80[0x1c]; // JASRegisterParam
|
||||
/* 0x000 */ JASSeqCtrl mSeqCtrl;
|
||||
/* 0x05C */ JASTrackPort mTrackPort;
|
||||
/* 0x080 */ JASRegisterParam mRegisterParam;
|
||||
/* 0x09C */ MoveParam_ field_0x9c[6];
|
||||
/* 0x0e4 */ u8 mOscParam[0x30]; // JASOscillator::Data[2]
|
||||
/* 0x114 */ u8 field_0x114[0x18]; // JASOscillator::Point[4]
|
||||
/* 0x12C */ JASTrack* mParent;
|
||||
/* 0x130 */ JASTrack* field_0x130[16];
|
||||
/* 0x130 */ JASTrack* mChildren[16];
|
||||
/* 0x170 */ TChannelMgr* field_0x170[4];
|
||||
/* 0x180 */ TChannelMgr field_0x180;
|
||||
/* 0x1D0 */ int channelMgrCount;
|
||||
/* 0x1D4 */ void* field_0x1d4;
|
||||
/* 0x1D8 */ f32 field_0x1d8;
|
||||
/* 0x1DC */ f32 field_0x1dc;
|
||||
/* 0x1E0 */ f32 field_0x1e0;
|
||||
/* 0x1E4 */ f32 field_0x1e4;
|
||||
/* 0x1E8 */ f32 field_0x1e8;
|
||||
/* 0x1EC */ f32 field_0x1ec;
|
||||
/* 0x1F0 */ u16 field_0x1f0;
|
||||
/* 0x1F2 */ u16 field_0x1f2;
|
||||
/* 0x1E0 */ f32 mVibDepth;
|
||||
/* 0x1E4 */ f32 mVibPitch;
|
||||
/* 0x1E8 */ f32 mTremDepth;
|
||||
/* 0x1EC */ f32 mTremPitch;
|
||||
/* 0x1F0 */ u16 mVibDelay;
|
||||
/* 0x1F2 */ u16 mTremDelay;
|
||||
/* 0x1F4 */ short field_0x1f4[8];
|
||||
/* 0x204 */ short field_0x204[8];
|
||||
/* 0x214 */ char field_0x214;
|
||||
@@ -159,20 +201,20 @@ struct JASTrack {
|
||||
u8 flag6 : 1;
|
||||
u8 flag7 : 1;
|
||||
} field_0x216;
|
||||
/* 0x218 */ f32 field_0x218;
|
||||
/* 0x218 */ f32 mPanPower;
|
||||
/* 0x21C */ f32 field_0x21c;
|
||||
/* 0x220 */ u32 field_0x220;
|
||||
/* 0x224 */ short field_0x224;
|
||||
/* 0x220 */ u32 mSkipSample;
|
||||
/* 0x224 */ u16 mDirectRelease;
|
||||
/* 0x226 */ u16 field_0x226;
|
||||
/* 0x228 */ u16 field_0x228;
|
||||
/* 0x22A */ s8 field_0x22a;
|
||||
/* 0x228 */ u16 mTimebase;
|
||||
/* 0x22A */ s8 mTranspose;
|
||||
/* 0x22B */ char field_0x22b;
|
||||
/* 0x22C */ short field_0x22c;
|
||||
/* 0x22E */ short field_0x22e;
|
||||
/* 0x230 */ char field_0x230;
|
||||
/* 0x231 */ char field_0x231;
|
||||
/* 0x232 */ char field_0x232;
|
||||
/* 0x233 */ char field_0x233;
|
||||
/* 0x22C */ u16 mBankNumber;
|
||||
/* 0x22E */ u16 mProgNumber;
|
||||
/* 0x230 */ u8 mBendSense;
|
||||
/* 0x231 */ u8 mNoteOnPrio;
|
||||
/* 0x232 */ u8 mReleasePrio;
|
||||
/* 0x233 */ u8 mGateRate;
|
||||
/* 0x234 */ u16 field_0x234[6];
|
||||
/* 0x240 */ u8 field_0x240[0x08]; // TLinkListNode
|
||||
};
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
#ifndef JASTRACKPORT_H
|
||||
#define JASTRACKPORT_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class JASTrackPort {
|
||||
public:
|
||||
/* 8029354C */ void init();
|
||||
/* 8029357C */ u16 readImport(u32);
|
||||
/* 802935A0 */ u16 readExport(u32);
|
||||
/* 802935C4 */ void writeImport(u32, u16);
|
||||
/* 802935E8 */ void writeExport(u32, u16);
|
||||
/* 8029360C */ u32 checkImport(u32) const;
|
||||
/* 80293628 */ u32 checkExport(u32) const;
|
||||
|
||||
u16 get(u32 param_0) { return field_0x4[param_0]; }
|
||||
void set(u32 param_0, u16 param_1) { field_0x4[param_0] = param_1; }
|
||||
|
||||
u16 field_0x0;
|
||||
u16 field_0x2;
|
||||
u16 field_0x4[16];
|
||||
};
|
||||
|
||||
#endif /* JASTRACKPORT_H */
|
||||
|
||||
@@ -11,6 +11,9 @@ T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) {
|
||||
}
|
||||
}
|
||||
|
||||
inline u8 JSULoNibble(u8 param_0) { return param_0 & 0x0f; }
|
||||
inline u8 JSUHiNibble(u8 param_0) {return param_0 >> 4; }
|
||||
|
||||
inline u8 JSULoByte(u16 in) {
|
||||
return in & 0xff;
|
||||
}
|
||||
@@ -19,4 +22,6 @@ inline u8 JSUHiByte(u16 in) {
|
||||
return in >> 8;
|
||||
}
|
||||
|
||||
inline u16 JSULoHalf(u32 param_0) {return param_0; }
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user