Skip to content

Commit

Permalink
JASSeqParser OK
Browse files Browse the repository at this point in the history
credits to cuyler for regswap fix
  • Loading branch information
LagoLunatic committed Sep 8, 2024
1 parent 35bc8a4 commit 1606255
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
8 changes: 2 additions & 6 deletions src/JSystem/JAudio/JASSeqParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1606255

Please sign in to comment.