Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Fixed 5B Instrument Recording #138

Merged
merged 2 commits into from
Jul 6, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Source/InstrumentRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ void CInstrumentRecorder::RecordInstrument(const unsigned Tick, CView *pView) /
}
break;
case SNDCHIP_S5B:
Val = 0x1F & REG(0x06) | (0x10 & REG(0x08 + ID)) << 1
//0x1F accounts for inverted noise period value
Val = 0x1F & (0x1F - REG(0x06)) | (0x10 & REG(0x08 + ID)) << 1
Copy link
Owner

@nyanpasu64 nyanpasu64 Jun 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks a bit suspicious, maybe 0x1F - (0x1F & REG(0x06)) is more correct, idk I haven't compiled the code yet.

| (0x01 << ID & ~REG(0x07)) << (6 - ID) | (0x08 << ID & ~REG(0x07)) << (4 - ID); break;
}
break;
Expand Down Expand Up @@ -404,4 +405,4 @@ void CInstrumentRecorder::FinalizeRecordInstrument()
N163Inst->SetSample(0, j, 0);
break;
}
}
}