diff --git a/Dn-FamiTracker.vcxproj b/Dn-FamiTracker.vcxproj index f2ca4eb..18e30ac 100644 --- a/Dn-FamiTracker.vcxproj +++ b/Dn-FamiTracker.vcxproj @@ -23,7 +23,7 @@ Dn-FamiTracker MFCProj 8.1 - Dn-FamiTracker + E-FamiTracker 8.1 @@ -756,7 +756,7 @@ makehm /h /a afxhh.h IDW_,HIDW_,0x50000 "%(FullPath)" >> "hlp\HTMLDefines. - + true @@ -765,7 +765,7 @@ makehm /h /a afxhh.h IDW_,HIDW_,0x50000 "%(FullPath)" >> "hlp\HTMLDefines. - + @@ -805,7 +805,7 @@ makehm /h /a afxhh.h IDW_,HIDW_,0x50000 "%(FullPath)" >> "hlp\HTMLDefines. - + true true diff --git a/Dn-FamiTracker.vcxproj.filters b/Dn-FamiTracker.vcxproj.filters index 6949e3b..47dc2af 100644 --- a/Dn-FamiTracker.vcxproj.filters +++ b/Dn-FamiTracker.vcxproj.filters @@ -1501,7 +1501,7 @@ - + Resource Files @@ -1612,11 +1612,11 @@ Header Files\Dialog Boxes Headers\Instrument Headers\Related Headers\Resampler Headers - + - + Source Files diff --git a/Dn-FamiTracker.rc b/E-FamiTracker.rc similarity index 98% rename from Dn-FamiTracker.rc rename to E-FamiTracker.rc index e833647..a68d66c 100644 --- a/Dn-FamiTracker.rc +++ b/E-FamiTracker.rc @@ -109,7 +109,7 @@ BEGIN MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE MENUITEM "Save &As...", ID_FILE_SAVE_AS MENUITEM SEPARATOR - MENUITEM "Create NS&F...\tCtrl+E", ID_FILE_CREATE_NSF +// MENUITEM "Create NS&F...\tCtrl+E", ID_FILE_CREATE_NSF MENUITEM "Create WA&V...\tCtrl+Shift+E", ID_FILE_CREATEWAV MENUITEM SEPARATOR MENUITEM "&Import Text...", ID_FILE_IMPORTTEXT @@ -321,17 +321,17 @@ BEGIN MENUITEM "&Popup", ID_CONTROLPANEL_POPUP, INACTIVE END END - POPUP "&Help" - BEGIN - MENUITEM "&Help Topics\tF1", ID_HELP_FINDER - MENUITEM "&Effect Table", ID_HELP_EFFECTTABLE - MENUITEM "&FAQ", ID_HELP_FAQ - MENUITEM SEPARATOR - MENUITEM "&Performance", ID_HELP_PERFORMANCE - MENUITEM SEPARATOR - MENUITEM "&About Dn-FamiTracker...", ID_APP_ABOUT - MENUITEM "Check for updates...", ID_HELP_VERSION_CHECK - END + //POPUP "&Help" + //BEGIN + // //MENUITEM "&Help Topics\tF1", ID_HELP_FINDER + // //MENUITEM "&Effect Table", ID_HELP_EFFECTTABLE + // MENUITEM "&FAQ", ID_HELP_FAQ + // MENUITEM SEPARATOR + // MENUITEM "&Performance", ID_HELP_PERFORMANCE + // MENUITEM SEPARATOR + //MENUITEM "&About Dn-FamiTracker...", ID_APP_ABOUT + // //MENUITEM "Check for updates...", ID_HELP_VERSION_CHECK + //END END IDR_PATTERN_POPUP MENU @@ -550,14 +550,14 @@ BEGIN BEGIN BLOCK "040904e4" BEGIN - VALUE "CompanyName", "HertzDevil" - VALUE "FileDescription", "Dn-FamiTracker, Extension of FamiTracker" - VALUE "FileVersion", "0.3.14.5" - VALUE "InternalName", "Dn-FamiTracker.exe" - VALUE "LegalCopyright", " (c) jsr, HertzDevil 2005-2016 All rights reserved." - VALUE "OriginalFilename", "Dn-FamiTracker.exe" - VALUE "ProductName", "Dn-FamiTracker" - VALUE "ProductVersion", "0.3.14.5" + VALUE "CompanyName", "Eulous" + VALUE "FileDescription", "E-FamiTracker, Mod of Dn-FamiTracker" + VALUE "FileVersion", "0.1.0" + VALUE "InternalName", "E-FamiTracker.exe" + VALUE "LegalCopyright", " (c) Eulous, jsr, HertzDevil 2005-2021 All rights reserved." + VALUE "OriginalFilename", "E-FamiTracker.exe" + VALUE "ProductName", "E-FamiTracker" + VALUE "ProductVersion", "0.1.0" END END BLOCK "VarFileInfo" @@ -2051,7 +2051,7 @@ IDI_RIGHT ICON "res/RightArrow.ico" // RT_MANIFEST // -ID_MANIFEST RT_MANIFEST "res/Dn-FamiTracker.manifest" +ID_MANIFEST RT_MANIFEST "res/E-FamiTracker.manifest" ///////////////////////////////////////////////////////////////////////////// @@ -2407,7 +2407,7 @@ IDR_HTML1 HTML "res/export_report.htm" STRINGTABLE BEGIN - IDR_MAINFRAME "Dn-FamiTracker\n\nDn-FamiTracker\nDn-FamiTracker modules (*.0cc;*.ftm)\n.0cc\n0CCFamiTracker.Document\n0CCFamiTracker.Document" + IDR_MAINFRAME "E-FamiTracker\nUntitled\n.0cc\n0CCFamiTracker.Document\n0CCFamiTracker.Document" IDS_FRAME_DROP_MOVE "Drop selection to move frames" IDS_DPCM_IMPORT_QUALITY_FORMAT "Quality: %1" IDS_CLIPBOARD_ERROR "Could not register clipboard format" @@ -2432,7 +2432,7 @@ BEGIN IDS_SEL_TERMINAL_SKIP "Error: Current selection may truncate other rows, consider enabling ""Show skipped rows""." IDS_PASTE_REPEATED_ROW "Warning: Clip data may overwrite itself during pasting. Do you want to apply the paste operation?" IDS_PASTE_NONTERMINAL "Warning: Clip data may alter frame lengths during pasting. Do you want to apply the paste operation?" - IDS_DISABLE_SAVE "Saving to external files is disabled in this build of Dn-FamiTracker." + IDS_DISABLE_SAVE "Saving to external files is disabled in this build of E-FamiTracker." IDS_BOOKMARK_EMPTY "The current track does not contain any bookmarks." IDS_POPULATE_PATTERNS "Do you want to copy a unique pattern for all frames? There is no undo for this command." IDS_BOOKMARK_FORMAT "Moved to bookmark %1. (Highlight: %2, %3)" @@ -2591,7 +2591,7 @@ END STRINGTABLE BEGIN - ID_FILE_GENERALSETTINGS "Open Dn-FamiTracker settings\nConfiguration" + ID_FILE_GENERALSETTINGS "Open E-FamiTracker settings\nConfiguration" ID_EDIT_ENABLEMIDI "Temporarly enable / disable commands from the MIDI device\nEnable MIDI" ID_TRACKER_PLAYROW "Play a single row\nPlay Current Row" END @@ -2611,8 +2611,8 @@ BEGIN IDS_MODULE_ERROR_NONE "This build is not allowed to bypass validation of loaded modules." IDS_FIND_EDIT_DISABLED "Replace will not work unless Edit Mode is enabled." IDS_ABOUT_TOOLTIP_WEB3 "Go to https://github.com/Gumball2415/Dn-FamiTracker" - IDS_FILE_LOAD_ERROR "Couldn't load file properly. Make sure you have the latest version of Dn-FamiTracker." - IDS_CONFIG_WINDOW "Dn-FamiTracker configuration" + IDS_FILE_LOAD_ERROR "Couldn't load file properly. Make sure you have the latest version of E-FamiTracker." + IDS_CONFIG_WINDOW "E-FamiTracker configuration" END STRINGTABLE @@ -2764,11 +2764,11 @@ BEGIN IDS_SONG_DELETE "Do you want to delete the selected songs? There is no undo for this command." IDS_SOUND_FAIL "It appears the current sound settings aren't working, change settings and try again." IDS_UNDERRUN_MESSAGE "Warning: Audio buffer underrun, increase the audio buffer size!" - IDS_WELCOME_VER_FORMAT "Welcome to Dn-FamiTracker %1, press F1 for help" + IDS_WELCOME_VER_FORMAT "Welcome to E-FamiTracker %1!" 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 Dn-FamiTracker." - IDS_NEW_2A03_INSTRUMENT "New 2A03 instrument" + IDS_INST_FILE_ERROR "Could not load instrument file! Check that you have the most recent version of E-FamiTracker." + IDS_NEW_2A03_INSTRUMENT "New 5E01 instrument" IDS_NEW_VRC6_INSTRUMENT "New VRC6 instrument" IDS_NEW_VRC7_INSTRUMENT "New VRC7 instrument" IDS_NEW_FDS_INSTRUMENT "New FDS instrument" @@ -2843,7 +2843,7 @@ BEGIN IDS_WAVE_EXPORT_DONE "Done" IDS_WAVE_EXPORT_FINISHED "finished" IDS_ABOUT_TOOLTIP_WEB "Go to http://hertzdevil.info/programs/" - IDS_ABOUT_VERSION_FORMAT "Dn-FamiTracker version %1" + IDS_ABOUT_VERSION_FORMAT "E-FamiTracker version %1" IDS_PROPERTIES_CHANNELS "Channels:" IDS_LOADING_DONE "File loaded" IDS_DPCM_IMPORT_SIZE_FORMAT "Converted size: %1 bytes" diff --git a/Dn-FamiTracker.reg b/E-FamiTracker.reg similarity index 100% rename from Dn-FamiTracker.reg rename to E-FamiTracker.reg diff --git a/Source/APU/nsfplay/xgm/devices/Sound/nes_apu.cpp b/Source/APU/nsfplay/xgm/devices/Sound/nes_apu.cpp index 8882223..85cbe42 100644 --- a/Source/APU/nsfplay/xgm/devices/Sound/nes_apu.cpp +++ b/Source/APU/nsfplay/xgm/devices/Sound/nes_apu.cpp @@ -92,8 +92,8 @@ namespace xgm static const INT16 sqrtbl[4][16] = { {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, - {1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + {0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, + {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0} }; scounter[i] -= clocks; diff --git a/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.cpp b/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.cpp index 31cd176..9dd48de 100644 --- a/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.cpp +++ b/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.cpp @@ -94,7 +94,7 @@ namespace xgm trkinfo[0].freq = clock/32/(trkinfo[0]._freq + 1); else trkinfo[0].freq = 0; - trkinfo[0].tone = -1; + trkinfo[0].tone = tduty; trkinfo[0].output = out[0]; break; case 1: @@ -234,12 +234,32 @@ namespace xgm // 三角波チャンネルの計算 戻り値は0-15 UINT32 NES_DMC::calc_tri (UINT32 clocks) { - static UINT32 tritbl[32] = + static UINT32 wavtbl[4][32] = { - 15,14,13,12,11,10, 9, 8, - 7, 6, 5, 4, 3, 2, 1, 0, - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9,10,11,12,13,14,15, + { + 15,14,13,12,11,10, 9, 8, + 7, 6, 5, 4, 3, 2, 1, 0, + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9,10,11,12,13,14,15, + }, + { + 15,15,14,14,13,13,12,12, + 11,11,10,10, 9, 9, 8, 8, + 7, 7, 6, 6, 5, 5, 4, 4, + 3, 3, 2, 2, 1, 1, 0, 0, + }, + { + 15,15,15,15,15,15,15,15, + 15,15,15,15,15,15,15,15, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + }, + { + 8, 9,10,12,13,14,14,15, + 15,15,14,14,13,12,10, 9, + 8, 6, 5, 3, 2, 1, 1, 0, + 0, 0, 1, 1, 2, 3, 5, 6, + }, }; if (linear_counter > 0 && length_counter[0] > 0 @@ -252,8 +272,8 @@ namespace xgm counter[0] += (tri_freq + 1); } } - - UINT32 ret = tritbl[tphase]; + + UINT32 ret = wavtbl[tduty][tphase]; return ret; } @@ -573,6 +593,7 @@ namespace xgm counter[1] = 0; counter[2] = 0; tphase = 0; + tduty = 0; nfreq = wavlen_table[0][0]; dfreq = freq_table[0][0]; tri_freq = 0; @@ -746,6 +767,7 @@ namespace xgm break; case 0x4009: + tduty = val & 3; break; case 0x400a: diff --git a/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.h b/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.h index 1542131..1c74515 100644 --- a/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.h +++ b/Source/APU/nsfplay/xgm/devices/Sound/nes_dmc.h @@ -63,6 +63,7 @@ namespace xgm INT32 counter[3]; // frequency dividers int tphase; // triangle phase + int tduty; // triangle/saw switch UINT32 nfreq; // noise frequency UINT32 dfreq; // DPCM frequency diff --git a/Source/ChannelMap.cpp b/Source/ChannelMap.cpp index f3d4065..b556d5a 100644 --- a/Source/ChannelMap.cpp +++ b/Source/ChannelMap.cpp @@ -46,7 +46,7 @@ CChannelMap::~CChannelMap() void CChannelMap::SetupSoundChips() { // Add available chips - AddChip(SNDCHIP_NONE, INST_2A03, _T("NES channels only")); + AddChip(SNDCHIP_NONE, INST_2A03, _T("5E01 channels only")); AddChip(SNDCHIP_VRC6, INST_VRC6, _T("Konami VRC6")); AddChip(SNDCHIP_VRC7, INST_VRC7, _T("Konami VRC7")); AddChip(SNDCHIP_FDS, INST_FDS, _T("Nintendo FDS sound")); diff --git a/Source/Channels2A03.cpp b/Source/Channels2A03.cpp index b4a7ea3..ae23013 100644 --- a/Source/Channels2A03.cpp +++ b/Source/Channels2A03.cpp @@ -289,11 +289,13 @@ void CTriangleChan::RefreshChannel() { int Freq = CalculatePeriod(); + char DutyCycle = (m_iDutyPeriod & MAX_DUTY); unsigned char HiFreq = (Freq & 0xFF); unsigned char LoFreq = (Freq >> 8); - + if (m_iInstVolume > 0 && m_iVolume > 0 && m_bGate) { WriteRegister(0x4008, (m_bEnvelopeLoop << 7) | (m_iLinearCounter & 0x7F)); // // // + WriteRegister(0x4009, DutyCycle); // // // WriteRegister(0x400A, HiFreq); if (m_bEnvelopeLoop || m_bResetEnvelope) // // // WriteRegister(0x400B, LoFreq + (m_iLengthCounter << 3)); @@ -315,6 +317,12 @@ int CTriangleChan::GetChannelVolume() const return m_iVolume ? VOL_COLUMN_MAX : 0; } +const char CTriangleChan::MAX_DUTY = 0x03; + +int CTriangleChan::getDutyMax() const { + return static_cast(MAX_DUTY); +} + bool CTriangleChan::HandleEffect(effect_t EffNum, unsigned char EffParam) { switch (EffNum) { @@ -351,6 +359,7 @@ bool CTriangleChan::HandleEffect(effect_t EffNum, unsigned char EffParam) void CTriangleChan::ClearRegisters() { WriteRegister(0x4008, 0); + WriteRegister(0x4009, 0); WriteRegister(0x400A, 0); WriteRegister(0x400B, 0); } diff --git a/Source/Channels2A03.h b/Source/Channels2A03.h index bf51915..97838fa 100644 --- a/Source/Channels2A03.h +++ b/Source/Channels2A03.h @@ -80,12 +80,16 @@ class CTriangleChan : public CChannelHandler2A03 { void RefreshChannel() override; void ResetChannel() override; // // // int GetChannelVolume() const override; // // // + int getDutyMax() const override; protected: + static const char MAX_DUTY; + bool HandleEffect(effect_t EffNum, unsigned char EffParam) override; // // // void ClearRegisters() override; CString GetCustomEffectString() const override; // // // private: int m_iLinearCounter; + }; // Noise diff --git a/Source/ChannelsDlg.cpp b/Source/ChannelsDlg.cpp index 3424e1e..7f50a88 100644 --- a/Source/ChannelsDlg.cpp +++ b/Source/ChannelsDlg.cpp @@ -11,7 +11,7 @@ // Used to handle channels in a future version. Not finished. const TCHAR *ROOT_ITEMS[] = { - _T("2A03/2A07"), + _T("5E01"), _T("Konami VRC6"), _T("Konami VRC7"), _T("Nintendo FDS"), diff --git a/Source/FamiTrackerView.cpp b/Source/FamiTrackerView.cpp index 81c3bec..ca675b5 100644 --- a/Source/FamiTrackerView.cpp +++ b/Source/FamiTrackerView.cpp @@ -85,6 +85,7 @@ const CString EFFECT_TEXTS[] = { // // // _T("Vxx - Set Square duty / Noise mode to XX"), _T("Vxx - Set N163 wave index to XX"), _T("Vxx - Set VRC7 patch index to XX"), + _T("Vxx - Set Wave shape to XX"), _T("Yxx - Set DPCM sample offset to XX<=3F"), _T("Qxy - Portamento up, X = speed, Y = notes"), _T("Rxy - Portamento down, X = speed, Y = notes"), @@ -4101,8 +4102,9 @@ CString CFamiTrackerView::GetEffectHint(const stChanNote &Note, int Column) cons if (Index > EF_FDS_MOD_SPEED_HI || (Index == EF_FDS_MOD_SPEED_HI && Param >= 0x10)) ++Index; if (Index > EF_FDS_MOD_DEPTH || (Index == EF_FDS_MOD_DEPTH && Param >= 0x80)) ++Index; if (Index > EF_NOTE_CUT || (Index == EF_NOTE_CUT && Param >= 0x80 && Channel == CHANID_TRIANGLE)) ++Index; - if (Index > EF_DUTY_CYCLE || (Index == EF_DUTY_CYCLE && (Chip == SNDCHIP_VRC7 || Chip == SNDCHIP_N163))) ++Index; - if (Index > EF_DUTY_CYCLE || (Index == EF_DUTY_CYCLE && Chip == SNDCHIP_N163)) ++Index; + if (Index > EF_DUTY_CYCLE || (Index == EF_DUTY_CYCLE && (Chip == SNDCHIP_VRC7 || Chip == SNDCHIP_N163 || Channel == CHANID_TRIANGLE))) ++Index; + if (Index > EF_DUTY_CYCLE || (Index == EF_DUTY_CYCLE && (Chip == SNDCHIP_N163 || Channel == CHANID_TRIANGLE))) ++Index; + if (Index > EF_DUTY_CYCLE || (Index == EF_DUTY_CYCLE && Channel == CHANID_TRIANGLE)) ++Index; if (Index > EF_VOLUME || (Index == EF_VOLUME && Param >= 0xE0)) ++Index; if (Index > EF_SPEED || (Index == EF_SPEED && Param >= GetDocument()->GetSpeedSplitPoint())) ++Index; diff --git a/Source/GotoDlg.cpp b/Source/GotoDlg.cpp index f20e77a..562abc1 100644 --- a/Source/GotoDlg.cpp +++ b/Source/GotoDlg.cpp @@ -68,7 +68,7 @@ BOOL CGotoDlg::OnInitDialog() CFamiTrackerView *pView = static_cast(((CFrameWnd*)AfxGetMainWnd())->GetActiveView()); CPatternEditor *pEditor = pView->GetPatternEditor(); - m_cChipEdit->AddString(_T("2A03")); + m_cChipEdit->AddString(_T("5E01")); if (pDoc->ExpansionEnabled(SNDCHIP_VRC6)) m_cChipEdit->AddString(_T("VRC6")); if (pDoc->ExpansionEnabled(SNDCHIP_VRC7)) @@ -108,7 +108,7 @@ BOOL CGotoDlg::OnInitDialog() m_cChipEdit->SelectString(-1, _T("VRC6")); } else - m_cChipEdit->SelectString(-1, _T("2A03")); + m_cChipEdit->SelectString(-1, _T("5E01")); SetDlgItemInt(IDC_EDIT_GOTO_FRAME, pEditor->GetFrame()); SetDlgItemInt(IDC_EDIT_GOTO_ROW, pEditor->GetRow()); @@ -143,7 +143,7 @@ void CGotoDlg::CheckDestination() const int CGotoDlg::GetChipFromString(const CString str) { - if (str == _T("2A03")) + if (str == _T("5E01")) return SNDCHIP_NONE; else if (str == _T("VRC6")) return SNDCHIP_VRC6; diff --git a/Source/Instrument2A03.cpp b/Source/Instrument2A03.cpp index 8e29ef5..d366c32 100644 --- a/Source/Instrument2A03.cpp +++ b/Source/Instrument2A03.cpp @@ -31,7 +31,7 @@ // 2A03 instruments -LPCTSTR CInstrument2A03::SEQUENCE_NAME[] = {_T("Volume"), _T("Arpeggio"), _T("Pitch"), _T("Hi-pitch"), _T("Duty / Noise")}; +LPCTSTR CInstrument2A03::SEQUENCE_NAME[] = {_T("Volume"), _T("Arpeggio"), _T("Pitch"), _T("Hi-pitch"), _T("Timbre")}; CInstrument2A03::CInstrument2A03() : CSeqInstrument(INST_2A03), // // // m_cSamples(), diff --git a/Source/InstrumentEditDlg.cpp b/Source/InstrumentEditDlg.cpp index 219d208..84a29a0 100644 --- a/Source/InstrumentEditDlg.cpp +++ b/Source/InstrumentEditDlg.cpp @@ -53,7 +53,7 @@ const int CInstrumentEditDlg::KEYBOARD_HEIGHT = 58; const TCHAR *CInstrumentEditDlg::CHIP_NAMES[] = { _T(""), - _T("2A03"), + _T("5E01"), _T("VRC6"), _T("VRC7"), _T("FDS"), @@ -191,7 +191,7 @@ void CInstrumentEditDlg::SetCurrentInstrument(int Index) int Channel = CFamiTrackerView::GetView()->GetSelectedChannel(); int Type = pDoc->GetChannelType(Channel); bool bShowDPCM = (Type == CHANID_DPCM) || (std::static_pointer_cast(pInstrument)->AssignedSamples()); - InsertPane(new CInstrumentEditorSeq(NULL, _T("2A03 settings"), CInstrument2A03::SEQUENCE_NAME, 15, 3, INST_2A03), !bShowDPCM); // // // + InsertPane(new CInstrumentEditorSeq(NULL, _T("5E01 settings"), CInstrument2A03::SEQUENCE_NAME, 15, 3, INST_2A03), !bShowDPCM); // // // InsertPane(new CInstrumentEditorDPCM(), bShowDPCM); } break; diff --git a/Source/MainFrm.cpp b/Source/MainFrm.cpp index e5217d3..5c43cf7 100644 --- a/Source/MainFrm.cpp +++ b/Source/MainFrm.cpp @@ -2658,7 +2658,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 5E01 instrument")); if (Chip & SNDCHIP_VRC6) menu.AppendMenu(MF_STRING, ID_INSTRUMENT_ADD_VRC6, _T("New VRC6 instrument")); diff --git a/Source/PatternEditor.cpp b/Source/PatternEditor.cpp index 24c505c..7e8840b 100644 --- a/Source/PatternEditor.cpp +++ b/Source/PatternEditor.cpp @@ -1830,8 +1830,8 @@ void CPatternEditor::DrawRegisters(CDC *pDC) return str; }; - // 2A03 - DrawHeaderFunc(_T("2A03")); // // // + // 5E01 + DrawHeaderFunc(_T("5E01")); // // // for (int i = 0; i < 5; ++i) { GetRegsFunc(SNDCHIP_NONE, [&] (int x) { return 0x4000 + i * 4 + x; }, 4); @@ -1842,6 +1842,8 @@ void CPatternEditor::DrawRegisters(CDC *pDC) double freq = theApp.GetSoundGenerator()->GetChannelFrequency(SNDCHIP_NONE, i); // // // // pDC->FillSolidRect(x + 200, y, x + 400, y + 18, m_colEmptyBg); + LPCTSTR waveNames[4] = {_T("tri"),_T("saw"),_T("squ"),_T("sin")}; + switch (i) { case 0: case 1: period = reg[2] | ((reg[3] & 7) << 8); @@ -1850,7 +1852,7 @@ void CPatternEditor::DrawRegisters(CDC *pDC) case 2: period = reg[2] | ((reg[3] & 7) << 8); vol = reg[0] ? 15 : 0; - text.Format(_T("%s"), GetPitchTextFunc(3, period, freq)); break; + text.Format(_T("%s, shape = %i (%s)"), GetPitchTextFunc(3, period, freq), reg[1], waveNames[reg[1]]); break; case 3: period = reg[2] & 0x0F; vol = reg[0] & 0x0F; diff --git a/Source/SoundGen.cpp b/Source/SoundGen.cpp index 132f97b..172c88d 100644 --- a/Source/SoundGen.cpp +++ b/Source/SoundGen.cpp @@ -192,7 +192,7 @@ void CSoundGen::CreateChannels() AssignChannel(new CTrackerChannel(_T("Pulse 1"), _T("PU1"), SNDCHIP_NONE, CHANID_SQUARE1)); AssignChannel(new CTrackerChannel(_T("Pulse 2"), _T("PU2"), SNDCHIP_NONE, CHANID_SQUARE2)); #endif - AssignChannel(new CTrackerChannel(_T("Triangle"), _T("TRI"), SNDCHIP_NONE, CHANID_TRIANGLE)); + AssignChannel(new CTrackerChannel(_T("Wave"), _T("WAV"), SNDCHIP_NONE, CHANID_TRIANGLE)); AssignChannel(new CTrackerChannel(_T("Noise"), _T("NOI"), SNDCHIP_NONE, CHANID_NOISE)); AssignChannel(new CTrackerChannel(_T("DPCM"), _T("DMC"), SNDCHIP_NONE, CHANID_DPCM)); diff --git a/Source/SwapDlg.cpp b/Source/SwapDlg.cpp index 693f50c..8ce6333 100644 --- a/Source/SwapDlg.cpp +++ b/Source/SwapDlg.cpp @@ -77,7 +77,7 @@ BOOL CSwapDlg::OnInitDialog() m_cChipSecond->SubclassDlgItem(IDC_COMBO_SWAP_CHIP2, this); CFamiTrackerDoc *pDoc = CFamiTrackerDoc::GetDoc(); - m_cChipFirst->AddString(_T("2A03")); + m_cChipFirst->AddString(_T("5E01")); if (pDoc->ExpansionEnabled(SNDCHIP_VRC6)) m_cChipFirst->AddString(_T("VRC6")); if (pDoc->ExpansionEnabled(SNDCHIP_VRC7)) @@ -117,7 +117,7 @@ void CSwapDlg::CheckDestination() const int CSwapDlg::GetChipFromString(const CString str) { - if (str == _T("2A03")) + if (str == _T("5E01")) return SNDCHIP_NONE; else if (str == _T("VRC6")) return SNDCHIP_VRC6; diff --git a/Source/TextExporter.cpp b/Source/TextExporter.cpp index 4d1b6b3..105375e 100644 --- a/Source/TextExporter.cpp +++ b/Source/TextExporter.cpp @@ -128,7 +128,7 @@ static const TCHAR* CT[CT_COUNT] = _T("GROOVE"), _T("USEGROOVE"), // instruments - _T("INST2A03"), + _T("INST5E01"), _T("INSTVRC6"), _T("INSTVRC7"), _T("INSTFDS"), @@ -942,7 +942,7 @@ const CString& CTextExport::ImportFile(LPCTSTR FileName, CFamiTrackerDoc *pDoc) CHECK(t.ReadInt(i,0,MAX_INSTRUMENTS-1,&sResult)); if (pDoc->GetInstrumentType(i) != INST_2A03) { - sResult.Format(_T("Line %d column %d: instrument %d is not defined as a 2A03 instrument."), t.line, t.GetColumn(), i); + sResult.Format(_T("Line %d column %d: instrument %d is not defined as a 5E01 instrument."), t.line, t.GetColumn(), i); return sResult; } auto pInst = std::static_pointer_cast(pDoc->GetInstrument(i)); diff --git a/Source/VersionChecker.cpp b/Source/VersionChecker.cpp index b58f9bc..54937b4 100644 --- a/Source/VersionChecker.cpp +++ b/Source/VersionChecker.cpp @@ -98,7 +98,7 @@ namespace { ft_version_t ver = { }; auto& [api, maj, min, rev] = ver; const std::string& tag = i["tag_name"]; - ::sscanf_s(tag.data(), "Dn%u.%u.%u%*1[.r]%u", &api, &maj, &min, &rev); + ::sscanf_s(tag.data(), "E%u.%u.%u%*1[.r]%u", &api, &maj, &min, &rev); if (ver > current) { current = ver; jPtr = &i; diff --git a/name.h b/name.h index b9a69b3..637ff3e 100644 --- a/name.h +++ b/name.h @@ -1,2 +1,2 @@ #pragma once -#define APP_NAME "Dn-FamiTracker" +#define APP_NAME "E-FamiTracker" diff --git a/res/Dn-FamiTracker.manifest b/res/E-FamiTracker.manifest similarity index 94% rename from res/Dn-FamiTracker.manifest rename to res/E-FamiTracker.manifest index 7209e09..c02cd13 100644 --- a/res/Dn-FamiTracker.manifest +++ b/res/E-FamiTracker.manifest @@ -2,7 +2,7 @@ Extension of FamiTracker diff --git a/res/Inst_2A03.ico b/res/Inst_2A03.ico index 0573165..25889c5 100644 Binary files a/res/Inst_2A03.ico and b/res/Inst_2A03.ico differ diff --git a/version.h b/version.h index 9bf78cf..f60b038 100644 --- a/version.h +++ b/version.h @@ -33,7 +33,7 @@ #define VERSION_API 0 -#define VERSION_MAJ 2 +#define VERSION_MAJ 0 #define VERSION_MIN 1 #define VERSION_REV 0