Skip to content

Commit

Permalink
0.2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Dec 4, 2016
1 parent 54d001a commit 44ef06e
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 24 deletions.
11 changes: 11 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion FamiTracker.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Source/APU/Mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Source/APU/SN76489_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Source/APU/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions Source/ChannelMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
Expand Down
4 changes: 2 additions & 2 deletions Source/ChannelsDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down Expand Up @@ -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);
*/
Expand Down
6 changes: 3 additions & 3 deletions Source/ChannelsSN7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() :
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Source/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 1 addition & 1 deletion Source/InstrumentEditDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const int CInstrumentEditDlg::KEYBOARD_HEIGHT = 58;

const TCHAR *CInstrumentEditDlg::CHIP_NAMES[] = {
_T(""),
_T("2A03"),
_T("SN76489"),
// // //
};

Expand Down
2 changes: 1 addition & 1 deletion Source/InstrumentEditor2A03.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions Source/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")); // // //

// // //

Expand Down
4 changes: 2 additions & 2 deletions Source/PatternCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions Source/SoundGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
// // //
}
Expand Down Expand Up @@ -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);
// // //
}

Expand Down

0 comments on commit 44ef06e

Please sign in to comment.