diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..99a6931 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,11 @@ +# Change Log + +### Version 0.2.0 + +- Added VGM logger (with `vgm_cmp` postprocessing and proper GD3 tag support); use `vgmlpfnd` manually for looped songs +- Added `NCx` noise pitch rebind effect +- Channels now use subtractive mixing instead of multiplicative mixing for channel volume and instrument volume + +### Version 0.1.0 + +- Initial release diff --git a/FamiTracker.rc b/FamiTracker.rc index b8af54d..7575cca 100644 --- a/FamiTracker.rc +++ b/FamiTracker.rc @@ -1615,7 +1615,7 @@ BEGIN IDS_DPCM_IMPORT_INVALID_WAVEFILE "Cannot load this sample, file is invalid or incompatible. (Only uncompressed PCM is supported.)" IDS_INST_FILE_ERROR "Could not load instrument file! Check that you have the most recent version of SnevenTracker." - IDS_NEW_2A03_INSTRUMENT "New 2A03 instrument" + IDS_NEW_2A03_INSTRUMENT "New SN76489 instrument" IDS_NEW_VRC6_INSTRUMENT "New VRC6 instrument" IDS_NEW_VRC7_INSTRUMENT "New VRC7 instrument" IDS_NEW_FDS_INSTRUMENT "New FDS instrument" diff --git a/Source/APU/Mixer.cpp b/Source/APU/Mixer.cpp index b351ea0..54a41d3 100644 --- a/Source/APU/Mixer.cpp +++ b/Source/APU/Mixer.cpp @@ -230,7 +230,7 @@ void CMixer::AddValue(int ChanID, int Chip, int Value, int AbsValue, int FrameCy switch (ChanID) { case CHANID_SQUARE1: case CHANID_SQUARE2: - case CHANID_TRIANGLE: + case CHANID_SQUARE3: case CHANID_NOISE: SynthSN76489Left.offset(FrameCycles, Value, &BlipBuffer); } @@ -257,7 +257,7 @@ void CMixer::StoreChannelLevel(int Channel, int Value) switch (Channel) { // // // case CHANID_SQUARE1: case CHANID_SQUARE2: - case CHANID_TRIANGLE: + case CHANID_SQUARE3: case CHANID_NOISE: int Lv = AbsVol; AbsVol = 0; diff --git a/Source/APU/SN76489_new.cpp b/Source/APU/SN76489_new.cpp index dacf2bf..f942a4d 100644 --- a/Source/APU/SN76489_new.cpp +++ b/Source/APU/SN76489_new.cpp @@ -213,8 +213,8 @@ void CSN76489::Write(uint16 Address, uint8 Value) default: Value &= 0x3F; m_SquareChannel[m_iAddressLatch / 2]->Write(1, Value & 0x3F); - if (m_iAddressLatch / 2 == CHANID_TRIANGLE) - m_NoiseChannel->CachePeriod(m_SquareChannel[CHANID_TRIANGLE]->GetPeriod()); + if (m_iAddressLatch / 2 == CHANID_SQUARE3) + m_NoiseChannel->CachePeriod(m_SquareChannel[CHANID_SQUARE3]->GetPeriod()); if (m_pVGMWriter != nullptr) m_pVGMWriter->WriteReg(0, Value); } @@ -224,7 +224,7 @@ void CSN76489::Write(uint16 Address, uint8 Value) m_pVGMWriter->WriteReg(0, 0x80 | (Address << 4) | Value); if (Address == 4 || Address == 5) - m_NoiseChannel->CachePeriod(m_SquareChannel[CHANID_TRIANGLE]->GetPeriod()); + m_NoiseChannel->CachePeriod(m_SquareChannel[CHANID_SQUARE3]->GetPeriod()); } uint8 CSN76489::Read(uint16 Address, bool &Mapped) diff --git a/Source/APU/Types.h b/Source/APU/Types.h index ed84ed1..2cee6e2 100644 --- a/Source/APU/Types.h +++ b/Source/APU/Types.h @@ -28,7 +28,7 @@ const uint8 SNDCHIP_NONE = 0; enum chan_id_t { CHANID_SQUARE1, CHANID_SQUARE2, - CHANID_TRIANGLE, + CHANID_SQUARE3, CHANID_NOISE, // // // CHANNELS /* Total number of channels */ diff --git a/Source/ChannelMap.cpp b/Source/ChannelMap.cpp index ddbd02d..7b7862f 100644 --- a/Source/ChannelMap.cpp +++ b/Source/ChannelMap.cpp @@ -48,11 +48,11 @@ void CChannelMap::SetupSoundChips() // Add available chips #ifdef _DEBUG // Under development - AddChip(SNDCHIP_NONE, new CInstrument2A03(), _T("NES channels only")); + AddChip(SNDCHIP_NONE, new CInstrument2A03(), _T("SN76489 channels only")); // // // #else /* _DEBUG */ // Ready for use - AddChip(SNDCHIP_NONE, new CInstrument2A03(), _T("NES channels only")); + AddChip(SNDCHIP_NONE, new CInstrument2A03(), _T("SN76489 channels only")); // // // #endif /* _DEBUG */ } diff --git a/Source/ChannelsDlg.cpp b/Source/ChannelsDlg.cpp index 50e3230..10add28 100644 --- a/Source/ChannelsDlg.cpp +++ b/Source/ChannelsDlg.cpp @@ -17,7 +17,7 @@ const TCHAR *ROOT_ITEMS[] = { const int CHILD_ITEMS_ID[ROOT_ITEM_COUNT][9] = { // 2A03 - {CHANID_SQUARE1, CHANID_SQUARE2, CHANID_TRIANGLE, CHANID_NOISE}, // // // + {CHANID_SQUARE1, CHANID_SQUARE2, CHANID_SQUARE3, CHANID_NOISE}, // // // }; const TCHAR *CHILD_ITEMS[ROOT_ITEM_COUNT][9] = { @@ -92,7 +92,7 @@ BOOL CChannelsDlg::OnInitDialog() /* AddChannel(CHANID_SQUARE1); AddChannel(CHANID_SQUARE2); - AddChannel(CHANID_TRIANGLE); + AddChannel(CHANID_SQUARE3); AddChannel(CHANID_NOISE); AddChannel(CHANID_DPCM); */ diff --git a/Source/ChannelsSN7.cpp b/Source/ChannelsSN7.cpp index 63356f2..346e90c 100644 --- a/Source/ChannelsSN7.cpp +++ b/Source/ChannelsSN7.cpp @@ -32,7 +32,7 @@ //#define NOISE_PITCH_SCALE int CChannelHandlerSN7::m_iRegisterPos[] = { - CHANID_SQUARE1, CHANID_SQUARE2, CHANID_TRIANGLE + CHANID_SQUARE1, CHANID_SQUARE2, CHANID_SQUARE3 }; // // // CChannelHandlerSN7::CChannelHandlerSN7() : @@ -75,8 +75,8 @@ void CChannelHandlerSN7::HandleCustomEffects(int EffNum, int EffParam) EffParam -= 0xC1; m_iRegisterPos[CHANID_SQUARE1] = CHANID_SQUARE1; m_iRegisterPos[CHANID_SQUARE2] = CHANID_SQUARE2; - m_iRegisterPos[CHANID_TRIANGLE] = EffParam; - m_iRegisterPos[EffParam] = CHANID_TRIANGLE; + m_iRegisterPos[CHANID_SQUARE3] = EffParam; + m_iRegisterPos[EffParam] = CHANID_SQUARE3; } break; case EF_DUTY_CYCLE: diff --git a/Source/Compiler.cpp b/Source/Compiler.cpp index 311d96e..58da82b 100644 --- a/Source/Compiler.cpp +++ b/Source/Compiler.cpp @@ -1453,7 +1453,7 @@ void CCompiler::WriteChannelMap() pChunk->StoreByte(CHANID_SQUARE1 + 1); pChunk->StoreByte(CHANID_SQUARE2 + 1); - pChunk->StoreByte(CHANID_TRIANGLE + 1); + pChunk->StoreByte(CHANID_SQUARE3 + 1); pChunk->StoreByte(CHANID_NOISE + 1); if (m_pDocument->ExpansionEnabled(SNDCHIP_VRC6)) { diff --git a/Source/InstrumentEditDlg.cpp b/Source/InstrumentEditDlg.cpp index bd39716..1e02c63 100644 --- a/Source/InstrumentEditDlg.cpp +++ b/Source/InstrumentEditDlg.cpp @@ -40,7 +40,7 @@ const int CInstrumentEditDlg::KEYBOARD_HEIGHT = 58; const TCHAR *CInstrumentEditDlg::CHIP_NAMES[] = { _T(""), - _T("2A03"), + _T("SN76489"), // // // }; diff --git a/Source/InstrumentEditor2A03.h b/Source/InstrumentEditor2A03.h index 02c08e1..d85768b 100644 --- a/Source/InstrumentEditor2A03.h +++ b/Source/InstrumentEditor2A03.h @@ -30,7 +30,7 @@ class CInstrumentEditor2A03 : public CSequenceInstrumentEditPanel CInstrumentEditor2A03(CWnd* pParent = NULL); // standard constructor virtual ~CInstrumentEditor2A03(); virtual int GetIDD() const { return IDD; }; - virtual TCHAR *GetTitle() const { return _T("2A03 settings"); }; + virtual TCHAR *GetTitle() const { return _T("SN76489 settings"); }; // // // // Public virtual void SelectInstrument(int Instrument); diff --git a/Source/MainFrm.cpp b/Source/MainFrm.cpp index f492025..11a8305 100644 --- a/Source/MainFrm.cpp +++ b/Source/MainFrm.cpp @@ -161,7 +161,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) ON_COMMAND(ID_FILE_GENERALSETTINGS, OnFileGeneralsettings) ON_COMMAND(ID_FILE_IMPORTTEXT, OnFileImportText) ON_COMMAND(ID_FILE_EXPORTTEXT, OnFileExportText) - ON_COMMAND(ID_FILE_CREATE_NSF, OnCreateNSF) +// // // ON_COMMAND(ID_FILE_CREATE_NSF, OnCreateNSF) ON_COMMAND(ID_FILE_CREATEWAV, OnCreateWAV) ON_COMMAND(ID_EDIT_UNDO, OnEditUndo) ON_COMMAND(ID_EDIT_REDO, OnEditRedo) @@ -204,7 +204,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) ON_COMMAND(ID_TRACKER_KILLSOUND, OnTrackerKillsound) ON_COMMAND(ID_TRACKER_SWITCHTOTRACKINSTRUMENT, OnTrackerSwitchToInstrument) // // // - ON_COMMAND(ID_TRACKER_DISPLAYREGISTERSTATE, OnTrackerDisplayRegisterState) +// // // ON_COMMAND(ID_TRACKER_DISPLAYREGISTERSTATE, OnTrackerDisplayRegisterState) ON_COMMAND(ID_VIEW_CONTROLPANEL, OnViewControlpanel) ON_COMMAND(ID_HELP, CFrameWnd::OnHelp) ON_COMMAND(ID_HELP_FINDER, CFrameWnd::OnHelpFinder) @@ -2144,7 +2144,7 @@ void CMainFrame::OnNewInstrumentMenu(NMHDR* pNotifyStruct, LRESULT* result) int Chip = pDoc->GetExpansionChip(); int SelectedChip = pDoc->GetChannel(pView->GetSelectedChannel())->GetChip(); // where the cursor is located - menu.AppendMenu(MF_STRING, ID_INSTRUMENT_ADD_2A03, _T("New 2A03 instrument")); + menu.AppendMenu(MF_STRING, ID_INSTRUMENT_ADD_2A03, _T("New SN76489 instrument")); // // // // // // diff --git a/Source/PatternCompiler.cpp b/Source/PatternCompiler.cpp index 83d0e73..9c12e9a 100644 --- a/Source/PatternCompiler.cpp +++ b/Source/PatternCompiler.cpp @@ -329,13 +329,13 @@ void CPatternCompiler::CompileData(int Track, int Pattern, int Channel) } break;*/ case EF_SWEEPUP: - if (ChanID < CHANID_TRIANGLE) { + if (ChanID < CHANID_SQUARE3) { WriteData(Command(CMD_EFF_SWEEP)); WriteData(0x88 | (EffParam & 0x77)); // Calculate sweep } break; case EF_SWEEPDOWN: - if (ChanID < CHANID_TRIANGLE) { + if (ChanID < CHANID_SQUARE3) { WriteData(Command(CMD_EFF_SWEEP)); WriteData(0x80 | (EffParam & 0x77)); // Calculate sweep } diff --git a/Source/SoundGen.cpp b/Source/SoundGen.cpp index 338e039..5fdff3e 100644 --- a/Source/SoundGen.cpp +++ b/Source/SoundGen.cpp @@ -178,7 +178,7 @@ void CSoundGen::CreateChannels() // 2A03/2A07 AssignChannel(new CTrackerChannel(_T("Square 1"), SNDCHIP_NONE, CHANID_SQUARE1), new CSquareChan()); AssignChannel(new CTrackerChannel(_T("Square 2"), SNDCHIP_NONE, CHANID_SQUARE2), new CSquareChan()); - AssignChannel(new CTrackerChannel(_T("Square 3"), SNDCHIP_NONE, CHANID_TRIANGLE), new CSquareChan()); + AssignChannel(new CTrackerChannel(_T("Square 3"), SNDCHIP_NONE, CHANID_SQUARE3), new CSquareChan()); AssignChannel(new CTrackerChannel(_T("Noise"), SNDCHIP_NONE, CHANID_NOISE), new CNoiseChan()); // // // } @@ -1233,7 +1233,7 @@ void CSoundGen::LoadMachineSettings(int Machine, int Rate) // // // // Setup note tables m_pChannels[CHANID_SQUARE1]->SetNoteTable(m_pNoteLookupTable); m_pChannels[CHANID_SQUARE2]->SetNoteTable(m_pNoteLookupTable); - m_pChannels[CHANID_TRIANGLE]->SetNoteTable(m_pNoteLookupTable); + m_pChannels[CHANID_SQUARE3]->SetNoteTable(m_pNoteLookupTable); // // // }