From 1606255c34426fbf545ec496d26df2df53d4e04d Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sat, 7 Sep 2024 23:34:52 -0400 Subject: [PATCH] JASSeqParser OK credits to cuyler for regswap fix --- configure.py | 2 +- src/JSystem/JAudio/JASSeqParser.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/configure.py b/configure.py index b19d1b52..3f23754b 100644 --- a/configure.py +++ b/configure.py @@ -744,7 +744,7 @@ def JSystemLib(lib_name, objects): Object(Matching, "JSystem/JAudio/JASPlayer_impl.cpp"), Object(Matching, "JSystem/JAudio/JASRegisterParam.cpp"), Object(Matching, "JSystem/JAudio/JASSeqCtrl.cpp"), - Object(NonMatching, "JSystem/JAudio/JASSeqParser.cpp"), + Object(Matching, "JSystem/JAudio/JASSeqParser.cpp"), Object(NonMatching, "JSystem/JAudio/JASTrack.cpp"), Object(Matching, "JSystem/JAudio/JASTrackInterrupt.cpp"), Object(Matching, "JSystem/JAudio/JASTrackPort.cpp"), diff --git a/src/JSystem/JAudio/JASSeqParser.cpp b/src/JSystem/JAudio/JASSeqParser.cpp index fb4f4918..00a63019 100644 --- a/src/JSystem/JAudio/JASSeqParser.cpp +++ b/src/JSystem/JAudio/JASSeqParser.cpp @@ -726,10 +726,7 @@ int JASystem::TSeqParser::Cmd_Process(TTrack* track, u8 r5, u16 r6) { } JASystem::TSeqParser::CmdFunc cmdFunc = sCmdPList[r5-0xC0]; - if (cmdFunc == NULL) { - return 0; - } - return (this->*cmdFunc)(track, sp18); + return cmdFunc == NULL ? 0 : (this->*cmdFunc)(track, sp18); } /* 8027FA48-8027FB08 .text RegCmd_Process__Q28JASystem10TSeqParserFPQ28JASystem6TTrackii */ @@ -842,7 +839,6 @@ int JASystem::TSeqParser::cmdNoteOff(TTrack* track, u8 flag) { /* 8027FE08-80280148 .text cmdNoteOn__Q28JASystem10TSeqParserFPQ28JASystem6TTrackUc */ int JASystem::TSeqParser::cmdNoteOn(TTrack* track, u8 note) { - /* Nonmatching */ u32 r27 = track->getSeq()->readByte(); if (r27 & 0x80) { note = track->exchangeRegisterValue(note); @@ -943,7 +939,7 @@ int JASystem::TSeqParser::cmdNoteOn(TTrack* track, u8 note) { return 0; } - track->getSeq()->wait(r24 ? r27 : -1); + track->getSeq()->wait(r24 ? (s32)r27 : -1); return 1; }