mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 05:14:58 -04:00
JASTrackPort
This commit is contained in:
+1
-1
@@ -669,7 +669,7 @@ config.libs = [
|
||||
Object(NonMatching, "JSystem/JAudio/JASSeqParser.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASTrack.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASTrackInterrupt.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASTrackPort.cpp"),
|
||||
Object(Matching, "JSystem/JAudio/JASTrackPort.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASBank.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASWaveBank.cpp"),
|
||||
Object(NonMatching, "JSystem/JAudio/JASBasicBank.cpp"),
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef JASTRACKPORT_H
|
||||
#define JASTRACKPORT_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
|
||||
namespace JASystem {
|
||||
class TTrackPort {
|
||||
public:
|
||||
void init();
|
||||
u16 readImport(int);
|
||||
u16 readExport(int);
|
||||
void writeImport(int, u16);
|
||||
void writeExport(int, u16);
|
||||
|
||||
/* 0x00 */ u8 field_0x0[16];
|
||||
/* 0x10 */ u8 field_0x10[16];
|
||||
/* 0x20 */ u16 field_0x20[16];
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* JASTRACKPORT_H */
|
||||
@@ -3,31 +3,45 @@
|
||||
// Translation Unit: JASTrackPort.cpp
|
||||
//
|
||||
|
||||
#include "JASTrackPort.h"
|
||||
#include "dolphin/types.h"
|
||||
#include "JSystem/JAudio/JASTrackPort.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
const u32 MAX_PORTS = 16;
|
||||
|
||||
/* 802842A8-802842E8 .text init__Q28JASystem10TTrackPortFv */
|
||||
void JASystem::TTrackPort::init() {
|
||||
/* Nonmatching */
|
||||
for (int i = 0; i < 16; i++) {
|
||||
field_0x0[i] = 0;
|
||||
field_0x10[i] = 0;
|
||||
field_0x20[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* 802842E8-8028437C .text readImport__Q28JASystem10TTrackPortFi */
|
||||
void JASystem::TTrackPort::readImport(int) {
|
||||
/* Nonmatching */
|
||||
u16 JASystem::TTrackPort::readImport(int port_num) {
|
||||
JUT_ASSERT(31, port_num >= 0 && port_num < MAX_PORTS);
|
||||
field_0x0[port_num] = 0;
|
||||
return field_0x20[port_num];
|
||||
}
|
||||
|
||||
/* 8028437C-80284414 .text readExport__Q28JASystem10TTrackPortFi */
|
||||
void JASystem::TTrackPort::readExport(int) {
|
||||
/* Nonmatching */
|
||||
u16 JASystem::TTrackPort::readExport(int port_num) {
|
||||
JUT_ASSERT(38, port_num >= 0 && port_num < MAX_PORTS);
|
||||
field_0x10[port_num] = 0;
|
||||
return field_0x20[port_num];
|
||||
}
|
||||
|
||||
/* 80284414-802844AC .text writeImport__Q28JASystem10TTrackPortFiUs */
|
||||
void JASystem::TTrackPort::writeImport(int, unsigned short) {
|
||||
/* Nonmatching */
|
||||
void JASystem::TTrackPort::writeImport(int port_num, u16 value) {
|
||||
JUT_ASSERT(45, port_num >= 0 && port_num < MAX_PORTS);
|
||||
field_0x0[port_num] = 1;
|
||||
field_0x20[port_num] = value;
|
||||
}
|
||||
|
||||
/* 802844AC-80284548 .text writeExport__Q28JASystem10TTrackPortFiUs */
|
||||
void JASystem::TTrackPort::writeExport(int, unsigned short) {
|
||||
/* Nonmatching */
|
||||
void JASystem::TTrackPort::writeExport(int port_num, u16 value) {
|
||||
JUT_ASSERT(51, port_num >= 0 && port_num < MAX_PORTS);
|
||||
field_0x10[port_num] = 1;
|
||||
field_0x20[port_num] = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user