├── xgm ├── Makefile ├── xtypes.h ├── readme_ja.txt ├── player │ ├── player.h │ ├── nsf │ │ ├── nsf.h │ │ ├── nsfplay.h │ │ ├── nsfconfig.h │ │ ├── nsfplay.cpp │ │ └── pls │ │ │ ├── sstream.h │ │ │ ├── ppls.h │ │ │ └── sstream.cpp │ ├── soundData.h │ ├── midi_interface.h │ ├── plugin │ │ ├── kbmedia │ │ │ ├── plugin.h │ │ │ └── sdk │ │ │ │ └── kmp_pi.h │ │ └── winamp2 │ │ │ ├── in_module.h │ │ │ ├── readme.txt │ │ │ ├── in_module.cpp │ │ │ ├── in_module_msp.cpp │ │ │ └── sdk │ │ │ └── OUT.H │ └── all.h ├── utils │ ├── nsf_tag.h │ ├── nsf_tag.cpp │ └── tagctrl.h ├── devices │ ├── device.h │ ├── devinfo.h │ ├── Misc │ │ ├── block.h │ │ ├── detect.cpp │ │ ├── detect.h │ │ ├── nsf2_irq.h │ │ ├── log_cpu.h │ │ ├── nes_detect.h │ │ ├── nsf2_irq.cpp │ │ └── nes_detect.cpp │ ├── Audio │ │ ├── filter.h │ │ ├── rconv.cpp │ │ ├── rconv.h │ │ ├── filter.cpp │ │ ├── MedianFilter.h │ │ ├── echo.h │ │ ├── MedianFilter.cpp │ │ ├── echo.cpp │ │ ├── amplifier.h │ │ ├── fader.h │ │ └── mixer.h │ ├── CPU │ │ ├── nes_cpu.cpp │ │ ├── km6502 │ │ │ ├── km6502.txt │ │ │ ├── km65c02.h │ │ │ ├── km6502.h │ │ │ ├── km6280.h │ │ │ ├── km6502m.h │ │ │ ├── km65c02m.h │ │ │ ├── km6502ft.h │ │ │ ├── kmconfig.h │ │ │ ├── km6280m.h │ │ │ └── km6502ex.h │ │ └── nes_cpu.h │ ├── Sound │ │ ├── nes_apu.h │ │ ├── nes_apu.cpp │ │ ├── nes_dmc.cpp │ │ ├── nes_mmc5.h │ │ ├── legacy │ │ │ ├── emutypes.h │ │ │ ├── 281btone.h │ │ │ ├── 2413tone.h │ │ │ ├── vrc7tone_kt2.h │ │ │ ├── vrc7tone_mo.h │ │ │ ├── vrc7tone_kt1.h │ │ │ ├── vrc7tone_rw.h │ │ │ ├── vrc7tone_ft36.h │ │ │ ├── vrc7tone_ft35.h │ │ │ ├── emu2212.h │ │ │ └── emu2149.h │ │ ├── nes_fme7.h │ │ ├── nes_vrc7.h │ │ ├── nes_vrc6.h │ │ ├── nes_n106.h │ │ ├── nes_fds.h │ │ ├── nes_vrc7.cpp │ │ └── nes_dmc.h │ ├── Memory │ │ ├── nes_bank.h │ │ ├── nes_bank.cpp │ │ ├── nes_mem.cpp │ │ ├── ram64k.h │ │ ├── nsf2_vectors.h │ │ ├── nes_mem.h │ │ ├── nsf2_vectors.cpp │ │ └── ram64k.cpp │ └── all.h ├── xgm.h ├── version.h ├── browser │ └── browser.h ├── debugout.h └── readme.txt ├── nsfplug_ui ├── NSFDialogModel.h ├── NSFDialogModel.cpp ├── stdafx.h ├── KeyDialog.h ├── KeyHeader.h ├── KeyWindow.h ├── icon1.ico ├── icon2.ico ├── nsf_setup.h ├── nsfplug.ico ├── res │ ├── nsf.ico │ ├── ascii.bmp │ ├── digit.bmp │ ├── logo.bmp │ ├── bitmap1.bmp │ ├── keyboard.bmp │ ├── keyheader.bmp │ ├── noise_lamp.bmp │ └── nsf_setup.rc2 ├── stdafx.cpp ├── KeyDialog.cpp ├── KeyHeader.cpp ├── KeyWindow.cpp ├── NSFApuPanel.h ├── NSFDialogs.h ├── NSFDmcPanel.h ├── NSFFdsPanel.h ├── ico00001.ico ├── nsf_setup.cpp ├── nsf_setup.def ├── nsf_setup.rc ├── nsfplug_ui.h ├── tempfile.tmp ├── NSFApuPanel.cpp ├── NSFAudioPanel.h ├── NSFDialogs.cpp ├── NSFDmcPanel.cpp ├── NSFEasyDialog.h ├── NSFFdsPanel.cpp ├── NSFInfoDialog.h ├── NSFMaskDialog.h ├── NSFMixerDialog.h ├── NSFMixerPanel.h ├── NSFTrackDialog.h ├── hlp │ ├── nsfplug.chw │ ├── nsfplug.hhc │ ├── nsfplug.hhp │ └── intro.htm ├── NSFAudioPanel.cpp ├── NSFConfigDialog.h ├── NSFEasyDialog.cpp ├── NSFInfoDialog.cpp ├── NSFMaskDialog.cpp ├── NSFMemoryDialog.h ├── NSFMixerDialog.cpp ├── NSFMixerPanel.cpp ├── NSFPresetDialog.h ├── NSFTrackDialog.cpp ├── nsfplug_ui.vcproj ├── NSFConfigDialog.cpp ├── NSFConfigPageDevice.h ├── NSFConfigPageMain.cpp ├── NSFConfigPageMain.h ├── NSFMemoryDialog.cpp ├── NSFPresetDialog.cpp ├── NSFTrackSetupDialog.h ├── NSFConfigPageDevice.cpp ├── NSFMemoryWriteDialog.h ├── NSFTrackSetupDialog.cpp ├── NSFMemoryWriteDialog.cpp ├── nsfplug.hhk ├── NSFDialog.cpp ├── NSFDialog.h ├── PresetManager.h ├── NSFN106Panel.h ├── NSFMMC5Panel.h ├── NSFPanPanel.h ├── NSFPanDialog.h ├── NSFN106Panel.cpp ├── NSFMMC5Panel.cpp ├── NSFPanPanel.cpp ├── PresetManager.cpp └── NSFPanDialog.cpp ├── libemuwa2 ├── winamp2 │ ├── WINAMP_SDK_IS_REQUIRED.TXT │ ├── GEN.H │ ├── wa_hotkeys.h │ ├── ipc_pe.h │ ├── OUT.H │ └── DSP.H ├── libemuwa2.vcproj ├── emu_outdisk.h ├── emu_winamp.h └── emu_outmod.h ├── distribute ├── nsfplay.ini ├── push_winamp.bat └── distribute.bat ├── kbnsf ├── in_nsf.def ├── in_nsf.h ├── kbnsf.rc ├── in_nsf.cpp ├── in_nsf_k.txt ├── kmp_hack.cpp └── resource.h ├── vcm ├── vcm.h ├── vcm_ui.h ├── ReadMe.txt ├── vcm.vcproj ├── ui │ └── win32 │ │ ├── stdafx.h │ │ ├── vcmCtrl.h │ │ ├── vcmDlg.h │ │ ├── vcmSpin.h │ │ ├── vcmText.h │ │ ├── vcmTree.h │ │ ├── win32.cpp │ │ ├── win32.h │ │ ├── win32.rc │ │ ├── ReadMe.txt │ │ ├── stdafx.cpp │ │ ├── vcmCheck.h │ │ ├── vcmCombo.h │ │ ├── vcmCtrl.cpp │ │ ├── vcmDlg.cpp │ │ ├── vcmSlider.h │ │ ├── vcmSpin.cpp │ │ ├── vcmText.cpp │ │ ├── vcmTree.cpp │ │ ├── res │ │ ├── win32.ico │ │ ├── win32.rc2 │ │ └── win32.manifest │ │ ├── vcmCheck.cpp │ │ ├── vcmCombo.cpp │ │ ├── vcmSlider.cpp │ │ ├── vcm_ui.vcproj │ │ └── resource.h ├── group.cpp └── value.cpp ├── nsfplay ├── stdafx.cpp ├── nsfplay.vcproj ├── res │ ├── about.ico │ ├── config.ico │ ├── next.ico │ ├── open.ico │ ├── pause.ico │ ├── play.ico │ ├── prev.ico │ ├── prop.ico │ ├── stop.ico │ ├── volume.bmp │ ├── volume.ico │ ├── nsfplay.ico │ ├── nsfplay.rc2 │ ├── nsfplug.ico │ ├── waveout.ico │ └── nsfplay.manifest ├── stdafx.h ├── nsfplay.h ├── resource.h └── nsfplayDlg.h ├── in_yansf ├── in_nsf.h ├── in_nsf.cpp └── in_nsf_w.txt ├── nsfmwin ├── nsfmwin.h ├── stdafx.h ├── OptionDlg.h ├── nsfmwin.cpp ├── nsfmwin.rc ├── stdafx.cpp ├── OptionDlg.cpp ├── hlp │ ├── INTRO.htm │ ├── TAG2PLS.htm │ ├── nsfmwin.chm │ ├── nsfmwin.hhc │ ├── nsfmwin.hhp │ ├── COPYRIGHT.htm │ ├── HIDD_OPTION.htm │ ├── HTMLDefines.h │ ├── IDD_OPTION.png │ ├── HIDD_ROOT_DIALOG.htm │ ├── IDD_NSFMWIN_DIALOG.png │ └── nsfmwin.hhk ├── nsfmwin.vcproj ├── nsfmwinDlg.cpp ├── nsfmwinDlg.h ├── res │ ├── nsfmwin.ico │ ├── nsfmwin.rc2 │ └── nsfmwin.manifest ├── nsfmeasure.h ├── nsfmeasure.cpp ├── resource.h └── nsfmwin.sln ├── test ├── test.vcproj └── main.cpp ├── tag2pls ├── tag2pls.vcproj ├── tag2pls.txt └── main.cpp ├── setup.bat ├── .gitignore ├── cpp17.props ├── readme.txt └── docs └── index.html /xgm/Makefile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFDialogModel.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFDialogModel.cpp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /libemuwa2/winamp2/WINAMP_SDK_IS_REQUIRED.TXT: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /distribute/nsfplay.ini: -------------------------------------------------------------------------------- 1 | [NSFPLAY] 2 | VOLUME=255 3 | -------------------------------------------------------------------------------- /kbnsf/in_nsf.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | kmp_GetTestModule 3 | -------------------------------------------------------------------------------- /vcm/vcm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/vcm.h -------------------------------------------------------------------------------- /nsfplay/stdafx.cpp: -------------------------------------------------------------------------------- 1 | struct IUnknown; 2 | #include "stdafx.h" 3 | 4 | 5 | -------------------------------------------------------------------------------- /vcm/vcm_ui.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/vcm_ui.h -------------------------------------------------------------------------------- /xgm/xtypes.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/xtypes.h -------------------------------------------------------------------------------- /kbnsf/in_nsf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/kbnsf/in_nsf.h -------------------------------------------------------------------------------- /kbnsf/kbnsf.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/kbnsf/kbnsf.rc -------------------------------------------------------------------------------- /vcm/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ReadMe.txt -------------------------------------------------------------------------------- /vcm/vcm.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/vcm.vcproj -------------------------------------------------------------------------------- /in_yansf/in_nsf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/in_yansf/in_nsf.h -------------------------------------------------------------------------------- /kbnsf/in_nsf.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/kbnsf/in_nsf.cpp -------------------------------------------------------------------------------- /nsfmwin/nsfmwin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/nsfmwin.h -------------------------------------------------------------------------------- /nsfmwin/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/stdafx.h -------------------------------------------------------------------------------- /test/test.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/test/test.vcproj -------------------------------------------------------------------------------- /xgm/readme_ja.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/readme_ja.txt -------------------------------------------------------------------------------- /in_yansf/in_nsf.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/in_yansf/in_nsf.cpp -------------------------------------------------------------------------------- /kbnsf/in_nsf_k.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/kbnsf/in_nsf_k.txt -------------------------------------------------------------------------------- /kbnsf/kmp_hack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/kbnsf/kmp_hack.cpp -------------------------------------------------------------------------------- /nsfmwin/OptionDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/OptionDlg.h -------------------------------------------------------------------------------- /nsfmwin/nsfmwin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/nsfmwin.cpp -------------------------------------------------------------------------------- /nsfmwin/nsfmwin.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/nsfmwin.rc -------------------------------------------------------------------------------- /nsfmwin/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/stdafx.cpp -------------------------------------------------------------------------------- /nsfplug_ui/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/stdafx.h -------------------------------------------------------------------------------- /xgm/player/player.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/player.h -------------------------------------------------------------------------------- /xgm/utils/nsf_tag.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/utils/nsf_tag.h -------------------------------------------------------------------------------- /in_yansf/in_nsf_w.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/in_yansf/in_nsf_w.txt -------------------------------------------------------------------------------- /nsfmwin/OptionDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/OptionDlg.cpp -------------------------------------------------------------------------------- /nsfmwin/hlp/INTRO.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/INTRO.htm -------------------------------------------------------------------------------- /nsfmwin/nsfmwin.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/nsfmwin.vcproj -------------------------------------------------------------------------------- /nsfmwin/nsfmwinDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/nsfmwinDlg.cpp -------------------------------------------------------------------------------- /nsfmwin/nsfmwinDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/nsfmwinDlg.h -------------------------------------------------------------------------------- /nsfplay/nsfplay.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/nsfplay.vcproj -------------------------------------------------------------------------------- /nsfplay/res/about.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/about.ico -------------------------------------------------------------------------------- /nsfplay/res/config.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/config.ico -------------------------------------------------------------------------------- /nsfplay/res/next.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/next.ico -------------------------------------------------------------------------------- /nsfplay/res/open.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/open.ico -------------------------------------------------------------------------------- /nsfplay/res/pause.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/pause.ico -------------------------------------------------------------------------------- /nsfplay/res/play.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/play.ico -------------------------------------------------------------------------------- /nsfplay/res/prev.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/prev.ico -------------------------------------------------------------------------------- /nsfplay/res/prop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/prop.ico -------------------------------------------------------------------------------- /nsfplay/res/stop.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/stop.ico -------------------------------------------------------------------------------- /nsfplay/res/volume.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/volume.bmp -------------------------------------------------------------------------------- /nsfplay/res/volume.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/volume.ico -------------------------------------------------------------------------------- /nsfplug_ui/KeyDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/KeyDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/KeyHeader.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/KeyHeader.h -------------------------------------------------------------------------------- /nsfplug_ui/KeyWindow.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/KeyWindow.h -------------------------------------------------------------------------------- /nsfplug_ui/icon1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/icon1.ico -------------------------------------------------------------------------------- /nsfplug_ui/icon2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/icon2.ico -------------------------------------------------------------------------------- /nsfplug_ui/nsf_setup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsf_setup.h -------------------------------------------------------------------------------- /nsfplug_ui/nsfplug.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsfplug.ico -------------------------------------------------------------------------------- /nsfplug_ui/res/nsf.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/nsf.ico -------------------------------------------------------------------------------- /nsfplug_ui/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/stdafx.cpp -------------------------------------------------------------------------------- /tag2pls/tag2pls.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/tag2pls/tag2pls.vcproj -------------------------------------------------------------------------------- /vcm/ui/win32/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/stdafx.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmCtrl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmCtrl.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmDlg.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmSpin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmSpin.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmText.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmText.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmTree.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmTree.h -------------------------------------------------------------------------------- /vcm/ui/win32/win32.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/win32.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/win32.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/win32.h -------------------------------------------------------------------------------- /vcm/ui/win32/win32.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/win32.rc -------------------------------------------------------------------------------- /xgm/devices/device.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/device.h -------------------------------------------------------------------------------- /xgm/devices/devinfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/devinfo.h -------------------------------------------------------------------------------- /xgm/player/nsf/nsf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/nsf/nsf.h -------------------------------------------------------------------------------- /xgm/player/soundData.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/soundData.h -------------------------------------------------------------------------------- /xgm/utils/nsf_tag.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/utils/nsf_tag.cpp -------------------------------------------------------------------------------- /nsfmwin/hlp/TAG2PLS.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/TAG2PLS.htm -------------------------------------------------------------------------------- /nsfmwin/hlp/nsfmwin.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/nsfmwin.chm -------------------------------------------------------------------------------- /nsfmwin/hlp/nsfmwin.hhc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/nsfmwin.hhc -------------------------------------------------------------------------------- /nsfmwin/hlp/nsfmwin.hhp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/nsfmwin.hhp -------------------------------------------------------------------------------- /nsfmwin/res/nsfmwin.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/res/nsfmwin.ico -------------------------------------------------------------------------------- /nsfmwin/res/nsfmwin.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/res/nsfmwin.rc2 -------------------------------------------------------------------------------- /nsfplay/res/nsfplay.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/nsfplay.ico -------------------------------------------------------------------------------- /nsfplay/res/nsfplay.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/nsfplay.rc2 -------------------------------------------------------------------------------- /nsfplay/res/nsfplug.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/nsfplug.ico -------------------------------------------------------------------------------- /nsfplay/res/waveout.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplay/res/waveout.ico -------------------------------------------------------------------------------- /nsfplug_ui/KeyDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/KeyDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/KeyHeader.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/KeyHeader.cpp -------------------------------------------------------------------------------- /nsfplug_ui/KeyWindow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/KeyWindow.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFApuPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFApuPanel.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFDialogs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFDialogs.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFDmcPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFDmcPanel.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFFdsPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFFdsPanel.h -------------------------------------------------------------------------------- /nsfplug_ui/ico00001.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/ico00001.ico -------------------------------------------------------------------------------- /nsfplug_ui/nsf_setup.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsf_setup.cpp -------------------------------------------------------------------------------- /nsfplug_ui/nsf_setup.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsf_setup.def -------------------------------------------------------------------------------- /nsfplug_ui/nsf_setup.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsf_setup.rc -------------------------------------------------------------------------------- /nsfplug_ui/nsfplug_ui.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsfplug_ui.h -------------------------------------------------------------------------------- /nsfplug_ui/res/ascii.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/ascii.bmp -------------------------------------------------------------------------------- /nsfplug_ui/res/digit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/digit.bmp -------------------------------------------------------------------------------- /nsfplug_ui/res/logo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/logo.bmp -------------------------------------------------------------------------------- /nsfplug_ui/tempfile.tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/tempfile.tmp -------------------------------------------------------------------------------- /vcm/ui/win32/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/ReadMe.txt -------------------------------------------------------------------------------- /vcm/ui/win32/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/stdafx.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmCheck.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmCheck.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmCombo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmCombo.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmCtrl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmCtrl.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmDlg.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmSlider.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmSlider.h -------------------------------------------------------------------------------- /vcm/ui/win32/vcmSpin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmSpin.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmText.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmText.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmTree.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmTree.cpp -------------------------------------------------------------------------------- /xgm/devices/Misc/block.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Misc/block.h -------------------------------------------------------------------------------- /xgm/player/nsf/nsfplay.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/nsf/nsfplay.h -------------------------------------------------------------------------------- /libemuwa2/libemuwa2.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/libemuwa2/libemuwa2.vcproj -------------------------------------------------------------------------------- /nsfmwin/hlp/COPYRIGHT.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/COPYRIGHT.htm -------------------------------------------------------------------------------- /nsfmwin/hlp/HIDD_OPTION.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/HIDD_OPTION.htm -------------------------------------------------------------------------------- /nsfmwin/hlp/HTMLDefines.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/HTMLDefines.h -------------------------------------------------------------------------------- /nsfmwin/hlp/IDD_OPTION.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/IDD_OPTION.png -------------------------------------------------------------------------------- /nsfplug_ui/NSFApuPanel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFApuPanel.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFAudioPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFAudioPanel.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFDialogs.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFDialogs.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFDmcPanel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFDmcPanel.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFEasyDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFEasyDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFFdsPanel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFFdsPanel.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFInfoDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFInfoDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFMaskDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMaskDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFMixerDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMixerDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFMixerPanel.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMixerPanel.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFTrackDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFTrackDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/hlp/nsfplug.chw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/hlp/nsfplug.chw -------------------------------------------------------------------------------- /nsfplug_ui/hlp/nsfplug.hhc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/hlp/nsfplug.hhc -------------------------------------------------------------------------------- /nsfplug_ui/hlp/nsfplug.hhp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/hlp/nsfplug.hhp -------------------------------------------------------------------------------- /nsfplug_ui/res/bitmap1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/bitmap1.bmp -------------------------------------------------------------------------------- /nsfplug_ui/res/keyboard.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/keyboard.bmp -------------------------------------------------------------------------------- /vcm/ui/win32/res/win32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/res/win32.ico -------------------------------------------------------------------------------- /vcm/ui/win32/res/win32.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/res/win32.rc2 -------------------------------------------------------------------------------- /vcm/ui/win32/vcmCheck.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmCheck.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmCombo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmCombo.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcmSlider.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcmSlider.cpp -------------------------------------------------------------------------------- /vcm/ui/win32/vcm_ui.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/vcm/ui/win32/vcm_ui.vcproj -------------------------------------------------------------------------------- /xgm/devices/Audio/filter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Audio/filter.h -------------------------------------------------------------------------------- /xgm/devices/Audio/rconv.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Audio/rconv.cpp -------------------------------------------------------------------------------- /xgm/devices/Audio/rconv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Audio/rconv.h -------------------------------------------------------------------------------- /xgm/devices/CPU/nes_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/CPU/nes_cpu.cpp -------------------------------------------------------------------------------- /xgm/devices/Misc/detect.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Misc/detect.cpp -------------------------------------------------------------------------------- /xgm/devices/Misc/detect.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Misc/detect.h -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_apu.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Sound/nes_apu.h -------------------------------------------------------------------------------- /xgm/player/midi_interface.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/midi_interface.h -------------------------------------------------------------------------------- /xgm/player/nsf/nsfconfig.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/nsf/nsfconfig.h -------------------------------------------------------------------------------- /xgm/player/nsf/nsfplay.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/nsf/nsfplay.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFAudioPanel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFAudioPanel.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFConfigDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFConfigDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFEasyDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFEasyDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFInfoDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFInfoDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFMaskDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMaskDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFMemoryDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMemoryDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFMixerDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMixerDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFMixerPanel.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMixerPanel.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFPresetDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFPresetDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFTrackDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFTrackDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/nsfplug_ui.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/nsfplug_ui.vcproj -------------------------------------------------------------------------------- /nsfplug_ui/res/keyheader.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/keyheader.bmp -------------------------------------------------------------------------------- /nsfplug_ui/res/noise_lamp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/noise_lamp.bmp -------------------------------------------------------------------------------- /nsfplug_ui/res/nsf_setup.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/res/nsf_setup.rc2 -------------------------------------------------------------------------------- /xgm/devices/Audio/filter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Audio/filter.cpp -------------------------------------------------------------------------------- /xgm/devices/Memory/nes_bank.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Memory/nes_bank.h -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_apu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Sound/nes_apu.cpp -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_dmc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Sound/nes_dmc.cpp -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_mmc5.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Sound/nes_mmc5.h -------------------------------------------------------------------------------- /nsfmwin/hlp/HIDD_ROOT_DIALOG.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/HIDD_ROOT_DIALOG.htm -------------------------------------------------------------------------------- /nsfplug_ui/NSFConfigDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFConfigDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFConfigPageDevice.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFConfigPageDevice.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFConfigPageMain.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFConfigPageMain.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFConfigPageMain.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFConfigPageMain.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFMemoryDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMemoryDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFPresetDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFPresetDialog.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFTrackSetupDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFTrackSetupDialog.h -------------------------------------------------------------------------------- /xgm/devices/Audio/MedianFilter.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Audio/MedianFilter.h -------------------------------------------------------------------------------- /xgm/devices/Memory/nes_bank.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Memory/nes_bank.cpp -------------------------------------------------------------------------------- /xgm/devices/Memory/nes_mem.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/Memory/nes_mem.cpp -------------------------------------------------------------------------------- /nsfmwin/hlp/IDD_NSFMWIN_DIALOG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfmwin/hlp/IDD_NSFMWIN_DIALOG.png -------------------------------------------------------------------------------- /nsfplug_ui/NSFConfigPageDevice.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFConfigPageDevice.cpp -------------------------------------------------------------------------------- /nsfplug_ui/NSFMemoryWriteDialog.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMemoryWriteDialog.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFTrackSetupDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFTrackSetupDialog.cpp -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6502.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/devices/CPU/km6502/km6502.txt -------------------------------------------------------------------------------- /xgm/player/plugin/kbmedia/plugin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/plugin/kbmedia/plugin.h -------------------------------------------------------------------------------- /nsfplug_ui/NSFMemoryWriteDialog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/nsfplug_ui/NSFMemoryWriteDialog.cpp -------------------------------------------------------------------------------- /xgm/player/plugin/winamp2/in_module.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/plugin/winamp2/in_module.h -------------------------------------------------------------------------------- /xgm/player/plugin/winamp2/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/plugin/winamp2/readme.txt -------------------------------------------------------------------------------- /xgm/player/all.h: -------------------------------------------------------------------------------- 1 | #include "nsf/nsfplay.h" 2 | #include "plugin/kbmedia/plugin.h" 3 | #include "plugin/winamp2/in_module.h" 4 | -------------------------------------------------------------------------------- /xgm/player/plugin/kbmedia/sdk/kmp_pi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/plugin/kbmedia/sdk/kmp_pi.h -------------------------------------------------------------------------------- /xgm/player/plugin/winamp2/in_module.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/plugin/winamp2/in_module.cpp -------------------------------------------------------------------------------- /distribute/push_winamp.bat: -------------------------------------------------------------------------------- 1 | cd /d "%~dp0" 2 | call distribute.bat 3 | copy plugins\*.* "C:\Program Files (x86)\Winamp\Plugins" 4 | pause -------------------------------------------------------------------------------- /xgm/player/plugin/winamp2/in_module_msp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HertzDevil/nsfplay/HEAD/xgm/player/plugin/winamp2/in_module_msp.cpp -------------------------------------------------------------------------------- /xgm/xgm.h: -------------------------------------------------------------------------------- 1 | #ifndef _XGM_H_ 2 | #define _XGM_H_ 3 | #include "devices/all.h" 4 | #include "player/all.h" 5 | #include "version.h" 6 | #endif -------------------------------------------------------------------------------- /xgm/utils/tagctrl.h: -------------------------------------------------------------------------------- 1 | #ifndef _TAG_CTRL_H_ 2 | #define _TAG_CTRL_H_ 3 | 4 | namespace xgm 5 | { 6 | } //namespace 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | #endif -------------------------------------------------------------------------------- /nsfplug_ui/hlp/intro.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /distribute/distribute.bat: -------------------------------------------------------------------------------- 1 | copy ..\Release\nsfplay.exe nsfplay.exe 2 | copy ..\Release\plugins\in_yansf.dll plugins\in_yansf.dll 3 | copy ..\Release\plugins\nsfplug_ui.dll plugins\nsfplug_ui.dll 4 | @pause -------------------------------------------------------------------------------- /xgm/version.h: -------------------------------------------------------------------------------- 1 | #ifndef _VERSION_H_ 2 | #define _VERSION_H_ 3 | #define NSFPLAY_TITLE "NSFPlay 2.4 beta Synthesia 0.61 (unofficial)" 4 | #define NSFPLAY_VERSION "2.4 beta Synthesia 0.61 (unofficial)" 5 | #endif 6 | -------------------------------------------------------------------------------- /nsfmwin/hlp/nsfmwin.hhk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /nsfplug_ui/nsfplug.hhk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /setup.bat: -------------------------------------------------------------------------------- 1 | @echo This batch file sets up in_yansf.ini for debugging. 2 | md Debug 3 | md Debug\plugins 4 | md Release 5 | md Release\plugins 6 | copy distribute\plugins\in_yansf.ini Debug\plugins\in_yansf.ini 7 | copy distribute\plugins\in_yansf.ini Release\plugins\in_yansf.ini 8 | pause -------------------------------------------------------------------------------- /nsfmwin/nsfmeasure.h: -------------------------------------------------------------------------------- 1 | #ifndef _NSFMEASURE_H_ 2 | #include "xgm.h" 3 | 4 | class NSFMeas 5 | { 6 | protected: 7 | xgm::NSF *nsf; 8 | xgm::NSFPlayer *nsfp; 9 | xgm::NSFPlayerConfig *nsfc; 10 | int progress_time; 11 | public: 12 | NSFMeas(); 13 | virtual ~NSFMeas(); 14 | virtual bool Open(xgm::NSF *nsf, int max_time=300000, int min_loop = 30000, int mode = 0); 15 | virtual bool Progress(); 16 | virtual bool IsDetected(); 17 | virtual int GetProgressTime(); 18 | }; 19 | 20 | #endif -------------------------------------------------------------------------------- /xgm/browser/browser.h: -------------------------------------------------------------------------------- 1 | #ifndef _BROWSER_H_ 2 | #define _BROWSER_H_ 3 | 4 | 5 | namespace xgm 6 | { 7 | class Browser 8 | { 9 | private: 10 | int bufmax; 11 | int infoidx; 12 | BrowserInfo *infobuf; 13 | 14 | public: 15 | void Browser(int bufmax=256) 16 | { 17 | 18 | } 19 | 20 | BrowserInfo &GetInfo() 21 | { 22 | return infobuf[infoidx]; 23 | } 24 | 25 | 26 | }; 27 | 28 | } // namespace 29 | 30 | 31 | #endif -------------------------------------------------------------------------------- /nsfplug_ui/NSFDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "NSFDialogs.h" 3 | 4 | void NSFDialog::SetDialogManager(NSFDialogManager *p) 5 | { 6 | parent = p; 7 | pm = parent->pm; 8 | } 9 | 10 | void NSFDialog::UpdateNSFPlayerConfig(bool b) 11 | { 12 | } 13 | 14 | void NSFDialog::Open() 15 | { 16 | UpdateNSFPlayerConfig(true); 17 | dynamic_cast(this)->SetWindowPos(&CWnd::wndTop,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE|SWP_NOZORDER); 18 | dynamic_cast(this)->ShowWindow(SW_SHOW); 19 | } 20 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef _NSFDIALOG_H_ 2 | #define _NSFDIALOG_H_ 3 | #include "xgm.h" 4 | #include "resource.h" 5 | #include "nsfplug_ui.h" 6 | 7 | class NSFDialogManager; 8 | 9 | class NSFDialog 10 | { 11 | protected: 12 | NSFDialogManager *parent; 13 | NSFplug_Model *pm; 14 | 15 | public: 16 | virtual void Open(); 17 | virtual void SetDialogManager(NSFDialogManager *p); 18 | virtual void UpdateNSFPlayerConfig(bool b); 19 | }; 20 | 21 | #define CONFIG (*(pm->cf)) 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /xgm/devices/Memory/ram64k.h: -------------------------------------------------------------------------------- 1 | #ifndef _RAM64K_H_ 2 | #define _RAM64K_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm 6 | { 7 | class RAM64K : public IDevice 8 | { 9 | 10 | public: 11 | UINT8 image[0x10000]; 12 | RAM64K (); 13 | ~RAM64K (); 14 | void Reset (); 15 | bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 16 | bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 17 | bool SetImage (UINT8 * data, UINT32 offset, UINT32 size); 18 | }; 19 | 20 | } // namespace 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /xgm/devices/all.h: -------------------------------------------------------------------------------- 1 | #include "cpu/nes_cpu.h" 2 | 3 | #include "sound/nes_apu.h" 4 | #include "sound/nes_dmc.h" 5 | #include "sound/nes_fds.h" 6 | #include "sound/nes_mmc5.h" 7 | #include "sound/nes_vrc6.h" 8 | #include "sound/nes_vrc7.h" 9 | #include "sound/nes_fme7.h" 10 | 11 | #include "memory/nes_bank.h" 12 | #include "memory/nes_mem.h" 13 | #include "memory/ram64k.h" 14 | 15 | #include "audio/amplifier.h" 16 | #include "audio/mixer.h" 17 | #include "audio/filter.h" 18 | #include "audio/rconv.h" 19 | #include "audio/echo.h" 20 | 21 | #include "misc/nes_detect.h" 22 | 23 | 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cmd.exe.lnk 2 | Debug 3 | Release 4 | nsfplug_ui/hlp/nsfplug.chm 5 | distribute/nsfplay.exe 6 | distribute/plugins/in_yansf.ini 7 | distribute/plugins/in_yansf.dll 8 | distribute/plugins/nsfplug_ui.dll 9 | 10 | # Visual Studio 11 | # user files 12 | *.suo 13 | *.user 14 | *.userosscache 15 | *.sln.docstates 16 | *.vcxproj.filters 17 | # cache 18 | ipch/ 19 | *.aps 20 | *.ncb 21 | *.opendb 22 | *.opensdf 23 | *.sdf 24 | *.cachefile 25 | *.VC.db 26 | *.VC.VC.opendb 27 | # converting solution/project to newer version 28 | _UpgradeReport_Files/ 29 | Backup*/ 30 | UpgradeLog*.XML 31 | UpgradeLog*.htm 32 | .vs/ 33 | -------------------------------------------------------------------------------- /xgm/devices/Misc/nsf2_irq.h: -------------------------------------------------------------------------------- 1 | #ifndef _NSF2_IRQ_H_ 2 | #define _NSF2_IRQ_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm 6 | { 7 | 8 | class NES_CPU; // forward declaration 9 | 10 | class NSF2_IRQ : public IDevice 11 | { 12 | protected: 13 | UINT16 reload; 14 | UINT32 count; 15 | bool active; 16 | bool irq; 17 | NES_CPU* cpu; 18 | public: 19 | NSF2_IRQ(); 20 | ~NSF2_IRQ(); 21 | void Reset(); 22 | bool Read(UINT32 adr, UINT32 & val, UINT32 id=0); 23 | bool Write(UINT32 adr, UINT32 val, UINT32 id=0); 24 | 25 | void Clock(UINT32 clocks); 26 | void SetCPU(NES_CPU* cpu_); 27 | }; 28 | 29 | } // namespace xgm 30 | #endif -------------------------------------------------------------------------------- /xgm/devices/Audio/echo.h: -------------------------------------------------------------------------------- 1 | #ifndef _ECHO_H_ 2 | #define _ECHO_H_ 3 | #include "filter.h" 4 | 5 | namespace xgm { 6 | 7 | class EchoUnit : public IRenderable { 8 | protected: 9 | int rate; 10 | INT32 *echo_buf; 11 | int h[32]; 12 | int eidx, edelay; 13 | Filter lpf; 14 | DCFilter hpf; 15 | 16 | public: 17 | EchoUnit(){ echo_buf = new INT32[1<<17]; } 18 | ~EchoUnit(){ delete [] echo_buf; } 19 | void Reset(); 20 | void SetRate(double r); 21 | virtual void Tick(UINT32 clocks); 22 | virtual UINT32 Render(INT32 b[2]); 23 | inline UINT32 FastRender(INT32 b[2]); 24 | }; 25 | 26 | } // xgm 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /xgm/devices/Memory/nsf2_vectors.h: -------------------------------------------------------------------------------- 1 | #ifndef _NSF2_VECTORS_H_ 2 | #define _NSF2_VECTORS_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm 6 | { 7 | // vector table overlay for NSF2 8 | class NSF2_Vectors : public IDevice 9 | { 10 | protected: 11 | UINT8 vectors[6]; 12 | 13 | public: 14 | NSF2_Vectors(); 15 | ~NSF2_Vectors(); 16 | void Reset (); 17 | bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); // overlays all 3 vectors 18 | bool Write (UINT32 adr, UINT32 val, UINT32 id=0); // can write IRQ vector only 19 | void ForceVector(int vector, UINT32 adr); // write directly to the 3 vectors (0=NMI,1=Reset,2=IRQ) 20 | }; 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /xgm/player/nsf/pls/sstream.h: -------------------------------------------------------------------------------- 1 | #ifndef _SSTREAM_H_ 2 | #define _SSTREAM_H_ 3 | 4 | extern "C" { 5 | 6 | typedef struct tagSST 7 | { 8 | long size ; 9 | long length ; 10 | long index ; 11 | unsigned char *str ; 12 | } SST ; 13 | 14 | SST *SST_new(void) ; 15 | int SST_set_text(SST *sst, const char *str) ; 16 | char *SST_sublimate(SST *sst) ; 17 | void SST_delete(SST *sst) ; 18 | int SST_seekoff(SST *sst, long offset) ; 19 | int SST_seekpos(SST *sst, long pos) ; 20 | long SST_tell(SST *sst) ; 21 | int SST_getc(SST *sst) ; 22 | int SST_putc(SST *sst, int c) ; 23 | int SST_ungetc(SST *sst, int c) ; 24 | 25 | #define SST_BUF_GSIZE 32 26 | #define SST_EOF (-1) 27 | 28 | } // extern "C" 29 | 30 | #endif -------------------------------------------------------------------------------- /nsfplug_ui/PresetManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | class PresetManager 6 | { 7 | private: 8 | CString path; 9 | static const char *preset_range[]; 10 | std::map presetName2Sect; 11 | std::map presetSect2Name; 12 | public: 13 | void Reset( const CString &path ); 14 | bool CreatePreset(xgm::NSFPlayerConfig *, const CString &name ); 15 | bool LoadPreset(xgm::NSFPlayerConfig *, const CString &name); 16 | const std::set GetPresetNames(); 17 | const std::set GetPresetSects(); 18 | bool SavePreset(xgm::NSFPlayerConfig *, const CString &name); 19 | bool DeletePreset(const CString &name); 20 | }; 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /xgm/debugout.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEBUGOUT_H_ 2 | #define _DEBUGOUT_H_ 3 | 4 | #ifdef _MSC_VER 5 | #include 6 | #define _CRTDBG_MAP_ALLOC 7 | struct IUnknown; 8 | #include 9 | #include 10 | #include 11 | 12 | namespace xgm 13 | { 14 | class __DebugOut 15 | { 16 | public: 17 | static void printf (const char *format, ...) 18 | { 19 | static char buf[1024]; 20 | va_list argl; 21 | 22 | va_start (argl, format); 23 | _vsnprintf (buf, 1024, format, argl); 24 | OutputDebugString (buf); 25 | va_end (argl); 26 | } 27 | }; 28 | #define DEBUG_OUT __DebugOut::printf 29 | } 30 | 31 | #else 32 | #define DEBUG_OUT printf 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /nsfplay/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef VC_EXTRALEAN 4 | #define VC_EXTRALEAN 5 | #endif 6 | 7 | #ifndef WINVER 8 | #define WINVER 0x0501 9 | #endif 10 | 11 | #ifndef _WIN32_WINNT 12 | #define _WIN32_WINNT 0x0501 13 | #endif 14 | 15 | #ifndef _WIN32_WINDOWS 16 | #define _WIN32_WINDOWS 0x0501 17 | #endif 18 | 19 | #ifndef _WIN32_IE 20 | #define _WIN32_IE 0x0500 21 | #endif 22 | 23 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS 24 | 25 | #define _AFX_ALL_WARNINGS 26 | 27 | #include 28 | #include 29 | 30 | #include 31 | #ifndef _AFX_NO_AFXCMN_SUPPORT 32 | #include 33 | #endif 34 | #include 35 | #include 36 | #include 37 | 38 | -------------------------------------------------------------------------------- /nsfmwin/res/nsfmwin.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | アプリケーションの説明をここに挿入します。 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /nsfplay/res/nsfplay.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | アプリケーションの説明をここに挿入します。 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /vcm/ui/win32/res/win32.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | アプリケーションの説明をここに挿入します。 10 | 11 | 12 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /xgm/devices/Memory/nes_mem.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_RAM_H_ 2 | #define _NES_RAM_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm 6 | { 7 | const UINT32 PLAYER_RESERVED = 0x4100; 8 | const UINT32 PLAYER_RESERVED_SIZE = 0x0020; 9 | 10 | class NES_MEM : public IDevice 11 | { 12 | protected: 13 | UINT8 image[0x10000]; 14 | bool fds_enable; 15 | 16 | public: 17 | NES_MEM (); 18 | ~NES_MEM (); 19 | void Reset (); 20 | bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 21 | bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 22 | bool SetImage (UINT8 * data, UINT32 offset, UINT32 size); 23 | void SetFDSMode (bool); // enables writing to $6000-DFFF for FDS 24 | void SetReserved (const UINT8* data, UINT32 size); 25 | }; 26 | 27 | } // namespace 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /cpp17.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 13 | true 14 | 15 | 16 | 17 | 18 | stdcpp17 19 | /Zc:__cplusplus %(AdditionalOptions) 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /xgm/player/nsf/pls/ppls.h: -------------------------------------------------------------------------------- 1 | #ifndef _PPLS_H_ 2 | #define _PPLS_H_ 3 | 4 | extern "C" { 5 | 6 | typedef struct tagPLSITEM 7 | { 8 | int type ; 9 | char *filename ; 10 | char *title ; 11 | char *memo ; 12 | int song ; 13 | 14 | long time_in_ms ; 15 | long loop_in_ms ; 16 | long fade_in_ms ; 17 | 18 | int loop_num ; 19 | 20 | int enable_vol[4] ; 21 | int vol[4] ; 22 | 23 | int extra_code ; 24 | int opll_ch_pan ; 25 | 26 | } PLSITEM ; 27 | 28 | PLSITEM *PLSITEM_new(const char *text) ; 29 | void PLSITEM_delete(PLSITEM *elem) ; 30 | char *PLSITEM_print(PLSITEM *elem, char *buf, char *plsfile) ; 31 | void PLSITEM_adjust(PLSITEM *elem, int play_time, int fade_time, int loop_num, int vol[4]) ; 32 | void PLSITEM_set_title(PLSITEM *elem, const char *title) ; 33 | 34 | int PPLS_get_time(char *text, int d) ; 35 | 36 | #define PLSITEM_PRINT_SIZE (_MAX_PATH*2+1024) 37 | 38 | } // extern "C" 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /xgm/devices/Memory/nsf2_vectors.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "nsf2_vectors.h" 3 | 4 | namespace xgm { 5 | 6 | NSF2_Vectors::NSF2_Vectors() 7 | { 8 | } 9 | 10 | NSF2_Vectors::~NSF2_Vectors() 11 | { 12 | } 13 | 14 | void NSF2_Vectors::Reset() 15 | { 16 | } 17 | 18 | bool NSF2_Vectors::Read(UINT32 adr, UINT32& val, UINT32 id) 19 | { 20 | if (adr < 0xFFFA) return false; 21 | if (adr > 0xFFFF) return false; 22 | val = vectors[adr-0xFFFA]; 23 | return true; 24 | } 25 | 26 | bool NSF2_Vectors::Write(UINT32 adr, UINT32 val, UINT32 id) 27 | { 28 | if (adr < 0xFFFE) return false; 29 | if (adr > 0xFFFF) return false; 30 | vectors[adr-0xFFFA] = val; 31 | return true; 32 | } 33 | 34 | void NSF2_Vectors::ForceVector(int vector, UINT32 adr) 35 | { 36 | if (vector < 0 || vector > 2) return; 37 | vectors[(vector*2)+0] = adr & 0xFF; 38 | vectors[(vector*2)+1] = (adr >> 8) & 0xFF; 39 | } 40 | 41 | } // namespace 42 | -------------------------------------------------------------------------------- /kbnsf/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by kbnsf.rc 4 | // 5 | #define ID_TAG112 112 6 | #define ID_TAG114 114 7 | #define ID_TAG115 115 8 | #define ID_118 118 9 | #define ID_120 120 10 | #define IDR_EXTRA_BACKUP 121 11 | #define IDR_EXTRA_BACKUP1 122 12 | #define IDR_EXTRA 122 13 | #define ID_122 122 14 | #define ID_Menu 123 15 | 16 | // Next default values for new objects 17 | // 18 | #ifdef APSTUDIO_INVOKED 19 | #ifndef APSTUDIO_READONLY_SYMBOLS 20 | #define _APS_NEXT_RESOURCE_VALUE 124 21 | #define _APS_NEXT_COMMAND_VALUE 40001 22 | #define _APS_NEXT_CONTROL_VALUE 1001 23 | #define _APS_NEXT_SYMED_VALUE 101 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/emutypes.h: -------------------------------------------------------------------------------- 1 | #ifndef _EMUTYPES_H_ 2 | #define _EMUTYPES_H_ 3 | 4 | #if defined(_MSC_VER) 5 | #define INLINE __forceinline 6 | #elif defined(__GNUC__) 7 | #define INLINE __inline__ 8 | #elif defined(_MWERKS_) 9 | #define INLINE inline 10 | #else 11 | #define INLINE 12 | #endif 13 | 14 | #if defined(EMU_DLL_IMPORTS) 15 | #define EMU2149_DLL_IMPORTS 16 | #define EMU2212_DLL_IMPORTS 17 | #define EMU2413_DLL_IMPORTS 18 | #define EMU8950_DLL_IMPORTS 19 | #define EMU76489_DLL_IMPORTS 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | typedef unsigned int e_uint; 27 | typedef signed int e_int; 28 | 29 | typedef unsigned char e_uint8 ; 30 | typedef signed char e_int8 ; 31 | 32 | typedef unsigned short e_uint16 ; 33 | typedef signed short e_int16 ; 34 | 35 | typedef unsigned int e_uint32 ; 36 | typedef signed int e_int32 ; 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | #endif 42 | -------------------------------------------------------------------------------- /xgm/devices/Audio/MedianFilter.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "MedianFilter.h" 3 | 4 | using namespace xgm; 5 | 6 | static int INT32CMP(const INT32 *a, const INT32 *b) { 7 | if (*a < *b) 8 | return -1; 9 | else if (*a> *b) 10 | return 1; 11 | return 0; 12 | } 13 | 14 | MedianFilter::MedianFilter(int tapSize) { 15 | tapSize_ = tapSize; 16 | tap_ = new INT32[tapSize_]; 17 | } 18 | 19 | MedianFilter::~MedianFilter() { 20 | delete [] tap_; 21 | } 22 | 23 | void MedianFilter::Reset() { 24 | for(int i=0; i>1]; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /xgm/devices/Memory/ram64k.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "ram64k.h" 3 | 4 | namespace xgm 5 | { 6 | ///////////////////////////////////////////////////////////////////////////// 7 | 8 | RAM64K::RAM64K() 9 | { 10 | } 11 | 12 | RAM64K::~RAM64K() 13 | { 14 | } 15 | 16 | void 17 | RAM64K::Reset () 18 | { 19 | memset (image, 0, 0x10000); 20 | } 21 | 22 | bool 23 | RAM64K::SetImage (UINT8 * data, UINT32 offset, UINT32 size) 24 | { 25 | if( offset + size < 0x10000 ) 26 | memcpy (image + offset, data, size ); 27 | else 28 | memcpy (image + offset, data, 0x10000 - offset); 29 | return true; 30 | } 31 | 32 | bool 33 | RAM64K::Write (UINT32 adr, UINT32 val, UINT32 id) 34 | { 35 | image[adr & 0xFFFF] = val&0xFF; 36 | return true; 37 | } 38 | 39 | bool 40 | RAM64K::Read (UINT32 adr, UINT32 & val, UINT32 id) 41 | { 42 | val = image[adr & 0xFFFF]; 43 | return true; 44 | } 45 | 46 | ///////////////////////////////////////////////////////////////////////////// 47 | }// namespace 48 | -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_fme7.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_FME7_H_ 2 | #define _NES_FME7_H_ 3 | #include "../device.h" 4 | #include "legacy/emu2149.h" 5 | 6 | namespace xgm 7 | { 8 | 9 | class NES_FME7:public ISoundChip 10 | { 11 | protected: 12 | INT32 sm[2][3]; // stereo mix 13 | INT16 buf[2]; 14 | PSG *psg; 15 | int divider; // clock divider 16 | double clock, rate; 17 | TrackInfoBasic trkinfo[5]; 18 | public: 19 | NES_FME7 (); 20 | ~NES_FME7 (); 21 | virtual void Reset (); 22 | virtual void Tick (UINT32 clocks); 23 | virtual UINT32 Render (INT32 b[2]); 24 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 25 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 26 | virtual void SetClock (double); 27 | virtual void SetRate (double); 28 | virtual void SetMask (int m){ if(psg) PSG_setMask(psg,m); } 29 | virtual void SetStereoMix (int trk, xgm::INT16 mixl, xgm::INT16 mixr); 30 | virtual ITrackInfo *GetTrackInfo(int trk); 31 | }; 32 | 33 | } // namespace 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /vcm/group.cpp: -------------------------------------------------------------------------------- 1 | #include "vcm.h" 2 | 3 | using namespace vcm; 4 | 5 | ConfigGroup::ConfigGroup( const std::string &l, const std::string &d, Configuration *b/*=NULL*/ ) 6 | : label(l), desc(d) 7 | { 8 | } 9 | 10 | ConfigGroup::~ConfigGroup() 11 | { 12 | Clear(); 13 | } 14 | 15 | bool ConfigGroup::AddSubGroup( ConfigGroup *sub ) 16 | { 17 | subGroup.push_back(sub); 18 | return true; 19 | } 20 | 21 | bool ConfigGroup::Insert( const std::string &id, ValueCtrl *ctrl, ValueConv *conv /*=NULL*/ ) 22 | { 23 | if(conv) ctrl->AddConv( conv ); 24 | this->members.push_back( std::pair < const std::string, ValueCtrl * >( id, ctrl ) ); 25 | return true; 26 | } 27 | 28 | bool ConfigGroup::Insert( const std::string &id, ValueCtrl *ctrl, std::vector convs ) 29 | { 30 | ctrl->AddConv( convs ); 31 | this->members.push_back( std::pair < const std::string, ValueCtrl * >( id, ctrl ) ); 32 | return true; 33 | } 34 | 35 | void ConfigGroup::Clear() 36 | { 37 | GroupList::iterator it; 38 | for( it=this->members.begin(); it!=this->members.end(); it++ ) 39 | delete (*it).second; 40 | members.clear(); 41 | } 42 | -------------------------------------------------------------------------------- /xgm/devices/Misc/log_cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOG_CPU_H_ 2 | #define _LOG_CPU_H_ 3 | 4 | #include "../device.h" 5 | #include 6 | 7 | namespace xgm 8 | { 9 | 10 | class NES_CPU; // forward 11 | class NSF; // forward 12 | 13 | class CPULogger : public IDevice 14 | { 15 | public: 16 | CPULogger(); 17 | virtual ~CPULogger(); 18 | 19 | // IDevice virtuals 20 | virtual void Reset (); 21 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 22 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 23 | virtual void SetOption (int id, int val); 24 | 25 | // CPULogger specific 26 | int GetLogLevel () const; 27 | void SetSoundchip (UINT8 soundchip_); 28 | void SetFilename (const char * filename_); 29 | void Begin (const char* title); 30 | void Init (UINT8 reg_a, UINT8 reg_x); 31 | void Play (); 32 | void SetCPU (NES_CPU* c); 33 | void SetNSF (NSF* n); 34 | 35 | protected: 36 | int log_level; 37 | UINT8 soundchip; 38 | FILE* file; 39 | char* filename; 40 | UINT32 frame_count; 41 | NES_CPU* cpu; 42 | NSF* nsf; 43 | UINT8 bank[8]; 44 | }; 45 | 46 | } 47 | 48 | #endif -------------------------------------------------------------------------------- /libemuwa2/winamp2/GEN.H: -------------------------------------------------------------------------------- 1 | #ifndef NULLSOFT_WINAMP_GEN_H 2 | #define NULLSOFT_WINAMP_GEN_H 3 | 4 | #include 5 | 6 | #define GEN_INIT_SUCCESS 0 7 | 8 | // return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param) 9 | // which determine if we can uninstall the plugin immediately or on winamp restart 10 | // 11 | // uninstall support was added from 5.0+ and uninstall now support from 5.5+ 12 | // it is down to you to ensure that if uninstall now is returned that it will not cause a crash 13 | // (ie don't use if you've been subclassing the main window) 14 | #define GEN_PLUGIN_UNINSTALL_NOW 0x1 15 | #define GEN_PLUGIN_UNINSTALL_REBOOT 0x0 16 | 17 | typedef struct { 18 | int version; 19 | char *description; 20 | int (*init)(); 21 | void (*config)(); 22 | void (*quit)(); 23 | HWND hwndParent; 24 | HINSTANCE hDllInstance; 25 | } winampGeneralPurposePlugin; 26 | 27 | #define GPPHDR_VER 0x10 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | //extern winampGeneralPurposePlugin *gen_plugins[256]; 32 | typedef winampGeneralPurposePlugin * (*winampGeneralPurposePluginGetter)(); 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif -------------------------------------------------------------------------------- /libemuwa2/emu_outdisk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * emu_outdisk.h 3 | */ 4 | #pragma once 5 | struct IUnknown; 6 | #include 7 | #include 8 | 9 | #include "winamp2/IN2.H" 10 | 11 | class EmuOutDisk { 12 | static Out_Module m_out_mod; 13 | static unsigned int m_sec_size; 14 | static unsigned int m_written; 15 | static bool m_playing; 16 | static const char* m_filename; 17 | static HMMIO m_file; 18 | static MMCKINFO m_ckRIFF; 19 | static MMCKINFO m_ck; 20 | static MMIOINFO m_info; 21 | public: 22 | Out_Module *GetOutputModule(); 23 | static void About(HWND){} 24 | static void Config(HWND){} 25 | static void Init(); 26 | static void Quit(); 27 | static int Open(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); 28 | static void Close(); 29 | static int Write(char *buf, int len); 30 | static int CanWrite(); 31 | static int IsPlaying(); 32 | static int Pause(int pause); 33 | static void SetVolume(int volume); 34 | static void SetPan(int pan); 35 | static void Flush(int t); 36 | static int GetOutputTime(); 37 | static int GetWrittenTime(); 38 | static void SetFilename(const char* filename); 39 | }; -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_vrc7.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_VRC7_H_ 2 | #define _NES_VRC7_H_ 3 | #include "../device.h" 4 | #include "legacy/emu2413.h" 5 | 6 | namespace xgm 7 | { 8 | 9 | class NES_VRC7 : public ISoundChip 10 | { 11 | protected: 12 | int mask; 13 | unsigned int patch_set; 14 | INT32 sm[2][6]; // stereo mix 15 | INT16 buf[2]; 16 | OPLL *opll; 17 | UINT32 divider; // clock divider 18 | double clock, rate; 19 | TrackInfoBasic trkinfo[6]; 20 | public: 21 | NES_VRC7 (); 22 | ~NES_VRC7 (); 23 | 24 | virtual void Reset (); 25 | virtual void Tick (UINT32 clocks); 26 | virtual UINT32 Render (INT32 b[2]); 27 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 28 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 29 | virtual void SetPatchSet (unsigned int p); 30 | virtual void SetClock (double); 31 | virtual void SetRate (double); 32 | virtual void SetMask (int m){ mask = m; if(opll) OPLL_setMask(opll, m); } 33 | virtual void SetStereoMix (int trk, xgm::INT16 mixl, xgm::INT16 mixr); 34 | virtual ITrackInfo *GetTrackInfo(int trk); 35 | }; 36 | 37 | } // namespace 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFN106Panel.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_NSFN106PANEL_H__FE81618A_15CD_40A7_B503_C43DA1BFC0D7__INCLUDED_) 2 | #define AFX_NSFN106PANEL_H__FE81618A_15CD_40A7_B503_C43DA1BFC0D7__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | 8 | #include "NSFDialog.h" 9 | ///////////////////////////////////////////////////////////////////////////// 10 | // NSFN106Panel 11 | 12 | class NSFN106Panel : public CDialog, public NSFDialog 13 | { 14 | public: 15 | NSFN106Panel(CWnd* pParent = NULL); 16 | 17 | //{{AFX_DATA(NSF106Panel) 18 | enum { IDD = IDD_N106PANEL }; 19 | BOOL m_serial; 20 | //}}AFX_DATA 21 | 22 | public: 23 | void UpdateNSFPlayerConfig(bool b); 24 | 25 | // ClassWizard 26 | //{{AFX_VIRTUAL(NSFN106Panel) 27 | protected: 28 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 29 | //}}AFX_VIRTUAL 30 | 31 | protected: 32 | 33 | //{{AFX_MSG(NSFN106Panel) 34 | afx_msg void OnSerial(); 35 | //}}AFX_MSG 36 | DECLARE_MESSAGE_MAP() 37 | 38 | public: 39 | virtual BOOL OnInitDialog(); 40 | }; 41 | 42 | //{{AFX_INSERT_LOCATION}} 43 | // Microsoft Visual C++ 44 | 45 | #endif // !defined(AFX_NSFN106PANEL_H__FE81618A_15CD_40A7_B503_C43DA1BFC0D7__INCLUDED_) 46 | -------------------------------------------------------------------------------- /xgm/devices/Misc/nes_detect.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_DETECT_H_ 2 | #define _NES_DETECT_H_ 3 | #include "detect.h" 4 | 5 | namespace xgm 6 | { 7 | 8 | class NESDetector : public BasicDetector 9 | { 10 | public: 11 | virtual bool Write (UINT32, UINT32, UINT32 id=0); 12 | }; 13 | 14 | class NESDetectorEx : public ILoopDetector 15 | { 16 | protected: 17 | enum 18 | { 19 | SQR_0=0,SQR_1,TRI,NOIZ,DPCM, 20 | N106_0,N106_1,N106_2,N106_3, 21 | N106_4,N106_5,N106_6,N106_7, 22 | MAX_CH 23 | }; 24 | BasicDetector *m_LD[MAX_CH]; 25 | bool m_looped[MAX_CH]; 26 | UINT32 m_n106_addr; 27 | int m_loop_start, m_loop_end; 28 | public: 29 | NESDetectorEx(); 30 | virtual ~NESDetectorEx(); 31 | virtual bool IsLooped (int time_in_ms, int match_second, int match_interval); 32 | virtual void Reset (); 33 | virtual bool Write (UINT32, UINT32, UINT32 id=0); 34 | virtual bool Read (UINT32, UINT32 &, UINT32 id=0){ return false; } 35 | virtual int GetLoopStart(){ return m_loop_start; } 36 | virtual int GetLoopEnd(){ return m_loop_end; } 37 | virtual bool IsEmpty() 38 | { 39 | bool ret = true; 40 | for(int i=0;iIsEmpty(); 42 | return ret; 43 | } 44 | }; 45 | 46 | } // namespace 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFMMC5Panel.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_NSFMMC5PANEL_H__INCLUDED_) 2 | #define AFX_NSFMMC5PANEL_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // NSFMMC5Panel.h : 8 | // 9 | #include "NSFDialog.h" 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // NSFMMC5Panel 13 | 14 | class NSFMMC5Panel : public CDialog, public NSFDialog 15 | { 16 | public: 17 | NSFMMC5Panel(CWnd* pParent = NULL); 18 | 19 | //{{AFX_DATA(NSFMMC5Panel) 20 | //enum { IDD = IDD_MMC5PANEL }; 21 | enum { IDD = 0 }; 22 | BOOL m_nonlinear_mixer; 23 | BOOL m_phase_refresh; 24 | //}}AFX_DATA 25 | 26 | public: 27 | void UpdateNSFPlayerConfig(bool b); 28 | 29 | // 30 | // ClassWizard 31 | //{{AFX_VIRTUAL(NSFApuPanel) 32 | protected: 33 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 34 | //}}AFX_VIRTUAL 35 | 36 | // 37 | protected: 38 | 39 | // 40 | //{{AFX_MSG(NSFMMC5Panel) 41 | afx_msg void OnNonlinear(); 42 | afx_msg void OnPhaseRefresh(); 43 | //}}AFX_MSG 44 | DECLARE_MESSAGE_MAP() 45 | public: 46 | virtual BOOL OnInitDialog(); 47 | }; 48 | 49 | //{{AFX_INSERT_LOCATION}} 50 | // Microsoft Visual C++ 51 | 52 | #endif // !defined(AFX_NSFMMC5PANEL_H__INCLUDED_) 53 | -------------------------------------------------------------------------------- /xgm/devices/Audio/echo.cpp: -------------------------------------------------------------------------------- 1 | #include "echo.h" 2 | 3 | using namespace xgm; 4 | 5 | void EchoUnit::Reset() 6 | { 7 | int hdef[16] = { 8 | 0, 0, 0, 0, 9 | 64, 32, 16, 8, 10 | 32, 16, 8, 4, 11 | 16, 8, 4, 2, 12 | }; 13 | eidx = 0; 14 | memset(echo_buf,0,sizeof(INT32)*(1<<17)); 15 | for(int i=0; i<16; i++) h[i] = hdef[i]; 16 | lpf.SetParam(4700,100); 17 | lpf.Reset(); 18 | hpf.SetParam(270,100); 19 | hpf.Reset(); 20 | } 21 | 22 | void EchoUnit::SetRate(double rate) 23 | { 24 | edelay = ((int)rate)/16; 25 | lpf.SetRate(rate); 26 | hpf.SetRate(rate); 27 | } 28 | 29 | inline xgm::UINT32 EchoUnit::FastRender(xgm::INT32 b[2]) 30 | { 31 | INT32 buf[2]; 32 | 33 | int tmp = eidx; 34 | for(int i=0; i<16; i++) 35 | { 36 | echo_buf[tmp&((1<<17)-1)] += (b[0]*h[i])>>8; 37 | tmp += edelay; 38 | } 39 | buf[0] = buf[1] = echo_buf[eidx]; 40 | lpf.FastRender(buf); 41 | hpf.FastRender(buf); 42 | echo_buf[eidx] = 0; 43 | eidx = (eidx + 1)&((1<<17)-1); 44 | 45 | b[0] += buf[0]; 46 | b[1] += buf[1]; 47 | 48 | return 2; 49 | } 50 | 51 | void xgm::EchoUnit::Tick(UINT32 clocks) 52 | { 53 | lpf.Tick(clocks); 54 | //hpf.Tick(clocks); // hpf has no sub-renderable 55 | } 56 | 57 | xgm::UINT32 EchoUnit::Render(xgm::INT32 b[2]) 58 | { 59 | return FastRender(b); 60 | } -------------------------------------------------------------------------------- /test/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * main.cpp written by Mitsutaka Okazaki 2004. 3 | * 4 | * This software is provided 'as-is', without any express or implied warranty. 5 | * In no event will the authors be held liable for any damages arising from 6 | * the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not 17 | * be misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | */ 21 | #include 22 | #include 23 | #include "../libemuwa2/emu_winamp.h" 24 | 25 | int main(int argc, char *argv[]) { 26 | 27 | 28 | if(argc<2) return 0; 29 | 30 | EmuWinamp emu("in_yansf.dll"); 31 | emu.Play(argv[1]); 32 | MSG msg; 33 | while(GetMessage(&msg,NULL,0,0)) { 34 | TranslateMessage(&msg); 35 | DispatchMessage(&msg); 36 | } 37 | emu.Stop(); 38 | 39 | return 0; 40 | } -------------------------------------------------------------------------------- /xgm/devices/Audio/amplifier.h: -------------------------------------------------------------------------------- 1 | #ifndef _AMPLIFIER_H_ 2 | #define _AMPLIFIER_H_ 3 | #include 4 | 5 | namespace xgm 6 | { 7 | 8 | class Amplifier : virtual public IRenderable 9 | { 10 | protected: 11 | IRenderable * target; 12 | int mute, volume; 13 | int combo; 14 | 15 | public: 16 | Amplifier () 17 | { 18 | target = NULL; 19 | mute = false; 20 | volume = 64; 21 | } 22 | 23 | ~Amplifier () 24 | { 25 | } 26 | 27 | void Attach (IRenderable * p) 28 | { 29 | target = p; 30 | } 31 | 32 | void Tick (UINT32 clocks) 33 | { 34 | assert (target); 35 | target->Tick(clocks); 36 | } 37 | 38 | UINT32 Render (INT32 b[2]) 39 | { 40 | assert (target); 41 | if (mute) 42 | { 43 | b[0] = b[1] = 0; 44 | return 2; 45 | } 46 | target->Render (b); 47 | b[0] = (b[0] * volume) / 16; 48 | b[1] = (b[1] * volume) / 16; 49 | 50 | return 2; 51 | } 52 | 53 | void SetVolume (int v) 54 | { 55 | volume = v; 56 | } 57 | int GetVolume () 58 | { 59 | return volume; 60 | } 61 | void SetMute (int m) 62 | { 63 | mute = m; 64 | } 65 | int GetMute () 66 | { 67 | return mute; 68 | } 69 | }; 70 | 71 | } // namespace 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFPanPanel.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_NSFPANPANEL_H__INCLUDED_) 2 | #define AFX_NSFPANPANEL_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // NSFPanPanel.h 8 | // 9 | #include "NSFDialog.h" 10 | 11 | ///////////////////////////////////////////////////////////////////////////// 12 | // NSFPanPanel 13 | 14 | class NSFPanPanel : public CDialog, public NSFDialog 15 | { 16 | // 17 | public: 18 | NSFPanPanel(CWnd* pParent = NULL); // 19 | 20 | int channel_id; 21 | void SetChannelID(int id); 22 | void SetVolume(int i); 23 | int GetVolume(); 24 | void SetPan(int i); 25 | int GetPan(); 26 | 27 | void UpdateNSFPlayerConfig(bool b); 28 | 29 | // 30 | //{{AFX_DATA(NSFPanPanel) 31 | enum { IDD = IDD_PAN }; 32 | CButton m_name; 33 | CSliderCtrl m_span; 34 | CSliderCtrl m_svol; 35 | //}}AFX_DATA 36 | 37 | 38 | // 39 | // ClassWizard 40 | //{{AFX_VIRTUAL(NSFPanPanel) 41 | protected: 42 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 43 | //}}AFX_VIRTUAL 44 | 45 | // 46 | protected: 47 | 48 | // 49 | //{{AFX_MSG(NSFPanPanel) 50 | virtual BOOL OnInitDialog(); 51 | afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 52 | //}}AFX_MSG 53 | DECLARE_MESSAGE_MAP() 54 | }; 55 | 56 | //{{AFX_INSERT_LOCATION}} 57 | // Microsoft Visual C++ 58 | 59 | #endif // !defined(AFX_NSFPANPANEL_H__INCLUDED_) 60 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFPanDialog.h: -------------------------------------------------------------------------------- 1 | #if !defined(AFX_NSFPANDIALOG_H__INCLUDED_) 2 | #define AFX_NSFPANDIALOG_H__INCLUDED_ 3 | 4 | #if _MSC_VER > 1000 5 | #pragma once 6 | #endif // _MSC_VER > 1000 7 | // NSFPanDialog.h 8 | // 9 | #include "NSFDialog.h" 10 | #include "NSFPanPanel.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | // NSFPanDialog 14 | 15 | class NSFPanDialog : public CDialog, public NSFDialog 16 | { 17 | // 18 | public: 19 | NSFPanDialog(CWnd* pParent = NULL); // 20 | 21 | void UpdateNSFPlayerConfig(bool b); 22 | 23 | // 24 | //{{AFX_DATA(NSFPanDialog) 25 | enum { IDD = IDD_PANBOX }; 26 | // 27 | //}}AFX_DATA 28 | 29 | 30 | // 31 | // ClassWizard 32 | //{{AFX_VIRTUAL(NSFPanDialog) 33 | protected: 34 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 35 | //}}AFX_VIRTUAL 36 | 37 | // 38 | public: 39 | NSFPanPanel panel[xgm::NES_CHANNEL_MAX]; 40 | CMenu m_Menu; 41 | void SetDialogManager(NSFDialogManager *p); 42 | 43 | // 44 | protected: 45 | 46 | // 47 | //{{AFX_MSG(NSFPanDialog) 48 | virtual BOOL OnInitDialog(); 49 | //}}AFX_MSG 50 | DECLARE_MESSAGE_MAP() 51 | public: 52 | afx_msg void OnVolReset(); 53 | afx_msg void OnPanMono(); 54 | afx_msg void OnPanRandom(); 55 | afx_msg void OnPanSpread(); 56 | }; 57 | 58 | //{{AFX_INSERT_LOCATION}} 59 | // Microsoft Visual C++ 60 | 61 | #endif // !defined(AFX_NSFPANDIALOG_H__INCLUDED_) 62 | -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_vrc6.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_VRC6_H_ 2 | #define _NES_VRC6_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm 6 | { 7 | 8 | class NES_VRC6:public ISoundChip 9 | { 10 | protected: 11 | UINT32 counter[3]; // frequency divider 12 | UINT32 phase[3]; // phase counter 13 | UINT32 freq2[3]; // adjusted frequency 14 | int count14; // saw 14-stage counter 15 | 16 | int mask; 17 | INT32 sm[2][3]; // stereo mix 18 | int duty[2]; 19 | int volume[3]; 20 | int enable[3]; 21 | int gate[3]; 22 | UINT32 freq[3]; 23 | INT16 calc_sqr (int i, UINT32 clocks); 24 | INT16 calc_saw (UINT32 clocks); 25 | bool halt; 26 | int freq_shift; 27 | double clock, rate; 28 | INT32 out[3]; 29 | TrackInfoBasic trkinfo[3]; 30 | 31 | public: 32 | NES_VRC6 (); 33 | ~NES_VRC6 (); 34 | 35 | virtual void Reset (); 36 | virtual void Tick (UINT32 clocks); 37 | virtual UINT32 Render (INT32 b[2]); 38 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 39 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 40 | virtual void SetClock (double); 41 | virtual void SetRate (double); 42 | virtual void SetMask (int m){ mask = m; } 43 | virtual void SetStereoMix (int trk, xgm::INT16 mixl, xgm::INT16 mixr); 44 | virtual ITrackInfo *GetTrackInfo(int trk); 45 | }; 46 | 47 | } // namespace 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /nsfmwin/nsfmeasure.cpp: -------------------------------------------------------------------------------- 1 | #include "nsfmeasure.h" 2 | 3 | using namespace xgm; 4 | 5 | #define FREQ 60 6 | 7 | NSFMeas::NSFMeas() 8 | { 9 | nsfp = new NSFPlayer(); 10 | nsfc = new NSFPlayerConfig(); 11 | nsfc->detecttime = 60*1000; 12 | nsfc->detectint = 5000; 13 | nsfc->loopnum = 1; 14 | nsfc->autodetect = 1; 15 | nsfc->autostop = 1; 16 | nsfc->stopsec = 3; 17 | nsfc->enable_dcf = 1; 18 | for(int i=0; idprop[i].filter_C = 0; 20 | nsfc->dprop[DMC].option[NES_DMC::OPT_DPCM_HPF]=0; 21 | nsfc->dprop[DMC].option[NES_DMC::OPT_DPCM_LPF]=0; 22 | nsfc->dprop[DMC].option[NES_DMC::OPT_DPCM_FEEDBACK]=0; 23 | nsfp->SetConfig(nsfc); 24 | } 25 | 26 | NSFMeas::~NSFMeas() 27 | { 28 | delete nsfp; 29 | delete nsfc; 30 | } 31 | 32 | bool NSFMeas::Open(NSF *n, int max_time, int min_loop, int detect_mode) 33 | { 34 | nsf = n; 35 | progress_time = 0; 36 | nsf->playtime_unknown = true; 37 | nsf->time_in_ms = max_time; 38 | nsf->loop_in_ms = 0; 39 | nsfc->detecttime = min_loop; 40 | nsfc->detect_alternative = detect_mode; 41 | 42 | if(!nsfp->Load(nsf)) return false; 43 | nsfp->SetPlayFreq(FREQ); 44 | nsfp->Reset(); 45 | return true; 46 | } 47 | 48 | bool NSFMeas::Progress() 49 | { 50 | xgm::INT16 dummy[FREQ]; 51 | 52 | nsfp->Render(dummy,FREQ); 53 | progress_time += 1000; 54 | return (!nsfp->IsDetected()&&!nsfp->IsStopped()); 55 | } 56 | 57 | bool NSFMeas::IsDetected(){ return nsfp->IsDetected(); } 58 | 59 | int NSFMeas::GetProgressTime(){ return progress_time; } -------------------------------------------------------------------------------- /vcm/ui/win32/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by win32.rc 4 | // 5 | #define IDR_MANIFEST 1 6 | #define IDCANCEL2 3 7 | #define IDR_MAINFRAME 128 8 | #define IDD_SLIDER 130 9 | #define IDD_CHECK 131 10 | #define IDD_TEXT 132 11 | #define IDD_COMBO 133 12 | #define IDD_TREE_DIALOG 134 13 | #define IDC_EDIT 1004 14 | #define IDC_SPIN 1005 15 | #define IDC_LABEL 1006 16 | #define IDC_MIN 1007 17 | #define IDC_SLIDER 1008 18 | #define IDC_MAX 1009 19 | #define IDC_CHECK 1010 20 | #define IDC_TEXT 1011 21 | #define IDC_COMBO 1012 22 | #define IDC_TREE 1013 23 | #define IDC_DESC 1014 24 | #define IDC_APPLY 1015 25 | #define IDD_SPIN 2083 26 | #define IDD_WIN32_DIALOG 2084 27 | 28 | // Next default values for new objects 29 | // 30 | #ifdef APSTUDIO_INVOKED 31 | #ifndef APSTUDIO_READONLY_SYMBOLS 32 | #define _APS_NEXT_RESOURCE_VALUE 135 33 | #define _APS_NEXT_COMMAND_VALUE 32771 34 | #define _APS_NEXT_CONTROL_VALUE 1016 35 | #define _APS_NEXT_SYMED_VALUE 101 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | This branch of NSFPlay includes changes from Patashu's NSFPlay Synthesia build and tracks changes from the upstream branch. 2 | 3 | The original FamiTracker forum thread for NSFPlay Synthesia is available at: http://forums.famitracker.com/viewtopic.php?t=101 4 | 5 | The original readme text is included below: 6 | 7 | 8 | 9 | NSFPlay/NSFPlug 2.3 source code 7/19/2013 10 | 11 | This code is maintained by Brad Smith. It is a fork of NSFPlay/NSFPlug by Brezza. The latest version should be available at: 12 | - http://rainwarrior.ca/projects/nsfplay/ 13 | - http://github.com/bbbradsmith/nsfplay 14 | 15 | This code contains several modifications to original, see nsfplay.txt for a list of changes. 16 | 17 | To debug, select NSFPlay as your startup project and set $(OutDir) as your working directory. There is a Setup.bat which will copy the default in_yansf.ini to your Debug/Release temporary folders. I hope to eliminate the need for a default in_yansf.ini in future versions of the program. 18 | 19 | I have presumed based on text comments and readme files in the original code that it is distributed freely, and modification and redistribution is permitted. The same permissive license applies to this version of the code I maintain. You may reuse this code without restriction, and no warranty or liability is implied on my part. 20 | 21 | Feel free to contact me with questions or comments. 22 | 23 | Brad Smith 24 | nsfplay AT rainwarrior.ca 25 | http://rainwarrior.ca 26 | 27 | Original NSFPlay/NFSPlug project available at: http://www.pokipoki.org/dsa/ 28 | -------------------------------------------------------------------------------- /nsfplay/nsfplay.h: -------------------------------------------------------------------------------- 1 | /* 2 | * nsfplay.h written by Mitsutaka Okazaki 2004. 3 | * 4 | * This software is provided 'as-is', without any express or implied warranty. 5 | * In no event will the authors be held liable for any damages arising from 6 | * the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not 17 | * be misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | */ 21 | #pragma once 22 | 23 | #ifndef __AFXWIN_H__ 24 | #error include 'stdafx.h' before including this file for PCH 25 | #endif 26 | 27 | #include "resource.h" 28 | 29 | class CnsfplayDlg; // forward declaration 30 | 31 | class CnsfplayApp : public CWinApp 32 | { 33 | protected: 34 | HACCEL m_hAccel; 35 | CnsfplayDlg* m_pDlg; 36 | public: 37 | CnsfplayApp(); 38 | 39 | public: 40 | virtual BOOL InitInstance(); 41 | 42 | DECLARE_MESSAGE_MAP() 43 | virtual BOOL ProcessMessageFilter(int code, LPMSG lpMsg); 44 | }; 45 | 46 | extern CnsfplayApp theApp; 47 | -------------------------------------------------------------------------------- /nsfmwin/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by nsfmwin.rc 4 | // 5 | #define IDR_MANIFEST 1 6 | #define IDM_ABOUTBOX 0x0010 7 | #define IDD_ABOUTBOX 100 8 | #define IDS_ABOUTBOX 101 9 | #define IDD_NSFMWIN_DIALOG 102 10 | #define IDR_MAINFRAME 128 11 | #define IDD_OPTION 129 12 | #define IDC_PROGRESS1 1000 13 | #define IDC_PROGRESS2 1001 14 | #define IDC_LIST 1003 15 | #define IDC_DELETE 1005 16 | #define IDC_UP 1006 17 | #define IDC_DOWN 1007 18 | #define IDC_START 1008 19 | #define IDC_TRACK 1010 20 | #define IDC_FILE 1011 21 | #define IDC_PROGRESS0 1013 22 | #define IDC_TOTAL 1014 23 | #define IDC_PRIORITY 1015 24 | #define IDC_SEARCH 1017 25 | #define IDC_LOOPLEN 1019 26 | #define IDC_CHECK1 1021 27 | #define IDC_USEALT 1021 28 | #define ID_OPTION 57671 29 | 30 | // Next default values for new objects 31 | // 32 | #ifdef APSTUDIO_INVOKED 33 | #ifndef APSTUDIO_READONLY_SYMBOLS 34 | #define _APS_NEXT_RESOURCE_VALUE 132 35 | #define _APS_NEXT_COMMAND_VALUE 32771 36 | #define _APS_NEXT_CONTROL_VALUE 1022 37 | #define _APS_NEXT_SYMED_VALUE 101 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/281btone.h: -------------------------------------------------------------------------------- 1 | /* YMF281B tone by Chabin (4/10/2004) */ 2 | 0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 3 | 0x62,0x21,0x1a,0x07,0xf0,0x6f,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 4 | 0x00,0x10,0x44,0x02,0xf6,0xf4,0x54,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 5 | 0x03,0x01,0x97,0x04,0xf3,0xf3,0x13,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 6 | 0x01,0x61,0x0a,0x0f,0xfa,0x64,0x70,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 7 | 0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 8 | 0x00,0x61,0x8a,0x0e,0xc0,0x61,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 9 | 0x21,0x61,0x1b,0x07,0x84,0x80,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 10 | 0x37,0x32,0xc9,0x01,0x66,0x64,0x40,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 11 | 0x01,0x21,0x06,0x03,0xa5,0x71,0x51,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 12 | 0x06,0x11,0x5e,0x07,0xf3,0xf2,0xf6,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 13 | 0x00,0x20,0x18,0x06,0xf5,0xf3,0x20,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 14 | 0x97,0x41,0x20,0x07,0xff,0xf4,0x22,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 15 | 0x65,0x61,0x15,0x00,0xf7,0xf3,0x16,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 16 | 0x01,0x31,0x0e,0x07,0xfa,0xf3,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 17 | 0x48,0x61,0x09,0x07,0xf1,0x94,0xf0,0xf5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 18 | 0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 19 | 0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 20 | 0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/2413tone.h: -------------------------------------------------------------------------------- 1 | /* YM2413 tone by okazaki@angel.ne.jp (4/10/2004) */ 2 | 0x49,0x4c,0x4c,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 3 | 0x61,0x61,0x1e,0x17,0xf0,0x7f,0x00,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 4 | 0x13,0x41,0x16,0x0e,0xfd,0xf4,0x23,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 5 | 0x03,0x01,0x9a,0x04,0xf3,0xf3,0x13,0xf3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 6 | 0x11,0x61,0x0e,0x07,0xfa,0x64,0x70,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 7 | 0x22,0x21,0x1e,0x06,0xf0,0x76,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 8 | 0x21,0x22,0x16,0x05,0xf0,0x71,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 9 | 0x21,0x61,0x1d,0x07,0x82,0x80,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 10 | 0x23,0x21,0x2d,0x16,0x90,0x90,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 11 | 0x21,0x21,0x1b,0x06,0x64,0x65,0x10,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 12 | 0x21,0x21,0x0b,0x1a,0x85,0xa0,0x70,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 13 | 0x23,0x01,0x83,0x10,0xff,0xb4,0x10,0xf4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 14 | 0x97,0xc1,0x20,0x07,0xff,0xf4,0x22,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 15 | 0x61,0x00,0x0c,0x05,0xc2,0xf6,0x40,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 16 | 0x01,0x01,0x56,0x03,0x94,0xc2,0x03,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 17 | 0x21,0x01,0x89,0x03,0xf1,0xe4,0xf0,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 18 | 0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 19 | 0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 20 | 0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/vrc7tone_kt2.h: -------------------------------------------------------------------------------- 1 | // patch set 2 by kevtris (11/15/1999) 2 | // http://kevtris.org/nes/vrcvii.txt 3 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 4 | 0x31, 0x22, 0x23, 0x07, 0xF0, 0xF0, 0xE8, 0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x03, 0x31, 0x68, 0x05, 0xF2, 0x74, 0x79, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x01, 0x51, 0x72, 0x04, 0xF1, 0xD3, 0x9D, 0x8B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x22, 0x61, 0x1B, 0x05, 0xC0, 0xA1, 0xF8, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x22, 0x61, 0x2C, 0x03, 0xD2, 0xA1, 0xA7, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x31, 0x22, 0xFA, 0x01, 0xF1, 0xF1, 0xF4, 0xEE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x21, 0x61, 0x28, 0x06, 0xF1, 0xF1, 0xCE, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x27, 0x61, 0x60, 0x00, 0xF0, 0xF0, 0xFF, 0xFD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x60, 0x21, 0x2B, 0x06, 0x85, 0xF1, 0x79, 0x9D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x31, 0xA1, 0xFF, 0x0A, 0x53, 0x62, 0x5E, 0xAF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x03, 0xA1, 0x70, 0x0F, 0xD4, 0xA3, 0x94, 0xBE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x2B, 0x61, 0xE4, 0x07, 0xF6, 0x93, 0xBD, 0xAC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x21, 0x63, 0xED, 0x07, 0x77, 0xF1, 0xC7, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x21, 0x61, 0x2A, 0x03, 0xF3, 0xE2, 0xB6, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x21, 0x63, 0x37, 0x03, 0xF3, 0xE2, 0xB6, 0xD9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/vrc7tone_mo.h: -------------------------------------------------------------------------------- 1 | /* VRC7 TONES by okazaki@angel.ne.jp (4/10/2004) */ 2 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 3 | 0x33,0x01,0x09,0x0e,0x94,0x90,0x40,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 4 | 0x13,0x41,0x0f,0x0d,0xce,0xd3,0x43,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 5 | 0x01,0x12,0x1b,0x06,0xff,0xd2,0x00,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 6 | 0x61,0x61,0x1b,0x07,0xaf,0x63,0x20,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 7 | 0x22,0x21,0x1e,0x06,0xf0,0x76,0x08,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 8 | 0x66,0x21,0x15,0x00,0x93,0x94,0x20,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 9 | 0x21,0x61,0x1c,0x07,0x82,0x81,0x10,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 10 | 0x23,0x21,0x20,0x1f,0xc0,0x71,0x07,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 11 | 0x25,0x31,0x26,0x05,0x64,0x41,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 12 | 0x17,0x21,0x28,0x07,0xff,0x83,0x02,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 13 | 0x97,0x81,0x25,0x07,0xcf,0xc8,0x02,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 14 | 0x21,0x21,0x54,0x0f,0x80,0x7f,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 15 | 0x01,0x01,0x56,0x03,0xd3,0xb2,0x43,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 16 | 0x31,0x21,0x0c,0x03,0x82,0xc0,0x40,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 17 | 0x21,0x01,0x0c,0x03,0xd4,0xd3,0x40,0x84,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 18 | 0x07,0x21,0x14,0x00,0xee,0xf8,0xff,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 19 | 0x01,0x31,0x00,0x00,0xf8,0xf7,0xf8,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 20 | 0x25,0x11,0x00,0x00,0xf8,0xfa,0xf8,0x55,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 21 | -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/vrc7tone_kt1.h: -------------------------------------------------------------------------------- 1 | // patch set 1 by kevtris (11/14/1999) 2 | // http://kevtris.org/nes/vrcvii.txt 3 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 4 | 0x05, 0x03, 0x10, 0x06, 0x74, 0xA1, 0x13, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x05, 0x01, 0x16, 0x00, 0xF9, 0xA2, 0x15, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x01, 0x41, 0x11, 0x00, 0xA0, 0xA0, 0x83, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x01, 0x41, 0x17, 0x00, 0x60, 0xF0, 0x83, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x24, 0x41, 0x1F, 0x00, 0x50, 0xB0, 0x94, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x05, 0x01, 0x0B, 0x04, 0x65, 0xA0, 0x54, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x11, 0x41, 0x0E, 0x04, 0x70, 0xC7, 0x13, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x02, 0x44, 0x16, 0x06, 0xE0, 0xE0, 0x31, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x48, 0x22, 0x22, 0x07, 0x50, 0xA1, 0xA5, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x05, 0xA1, 0x18, 0x00, 0xA2, 0xA2, 0xF5, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x07, 0x81, 0x2B, 0x05, 0xA5, 0xA5, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x01, 0x41, 0x08, 0x08, 0xA0, 0xA0, 0x83, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x21, 0x61, 0x12, 0x00, 0x93, 0x92, 0x74, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x21, 0x62, 0x21, 0x00, 0x84, 0x85, 0x34, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x21, 0x62, 0x0E, 0x00, 0xA1, 0xA0, 0x34, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 19 | -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/vrc7tone_rw.h: -------------------------------------------------------------------------------- 1 | // patch set by rainwarrior (8/01/2012) 2 | // http://forums.nesdev.com/viewtopic.php?f=6&t=9141 3 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 4 | 0x03, 0x21, 0x05, 0x06, 0xB8, 0x82, 0x42, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x13, 0x41, 0x13, 0x0D, 0xD8, 0xD6, 0x23, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x31, 0x11, 0x08, 0x08, 0xFA, 0x9A, 0x22, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x31, 0x61, 0x18, 0x07, 0x78, 0x64, 0x30, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x22, 0x21, 0x1E, 0x06, 0xF0, 0x76, 0x08, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x02, 0x01, 0x06, 0x00, 0xF0, 0xF2, 0x03, 0xF5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x21, 0x61, 0x1D, 0x07, 0x82, 0x81, 0x16, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x23, 0x21, 0x1A, 0x17, 0xCF, 0x72, 0x25, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x15, 0x11, 0x25, 0x00, 0x4F, 0x71, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x85, 0x01, 0x12, 0x0F, 0x99, 0xA2, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x07, 0xC1, 0x69, 0x07, 0xF3, 0xF5, 0xA7, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x71, 0x23, 0x0D, 0x06, 0x66, 0x75, 0x23, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x01, 0x02, 0xD3, 0x05, 0xA3, 0x92, 0xF7, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x61, 0x63, 0x0C, 0x00, 0x94, 0xAF, 0x34, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x21, 0x62, 0x0D, 0x00, 0xB1, 0xA0, 0x54, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSFPlay 6 | 25 | 26 | 27 | 28 |
29 | 30 |

NSFPlay

31 | 32 |

NSFPlay is an open source 33 | NSF 34 | player for Windows and plugin for Winamp (NSFPlug). 35 |
36 | It's a program for listening to NES music. 37 |

38 | 39 |
44 | 45 |

NSFPlay was originally created by 46 | Brezza, 47 | who continued development until 2004. 48 |
49 | This fork was continued by 50 | rainwarrior 51 | in 2012 to add support for modern Windows, 52 |
53 | improve accuracy, and otherwise continue making improvements. 54 |

55 | 56 |
57 | 58 |
59 |
60 |
61 |

2019-3-3
62 | rainwarrior.ca

63 |
64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/vrc7tone_ft36.h: -------------------------------------------------------------------------------- 1 | // patch set by quietust (1/18/2004), used in FamiTracker 0.3.6 2 | // Source: http://nesdev.com/cgi-bin/wwwthreads/showpost.pl?Board=NESemdev&Number=1440 3 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 4 | 0x03, 0x21, 0x04, 0x06, 0x8D, 0xF2, 0x42, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x13, 0x41, 0x05, 0x0E, 0x99, 0x96, 0x63, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x31, 0x11, 0x10, 0x0A, 0xF0, 0x9C, 0x32, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x21, 0x61, 0x1D, 0x07, 0x9F, 0x64, 0x20, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x22, 0x21, 0x1E, 0x06, 0xF0, 0x76, 0x08, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x02, 0x01, 0x06, 0x00, 0xF0, 0xF2, 0x03, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x21, 0x61, 0x1C, 0x07, 0x82, 0x81, 0x16, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x23, 0x21, 0x1A, 0x17, 0xEF, 0x82, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x25, 0x11, 0x1F, 0x00, 0x86, 0x41, 0x20, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x85, 0x01, 0x1F, 0x0F, 0xE4, 0xA2, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x07, 0xC1, 0x2B, 0x45, 0xB4, 0xF1, 0x24, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x61, 0x23, 0x11, 0x06, 0x96, 0x96, 0x13, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x01, 0x02, 0xD3, 0x05, 0x82, 0xA2, 0x31, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x61, 0x22, 0x0D, 0x02, 0xC3, 0x7F, 0x24, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x21, 0x62, 0x0E, 0x00, 0xA1, 0xA0, 0x44, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -------------------------------------------------------------------------------- /vcm/value.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "vcm.h" 3 | 4 | using namespace vcm; 5 | 6 | Value::Value ( ) : data(""), update(false) 7 | { 8 | } 9 | 10 | Value::Value (int i) : update(false) 11 | { 12 | SetInt(i); 13 | } 14 | 15 | Value::Value (const std::string &s) : update(false) 16 | { 17 | SetStr(s); 18 | } 19 | 20 | Value::Value (const char *s) : update(false) 21 | { 22 | SetStr(s); 23 | } 24 | 25 | int Value::GetInt() const 26 | { 27 | return ::atoi( this->data.c_str() ); 28 | } 29 | 30 | Value::operator const char * () const 31 | { 32 | return this->data.c_str(); 33 | } 34 | 35 | Value::operator int() const 36 | { 37 | return ::atoi( this->data.c_str() ); 38 | } 39 | 40 | std::string Value::GetStr() const 41 | { 42 | return this->data; 43 | } 44 | 45 | Value::operator std::string() const 46 | { 47 | return this->data; 48 | } 49 | 50 | void Value::SetInt( int i ) 51 | { 52 | char buf[16]; 53 | this->update = true; 54 | this->data = itoa( i, buf, 10 ); 55 | } 56 | 57 | Value &Value::operator = ( int i ) 58 | { 59 | char buf[16]; 60 | this->update = true; 61 | this->data = itoa( i, buf, 10 ); 62 | return *this; 63 | } 64 | 65 | void Value::SetStr( const char *str ) 66 | { 67 | this->update = true; 68 | this->data = (std::string)(str); 69 | } 70 | 71 | Value &Value::operator =( const char *str ) 72 | { 73 | this->update = true; 74 | this->data = (std::string)(str); 75 | return *this; 76 | } 77 | 78 | void Value::SetStr( const std::string &str ) 79 | { 80 | this->update = true; 81 | this->data = str; 82 | } 83 | 84 | Value &Value::operator =( const std::string &str ) 85 | { 86 | this->update = true; 87 | this->data = str; 88 | return *this; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFN106Panel.cpp: -------------------------------------------------------------------------------- 1 | // NSFN106Panel.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "NSFN106Panel.h" 6 | 7 | #ifdef _DEBUG 8 | #define new DEBUG_NEW 9 | #undef THIS_FILE 10 | static char THIS_FILE[] = __FILE__; 11 | #endif 12 | 13 | using namespace xgm; 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // NSFN106Panel 17 | 18 | 19 | NSFN106Panel::NSFN106Panel(CWnd* pParent /*=NULL*/) 20 | : CDialog(NSFN106Panel::IDD, pParent) 21 | { 22 | //{{AFX_DATA_INIT(NSFN106Panel) 23 | m_serial = FALSE; 24 | //}}AFX_DATA_INIT 25 | } 26 | 27 | 28 | void NSFN106Panel::UpdateNSFPlayerConfig(bool b) 29 | { 30 | NSFDialog::UpdateNSFPlayerConfig(b); 31 | 32 | if(!m_hWnd) return ; 33 | 34 | if(b) 35 | { 36 | m_serial = pm->cf->GetDeviceOption(N106,NES_N106::OPT_SERIAL).GetInt(); 37 | UpdateData(FALSE); 38 | } 39 | else 40 | { 41 | UpdateData(TRUE); 42 | pm->cf->GetDeviceOption(N106, NES_N106::OPT_SERIAL) = m_serial; 43 | pm->cf->Notify(N106); 44 | } 45 | } 46 | 47 | void NSFN106Panel::DoDataExchange(CDataExchange* pDX) 48 | { 49 | CDialog::DoDataExchange(pDX); 50 | //{{AFX_DATA_MAP(NSFN106Panel) 51 | DDX_Check(pDX, IDC_SERIAL, m_serial); 52 | //}}AFX_DATA_MAP 53 | } 54 | 55 | 56 | BEGIN_MESSAGE_MAP(NSFN106Panel, CDialog) 57 | //{{AFX_MSG_MAP(NSFN106Panel) 58 | ON_BN_CLICKED(IDC_SERIAL, OnSerial) 59 | //}}AFX_MSG_MAP 60 | END_MESSAGE_MAP() 61 | 62 | ///////////////////////////////////////////////////////////////////////////// 63 | // NSFN106Panel 64 | 65 | void NSFN106Panel::OnSerial() 66 | { 67 | //SetModified(true); 68 | } 69 | 70 | BOOL NSFN106Panel::OnInitDialog() 71 | { 72 | __super::OnInitDialog(); 73 | 74 | UpdateNSFPlayerConfig(TRUE); 75 | 76 | return TRUE; // return TRUE unless you set the focus to a control 77 | } 78 | -------------------------------------------------------------------------------- /libemuwa2/winamp2/wa_hotkeys.h: -------------------------------------------------------------------------------- 1 | #ifndef WA_HOTKEYS 2 | #define WA_HOTKEYS 3 | 4 | //#define IPC_GEN_HOTKEYS_ADD xxxx //pass a genHotkeysAddStruct * struct in data 5 | // 6 | //To get the IPC_GEN_HOTKEYS_ADD IPC number, do this: 7 | // 8 | // genhotkeys_add_ipc=SendMessage(winampWindow,WM_WA_IPC,(WPARAM)&"GenHotkeysAdd",IPC_REGISTER_WINAMP_IPCMESSAGE); 9 | // 10 | //Then you can use: 11 | // 12 | // PostMessage(winampWindow,WM_WA_IPC,(WPARAM)&myGenHotkeysAddStruct,genhotkeys_add_ipc); 13 | // 14 | 15 | //flags for the genHotkeysAddStruct struct 16 | #define HKF_BRING_TO_FRONT 0x1 // calls SetForegroundWindow before sending the message 17 | #define HKF_HWND_WPARAM 0x2 // sets wParam with Winamp's window handle 18 | #define HKF_COPY 0x4 // copies returned text to the clipboard 19 | #define HKF_PLPOS_WPARAM 0x8 // sets wParam with current pledit position 20 | #define HKF_ISPLAYING_WL 0x10 // sets wParam to genHotkeysAddStruct's wParam if playing, lParam if not 21 | // uses IPC_ISPLAYING to check if playing 22 | #define HKF_SHOWHIDE 0x20 // brings Winamp to front or minimizes Winamp if already at front 23 | #define HKF_NOSENDMSG 0x40 // don't send any message to the winamp window 24 | 25 | #define HKF_DISABLED 0x80000000 26 | 27 | typedef struct { 28 | char *name; //name that will appear in the Global Hotkeys preferences panel 29 | DWORD flags; //one or more flags from above 30 | UINT uMsg; //message that will be sent to winamp's main window (must always be !=NULL) 31 | WPARAM wParam; //wParam that will be sent to winamp's main window 32 | LPARAM lParam; //lParam that will be sent to winamp's main window 33 | char *id; //unique string to identify this command - case insensitive 34 | HWND wnd; //set the HWND to send message (or 0 for main winamp window) 35 | 36 | int extended[6]; //for future extension - always set to zero! 37 | } genHotkeysAddStruct; 38 | 39 | #endif -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/vrc7tone_ft35.h: -------------------------------------------------------------------------------- 1 | // patch set by Mitsutaka Okazaki used in FamiTracker 0.3.5 and prior (6/24/2001) 2 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 3 | 0x33, 0x01, 0x09, 0x0e, 0x94, 0x90, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 4 | 0x13, 0x41, 0x0f, 0x0d, 0xce, 0xd3, 0x43, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x01, 0x12, 0x1b, 0x06, 0xff, 0xd2, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x61, 0x61, 0x1b, 0x07, 0xaf, 0x63, 0x20, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x22, 0x21, 0x1e, 0x06, 0xf0, 0x76, 0x08, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x66, 0x21, 0x15, 0x00, 0x93, 0x94, 0x20, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x21, 0x61, 0x1c, 0x07, 0x82, 0x81, 0x10, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x23, 0x21, 0x20, 0x1f, 0xc0, 0x71, 0x07, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x25, 0x31, 0x26, 0x05, 0x64, 0x41, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x17, 0x21, 0x28, 0x07, 0xff, 0x83, 0x02, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x97, 0x81, 0x25, 0x07, 0xcf, 0xc8, 0x02, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x21, 0x21, 0x54, 0x0f, 0x80, 0x7f, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x01, 0x01, 0x56, 0x03, 0xd3, 0xb2, 0x43, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x31, 0x21, 0x0c, 0x03, 0x82, 0xc0, 0x40, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x21, 0x01, 0x0c, 0x03, 0xd4, 0xd3, 0x40, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x04, 0x21, 0x28, 0x00, 0xdf, 0xf8, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 19 | 0x23, 0x22, 0x00, 0x00, 0xa8, 0xf8, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 20 | 0x25, 0x18, 0x00, 0x00, 0xf8, 0xa9, 0xf8, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -------------------------------------------------------------------------------- /xgm/devices/CPU/nes_cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_CPU_H_ 2 | #define _NES_CPU_H_ 3 | #include "../device.h" 4 | 5 | #define ILLEGAL_OPCODES 1 6 | #define DISABLE_DECIMAL 1 7 | #define USE_DIRECT_ZEROPAGE 0 8 | #define USE_CALLBACK 1 9 | #define USE_INLINEMMC 0 10 | #define USE_USERPOINTER 1 11 | #define External __inline 12 | #include "km6502/km6502m.h" 13 | 14 | #include "../misc/log_cpu.h" 15 | 16 | namespace xgm 17 | { 18 | 19 | class NSF2_IRQ; // forward declaration 20 | 21 | class NES_CPU : public IDevice 22 | { 23 | protected: 24 | int init_addr; 25 | int play_addr; 26 | int song; 27 | int region; 28 | K6502_Context context; 29 | bool breaked; 30 | UINT32 fclocks_per_frame; // fCPU clocks per frame timer with fixed point precision 31 | UINT32 fclocks_left_in_frame; 32 | UINT32 breakpoint; 33 | UINT32 irqs; 34 | bool enable_irqs; 35 | bool extra_init; 36 | bool nmi_play; 37 | bool play_ready; 38 | IDevice *bus; 39 | UINT8 nsf2_bits; 40 | NSF2_IRQ* nsf2_irq; 41 | CPULogger *log_cpu; 42 | 43 | void run_from (UINT32 address); 44 | 45 | public: 46 | double NES_BASECYCLES; 47 | NES_CPU (double clock = DEFAULT_CLOCK); 48 | ~NES_CPU (); 49 | void Reset (); 50 | void Start ( 51 | int init_addr_, 52 | int play_addr_, 53 | double play_rate, 54 | int song_, 55 | int region_, 56 | UINT8 nsf2_bits_, 57 | bool enable_irqs_, 58 | NSF2_IRQ* nsf2_irq_); 59 | UINT32 Exec (UINT32 clock, bool *frameElapsed); // returns number of clocks executed and if it passed a frame boundary or not 60 | void SetMemory (IDevice *); 61 | bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 62 | bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 63 | void SetLogger (CPULogger *logger); 64 | unsigned int GetPC() const; 65 | 66 | // IRQ devices 67 | enum { 68 | IRQD_FRAME = 0, 69 | IRQD_DMC = 1, 70 | IRQD_NSF2 = 2, 71 | IRQD_COUNT 72 | }; 73 | 74 | void UpdateIRQ(int device, bool on); 75 | void EnableIRQ(bool enable); 76 | }; 77 | 78 | } // namespace xgm 79 | #endif 80 | -------------------------------------------------------------------------------- /xgm/devices/Misc/nsf2_irq.cpp: -------------------------------------------------------------------------------- 1 | #include "nsf2_irq.h" 2 | #include "../CPU/nes_cpu.h" 3 | 4 | namespace xgm { 5 | 6 | NSF2_IRQ::NSF2_IRQ() 7 | { 8 | Reset(); 9 | } 10 | 11 | NSF2_IRQ::~NSF2_IRQ() 12 | { 13 | } 14 | 15 | void NSF2_IRQ::Reset() 16 | { 17 | active = false; 18 | irq = false; 19 | reload = 0xFFFF; 20 | count = reload; 21 | } 22 | 23 | bool NSF2_IRQ::Read(UINT32 adr, UINT32 & val, UINT32 id) 24 | { 25 | if (0x401B > adr || adr > 0x401D) return false; 26 | switch (adr) 27 | { 28 | case 0x401B: 29 | val = reload & 0xFF; 30 | break; 31 | case 0x401C: 32 | val = (reload >> 8) & 0xFF; 33 | break; 34 | case 0x401D: 35 | val = irq ? 0x80 : 0x00; // return IRQ state 36 | val |= active ? 0x01 : 0x00; // return active state 37 | irq = false; // acknowledge IRQ 38 | cpu->UpdateIRQ(NES_CPU::IRQD_NSF2, false); 39 | break; 40 | } 41 | return true; 42 | } 43 | 44 | bool NSF2_IRQ::Write(UINT32 adr, UINT32 val, UINT32 id) 45 | { 46 | if (0x401B > adr || adr > 0x401D) return false; 47 | switch (adr) 48 | { 49 | case 0x401B: 50 | reload = (reload & 0xFF00) | (val & 0x00FF); 51 | break; 52 | case 0x401C: 53 | reload = (reload & 0x00FF) | ((val & 0x00FF) << 8); 54 | break; 55 | case 0x401D: 56 | if (!active) count = reload; 57 | active = (val & 0x01) != 0; 58 | break; 59 | } 60 | return true; 61 | } 62 | 63 | void NSF2_IRQ::Clock(UINT32 clocks) 64 | { 65 | if (!active) 66 | { 67 | count = reload; 68 | return; 69 | } 70 | 71 | if (clocks > count) 72 | { 73 | irq = true; 74 | cpu->UpdateIRQ(NES_CPU::IRQD_NSF2, true); 75 | while (clocks > 0) 76 | { 77 | if (clocks > count) 78 | { 79 | clocks -= count; 80 | count = reload; 81 | } 82 | else 83 | { 84 | count -= clocks; 85 | clocks = 0; 86 | } 87 | } 88 | } 89 | else 90 | { 91 | count -= clocks; 92 | } 93 | } 94 | 95 | void NSF2_IRQ::SetCPU(NES_CPU* cpu_) 96 | { 97 | cpu = cpu_; 98 | } 99 | 100 | } // namespace xgm 101 | -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/emu2212.h: -------------------------------------------------------------------------------- 1 | #ifndef _EMU2212_H_ 2 | #define _EMU2212_H_ 3 | 4 | #ifdef EMU2212_DLL_EXPORTS 5 | #define EMU2212_API __declspec(dllexport) 6 | #elif defined(EMU2212_DLL_IMPORTS) 7 | #define EMU2212_API __declspec(dllimport) 8 | #else 9 | #define EMU2212_API 10 | #endif 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | #include "emutypes.h" 17 | 18 | #define SCC_STANDARD 0 19 | #define SCC_ENHANCED 1 20 | 21 | #define SCC_MASK_CH(x) (1<<(x)) 22 | 23 | typedef struct __SCC { 24 | 25 | e_uint32 clk, rate ,base_incr, quality ; 26 | 27 | e_int32 out, prev, next; 28 | e_uint32 type ; 29 | e_uint32 mode ; 30 | e_uint32 active; 31 | e_uint32 base_adr; 32 | e_uint32 mask ; 33 | 34 | e_uint32 realstep ; 35 | e_uint32 scctime ; 36 | e_uint32 sccstep ; 37 | 38 | e_uint32 incr[5] ; 39 | 40 | e_int8 wave[5][32] ; 41 | 42 | e_uint32 count[5] ; 43 | e_uint32 freq[5] ; 44 | e_uint32 phase[5] ; 45 | e_uint32 volume[5] ; 46 | e_uint32 offset[5] ; 47 | e_uint8 reg[0x100-0xC0]; 48 | 49 | int ch_enable ; 50 | int ch_enable_next ; 51 | 52 | int cycle_4bit ; 53 | int cycle_8bit ; 54 | int refresh ; 55 | int rotate[5] ; 56 | 57 | } SCC ; 58 | 59 | 60 | EMU2212_API SCC *SCC_new(e_uint32 c, e_uint32 r) ; 61 | EMU2212_API void SCC_reset(SCC *scc) ; 62 | EMU2212_API void SCC_set_rate(SCC *scc, e_uint32 r); 63 | EMU2212_API void SCC_set_quality(SCC *scc, e_uint32 q) ; 64 | EMU2212_API void SCC_set_type(SCC *scc, e_uint32 type) ; 65 | EMU2212_API void SCC_delete(SCC *scc) ; 66 | EMU2212_API e_int16 SCC_calc(SCC *scc) ; 67 | EMU2212_API void SCC_write(SCC *scc, e_uint32 adr, e_uint32 val) ; 68 | EMU2212_API void SCC_writeReg(SCC *scc, e_uint32 adr, e_uint32 val) ; 69 | EMU2212_API e_uint32 SCC_read(SCC *scc, e_uint32 adr) ; 70 | EMU2212_API e_uint32 SCC_setMask(SCC *scc, e_uint32 adr) ; 71 | EMU2212_API e_uint32 SCC_toggleMask(SCC *scc, e_uint32 adr) ; 72 | 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /nsfmwin/nsfmwin.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 7.00 2 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsfmwin", "nsfmwin.vcproj", "{6EF9BB41-276F-4C7D-B3DE-BFEE67ED5585}" 3 | EndProject 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xgm", "..\xgm\xgm.vcproj", "{9A3DDFD1-D499-4AB2-A040-C1D5CB345045}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tag2pls", "..\tag2pls\tag2pls.vcproj", "{A77F74BE-9C19-4693-90A8-AB722E2E28E2}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfiguration) = preSolution 10 | ConfigName.0 = Debug 11 | ConfigName.1 = Release 12 | EndGlobalSection 13 | GlobalSection(ProjectDependencies) = postSolution 14 | {6EF9BB41-276F-4C7D-B3DE-BFEE67ED5585}.0 = {9A3DDFD1-D499-4AB2-A040-C1D5CB345045} 15 | {A77F74BE-9C19-4693-90A8-AB722E2E28E2}.0 = {9A3DDFD1-D499-4AB2-A040-C1D5CB345045} 16 | EndGlobalSection 17 | GlobalSection(ProjectConfiguration) = postSolution 18 | {6EF9BB41-276F-4C7D-B3DE-BFEE67ED5585}.Debug.ActiveCfg = Debug|Win32 19 | {6EF9BB41-276F-4C7D-B3DE-BFEE67ED5585}.Debug.Build.0 = Debug|Win32 20 | {6EF9BB41-276F-4C7D-B3DE-BFEE67ED5585}.Release.ActiveCfg = Release|Win32 21 | {6EF9BB41-276F-4C7D-B3DE-BFEE67ED5585}.Release.Build.0 = Release|Win32 22 | {9A3DDFD1-D499-4AB2-A040-C1D5CB345045}.Debug.ActiveCfg = Debug|Win32 23 | {9A3DDFD1-D499-4AB2-A040-C1D5CB345045}.Debug.Build.0 = Debug|Win32 24 | {9A3DDFD1-D499-4AB2-A040-C1D5CB345045}.Release.ActiveCfg = Release|Win32 25 | {9A3DDFD1-D499-4AB2-A040-C1D5CB345045}.Release.Build.0 = Release|Win32 26 | {A77F74BE-9C19-4693-90A8-AB722E2E28E2}.Debug.ActiveCfg = Debug|Win32 27 | {A77F74BE-9C19-4693-90A8-AB722E2E28E2}.Debug.Build.0 = Debug|Win32 28 | {A77F74BE-9C19-4693-90A8-AB722E2E28E2}.Release.ActiveCfg = Release|Win32 29 | {A77F74BE-9C19-4693-90A8-AB722E2E28E2}.Release.Build.0 = Release|Win32 30 | EndGlobalSection 31 | GlobalSection(ExtensibilityGlobals) = postSolution 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityAddIns) = postSolution 34 | EndGlobalSection 35 | EndGlobal 36 | -------------------------------------------------------------------------------- /xgm/readme.txt: -------------------------------------------------------------------------------- 1 | XGM SOURCE ARCHIVE 2 | 3 | This source archive is distributed in the hope that it will be useful, 4 | but WITHOUT ANY WARRANTY. You can reuse these source code freely. However, 5 | we possibly change the structure and interface of the program code without 6 | any advance notice. 7 | 8 | HOW TO COMPILE 9 | 10 | Open the workspace file top.sln with Visual C++ 7.0 or later 11 | version. We can compile both KbMediaPlayer and Winamp version of 12 | NSFplug on this workspace. 13 | 14 | To make a KbMediaPlayer version of NSFplug, that is, in_nsf.kpi, 15 | Please choose 'kbnsf' project as an active project. Then, you can 16 | build in_nsf.kpi by build menu. 17 | 18 | On the other hand, to make a Winamp version of NSFplug, activate 19 | 'wa2nsf' project and build it. 20 | 21 | Note that after the build process, VC++ copies the plugin files to: 22 | 23 | C:\Program Files\KbMediaPlayer\Plugins\OK\in_nsf\in_nsf.kpi 24 | C:\Program Files\Windamp\Plugins\in_nsf.dll 25 | 26 | If you don't need to have these copies, please remove or modify the 27 | custom build settings. 28 | 29 | ACKNOWLEDGEMENT 30 | 31 | I thank Mamiya and Kobarin and Nullsoft for their great source code. 32 | I thank Norix and Izumi for the fruitful discussions and the NSFplug 33 | users for their comments and bug reports. 34 | 35 | COPYRIGHTS 36 | 37 | NSFplug is built on KM6502, KbMediaPlayer plugin SDK and Winamp2 38 | plugin SDK. 39 | 40 | NSFplug uses KM6502 in emulating a 6502 cpu. KM6502 code is stored in 41 | devices\CPU\km6502 folder of this source archive. KM6502 is a public 42 | domain software. See the document of KM6502 stored in the folder. 43 | 44 | KbMediaPlayer Plugin SDK is provided by Kobarin. The SDK code is also 45 | packed in the kbmedia\sdk folder of this archive. The copyright of 46 | the source code remains with Kobarin. 47 | 48 | The files in winamp/sdk folder of this archive are the header files 49 | from Winamp2 Plugin SDK provided by Nullsoft. The copyright of these 50 | header files remains with Nullsoft. 51 | 52 | CONTACT 53 | 54 | Digital Sound Antiques 55 | http://dsa.sakura.ne.jp/ 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /nsfplay/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by nsfplay.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_NSFPLAY_DIALOG 102 9 | #define IDI_MAINFRAME 128 10 | #define IDI_FAMICOM 129 11 | #define IDR_ACCELERATOR 130 12 | #define IDI_OPEN 131 13 | #define IDI_PROP 132 14 | #define IDI_VOLUME 133 15 | #define IDI_NEXT 143 16 | #define IDI_STOP 144 17 | #define IDI_PLAY 145 18 | #define IDI_PREV 146 19 | #define IDI_PAUSE 147 20 | #define IDI_ABOUT 148 21 | #define IDI_CONFIG 149 22 | #define IDI_WAVEOUT 150 23 | #define IDC_PREV 1000 24 | #define IDC_NEXT 1001 25 | #define IDC_PLAY 1002 26 | #define IDC_STOP 1003 27 | #define IDC_PAUSE 1005 28 | #define IDC_INFO 1007 29 | #define IDC_PLAYTIME 1008 30 | #define IDC_TIME_MAX 1009 31 | #define IDC_SLIDER 1010 32 | #define IDC_TITLE 1011 33 | #define IDC_OPEN 1013 34 | #define IDC_VOLUME 1014 35 | #define IDC_CONFIG 1015 36 | #define IDC_VICON 1016 37 | #define IDC_CONFIG2 1016 38 | #define IDC_WAVEOUT 1016 39 | 40 | // Next default values for new objects 41 | // 42 | #ifdef APSTUDIO_INVOKED 43 | #ifndef APSTUDIO_READONLY_SYMBOLS 44 | #define _APS_NEXT_RESOURCE_VALUE 136 45 | #define _APS_NEXT_COMMAND_VALUE 32779 46 | #define _APS_NEXT_CONTROL_VALUE 1017 47 | #define _APS_NEXT_SYMED_VALUE 101 48 | #endif 49 | #endif 50 | -------------------------------------------------------------------------------- /libemuwa2/emu_winamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * emu_winamp.h written by Mitsutaka Okazaki 2004. 3 | * 4 | * This software is provided 'as-is', without any express or implied warranty. 5 | * In no event will the authors be held liable for any damages arising from 6 | * the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not 17 | * be misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | */ 21 | #pragma once 22 | struct IUnknown; 23 | #include 24 | #include "emu_outmod.h" 25 | #include "emu_outdisk.h" 26 | #include "winamp2/FRONTEND.h" 27 | 28 | class EmuWinamp { 29 | HMODULE m_dll; 30 | EmuOutMod m_eom; 31 | EmuOutDisk m_eod; 32 | In_Module *m_in_mod; 33 | char m_fn[2048]; 34 | char m_wo[2048]; // waveout filename 35 | bool m_playing; 36 | int m_volume; 37 | public: 38 | static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); 39 | EmuWinamp(const char *dll_name); 40 | ~EmuWinamp(); 41 | int Play(char *fn); 42 | void Stop(); 43 | void Pause(); 44 | void SetOutputTime(int time_in_ms); 45 | int GetOutputTime(); 46 | int GetWrittenTime(); 47 | int IsPlaying(); 48 | int IsPaused(); 49 | void GetFileInfo(char *file, char *title, int *length_in_ms); 50 | void Info(HWND hWnd); 51 | void Config(HWND hWnd); 52 | void About(HWND hWnd); 53 | void Next(); 54 | void Prev(); 55 | int GetBufferUsage(); 56 | void SetVolume(int volume); 57 | void Waveout(const char* wavefile); 58 | }; 59 | 60 | 61 | -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_n106.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_N106_H_ 2 | #define _NES_N106_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm { 6 | 7 | class TrackInfoN106 : public TrackInfoBasic 8 | { 9 | public: 10 | int wavelen; 11 | INT16 wave[256]; 12 | virtual IDeviceInfo *Clone(){ return new TrackInfoN106(*this); } 13 | }; 14 | 15 | class NES_N106:public ISoundChip 16 | { 17 | public: 18 | enum 19 | { 20 | OPT_SERIAL = 0, 21 | OPT_END 22 | }; 23 | 24 | protected: 25 | double rate, clock; 26 | int mask; 27 | INT32 sm[2][8]; // stereo mix 28 | INT32 fout[8]; // current output 29 | TrackInfoN106 trkinfo[8]; 30 | int option[OPT_END]; 31 | 32 | bool master_disable; 33 | UINT32 reg[0x80]; // all state is contained here 34 | unsigned int reg_select; 35 | bool reg_advance; 36 | int tick_channel; 37 | int tick_clock; 38 | int render_channel; 39 | int render_clock; 40 | int render_subclock; 41 | 42 | // convenience functions to interact with regs 43 | inline UINT32 get_phase (int channel); 44 | inline UINT32 get_freq (int channel); 45 | inline UINT32 get_off (int channel); 46 | inline UINT32 get_len (int channel); 47 | inline INT32 get_vol (int channel); 48 | inline INT32 get_sample (UINT32 index); 49 | inline int get_channels (); 50 | // for storing back the phase after modifying 51 | inline void set_phase (UINT32 phase, int channel); 52 | 53 | public: 54 | NES_N106 (); 55 | ~NES_N106 (); 56 | 57 | virtual void Reset (); 58 | virtual void Tick (UINT32 clocks); 59 | virtual UINT32 Render (INT32 b[2]); 60 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 61 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 62 | virtual void SetRate (double); 63 | virtual void SetClock (double); 64 | virtual void SetOption (int, int); 65 | virtual void SetMask (int m); 66 | virtual void SetStereoMix (int trk, INT16 mixl, INT16 mixr); 67 | virtual ITrackInfo *GetTrackInfo(int trk); 68 | }; 69 | 70 | } // namespace xgm 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /xgm/devices/Audio/fader.h: -------------------------------------------------------------------------------- 1 | #ifndef _FADER_H_ 2 | #define _FADER_H_ 3 | #include "../device.h" 4 | #include 5 | 6 | namespace xgm 7 | { 8 | class Fader : virtual public IRenderable 9 | { 10 | protected: 11 | UINT32 fade_pos, fade_end; 12 | IRenderable* d; 13 | 14 | public: 15 | Fader () 16 | { 17 | d = NULL; 18 | Reset(); 19 | } 20 | 21 | ~Fader () 22 | { 23 | } 24 | 25 | void Attach (IRenderable * dev) 26 | { 27 | d = dev; 28 | } 29 | 30 | void Reset () 31 | { 32 | fade_pos = 0; 33 | fade_end = 1; 34 | } 35 | 36 | bool IsFadeEnd () 37 | { 38 | return (fade_pos >= fade_end); 39 | } 40 | 41 | bool IsFading () 42 | { 43 | return (fade_pos > 0); 44 | } 45 | 46 | void FadeStart (double rate, int fade_in_ms) 47 | { 48 | if (fade_in_ms) 49 | { 50 | const UINT32 MAX_SAMPLES = ~0UL; 51 | double samples = (double)fade_in_ms * rate / 1000.0; 52 | if (samples < (double)MAX_SAMPLES) 53 | { 54 | fade_end = UINT32(samples); 55 | } 56 | else 57 | { 58 | fade_end = MAX_SAMPLES; 59 | } 60 | } 61 | else 62 | { 63 | fade_end = 1; 64 | } 65 | fade_pos = 1; // begin fade 66 | } 67 | 68 | void Skip (int length) 69 | { 70 | if (fade_pos > 0) 71 | { 72 | if (fade_pos < fade_end) ++fade_pos; 73 | else fade_pos = fade_end; 74 | } 75 | } 76 | 77 | virtual void Tick (UINT32 clocks) 78 | { 79 | d->Tick(clocks); 80 | } 81 | 82 | virtual UINT32 Render (INT32 b[2]) 83 | { 84 | d->Render (b); 85 | if (fade_pos > 0) 86 | { 87 | double fade_amount = double(fade_end - fade_pos) / double(fade_end); 88 | b[0] = INT32(fade_amount * b[0]); 89 | b[1] = INT32(fade_amount * b[1]); 90 | 91 | if (fade_pos < fade_end) ++fade_pos; 92 | else fade_pos = fade_end; 93 | } 94 | return 2; 95 | } 96 | }; 97 | 98 | } // namespace 99 | 100 | #endif 101 | -------------------------------------------------------------------------------- /tag2pls/tag2pls.txt: -------------------------------------------------------------------------------- 1 | NAME 2 | 3 | tag2pls - a taginfo to play-list converter for NSFplug. 4 | 5 | SYNOPSIS 6 | 7 | tag2pls [ -f "format"] FILENAME.NSF 8 | 9 | COPYRIGHT 10 | 11 | This software is public domain software. 12 | 13 | DESCRIPTION 14 | 15 | Tag2pls is a command-line taginfo to playlist converter. It can 16 | accept taginfo files generated by NSFplug or NSFMeasure. The 17 | playlists generated from this software can only be accepted by 18 | NSFplug for Winamp2.xx. 19 | 20 | Tag2pls extracts title and play-time information of FILENAME.NSF 21 | from the corresponding taginfo file (FILENAME.TAG or TAGINFO.TAG), 22 | then tag2pls prints the playlist file for the FILENAME.NSF to the 23 | standard output. 24 | 25 | The file TAGINFO.TAG or FILENAME.TAG must be located in the same 26 | folder together with the FILENAME.NSF (Note that TAGINFO.TAG is 27 | ignored if FILENAME.TAG exists). If not, tag2pls do not generate 28 | any play-time information. 29 | 30 | If the option -f is given, the existing title information in the 31 | taginfo file is ignored. Then, tag2pls generates the title section 32 | of the playlist according to the specified format. The format text 33 | may include the control characters that replaced with the following 34 | information. 35 | 36 | %T The title of the song. 37 | %A The artist name of the song. 38 | %C The copyright text of the song. 39 | %n The current number of the song. 40 | %e The number of songs in the NSF. 41 | %s The start number of the songs. 42 | %N The current number of the song in the hex format. 43 | %E The number of songs in the NSF in the hex format. 44 | %S The start number of the songs in the hex format. 45 | 46 | The default format is "%A - %T (%n/%e)". 47 | 48 | DIAGNOSTICS 49 | 50 | Tag2pls exits with the exit status non-zero if an error occurred. 51 | Otherwise, it exits with the status zero. 52 | 53 | AUTHOR 54 | 55 | [OK] (okazaki@angel.ne.jp) 56 | 57 | SEE ALSO 58 | 59 | http://www102.sakura.ne.jp/~ok/psa/ 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_fds.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_FDS_H_ 2 | #define _NES_FDS_H_ 3 | #include "../device.h" 4 | 5 | namespace xgm { 6 | 7 | class TrackInfoFDS : public TrackInfoBasic 8 | { 9 | public: 10 | INT16 wave[64]; 11 | virtual IDeviceInfo *Clone(){ return new TrackInfoFDS(*this); } 12 | }; 13 | 14 | class NES_FDS : public ISoundChip 15 | { 16 | public: 17 | enum 18 | { 19 | OPT_CUTOFF=0, 20 | OPT_4085_RESET, 21 | OPT_WRITE_PROTECT, 22 | OPT_END 23 | }; 24 | 25 | protected: 26 | double rate, clock; 27 | int mask; 28 | INT32 sm[2]; // stereo mix 29 | INT32 fout; // current output 30 | TrackInfoFDS trkinfo; 31 | int option[OPT_END]; 32 | 33 | bool master_io; 34 | UINT master_vol; 35 | UINT32 last_freq; // for trackinfo 36 | UINT32 last_vol; // for trackinfo 37 | 38 | // two wavetables 39 | const enum { TMOD=0, TWAV=1 }; 40 | INT32 wave[2][64]; 41 | UINT32 freq[2]; 42 | UINT32 phase[2]; 43 | bool wav_write; 44 | bool wav_halt; 45 | bool env_halt; 46 | bool mod_halt; 47 | UINT32 mod_pos; 48 | UINT32 mod_write_pos; 49 | 50 | // two ramp envelopes 51 | const enum { EMOD=0, EVOL=1 }; 52 | bool env_mode[2]; 53 | bool env_disable[2]; 54 | UINT32 env_timer[2]; 55 | UINT32 env_speed[2]; 56 | UINT32 env_out[2]; 57 | UINT32 master_env_speed; 58 | 59 | // 1-pole RC lowpass filter 60 | INT32 rc_accum; 61 | INT32 rc_k; 62 | INT32 rc_l; 63 | 64 | public: 65 | NES_FDS (); 66 | virtual ~ NES_FDS (); 67 | 68 | virtual void Reset (); 69 | virtual void Tick (UINT32 clocks); 70 | virtual UINT32 Render (INT32 b[2]); 71 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 72 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 73 | virtual void SetRate (double); 74 | virtual void SetClock (double); 75 | virtual void SetOption (int, int); 76 | virtual void SetMask(int m){ mask = m&1; } 77 | virtual void SetStereoMix (int trk, INT16 mixl, INT16 mixr); 78 | virtual ITrackInfo *GetTrackInfo(int trk); 79 | }; 80 | 81 | } // namespace xgm 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km65c02.h: -------------------------------------------------------------------------------- 1 | #ifndef KM65C02_H_ 2 | #define KM65C02_H_ 3 | 4 | #include "kmconfig.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if USE_USERPOINTER 11 | typedef Uword (Callback *ReadHandler)(void *user, Uword adr); 12 | typedef void (Callback *WriteHandler)(void *user, Uword adr, Uword value); 13 | #else 14 | typedef Uword (Callback *ReadHandler)(Uword adr); 15 | typedef void (Callback *WriteHandler)(Uword adr, Uword value); 16 | #endif 17 | 18 | struct K65C02_Context { 19 | Uword A; /* Accumulator */ 20 | Uword P; /* Status register */ 21 | Uword X; /* X register */ 22 | Uword Y; /* Y register */ 23 | Uword S; /* Stack pointer */ 24 | Uword PC; /* Program Counter */ 25 | 26 | Uword iRequest; /* interrupt request */ 27 | Uword iMask; /* interrupt mask */ 28 | Uword clock; /* (incremental)cycle counter */ 29 | Uword lastcode; 30 | void *user; /* pointer to user area */ 31 | 32 | #if USE_CALLBACK 33 | /* pointer to callback functions */ 34 | #if USE_INLINEMMC 35 | ReadHandler ReadByte[1 << (16 - USE_INLINEMMC)]; 36 | WriteHandler WriteByte[1 << (16 - USE_INLINEMMC)]; 37 | #else 38 | ReadHandler ReadByte; 39 | WriteHandler WriteByte; 40 | #endif 41 | #endif 42 | 43 | #if USE_DIRECT_ZEROPAGE 44 | Ubyte *zeropage; /* pointer to zero page */ 45 | #endif 46 | }; 47 | 48 | enum K65C02_FLAGS { 49 | K65C02_C_FLAG = 0x01, 50 | K65C02_Z_FLAG = 0x02, 51 | K65C02_I_FLAG = 0x04, 52 | K65C02_D_FLAG = 0x08, 53 | K65C02_B_FLAG = 0x10, 54 | K65C02_R_FLAG = 0x20, 55 | K65C02_V_FLAG = 0x40, 56 | K65C02_N_FLAG = 0x80 57 | }; 58 | 59 | enum K65C02_IRQ { 60 | K65C02_INIT = 1, 61 | K65C02_RESET = 2, 62 | K65C02_NMI = 4, 63 | K65C02_BRK = 8, 64 | K65C02_INT = 16 65 | }; 66 | 67 | #ifdef STATIC_CONTEXT65C02 68 | External void K6502_Exec(void); 69 | #else 70 | External void K6502_Exec(struct K65C02_Context *pc); 71 | #endif 72 | 73 | #if !USE_CALLBACK 74 | #if USE_USERPOINTER 75 | External Uword K65C02_ReadByte(void *user, Uword adr); 76 | External void K65C02_WriteByte(void *user, Uword adr, Uword value); 77 | #else 78 | External Uword K65C02_ReadByte(Uword adr); 79 | External void K65C02_WriteByte(Uword adr, Uword value); 80 | #endif 81 | #endif 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | #endif 87 | -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6502.h: -------------------------------------------------------------------------------- 1 | #ifndef KM6502_H_ 2 | #define KM6502_H_ 3 | 4 | #include "kmconfig.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if USE_USERPOINTER 11 | typedef Uword (Callback *ReadHandler)(void *user, Uword adr); 12 | typedef void (Callback *WriteHandler)(void *user, Uword adr, Uword value); 13 | #else 14 | typedef Uword (Callback *ReadHandler)(Uword adr); 15 | typedef void (Callback *WriteHandler)(Uword adr, Uword value); 16 | #endif 17 | 18 | struct K6502_Context { 19 | Uword A; /* Accumulator */ 20 | Uword P; /* Status register */ 21 | Uword X; /* X register */ 22 | Uword Y; /* Y register */ 23 | Uword S; /* Stack pointer */ 24 | Uword PC; /* Program Counter */ 25 | 26 | Uword iRequest; /* interrupt request */ 27 | Uword iMask; /* interrupt mask */ 28 | Uword clock; /* (incremental)cycle counter */ 29 | Uword lastcode; 30 | void *user; /* pointer to user area */ 31 | 32 | #if ILLEGAL_OPCODES 33 | Uword illegal; 34 | #endif 35 | 36 | #if USE_CALLBACK 37 | /* pointer to callback functions */ 38 | #if USE_INLINEMMC 39 | ReadHandler ReadByte[1 << (16 - USE_INLINEMMC)]; 40 | WriteHandler WriteByte[1 << (16 - USE_INLINEMMC)]; 41 | #else 42 | ReadHandler ReadByte; 43 | WriteHandler WriteByte; 44 | #endif 45 | #endif 46 | 47 | #if USE_DIRECT_ZEROPAGE 48 | Ubyte *zeropage; /* pointer to zero page */ 49 | #endif 50 | }; 51 | 52 | enum K6502_FLAGS { 53 | K6502_C_FLAG = 0x01, 54 | K6502_Z_FLAG = 0x02, 55 | K6502_I_FLAG = 0x04, 56 | K6502_D_FLAG = 0x08, 57 | K6502_B_FLAG = 0x10, 58 | K6502_R_FLAG = 0x20, 59 | K6502_V_FLAG = 0x40, 60 | K6502_N_FLAG = 0x80 61 | }; 62 | 63 | enum K6502_IRQ { 64 | K6502_INIT = 1, 65 | K6502_RESET = 2, 66 | K6502_NMI = 4, 67 | K6502_BRK = 8, 68 | K6502_INT = 16 69 | }; 70 | 71 | #ifdef STATIC_CONTEXT6502 72 | External void K6502_Exec(void); 73 | #else 74 | External void K6502_Exec(struct K6502_Context *pc); 75 | #endif 76 | 77 | #if !USE_CALLBACK 78 | #if USE_USERPOINTER 79 | External Uword K6502_ReadByte(void *user, Uword adr); 80 | External void K6502_WriteByte(void *user, Uword adr, Uword value); 81 | #else 82 | External Uword K6502_ReadByte(Uword adr); 83 | External void K6502_WriteByte(Uword adr, Uword value); 84 | #endif 85 | #endif 86 | 87 | #ifdef __cplusplus 88 | } 89 | #endif 90 | #endif 91 | -------------------------------------------------------------------------------- /libemuwa2/emu_outmod.h: -------------------------------------------------------------------------------- 1 | /* 2 | * emu_outmod.h written by Mitsutaka Okazaki 2004. 3 | * 4 | * This software is provided 'as-is', without any express or implied warranty. 5 | * In no event will the authors be held liable for any damages arising from 6 | * the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not 17 | * be misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | */ 21 | #pragma once 22 | struct IUnknown; 23 | #include 24 | #include "winamp2/IN2.H" 25 | 26 | class EmuOutMod { 27 | static Out_Module m_out_mod; 28 | static HWAVEOUT m_hwo; 29 | static WAVEHDR *m_wh; 30 | static HANDLE m_mutex; 31 | static int m_volume; 32 | static char **m_buf; 33 | static int m_buf_idx; 34 | static int m_buf_idx_played; 35 | static int m_buf_pos; 36 | static int m_buf_rest; 37 | static int m_sec_size; 38 | static bool m_playing; 39 | public: 40 | static int m_ring_size; 41 | static int m_buf_size; 42 | Out_Module *GetOutputModule(); 43 | static void About(HWND){} 44 | static void Config(HWND){} 45 | static void Init(); 46 | static void Quit(); 47 | static int Open(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); 48 | static void Close(); 49 | static int Write(char *buf, int len); 50 | static int CanWrite(); 51 | static int IsPlaying(); 52 | static int Pause(int pause); 53 | static void SetVolume(int volume); 54 | static void SetPan(int pan); 55 | static void Flush(int t); 56 | static int GetOutputTime(); 57 | static int GetWrittenTime(); 58 | static void CALLBACK waveOutProc(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, DWORD, DWORD); 59 | }; -------------------------------------------------------------------------------- /xgm/player/plugin/winamp2/sdk/OUT.H: -------------------------------------------------------------------------------- 1 | #define OUT_VER 0x10 2 | 3 | typedef struct 4 | { 5 | int version; // module version (OUT_VER) 6 | const char *description; // description of module, with version string 7 | int id; // module id. each input module gets its own. non-nullsoft modules should 8 | // be >= 65536. 9 | 10 | HWND hMainWindow; // winamp's main window (filled in by winamp) 11 | HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp) 12 | 13 | void (*Config)(HWND hwndParent); // configuration dialog 14 | void (*About)(HWND hwndParent); // about dialog 15 | 16 | void (*Init)(); // called when loaded 17 | void (*Quit)(); // called when unloaded 18 | 19 | int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); 20 | // returns >=0 on success, <0 on failure 21 | // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins. 22 | // ... so don't expect the max latency returned to be what you asked for. 23 | // returns max latency in ms (0 for diskwriters, etc) 24 | // bufferlenms and prebufferms must be in ms. 0 to use defaults. 25 | // prebufferms must be <= bufferlenms 26 | 27 | void (*Close)(); // close the ol' output device. 28 | 29 | int (*Write)(char *buf, int len); 30 | // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data. 31 | // 1 returns not able to write (yet). Non-blocking, always. 32 | 33 | int (*CanWrite)(); // returns number of bytes possible to write at a given time. 34 | // Never will decrease unless you call Write (or Close, heh) 35 | 36 | int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be 37 | // written (i.e. closing while IsPlaying() returns 1 would truncate the song 38 | 39 | int (*Pause)(int pause); // returns previous pause state 40 | 41 | void (*SetVolume)(int volume); // volume is 0-255 42 | void (*SetPan)(int pan); // pan is -128 to 128 43 | 44 | void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms) 45 | // (used for seeking) 46 | 47 | int (*GetOutputTime)(); // returns played time in MS 48 | int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff) 49 | 50 | } Out_Module; 51 | 52 | 53 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFMMC5Panel.cpp: -------------------------------------------------------------------------------- 1 | // NSFMMC5Panel.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "NSFMMC5Panel.h" 6 | 7 | #ifdef _DEBUG 8 | #define new DEBUG_NEW 9 | #undef THIS_FILE 10 | static char THIS_FILE[] = __FILE__; 11 | #endif 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // NSFMMC5Panel 15 | 16 | using namespace xgm; 17 | 18 | NSFMMC5Panel::NSFMMC5Panel(CWnd* pParent /*=NULL*/) 19 | : CDialog(NSFMMC5Panel::IDD, pParent) 20 | { 21 | //{{AFX_DATA_INIT(NSFMMC5Panel) 22 | m_nonlinear_mixer = FALSE; 23 | m_phase_refresh = FALSE; 24 | //}}AFX_DATA_INIT 25 | } 26 | 27 | 28 | void NSFMMC5Panel::DoDataExchange(CDataExchange* pDX) 29 | { 30 | CDialog::DoDataExchange(pDX); 31 | //{{AFX_DATA_MAP(NSFMMC5Panel) 32 | DDX_Check(pDX, IDC_NONLINEAR_MIXER, m_nonlinear_mixer); 33 | DDX_Check(pDX, IDC_PHASE_REFRESH, m_phase_refresh); 34 | //}}AFX_DATA_MAP 35 | } 36 | 37 | void NSFMMC5Panel::UpdateNSFPlayerConfig(bool b) 38 | { 39 | NSFDialog::UpdateNSFPlayerConfig(b); 40 | 41 | if(!m_hWnd) return ; 42 | 43 | if(b) 44 | { 45 | m_nonlinear_mixer = pm->cf->GetDeviceOption(MMC5, NES_MMC5::OPT_NONLINEAR_MIXER).GetInt(); 46 | m_phase_refresh = pm->cf->GetDeviceOption(MMC5, NES_MMC5::OPT_PHASE_REFRESH).GetInt(); 47 | UpdateData(FALSE); 48 | } 49 | else 50 | { 51 | UpdateData(TRUE); 52 | pm->cf->GetDeviceOption(MMC5, NES_MMC5::OPT_NONLINEAR_MIXER) = m_nonlinear_mixer; 53 | pm->cf->GetDeviceOption(MMC5, NES_MMC5::OPT_PHASE_REFRESH) = m_phase_refresh; 54 | pm->cf->Notify(MMC5); 55 | } 56 | } 57 | 58 | BEGIN_MESSAGE_MAP(NSFMMC5Panel, CDialog) 59 | //{{AFX_MSG_MAP(NSFMMC5Panel) 60 | ON_BN_CLICKED(IDC_NONLINEAR_MIXER, OnNonlinear) 61 | ON_BN_CLICKED(IDC_NONLINEAR_MIXER, OnPhaseRefresh) 62 | //}}AFX_MSG_MAP 63 | END_MESSAGE_MAP() 64 | 65 | ///////////////////////////////////////////////////////////////////////////// 66 | // NSFMMC5Panel 67 | 68 | void NSFMMC5Panel::OnNonlinear() 69 | { 70 | //dynamic_cast(GetParent())->SetModified(true); 71 | } 72 | 73 | void NSFMMC5Panel::OnPhaseRefresh() 74 | { 75 | //dynamic_cast(GetParent())->SetModified(true); 76 | } 77 | 78 | BOOL NSFMMC5Panel::OnInitDialog() 79 | { 80 | __super::OnInitDialog(); 81 | 82 | // TODO : ?? 83 | UpdateNSFPlayerConfig(TRUE); 84 | 85 | return TRUE; // return TRUE unless you set the focus to a control 86 | // 87 | } 88 | -------------------------------------------------------------------------------- /libemuwa2/winamp2/ipc_pe.h: -------------------------------------------------------------------------------- 1 | #ifndef __IPC_PE_H 2 | #define __IPC_PE_H 3 | 4 | #define IPC_PE_GETCURINDEX 100 // returns current idx 5 | #define IPC_PE_GETINDEXTOTAL 101 // returns number of items 6 | #define IPC_PE_GETINDEXINFO 102 // (copydata) lpData is of type callbackinfo, callback is called with copydata/fileinfo structure and msg IPC_PE_GETINDEXINFORESULT 7 | #define IPC_PE_GETINDEXINFORESULT 103 // callback message for IPC_PE_GETINDEXINFO 8 | #define IPC_PE_DELETEINDEX 104 // lParam = index 9 | #define IPC_PE_SWAPINDEX 105 // (lParam & 0xFFFF0000) >> 16 = from, (lParam & 0xFFFF) = to 10 | #define IPC_PE_INSERTFILENAME 106 // (copydata) lpData is of type fileinfo 11 | #define IPC_PE_GETDIRTY 107 // returns 1 if the playlist changed since the last IPC_PE_SETCLEAN 12 | #define IPC_PE_SETCLEAN 108 // resets the dirty flag until next modification 13 | #define IPC_PE_GETIDXFROMPOINT 109 // pass a point parm, return a playlist index 14 | #define IPC_PE_SAVEEND 110 // pass index to save from 15 | #define IPC_PE_RESTOREEND 111 // no parm 16 | #define IPC_PE_GETNEXTSELECTED 112 // same as IPC_PLAYLIST_GET_NEXT_SELECTED for the main window 17 | #define IPC_PE_GETSELECTEDCOUNT 113 18 | #define IPC_PE_INSERTFILENAMEW 114 // (copydata) lpData is of type fileinfoW 19 | #define IPC_PE_GETINDEXINFO_TITLE 115 // like IPC_PE_GETINDEXINFO, but writes the title to char file[MAX_PATH] instead of filename 20 | #define IPC_PE_GETINDEXINFORESULT_TITLE 116 // callback message for IPC_PE_GETINDEXINFO 21 | typedef struct { 22 | char file[MAX_PATH]; 23 | int index; 24 | } fileinfo; 25 | 26 | typedef struct { 27 | wchar_t file[MAX_PATH]; 28 | int index; 29 | } fileinfoW; 30 | 31 | typedef struct { 32 | HWND callback; 33 | int index; 34 | } callbackinfo; 35 | 36 | // the following messages are in_process ONLY 37 | 38 | #define IPC_PE_GETINDEXTITLE 200 // lParam = pointer to fileinfo2 struct 39 | #define IPC_PE_GETINDEXTITLEW 201 // lParam = pointer to fileinfo2W struct 40 | #define IPC_PE_GETINDEXINFO_INPROC 202 // lParam = pointer to fileinfo struct 41 | #define IPC_PE_GETINDEXINFOW_INPROC 203 // lParam = pointer to fileinfoW struct 42 | 43 | typedef struct { 44 | int fileindex; 45 | char filetitle[256]; 46 | char filelength[16]; 47 | } fileinfo2; 48 | 49 | typedef struct 50 | { 51 | int fileindex; 52 | wchar_t filetitle[256]; 53 | wchar_t filelength[16]; 54 | } fileinfo2W; 55 | 56 | #endif -------------------------------------------------------------------------------- /xgm/devices/Sound/legacy/emu2149.h: -------------------------------------------------------------------------------- 1 | /* emu2149.h */ 2 | #ifndef _EMU2149_H_ 3 | #define _EMU2149_H_ 4 | #include "emutypes.h" 5 | 6 | #ifdef EMU2149_DLL_EXPORTS 7 | #define EMU2149_API __declspec(dllexport) 8 | #elif EMU2149_DLL_IMPORTS 9 | #define EMU2149_API __declspec(dllimport) 10 | #else 11 | #define EMU2149_API 12 | #endif 13 | 14 | #define EMU2149_VOL_DEFAULT 1 15 | #define EMU2149_VOL_YM2149 0 16 | #define EMU2149_VOL_AY_3_8910 1 17 | 18 | #define PSG_MASK_CH(x) (1<<(x)) 19 | 20 | #ifdef __cplusplus 21 | extern "C" 22 | { 23 | #endif 24 | 25 | typedef struct __PSG 26 | { 27 | 28 | /* Volume Table */ 29 | e_uint32 *voltbl; 30 | 31 | e_uint8 reg[0x20]; 32 | e_int32 out; 33 | e_int32 cout[3]; 34 | 35 | e_uint32 clk, rate, base_incr, quality; 36 | 37 | e_uint32 count[3]; 38 | e_uint32 volume[3]; 39 | e_uint32 freq[3]; 40 | e_uint32 edge[3]; 41 | e_uint32 tmask[3]; 42 | e_uint32 nmask[3]; 43 | e_uint32 mask; 44 | 45 | e_uint32 base_count; 46 | 47 | e_uint32 env_volume; 48 | e_uint32 env_ptr; 49 | e_uint32 env_face; 50 | 51 | e_uint32 env_continue; 52 | e_uint32 env_attack; 53 | e_uint32 env_alternate; 54 | e_uint32 env_hold; 55 | e_uint32 env_pause; 56 | e_uint32 env_reset; 57 | 58 | e_uint32 env_freq; 59 | e_uint32 env_count; 60 | 61 | e_uint32 noise_seed; 62 | e_uint32 noise_count; 63 | e_uint32 noise_freq; 64 | 65 | /* rate converter */ 66 | e_uint32 realstep; 67 | e_uint32 psgtime; 68 | e_uint32 psgstep; 69 | 70 | /* I/O Ctrl */ 71 | e_uint32 adr; 72 | 73 | } 74 | PSG; 75 | 76 | EMU2149_API void PSG_set_quality (PSG * psg, e_uint32 q); 77 | EMU2149_API void PSG_set_rate (PSG * psg, e_uint32 r); 78 | EMU2149_API PSG *PSG_new (e_uint32 clk, e_uint32 rate); 79 | EMU2149_API void PSG_reset (PSG *); 80 | EMU2149_API void PSG_delete (PSG *); 81 | EMU2149_API void PSG_writeReg (PSG *, e_uint32 reg, e_uint32 val); 82 | EMU2149_API void PSG_writeIO (PSG * psg, e_uint32 adr, e_uint32 val); 83 | EMU2149_API e_uint8 PSG_readReg (PSG * psg, e_uint32 reg); 84 | EMU2149_API e_uint8 PSG_readIO (PSG * psg); 85 | EMU2149_API e_int16 PSG_calc (PSG *); 86 | EMU2149_API void PSG_setVolumeMode (PSG * psg, int type); 87 | EMU2149_API e_uint32 PSG_setMask (PSG *, e_uint32 mask); 88 | EMU2149_API e_uint32 PSG_toggleMask (PSG *, e_uint32 mask); 89 | 90 | #ifdef __cplusplus 91 | } 92 | #endif 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /xgm/devices/Audio/mixer.h: -------------------------------------------------------------------------------- 1 | #ifndef _MIXER_H_ 2 | #define _MIXER_H_ 3 | #include "../device.h" 4 | #include 5 | 6 | namespace xgm 7 | { 8 | class Mixer : virtual public IRenderable 9 | { 10 | protected: 11 | typedef std::vector < IRenderable * >DeviceList; 12 | UINT32 fade_pos, fade_end; 13 | DeviceList dlist; 14 | 15 | public: 16 | Mixer () 17 | { 18 | Reset(); 19 | } 20 | 21 | ~Mixer () 22 | { 23 | } 24 | 25 | void DetachAll () 26 | { 27 | dlist.clear (); 28 | } 29 | 30 | void Attach (IRenderable * dev) 31 | { 32 | dlist.push_back (dev); 33 | } 34 | 35 | void Reset () 36 | { 37 | fade_pos = 0; 38 | fade_end = 1; 39 | } 40 | 41 | bool IsFadeEnd () 42 | { 43 | return (fade_pos >= fade_end); 44 | } 45 | 46 | bool IsFading () 47 | { 48 | return (fade_pos > 0); 49 | } 50 | 51 | void FadeStart (double rate, int fade_in_ms) 52 | { 53 | if (fade_in_ms) 54 | { 55 | const UINT32 MAX_SAMPLES = ~0UL; 56 | double samples = (double)fade_in_ms * rate / 1000.0; 57 | if (samples < (double)MAX_SAMPLES) 58 | { 59 | fade_end = UINT32(samples); 60 | } 61 | else 62 | { 63 | fade_end = MAX_SAMPLES; 64 | } 65 | } 66 | else 67 | { 68 | fade_end = 1; 69 | } 70 | fade_pos = 1; // begin fade 71 | } 72 | 73 | void Skip (int length) 74 | { 75 | if (fade_pos > 0) 76 | { 77 | if (fade_pos < fade_end) ++fade_pos; 78 | else fade_pos = fade_end; 79 | } 80 | } 81 | 82 | virtual void Tick (UINT32 clocks) 83 | { 84 | DeviceList::iterator it; 85 | for (it = dlist.begin (); it != dlist.end (); it++) 86 | { 87 | (*it)->Tick (clocks); 88 | } 89 | } 90 | 91 | virtual UINT32 Render (INT32 b[2]) 92 | { 93 | INT32 tmp[2]; 94 | DeviceList::iterator it; 95 | 96 | b[0] = b[1] = 0; 97 | 98 | for (it = dlist.begin (); it != dlist.end (); it++) 99 | { 100 | (*it)->Render (tmp); 101 | b[0] += tmp[0]; 102 | b[1] += tmp[1]; 103 | } 104 | 105 | if (fade_pos > 0) 106 | { 107 | double fade_amount = double(fade_end - fade_pos) / double(fade_end); 108 | b[0] = INT32(fade_amount * b[0]); 109 | b[1] = INT32(fade_amount * b[1]); 110 | 111 | if (fade_pos < fade_end) ++fade_pos; 112 | else fade_pos = fade_end; 113 | } 114 | return 2; 115 | } 116 | }; 117 | 118 | } // namespace 119 | 120 | #endif 121 | -------------------------------------------------------------------------------- /libemuwa2/winamp2/OUT.H: -------------------------------------------------------------------------------- 1 | #ifndef NULLSOFT_OUTH 2 | #define NULLSOFT_OUTH 3 | #include 4 | #include 5 | // ids: 6 | // waveout: 32 7 | // gapless: 64 8 | // xfade: 63 9 | // disk: 33 10 | // dsound: 38 11 | // NULL: 65 12 | // mm2: 69 13 | 14 | #if (_MSC_VER <= 1200) 15 | typedef int intptr_t; 16 | #endif 17 | 18 | #define OUT_VER 0x10 19 | 20 | typedef struct 21 | { 22 | int version; // module version (OUT_VER) 23 | const char *description; // description of module, with version string 24 | intptr_t id; // module id. each input module gets its own. non-nullsoft modules should 25 | // be >= 65536. 26 | 27 | HWND hMainWindow; // winamp's main window (filled in by winamp) 28 | HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp) 29 | 30 | void (*Config)(HWND hwndParent); // configuration dialog 31 | void (*About)(HWND hwndParent); // about dialog 32 | 33 | void (*Init)(); // called when loaded 34 | void (*Quit)(); // called when unloaded 35 | 36 | int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); 37 | // returns >=0 on success, <0 on failure 38 | 39 | // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins. 40 | // ... so don't expect the max latency returned to be what you asked for. 41 | // returns max latency in ms (0 for diskwriters, etc) 42 | // bufferlenms and prebufferms must be in ms. 0 to use defaults. 43 | // prebufferms must be <= bufferlenms 44 | // pass bufferlenms==-666 to tell the output plugin that it's clock is going to be used to sync video 45 | // out_ds turns off silence-eating when -666 is passed 46 | 47 | void (*Close)(); // close the ol' output device. 48 | 49 | int (*Write)(char *buf, int len); 50 | // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data. 51 | // 1 returns not able to write (yet). Non-blocking, always. 52 | 53 | int (*CanWrite)(); // returns number of bytes possible to write at a given time. 54 | // Never will decrease unless you call Write (or Close, heh) 55 | 56 | int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be 57 | // written (i.e. closing while IsPlaying() returns 1 would truncate the song 58 | 59 | int (*Pause)(int pause); // returns previous pause state 60 | 61 | void (*SetVolume)(int volume); // volume is 0-255 62 | void (*SetPan)(int pan); // pan is -128 to 128 63 | 64 | void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms) 65 | // (used for seeking) 66 | 67 | int (*GetOutputTime)(); // returns played time in MS 68 | int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff) 69 | 70 | } Out_Module; 71 | 72 | 73 | #endif -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6280.h: -------------------------------------------------------------------------------- 1 | #ifndef KM6280_H_ 2 | #define KM6280_H_ 3 | 4 | #include "kmconfig.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | #if USE_USERPOINTER 11 | typedef Uword (Callback *ReadHandler)(void *user, Uword adr); 12 | typedef void (Callback *WriteHandler)(void *user, Uword adr, Uword value); 13 | #else 14 | typedef Uword (Callback *ReadHandler)(Uword adr); 15 | typedef void (Callback *WriteHandler)(Uword adr, Uword value); 16 | #endif 17 | 18 | struct K6280_Context { 19 | Uword A; /* Accumulator */ 20 | Uword P; /* Status register */ 21 | Uword X; /* X register */ 22 | Uword Y; /* Y register */ 23 | Uword S; /* Stack pointer */ 24 | Uword PC; /* Program Counter */ 25 | 26 | Uword iRequest; /* interrupt request */ 27 | Uword iMask; /* interrupt mask */ 28 | Uword clock; /* (incremental)cycle counter */ 29 | Uword lastcode; 30 | void *user; /* pointer to user area */ 31 | 32 | Uword lowClockMode; 33 | 34 | #if USE_CALLBACK 35 | /* pointer to callback functions */ 36 | #if USE_INLINEMMC 37 | ReadHandler ReadByte[1 << (16 - USE_INLINEMMC)]; 38 | WriteHandler WriteByte[1 << (16 - USE_INLINEMMC)]; 39 | #else 40 | ReadHandler ReadByte; 41 | WriteHandler WriteByte; 42 | #endif 43 | ReadHandler ReadMPR; 44 | WriteHandler WriteMPR; 45 | WriteHandler Write6270; 46 | #endif 47 | 48 | #if USE_DIRECT_ZEROPAGE 49 | Ubyte *zeropage; /* pointer to zero page */ 50 | #endif 51 | }; 52 | 53 | enum K6280_FLAGS { 54 | K6280_C_FLAG = 0x01, 55 | K6280_Z_FLAG = 0x02, 56 | K6280_I_FLAG = 0x04, 57 | K6280_D_FLAG = 0x08, 58 | K6280_B_FLAG = 0x10, 59 | K6280_T_FLAG = 0x20, 60 | K6280_V_FLAG = 0x40, 61 | K6280_N_FLAG = 0x80 62 | }; 63 | 64 | enum K6280_IRQ { 65 | K6280_INIT = 1, 66 | K6280_RESET = 2, 67 | K6280_NMI = 4, 68 | K6280_BRK = 8, 69 | K6280_TIMER = 16, 70 | K6280_INT1 = 32, 71 | K6280_INT2 = 64 72 | }; 73 | 74 | #ifdef STATIC_CONTEXT6280 75 | External void K6280_Exec(void); 76 | #else 77 | External void K6280_Exec(struct K6280_Context *pc); 78 | #endif 79 | 80 | #if !USE_CALLBACK 81 | #if USE_USERPOINTER 82 | External Uword CCall K6280_ReadByte(void *user, Uword adr); 83 | External void CCall K6280_WriteByte(void *user, Uword adr, Uword value); 84 | External Uword CCall K6280_ReadMPR(void *user, Uword adr); 85 | External void CCall K6280_WriteMPR(void *user, Uword adr, Uword value); 86 | External void CCall K6280_Write6270(void *user, Uword adr, Uword value); 87 | #else 88 | External Uword CCall K6280_ReadByte(Uword adr); 89 | External void CCall K6280_WriteByte(Uword adr, Uword value); 90 | External Uword CCall K6280_ReadMPR(Uword adr); 91 | External void CCall K6280_WriteMPR(Uword adr, Uword value); 92 | External void CCall K6280_Write6270(Uword adr, Uword value); 93 | #endif 94 | #endif 95 | 96 | #ifdef __cplusplus 97 | } 98 | #endif 99 | #endif 100 | -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6502m.h: -------------------------------------------------------------------------------- 1 | #define BUILD_M6502 1 2 | #define BUILD_M65C02 0 3 | #define BUILD_HUC6280 0 4 | 5 | #include "km6502.h" 6 | 7 | #define C_FLAG K6502_C_FLAG 8 | #define Z_FLAG K6502_Z_FLAG 9 | #define I_FLAG K6502_I_FLAG 10 | #define D_FLAG K6502_D_FLAG 11 | #define B_FLAG K6502_B_FLAG 12 | #define R_FLAG K6502_R_FLAG 13 | #define V_FLAG K6502_V_FLAG 14 | #define N_FLAG K6502_N_FLAG 15 | #define T_FLAG 0 16 | 17 | #define BASE_OF_ZERO 0x0000 18 | 19 | #define VEC_RESET 0xFFFC 20 | #define VEC_NMI 0xFFFA 21 | #define VEC_INT 0xFFFE 22 | 23 | #define VEC_BRK VEC_INT 24 | 25 | #define IRQ_INIT K6502_INIT 26 | #define IRQ_RESET K6502_RESET 27 | #define IRQ_NMI K6502_NMI 28 | #define IRQ_BRK K6502_BRK 29 | #define IRQ_INT K6502_INT 30 | 31 | #ifdef STATIC_CONTEXT6502 32 | extern struct K6502_Context STATIC_CONTEXT6502; 33 | #define __THIS__ STATIC_CONTEXT6502 34 | #define __CONTEXT void 35 | #define __CONTEXT_ /* none */ 36 | #define __THISP /* none */ 37 | #define __THISP_ /* none */ 38 | #else 39 | #define __THIS__ (*pc) 40 | #define __CONTEXT struct K6502_Context *pc 41 | #define __CONTEXT_ struct K6502_Context *pc, 42 | #define __THISP pc 43 | #define __THISP_ pc, 44 | #endif 45 | 46 | #define K_EXEC K6502_Exec 47 | 48 | #if USE_USERPOINTER 49 | #define __THIS_USER_ __THIS__.user, 50 | #else 51 | #define __THIS_USER_ 52 | #endif 53 | 54 | #if USE_CALLBACK 55 | #if USE_INLINEMMC 56 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 57 | { 58 | return __THIS__.ReadByte[adr >> USE_INLINEMMC](__THIS_USER_ adr); 59 | } 60 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 61 | { 62 | __THIS__.WriteByte[adr >> USE_INLINEMMC](__THIS_USER_ adr, value); 63 | } 64 | #else 65 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 66 | { 67 | return __THIS__.ReadByte(__THIS_USER_ adr); 68 | } 69 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 70 | { 71 | __THIS__.WriteByte(__THIS_USER_ adr, value); 72 | } 73 | #endif 74 | #else 75 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 76 | { 77 | return K6502_ReadByte(__THIS_USER_ adr); 78 | } 79 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 80 | { 81 | K6502_WriteByte(__THIS_USER_ adr, value); 82 | } 83 | #endif 84 | #ifndef K_READNP 85 | #define K_READNP K_READ 86 | #define K_WRITENP K_WRITE 87 | #endif 88 | #ifndef K_READZP 89 | #if !USE_DIRECT_ZEROPAGE 90 | #define K_READZP K_READ 91 | #define K_WRITEZP K_WRITE 92 | #else 93 | static Uword Inline K_READZP(__CONTEXT_ Uword adr) 94 | { 95 | return __THIS__.zeropage[adr]; 96 | } 97 | static void Inline K_WRITEZP(__CONTEXT_ Uword adr, Uword value) 98 | { 99 | __THIS__.zeropage[adr] = value; 100 | } 101 | #endif 102 | #endif 103 | 104 | #include "km6502ft.h" 105 | #include "km6502cd.h" 106 | #include "km6502ct.h" 107 | #include "km6502ot.h" 108 | #include "km6502ex.h" 109 | -------------------------------------------------------------------------------- /nsfplay/nsfplayDlg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * nsfplayDlg.h written by Mitsutaka Okazaki 2004. 3 | * 4 | * This software is provided 'as-is', without any express or implied warranty. 5 | * In no event will the authors be held liable for any damages arising from 6 | * the use of this software. 7 | * 8 | * Permission is granted to anyone to use this software for any purpose, 9 | * including commercial applications, and to alter it and redistribute it 10 | * freely, subject to the following restrictions: 11 | * 12 | * 1. The origin of this software must not be misrepresented; you must not 13 | * claim that you wrote the original software. If you use this software 14 | * in a product, an acknowledgment in the product documentation would be 15 | * appreciated but is not required. 16 | * 2. Altered source versions must be plainly marked as such, and must not 17 | * be misrepresented as being the original software. 18 | * 3. This notice may not be removed or altered from any source distribution. 19 | * 20 | */ 21 | #pragma once 22 | #include "../libemuwa2/emu_winamp.h" 23 | #include "afxwin.h" 24 | #include "afxcmn.h" 25 | 26 | class CnsfplayDlg : public CDialog 27 | { 28 | public: 29 | CnsfplayDlg(CWnd* pParent = NULL); 30 | ~CnsfplayDlg(); 31 | 32 | enum { IDD = IDD_NSFPLAY_DIALOG }; 33 | 34 | protected: 35 | virtual void DoDataExchange(CDataExchange* pDX); 36 | 37 | 38 | protected: 39 | HICON m_hIcon; 40 | HICON m_hIcon_btn[2]; 41 | EmuWinamp *m_emu; 42 | UINT_PTR m_timerID; 43 | bool m_sb_dragging; 44 | void UpdateInfo(); 45 | int m_update_wait; 46 | int m_last_time; 47 | int m_last_len; 48 | char m_last_title[1024]; 49 | char m_IniPath[MAX_PATH+16]; 50 | 51 | virtual BOOL OnInitDialog(); 52 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 53 | afx_msg void OnPaint(); 54 | afx_msg HCURSOR OnQueryDragIcon(); 55 | DECLARE_MESSAGE_MAP() 56 | public: 57 | CString m_init_file; 58 | BOOL m_cancel_open; 59 | afx_msg void OnDropFiles(HDROP hDropInfo); 60 | afx_msg void OnBnClickedPrev(); 61 | afx_msg void OnBnClickedNext(); 62 | afx_msg void OnBnClickedInfo(); 63 | afx_msg void OnTimer(UINT nIDEvent); 64 | CStatic m_timebox; 65 | afx_msg void OnDestroy(); 66 | afx_msg void OnBnClickedStop(); 67 | afx_msg void OnBnClickedPlay(); 68 | CSliderCtrl m_slider; 69 | afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); 70 | CStatic m_title; 71 | CStatic m_time_max; 72 | afx_msg void OnBnClickedKbwin(); 73 | afx_msg void OnBnClickedPause(); 74 | afx_msg void OnBnClickedOpen(); 75 | CButton m_open_btn; 76 | CButton m_prop_btn; 77 | CSliderCtrl m_volume; 78 | afx_msg void OnBnClickedConfig(); 79 | afx_msg void OnBnClickedWaveout(); 80 | 81 | int WriteSingleWave(char* nsf_file, char* wave_file, char* track, char* ms); 82 | }; 83 | -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km65c02m.h: -------------------------------------------------------------------------------- 1 | #define BUILD_M6502 0 2 | #define BUILD_M65C02 1 3 | #define BUILD_HUC6280 0 4 | 5 | #include "km65c02.h" 6 | 7 | #define C_FLAG K65C02_C_FLAG 8 | #define Z_FLAG K65C02_Z_FLAG 9 | #define I_FLAG K65C02_I_FLAG 10 | #define D_FLAG K65C02_D_FLAG 11 | #define B_FLAG K65C02_B_FLAG 12 | #define R_FLAG K65C02_R_FLAG 13 | #define V_FLAG K65C02_V_FLAG 14 | #define N_FLAG K65C02_N_FLAG 15 | #define T_FLAG 0 16 | 17 | #define BASE_OF_ZERO 0x0000 18 | 19 | #define VEC_RESET 0xFFFC 20 | #define VEC_NMI 0xFFFA 21 | #define VEC_INT 0xFFFE 22 | 23 | #define VEC_BRK VEC_INT 24 | 25 | #define IRQ_INIT K65C02_INIT 26 | #define IRQ_RESET K65C02_RESET 27 | #define IRQ_NMI K65C02_NMI 28 | #define IRQ_BRK K65C02_BRK 29 | #define IRQ_INT K65C02_INT 30 | 31 | #ifdef STATIC_CONTEXT65C02 32 | extern struct K65C02_Context STATIC_CONTEXT65C02; 33 | #define __THIS__ STATIC_CONTEXT65C02 34 | #define __CONTEXT void 35 | #define __CONTEXT_ /* none */ 36 | #define __THISP /* none */ 37 | #define __THISP_ /* none */ 38 | #else 39 | #define __THIS__ (*pc) 40 | #define __CONTEXT struct K65C02_Context *pc 41 | #define __CONTEXT_ struct K65C02_Context *pc, 42 | #define __THISP pc 43 | #define __THISP_ pc, 44 | #endif 45 | 46 | #define K_EXEC K65C02_Exec 47 | 48 | #if USE_USERPOINTER 49 | #define __THIS_USER_ __THIS__.user, 50 | #else 51 | #define __THIS_USER_ 52 | #endif 53 | 54 | #if USE_CALLBACK 55 | #if USE_INLINEMMC 56 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 57 | { 58 | return __THIS__.ReadByte[adr >> USE_INLINEMMC](__THIS_USER_ adr); 59 | } 60 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 61 | { 62 | __THIS__.WriteByte[adr >> USE_INLINEMMC](__THIS_USER_ adr, value); 63 | } 64 | #else 65 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 66 | { 67 | return __THIS__.ReadByte(__THIS_USER_ adr); 68 | } 69 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 70 | { 71 | __THIS__.WriteByte(__THIS_USER_ adr, value); 72 | } 73 | #endif 74 | #else 75 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 76 | { 77 | return K65C02_ReadByte(__THIS_USER_ adr); 78 | } 79 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 80 | { 81 | K65C02_WriteByte(__THIS_USER_ adr, value); 82 | } 83 | #endif 84 | #ifndef K_READNP 85 | #define K_READNP K_READ 86 | #define K_WRITENP K_WRITE 87 | #endif 88 | #ifndef K_READZP 89 | #if !USE_DIRECT_ZEROPAGE 90 | #define K_READZP K_READ 91 | #define K_WRITEZP K_WRITE 92 | #else 93 | static Uword Inline K_READZP(__CONTEXT_ Uword adr) 94 | { 95 | return __THIS__.zeropage[adr]; 96 | } 97 | static void Inline K_WRITEZP(__CONTEXT_ Uword adr, Uword value) 98 | { 99 | __THIS__.zeropage[adr] = value; 100 | } 101 | #endif 102 | #endif 103 | 104 | #include "km6502ft.h" 105 | #include "km6502cd.h" 106 | #include "km6502ct.h" 107 | #include "km6502ot.h" 108 | #include "km6502ex.h" 109 | -------------------------------------------------------------------------------- /tag2pls/main.cpp: -------------------------------------------------------------------------------- 1 | #include "../xgm/xgm.h" 2 | #include "../xgm/utils/nsf_tag.h" 3 | 4 | using namespace xgm; 5 | 6 | static const char *help_message = 7 | "Usage: tag2pls [-f \"format\"] FILENAME.NSF\n\n"\ 8 | " The file TAGINFO.TAG or FILENAME.TAG must be located in the same\n"\ 9 | " folder together with the FILENAME.NSF.\n\n"\ 10 | " Some control characters can be accepted in the format string \n"\ 11 | " and they are replaced with the following data. \n\n"\ 12 | " %T The title of the song.\n"\ 13 | " %A The artist name of the song.\n"\ 14 | " %C The copyright text of the song.\n"\ 15 | " %n The current number of the song.\n"\ 16 | " %e The number of songs in the NSF.\n"\ 17 | " %s The start number of the songs.\n"\ 18 | " %N The current number of the song in the hex format.\n"\ 19 | " %E The number of songs in the NSF in the hex format.\n"\ 20 | " %S The start number of the songs in the hex format.\n"\ 21 | "\n"\ 22 | " The default format string is \"%A - %T (%n/%e)\"\n"\ 23 | " The title string from taginfo.tag will be ignored\n"\ 24 | " if the option -f is used.\n\n"\ 25 | ; 26 | 27 | void print_help() 28 | { 29 | fprintf(stderr,"%s",help_message); 30 | } 31 | 32 | int main( int argc, char *argv[] ) 33 | { 34 | NSF nsf; 35 | NSF_TAG nsf_tag; 36 | char *format=NULL; 37 | char *input=NULL; 38 | 39 | if(argc==1) 40 | { 41 | print_help(); 42 | return 0; 43 | } 44 | 45 | for(int i=1;i\plugin.ini 10 | // (look at the vis plugin for configuration code) 11 | 12 | typedef struct winampDSPModule { 13 | char *description; // description 14 | HWND hwndParent; // parent window (filled in by calling app) 15 | HINSTANCE hDllInstance; // instance handle to this DLL (filled in by calling app) 16 | 17 | void (*Config)(struct winampDSPModule *this_mod); // configuration dialog (if needed) 18 | int (*Init)(struct winampDSPModule *this_mod); // 0 on success, creates window, etc (if needed) 19 | 20 | // modify waveform samples: returns number of samples to actually write 21 | // (typically numsamples, but no more than twice numsamples, and no less than half numsamples) 22 | // numsamples should always be at least 128. should, but I'm not sure 23 | int (*ModifySamples)(struct winampDSPModule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate); 24 | 25 | void (*Quit)(struct winampDSPModule *this_mod); // called when unloading 26 | 27 | void *userData; // user data, optional 28 | } winampDSPModule; 29 | 30 | typedef struct { 31 | int version; // DSP_HDRVER 32 | char *description; // description of library 33 | winampDSPModule* (*getModule)(int); // module retrieval function 34 | int (*sf)(int key); // DSP_HDRVER == 0x21 35 | } winampDSPHeader; 36 | 37 | // exported symbols 38 | #ifdef USE_DSP_HDR_HWND 39 | typedef winampDSPHeader* (*winampDSPGetHeaderType)(HWND); 40 | #define DSP_HDRVER 0x22 41 | 42 | #else 43 | 44 | typedef winampDSPHeader* (*winampDSPGetHeaderType)(HWND); 45 | // header version: 0x20 == 0.20 == winamp 2.0 46 | #define DSP_HDRVER 0x20 47 | #endif 48 | 49 | // return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param) 50 | // which determine if we can uninstall the plugin immediately or on winamp restart 51 | #define DSP_PLUGIN_UNINSTALL_NOW 0x0 52 | #define DSP_PLUGIN_UNINSTALL_REBOOT 0x1 53 | // 54 | // uninstall support was added from 5.0+ and uninstall now support from 5.5+ 55 | // it is down to you to ensure that if uninstall now is returned that it will not cause a crash 56 | // (ie don't use if you've been subclassing the main window) 57 | 58 | // Version note: 59 | // 60 | // Added passing of Winamp's main hwnd in the call to the exported winampDSPHeader() 61 | // which allows for primarily the use of localisation features with the bundled plugins. 62 | // If you want to use the new version then either you can edit you version of dsp.h or 63 | // you can add USE_DSP_HDR_HWND to your project's defined list or before use of dsp.h 64 | // 65 | #endif -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6502ft.h: -------------------------------------------------------------------------------- 1 | #if USE_FL_TABLE 2 | const static Ubyte fl_table[0x200] = { 3 | 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 4 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 5 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 6 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 7 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 8 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 9 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 10 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 11 | 12 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 13 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 14 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 15 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 16 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 17 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 18 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 19 | 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 20 | 21 | 0x03,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 22 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 23 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 24 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 25 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 26 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 27 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 28 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, 29 | 30 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 31 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 32 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 33 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 34 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 35 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 36 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 37 | 0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81, 38 | }; 39 | #define FLAG_NZ(w) (fl_table[RTO8(w)]) 40 | #define FLAG_NZC(w) (fl_table[w & 0x01ff]) 41 | #else 42 | #define FLAG_NZ(w) ((w & N_FLAG) + (RTO8(w) ? 0 : Z_FLAG)) 43 | #define FLAG_NZC(w) (FLAG_NZ(w) + ((w >> 8) & C_FLAG)) 44 | #endif 45 | -------------------------------------------------------------------------------- /xgm/player/nsf/pls/sstream.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * String Stream 3 | */ 4 | #include 5 | #include 6 | #include 7 | #if defined(_MSC_VER) 8 | #include 9 | #if defined(_DEBUG) 10 | #define _CRTDBG_MAP_ALLOC 11 | #endif 12 | #endif 13 | 14 | #include "sstream.h" 15 | 16 | SST *SST_new(void) 17 | { 18 | SST *sst ; 19 | 20 | if(!(sst = (SST *)malloc(sizeof(SST)))) return NULL ; 21 | sst->index = 0 ; 22 | sst->length = 0 ; 23 | sst->size = 0 ; 24 | sst->str = 0 ; 25 | 26 | return sst ; 27 | } 28 | 29 | void SST_delete(SST *sst) 30 | { 31 | if(sst) 32 | { 33 | free(sst->str) ; 34 | free(sst) ; 35 | } 36 | } 37 | 38 | int SST_set_text(SST *sst, const char *str) 39 | { 40 | if(sst->str) return -1 ; 41 | 42 | sst->size = strlen(str) + 1 ; 43 | if(!(sst->str = (unsigned char *)malloc(sst->size))) return -1 ; 44 | strcpy((char *)sst->str,str) ; 45 | sst->index = 0 ; 46 | sst->length = sst->size - 1 ; 47 | 48 | return 0 ; 49 | } 50 | 51 | /* Delete SST object but leave the pointer to text. */ 52 | char *SST_sublimate(SST *sst) 53 | { 54 | char *ret = (char *)sst->str ; 55 | 56 | sst->index = 0 ; 57 | sst->length = 0 ; 58 | sst->size = 0 ; 59 | sst->str = NULL ; 60 | free(sst) ; 61 | 62 | return ret ; 63 | } 64 | 65 | int SST_seekoff(SST *sst, long offset) 66 | { 67 | long pos ; 68 | 69 | if(sst) 70 | { 71 | pos = sst->index + offset ; 72 | if(pos<0||sst->sizeindex = pos ; 74 | return 0 ; 75 | } 76 | else return -1 ; 77 | } 78 | 79 | int SST_seekpos(SST *sst, long pos) 80 | { 81 | if(sst) 82 | { 83 | if(pos<0||sst->sizeindex = pos ; 85 | return 0 ; 86 | } 87 | else return -1 ; 88 | } 89 | 90 | long SST_tell(SST *sst){ return sst?sst->index:-1 ; } 91 | 92 | int SST_putc(SST *sst, int c) 93 | { 94 | int i ; 95 | 96 | if(sst) 97 | { 98 | if( (sst->size-1) <= sst->index ) 99 | { 100 | if(!(sst->str=(unsigned char *)realloc(sst->str,sst->size+SST_BUF_GSIZE))) return -1 ; 101 | for(i=0;istr[sst->size+i] = '\0' ; 102 | sst->size += SST_BUF_GSIZE ; 103 | } 104 | sst->str[sst->index++] = c&0xff ; 105 | if(sst->lengthindex) sst->length = sst->index ; 106 | return c ; 107 | } 108 | else return -1 ; 109 | } 110 | 111 | int SST_length(SST *sst) 112 | { 113 | if(sst) return sst->length ; else return -1 ; 114 | } 115 | 116 | int SST_ungetc(SST *sst, int c) 117 | { 118 | if(c == SST_EOF) 119 | return -1 ; 120 | else if(sst->index>0) 121 | { 122 | sst->str[--sst->index] = c&0xff ; 123 | return c ; 124 | } 125 | else return -1 ; 126 | } 127 | 128 | int SST_getc(SST *sst) 129 | { 130 | int c ; 131 | 132 | if(sst) 133 | { 134 | if(sst->size <= sst->index) return SST_EOF ; 135 | c = sst->str[sst->index++] ; 136 | return c ; 137 | } 138 | else return -1 ; 139 | } 140 | 141 | char *SST_getn(SST *sst) 142 | { 143 | return sst?(char *)sst->str:NULL ; 144 | } 145 | 146 | 147 | -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/kmconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef KMCONFIG_H_ 2 | #define KMCONFIG_H_ 3 | 4 | /* general setting */ 5 | #if !defined(USE_USERPOINTER) 6 | #define USE_USERPOINTER 1 7 | #endif 8 | 9 | #if !defined(USE_INLINEMMC) 10 | #define USE_INLINEMMC 12 /* mmc page bits */ 11 | #endif 12 | 13 | #if USE_INLINEMMC 14 | #if defined(USE_CALLBACK) 15 | #undef USE_CALLBACK 16 | #endif 17 | #define USE_CALLBACK 1 18 | #else 19 | 20 | #if !defined(USE_CALLBACK) 21 | #define USE_CALLBACK 0 22 | #endif 23 | 24 | #endif 25 | 26 | #if !defined(BUILD_FOR_SIZE) && !defined(BUILD_FOR_SPEED) 27 | #define BUILD_FOR_SIZE 1 28 | #define BUILD_FOR_SPEED 0 29 | #endif 30 | 31 | #if defined(_MSC_VER) 32 | typedef unsigned int Uword; /* (0-0xFFFF) */ 33 | typedef unsigned char Ubyte; /* unsigned 8bit integer for table */ 34 | #ifndef Inline 35 | #define Inline __inline 36 | #endif 37 | #define CCall __cdecl 38 | #define FastCall __fastcall 39 | #define RTO16(w) ((Uword)(w & 0xFFFF)) /* Round to 16bit integer */ 40 | #define RTO8(w) ((Uword)(w & 0xFF)) /* Round to 8bit integer */ 41 | #elif defined(__BORLANDC__) 42 | typedef unsigned int Uword; /* (0-0xFFFF) */ 43 | typedef unsigned char Ubyte; /* unsigned 8bit integer for table */ 44 | #ifndef Inline 45 | #define Inline __inline 46 | #endif 47 | #define CCall __cdecl 48 | #define FastCall 49 | #define RTO16(w) ((Uword)(w & 0xFFFF)) /* Round to 16bit integer */ 50 | #define RTO8(w) ((Uword)(w & 0xFF)) /* Round to 8bit integer */ 51 | #elif defined(__GNUC__) 52 | typedef unsigned int Uword; /* (0-0xFFFF) */ 53 | typedef unsigned char Ubyte; /* unsigned 8bit integer for table */ 54 | #ifndef Inline 55 | #define Inline __inline__ 56 | #endif 57 | #define CCall 58 | #define FastCall /* __attribute__((regparm(2))) */ 59 | #define RTO16(w) ((Uword)(w & 0xFFFF)) /* Round to 16bit integer */ 60 | #define RTO8(w) ((Uword)(w & 0xFF)) /* Round to 8bit integer */ 61 | #else 62 | typedef unsigned int Uword; /* (0-0xFFFF) */ 63 | typedef unsigned char Ubyte; /* unsigned 8bit integer for table */ 64 | #ifndef Inline 65 | #define Inline 66 | #endif 67 | #ifndef CCall 68 | #define CCall 69 | #endif 70 | #ifndef FastCall 71 | #define FastCall 72 | #endif 73 | #define RTO16(w) ((Uword)(w & 0xFFFF)) /* Round to 16bit integer */ 74 | #define RTO8(w) ((Uword)(w & 0xFF)) /* Round to 8bit integer */ 75 | #endif 76 | 77 | #define Callback FastCall 78 | #ifndef External 79 | #define External extern 80 | #endif 81 | #ifndef USE_DIRECT_ZEROPAGE 82 | #define USE_DIRECT_ZEROPAGE 0 83 | #endif 84 | 85 | /* advanced setting */ 86 | 87 | #if !BUILD_FOR_SIZE && !BUILD_FOR_SPEED 88 | #define USE_FL_TABLE 1 /* Use table(512bytes) for flag */ 89 | #define OpsubCall CCall /* OP code sub */ 90 | #define MasubCall CCall /* addressing sub */ 91 | #endif 92 | 93 | /* auto setting */ 94 | 95 | #if BUILD_FOR_SIZE 96 | #define USE_FL_TABLE 1 97 | #define OpsubCall FastCall 98 | #define MasubCall FastCall 99 | #define OpcodeCall Inline 100 | #elif BUILD_FOR_SPEED 101 | #define USE_FL_TABLE 1 102 | #define OpsubCall Inline 103 | #define MasubCall FastCall 104 | #define OpcodeCall Inline 105 | #else 106 | #define OpcodeCall Inline 107 | #endif 108 | 109 | #endif /* KMCONFIG_H_ */ 110 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFPanPanel.cpp: -------------------------------------------------------------------------------- 1 | // NSFPanPanel.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "NSFPanPanel.h" 6 | #include "NSFDialogs.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // NSFPanPanel 16 | 17 | using namespace xgm; 18 | 19 | NSFPanPanel::NSFPanPanel(CWnd* pParent /*=NULL*/) 20 | : CDialog(NSFPanPanel::IDD, pParent) 21 | { 22 | //{{AFX_DATA_INIT(NSFPanPanel) 23 | //}}AFX_DATA_INIT 24 | } 25 | 26 | void NSFPanPanel::DoDataExchange(CDataExchange* pDX) 27 | { 28 | CDialog::DoDataExchange(pDX); 29 | //{{AFX_DATA_MAP(NSFPanPanel) 30 | DDX_Control(pDX, IDC_NAME, m_name); 31 | DDX_Control(pDX, IDC_PAN, m_span); 32 | DDX_Control(pDX, IDC_VOL, m_svol); 33 | //}}AFX_DATA_MAP 34 | } 35 | 36 | void NSFPanPanel::SetChannelID(int id) 37 | { 38 | channel_id = id; 39 | } 40 | 41 | void NSFPanPanel::SetVolume(int val) 42 | { 43 | if(val < 0) 44 | val = 0; 45 | else if(128 < val) 46 | val = 128; 47 | m_svol.SetPos(val); 48 | 49 | UpdateNSFPlayerConfig(false); 50 | } 51 | 52 | int NSFPanPanel::GetVolume() 53 | { 54 | return m_svol.GetPos(); 55 | } 56 | 57 | void NSFPanPanel::SetPan(int val) 58 | { 59 | if(val < 0) 60 | val = 0; 61 | else if(255 < val) 62 | val = 255; 63 | m_span.SetPos(val); 64 | 65 | UpdateNSFPlayerConfig(false); 66 | } 67 | 68 | int NSFPanPanel::GetPan() 69 | { 70 | return m_span.GetPos(); 71 | } 72 | 73 | void NSFPanPanel::UpdateNSFPlayerConfig(bool b) 74 | { 75 | NSFDialog::UpdateNSFPlayerConfig(b); 76 | 77 | if(b) 78 | { 79 | if (m_span) 80 | { 81 | m_span.SetPos(pm->cf->GetChannelConfig(channel_id, "PAN")); 82 | } 83 | if (m_svol) 84 | { 85 | m_svol.SetPos(pm->cf->GetChannelConfig(channel_id, "VOL")); 86 | } 87 | } 88 | else 89 | { 90 | pm->cf->GetChannelConfig(channel_id,"PAN") = m_span.GetPos(); 91 | pm->cf->GetChannelConfig(channel_id,"VOL") = m_svol.GetPos(); 92 | pm->cf->Notify(pm->cf->channel_device[channel_id]); 93 | } 94 | } 95 | 96 | BEGIN_MESSAGE_MAP(NSFPanPanel, CDialog) 97 | //{{AFX_MSG_MAP(NSFPanPanel) 98 | ON_WM_HSCROLL() 99 | //}}AFX_MSG_MAP 100 | END_MESSAGE_MAP() 101 | 102 | ///////////////////////////////////////////////////////////////////////////// 103 | // NSFPanPanel 104 | 105 | BOOL NSFPanPanel::OnInitDialog() 106 | { 107 | CDialog::OnInitDialog(); 108 | 109 | m_span.SetRange(0,255); 110 | m_span.SetTic(128); 111 | m_span.SetLineSize(1); 112 | m_span.SetPageSize(16); 113 | 114 | m_svol.SetRange(0,128); 115 | m_svol.SetTicFreq(16); 116 | m_svol.SetLineSize(1); 117 | m_svol.SetPageSize(16); 118 | 119 | m_name.SetWindowText(pm->cf->channel_name[channel_id]); 120 | 121 | return TRUE; 122 | } 123 | 124 | void NSFPanPanel::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 125 | { 126 | if((CSliderCtrl *)pScrollBar == &m_span) 127 | UpdateNSFPlayerConfig(false); 128 | if((CSliderCtrl *)pScrollBar == &m_svol) 129 | UpdateNSFPlayerConfig(false); 130 | 131 | CDialog::OnHScroll(nSBCode, nPos, pScrollBar); 132 | } 133 | -------------------------------------------------------------------------------- /nsfplug_ui/PresetManager.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "nsf_setup.h" 3 | #include "PresetManager.h" 4 | #include 5 | 6 | const char * 7 | PresetManager::preset_range[] = 8 | { 9 | "APU1_VOLUME", "APU2_VOLUME", "FDS_VOLUME", "MMC5_VOLUME", 10 | "5B_VOLUME", "VRC6_VOLUME", "VRC7_VOLUME", "N163_VOLUME", 11 | "APU1_FILTER", "APU2_FILTER", "FDS_FILTER", "MMC5_FILTER", 12 | "5B_FILTER", "VRC6_FILTER", "VRC7_FILTER", "N163_FILTER", 13 | // "COMP_LIMIT", "COMP_THRESHOLD", "COMP_VELOCITY", 14 | "HPF", "LPF", 15 | 16 | NULL 17 | }; 18 | 19 | void PresetManager::Reset(const CString &filepath) 20 | { 21 | path = filepath; 22 | 23 | char buf[128*64+2]; 24 | GetPrivateProfileSectionNames(buf,128*64+2,path); 25 | 26 | CString name; 27 | char *p = buf; 28 | std::set sects; 29 | 30 | while(1) 31 | { 32 | name = ""; 33 | 34 | while(*p!='\0') 35 | name.AppendChar(*p++); 36 | p++; 37 | 38 | if(name == "") break; 39 | 40 | if(name.Left(6)=="PRESET") 41 | sects.insert(name); 42 | } 43 | 44 | presetSect2Name.clear(); 45 | presetName2Sect.clear(); 46 | 47 | std::set::iterator it; 48 | for(it=sects.begin();it!=sects.end();it++) 49 | { 50 | GetPrivateProfileString((*it),"NAME","ERROR",buf,128,path); 51 | presetName2Sect[(CString)buf]=(*it); 52 | presetSect2Name[(*it)] = (CString)buf; 53 | } 54 | } 55 | 56 | bool 57 | PresetManager::CreatePreset( xgm::NSFPlayerConfig *cfg, const CString &name ) 58 | { 59 | CString sect; 60 | 61 | for(int i=0;i<128;i++) 62 | { 63 | sect = "PRESET"; 64 | sect.AppendFormat("%04d",i); 65 | 66 | if(presetSect2Name.find(sect)==presetSect2Name.end()) 67 | { 68 | presetName2Sect[name] = sect; 69 | presetSect2Name[sect] = name; 70 | WritePrivateProfileString( sect, "NAME", name, path ); 71 | return SavePreset(cfg,name); 72 | } 73 | 74 | } 75 | 76 | return false; 77 | } 78 | 79 | bool 80 | PresetManager::DeletePreset( const CString &name ) 81 | { 82 | if(presetName2Sect.find(name)==presetName2Sect.end()) 83 | return false; 84 | 85 | CString sect = presetName2Sect[name]; 86 | WritePrivateProfileSection( sect,NULL,path); 87 | presetName2Sect.erase( name ); 88 | presetSect2Name.erase( sect ); 89 | return true; 90 | } 91 | 92 | bool 93 | PresetManager::LoadPreset(xgm::NSFPlayerConfig *cfg, const CString &name) 94 | { 95 | for(int i=0;preset_range[i]!=NULL;i++) 96 | cfg->Load(path, presetName2Sect[name], preset_range[i]); 97 | 98 | cfg->Notify(-1); 99 | return true; 100 | } 101 | 102 | bool 103 | PresetManager::SavePreset(xgm::NSFPlayerConfig *cfg, const CString &name) 104 | { 105 | for(int i=0;preset_range[i]!=NULL;i++) 106 | cfg->Save(path, presetName2Sect[name], preset_range[i]); 107 | return true; 108 | } 109 | 110 | const std::set 111 | PresetManager::GetPresetNames() 112 | { 113 | std::set ret; 114 | std::map::iterator it; 115 | for(it=presetName2Sect.begin();it!=presetName2Sect.end();it++) 116 | ret.insert(it->first); 117 | 118 | return ret; 119 | } 120 | 121 | const std::set 122 | PresetManager::GetPresetSects() 123 | { 124 | std::set ret; 125 | std::map::iterator it; 126 | for(it=presetName2Sect.begin();it!=presetName2Sect.end();it++) 127 | ret.insert(it->second); 128 | 129 | return ret; 130 | } 131 | 132 | -------------------------------------------------------------------------------- /xgm/devices/Misc/nes_detect.cpp: -------------------------------------------------------------------------------- 1 | #include "nes_detect.h" 2 | 3 | namespace xgm 4 | { 5 | static UINT8 maskAPU[16] = 6 | { 7 | #if 1 8 | 0xff, 0xff, 0xff, 0xff, 9 | 0xff, 0xff, 0xff, 0xff, 10 | 0xff, 0x00, 0xff, 0xff, 11 | 0x3f, 0x00, 0x8f, 0xf8 12 | #else 13 | 0x00, 0x00, 0x00, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 16 | 0x00, 0x00, 0x00, 0x00 17 | #endif 18 | }; 19 | 20 | bool NESDetector::Write (UINT32 adr, UINT32 val, UINT32 id) 21 | { 22 | if ( 23 | (0x4000 <= adr && adr <= 0x4013) // APU / DMC 24 | ||(0x4015 == adr) 25 | ||(0x4017 == adr) 26 | ||(0x9000 <= adr && adr <= 0x9002) // VRC6 27 | ||(0xA000 <= adr && adr <= 0xA002) 28 | ||(0xB000 <= adr && adr <= 0xB002) 29 | ||(0x9010 == adr) // VRC7 30 | ||(0x9030 == adr) 31 | ||(0x4040 <= adr && adr <= 0x4092) // FDS 32 | ||(0x4800 == adr) // N163 33 | ||(0xF800 == adr) 34 | ||(0x5000 <= adr && adr <= 0x5007) // MMC5 35 | ||(0x5010 == adr) 36 | ||(0x5011 == adr) 37 | ||(0xC000 == adr) // 5B 38 | ||(0xE000 == adr) 39 | ||(0x401B <= adr && adr <= 0x401D) // NSF2 IRQ 40 | ) 41 | { 42 | return BasicDetector::Write(adr, val, id); 43 | } 44 | 45 | return false; 46 | } 47 | 48 | NESDetectorEx::NESDetectorEx() 49 | { 50 | int bufsize_table[]={ 51 | 15, 15, 15, 15, 15, // SQR0, SQR1, TRI, NOIZ, DPCM 52 | 14, 14, 14, 14,// N106[0-3] 53 | 14, 14, 14, 14 // N106[4-7] 54 | }; 55 | for(int i=0;iReset(); 70 | m_looped[i] = false; 71 | } 72 | } 73 | 74 | bool NESDetectorEx::IsLooped(int time_in_ms, int match_second, int match_interval) 75 | { 76 | bool all_empty = true, all_looped = true; 77 | for(int i=0;iIsLooped(time_in_ms, match_second, match_interval); 82 | if(m_looped[i]) 83 | { 84 | m_loop_start = m_LD[i]->GetLoopStart(); 85 | m_loop_end = m_LD[i]->GetLoopEnd(); 86 | } 87 | } 88 | all_looped &= m_looped[i]|m_LD[i]->IsEmpty(); 89 | all_empty &= m_LD[i]->IsEmpty(); 90 | } 91 | 92 | return !all_empty&all_looped; 93 | } 94 | 95 | bool NESDetectorEx::Write (UINT32 adr, UINT32 val, UINT32 id) 96 | { 97 | if (0x4000 <= adr && adr < 0x4004) 98 | m_LD[SQR_0]->Write(adr,val&maskAPU[adr-0x4000]); 99 | else if (0x4004 <= adr && adr < 0x4008) 100 | m_LD[SQR_1]->Write(adr,val&maskAPU[adr-0x4000]); 101 | else if (0x4008 <= adr && adr < 0x400C) 102 | m_LD[TRI]->Write(adr,val&maskAPU[adr-0x4000]); 103 | else if (0x400C <= adr && adr < 0x4010) 104 | m_LD[NOIZ]->Write(adr,val&maskAPU[adr-0x4000]); 105 | else if (adr==0x4012||adr==0x4013) 106 | m_LD[DPCM]->Write(adr,val); 107 | else if (0xF800 == adr) 108 | m_n106_addr = val; 109 | else if (0x4800 == adr) 110 | { 111 | if(0x40<=m_n106_addr) 112 | { 113 | m_LD[N106_0+((m_n106_addr>>3)&7)]->Write(m_n106_addr,val); 114 | 115 | } 116 | if (m_n106_addr & 0x80) m_n106_addr++; 117 | } 118 | return false; 119 | } 120 | 121 | } // namespace xgm -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6280m.h: -------------------------------------------------------------------------------- 1 | #define BUILD_M6502 0 2 | #define BUILD_M65C02 0 3 | #define BUILD_HUC6280 1 4 | 5 | #include "km6280.h" 6 | 7 | #define C_FLAG K6280_C_FLAG 8 | #define Z_FLAG K6280_Z_FLAG 9 | #define I_FLAG K6280_I_FLAG 10 | #define D_FLAG K6280_D_FLAG 11 | #define B_FLAG K6280_B_FLAG 12 | #define T_FLAG K6280_T_FLAG 13 | #define V_FLAG K6280_V_FLAG 14 | #define N_FLAG K6280_N_FLAG 15 | #define R_FLAG 0 16 | 17 | #define BASE_OF_ZERO 0x2000 18 | 19 | #define VEC_RESET 0xFFFE 20 | #define VEC_NMI 0xFFFC 21 | #define VEC_TIMER 0xFFFA 22 | #define VEC_INT1 0xFFF8 23 | #define VEC_INT 0xFFF6 24 | 25 | #define VEC_BRK VEC_INT 26 | 27 | #define IRQ_INIT K6280_INIT 28 | #define IRQ_RESET K6280_RESET 29 | #define IRQ_NMI K6280_NMI 30 | #define IRQ_BRK K6280_BRK 31 | #define IRQ_TIMER K6280_TIMER 32 | #define IRQ_INT1 K6280_INT1 33 | #define IRQ_INT K6280_INT2 34 | 35 | #ifdef STATIC_CONTEXT6280 36 | extern struct K6280_Context STATIC_CONTEXT6280; 37 | #define __THIS__ STATIC_CONTEXT6280 38 | #define __CONTEXT void 39 | #define __CONTEXT_ /* none */ 40 | #define __THISP /* none */ 41 | #define __THISP_ /* none */ 42 | #else 43 | #define __THIS__ (*pc) 44 | #define __CONTEXT struct K6280_Context *pc 45 | #define __CONTEXT_ struct K6280_Context *pc, 46 | #define __THISP pc 47 | #define __THISP_ pc, 48 | #endif 49 | 50 | #define K_EXEC K6280_Exec 51 | 52 | #if USE_USERPOINTER 53 | #define __THIS_USER_ __THIS__.user, 54 | #else 55 | #define __THIS_USER_ 56 | #endif 57 | 58 | #if USE_CALLBACK 59 | #if USE_INLINEMMC 60 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 61 | { 62 | return __THIS__.ReadByte[adr >> USE_INLINEMMC](__THIS_USER_ adr); 63 | } 64 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 65 | { 66 | __THIS__.WriteByte[adr >> USE_INLINEMMC](__THIS_USER_ adr, value); 67 | } 68 | #else 69 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 70 | { 71 | return __THIS__.ReadByte(__THIS_USER_ adr); 72 | } 73 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 74 | { 75 | __THIS__.WriteByte(__THIS_USER_ adr, value); 76 | } 77 | #endif 78 | static Uword Inline K_READMPR(__CONTEXT_ Uword adr) 79 | { 80 | return __THIS__.ReadMPR(__THIS_USER_ adr); 81 | } 82 | static void Inline K_WRITEMPR(__CONTEXT_ Uword adr, Uword value) 83 | { 84 | __THIS__.WriteMPR(__THIS_USER_ adr, value); 85 | } 86 | static void Inline K_WRITE6270(__CONTEXT_ Uword adr, Uword value) 87 | { 88 | __THIS__.Write6270(__THIS_USER_ adr, value); 89 | } 90 | #else 91 | static Uword Inline K_READ(__CONTEXT_ Uword adr) 92 | { 93 | return K6280_ReadByte(__THIS_USER_ adr); 94 | } 95 | static void Inline K_WRITE(__CONTEXT_ Uword adr, Uword value) 96 | { 97 | K6280_WriteByte(__THIS_USER_ adr, value); 98 | } 99 | static Uword Inline K_READMPR(__CONTEXT_ Uword adr) 100 | { 101 | return K6280_ReadMPR(__THIS_USER_ adr); 102 | } 103 | static void Inline K_WRITEMPR(__CONTEXT_ Uword adr, Uword value) 104 | { 105 | K6280_WriteMPR(__THIS_USER_ adr, value); 106 | } 107 | static void Inline K_WRITE6270(__CONTEXT_ Uword adr, Uword value) 108 | { 109 | K6280_Write6270(__THIS_USER_ adr, value); 110 | } 111 | #endif 112 | #ifndef K_READNP 113 | #define K_READNP K_READ 114 | #define K_WRITENP K_WRITE 115 | #endif 116 | #ifndef K_READZP 117 | #if !USE_DIRECT_ZEROPAGE 118 | #define K_READZP K_READ 119 | #define K_WRITEZP K_WRITE 120 | #else 121 | static Uword Inline K_READZP(__CONTEXT_ Uword adr) 122 | { 123 | return __THIS__.zeropage[adr]; 124 | } 125 | static void Inline K_WRITEZP(__CONTEXT_ Uword adr, Uword value) 126 | { 127 | __THIS__.zeropage[adr] = value; 128 | } 129 | #endif 130 | #endif 131 | 132 | #include "km6502ft.h" 133 | #include "km6502cd.h" 134 | #include "km6502ct.h" 135 | #include "km6502ot.h" 136 | #include "km6502ex.h" 137 | -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_vrc7.cpp: -------------------------------------------------------------------------------- 1 | #include "nes_vrc7.h" 2 | 3 | namespace xgm 4 | { 5 | NES_VRC7::NES_VRC7 () 6 | { 7 | patch_set = OPLL_VRC7_RW_TONE; 8 | 9 | opll = OPLL_new ( 3579545, DEFAULT_RATE); 10 | OPLL_reset_patch (opll, patch_set); 11 | SetClock(DEFAULT_CLOCK); 12 | 13 | for(int c=0;c<2;++c) 14 | for(int t=0;t<6;++t) 15 | sm[c][t] = 128; 16 | } 17 | 18 | NES_VRC7::~NES_VRC7 () 19 | { 20 | OPLL_delete (opll); 21 | } 22 | 23 | void NES_VRC7::SetPatchSet(unsigned int p) 24 | { 25 | patch_set = p; 26 | } 27 | 28 | void NES_VRC7::SetClock (double c) 29 | { 30 | clock = c / 36; 31 | } 32 | 33 | void NES_VRC7::SetRate (double r) 34 | { 35 | //rate = r ? r : DEFAULT_RATE; 36 | (void)r; // rate is ignored 37 | rate = 49716; 38 | OPLL_set_quality(opll, 1); // quality always on (not really a CPU hog) 39 | OPLL_set_rate(opll,(e_uint32)rate); 40 | } 41 | 42 | void NES_VRC7::Reset () 43 | { 44 | for (int i=0; i < 0x40; ++i) 45 | { 46 | Write(0x9010,i); 47 | Write(0x9030,0); 48 | } 49 | 50 | divider = 0; 51 | OPLL_reset_patch (opll, patch_set); 52 | OPLL_reset (opll); 53 | } 54 | 55 | void NES_VRC7::SetStereoMix(int trk, xgm::INT16 mixl, xgm::INT16 mixr) 56 | { 57 | if (trk < 0) return; 58 | if (trk > 5) return; 59 | sm[0][trk] = mixl; 60 | sm[1][trk] = mixr; 61 | } 62 | 63 | #define MOD(o,x) (&(o)->slot[(x)<<1]) 64 | #define CAR(o,x) (&(o)->slot[((x)<<1)|1]) 65 | 66 | ITrackInfo *NES_VRC7::GetTrackInfo(int trk) 67 | { 68 | if(opll&&trk<6) 69 | { 70 | //trkinfo[trk].max_volume = 15; 71 | //trkinfo[trk].volume = 15 - ((opll->reg[0x30+trk])&15); 72 | trkinfo[trk].volume = (255-CAR(opll,trk)->egout)*(15 - ((opll->reg[0x30+trk])&15)) / 15; 73 | trkinfo[trk].max_volume = 255; 74 | trkinfo[trk]._freq = opll->reg[0x10+trk]+((opll->reg[0x20+trk]&1)<<8); 75 | int blk = (opll->reg[0x20+trk]>>1)&7; 76 | trkinfo[trk].freq = clock*trkinfo[trk]._freq/(double)(0x80000>>blk); 77 | //trkinfo[trk].tone = (opll->reg[0x30+trk]>>4)&15; 78 | trkinfo[trk].tone = (255-MOD(opll,trk)->egout); 79 | trkinfo[trk].key = (opll->reg[0x20+trk]&0x10)?true:false; 80 | trkinfo[trk].misc = (MOD(opll,trk)->patch->FB)&0x7; //+ CAR(opll,trk)->patch->WF... 81 | if (trkinfo[trk].volume < 7) trkinfo[trk].key = false; //hack to remove released-into-oblivion notes 82 | return &trkinfo[trk]; 83 | } 84 | else 85 | return NULL; 86 | } 87 | 88 | bool NES_VRC7::Write (UINT32 adr, UINT32 val, UINT32 id) 89 | { 90 | if (adr == 0x9010) 91 | { 92 | OPLL_writeIO (opll, 0, val); 93 | return true; 94 | } 95 | if (adr == 0x9030) 96 | { 97 | OPLL_writeIO (opll, 1, val); 98 | return true; 99 | } 100 | else 101 | return false; 102 | } 103 | 104 | bool NES_VRC7::Read (UINT32 adr, UINT32 & val, UINT32 id) 105 | { 106 | return false; 107 | } 108 | 109 | void NES_VRC7::Tick (UINT32 clocks) 110 | { 111 | divider += clocks; 112 | while (divider >= 36) 113 | { 114 | divider -= 36; 115 | OPLL_calc(opll); 116 | } 117 | } 118 | 119 | UINT32 NES_VRC7::Render (INT32 b[2]) 120 | { 121 | b[0] = b[1] = 0; 122 | for (int i=0; i < 6; ++i) 123 | { 124 | INT32 val = (mask & (1<slot[(i<<1)|1].output[1]; 125 | b[0] += val * sm[0][i]; 126 | b[1] += val * sm[1][i]; 127 | } 128 | b[0] >>= (7 - 4); 129 | b[1] >>= (7 - 4); 130 | 131 | // master volume adjustment 132 | const INT32 MASTER = INT32(0.8 * 256.0); 133 | b[0] = (b[0] * MASTER) >> 8; 134 | b[1] = (b[1] * MASTER) >> 8; 135 | 136 | return 2; 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /xgm/devices/Sound/nes_dmc.h: -------------------------------------------------------------------------------- 1 | #ifndef _NES_DMC_H_ 2 | #define _NES_DMC_H_ 3 | 4 | #include "../device.h" 5 | #include "../audio/MedianFilter.h" 6 | #include "../CPU/nes_cpu.h" 7 | 8 | namespace xgm 9 | { 10 | class NES_APU; // forward declaration 11 | 12 | /** Bottom Half of APU **/ 13 | class NES_DMC:public ISoundChip 14 | { 15 | public: 16 | enum 17 | { 18 | OPT_ENABLE_4011=0, 19 | OPT_ENABLE_PNOISE, 20 | OPT_UNMUTE_ON_RESET, 21 | OPT_DPCM_ANTI_CLICK, 22 | OPT_NONLINEAR_MIXER, 23 | OPT_RANDOMIZE_NOISE, 24 | OPT_TRI_MUTE, 25 | OPT_END 26 | }; 27 | protected: 28 | const int GETA_BITS; 29 | static const UINT32 freq_table[2][16]; 30 | static const UINT32 wavlen_table[2][16]; 31 | UINT32 tnd_table[2][16][16][128]; 32 | 33 | int option[OPT_END]; 34 | int mask; 35 | INT32 sm[2][3]; 36 | UINT8 reg[0x10]; 37 | UINT32 len_reg; 38 | UINT32 adr_reg; 39 | IDevice *memory; 40 | UINT32 out[3]; 41 | UINT32 daddress; 42 | UINT32 length; 43 | UINT32 data; 44 | INT16 damp; 45 | int dac_lsb; 46 | bool dmc_pop; 47 | INT32 dmc_pop_offset; 48 | INT32 dmc_pop_follow; 49 | double clock; 50 | UINT32 rate; 51 | int pal; 52 | int mode; 53 | bool irq; 54 | bool active; 55 | 56 | UINT32 counter[3]; // frequency dividers 57 | int tphase; // triangle phase 58 | UINT32 nfreq; // noise frequency 59 | UINT32 dfreq; // DPCM frequency 60 | 61 | UINT32 tri_freq; 62 | int linear_counter; 63 | int linear_counter_reload; 64 | bool linear_counter_halt; 65 | bool linear_counter_control; 66 | 67 | int noise_volume; 68 | UINT32 noise, noise_tap; 69 | 70 | // noise envelope 71 | bool envelope_loop; 72 | bool envelope_disable; 73 | bool envelope_write; 74 | int envelope_div_period; 75 | int envelope_div; 76 | int envelope_counter; 77 | 78 | bool enable[3]; 79 | int length_counter[2]; // 0=tri, 1=noise 80 | 81 | TrackInfoBasic trkinfo[3]; 82 | 83 | // frame sequencer 84 | NES_APU* apu; // apu is clocked by DMC's frame sequencer 85 | int frame_sequence_count; // current cycle count 86 | int frame_sequence_length; // CPU cycles per FrameSequence 87 | int frame_sequence_step; // current step of frame sequence 88 | int frame_sequence_steps; // 4/5 steps per frame 89 | bool frame_irq; 90 | bool frame_irq_enable; 91 | 92 | NES_CPU* cpu; // IRQ needs CPU access 93 | 94 | inline UINT32 calc_tri (UINT32 clocks); 95 | inline UINT32 calc_dmc (UINT32 clocks); 96 | inline UINT32 calc_noise (UINT32 clocks); 97 | 98 | public: 99 | NES_DMC (); 100 | ~NES_DMC (); 101 | 102 | void InitializeTNDTable(double wt, double wn, double wd); 103 | void SetPal (bool is_pal); 104 | void SetAPU (NES_APU* apu_); 105 | void SetMemory (IDevice * r); 106 | void FrameSequence(int s); 107 | int GetDamp(){ return (damp<<1)|dac_lsb ; } 108 | void TickFrameSequence (UINT32 clocks); 109 | 110 | virtual void Reset (); 111 | virtual void Tick (UINT32 clocks); 112 | virtual UINT32 Render (INT32 b[2]); 113 | virtual bool Write (UINT32 adr, UINT32 val, UINT32 id=0); 114 | virtual bool Read (UINT32 adr, UINT32 & val, UINT32 id=0); 115 | virtual void SetRate (double rate); 116 | virtual void SetClock (double rate); 117 | virtual void SetOption (int, int); 118 | virtual void SetMask(int m){ mask = m; } 119 | virtual void SetStereoMix (int trk, xgm::INT16 mixl, xgm::INT16 mixr); 120 | virtual ITrackInfo *GetTrackInfo(int trk); 121 | 122 | void SetCPU(NES_CPU* cpu_); 123 | }; 124 | 125 | } 126 | 127 | #endif 128 | -------------------------------------------------------------------------------- /xgm/devices/CPU/km6502/km6502ex.h: -------------------------------------------------------------------------------- 1 | External void K_EXEC(__CONTEXT) 2 | { 3 | if (__THIS__.iRequest) 4 | { 5 | if (__THIS__.iRequest & IRQ_INIT) 6 | { 7 | #if BUILD_HUC6280 8 | __THIS__.lowClockMode = 1; 9 | #endif 10 | __THIS__.A = 0; 11 | __THIS__.X = 0; 12 | __THIS__.Y = 0; 13 | __THIS__.S = 0xFF; 14 | __THIS__.P = Z_FLAG | R_FLAG | I_FLAG; 15 | __THIS__.iRequest = 0; 16 | __THIS__.iMask = ~0; 17 | KI_ADDCLOCK(__THISP_ 7); 18 | return; 19 | } 20 | else if (__THIS__.iRequest & IRQ_RESET) 21 | { 22 | #if BUILD_HUC6280 23 | __THIS__.lowClockMode = 1; 24 | K_WRITEMPR(__THISP_ 0x80, 0x00); /* IPL(TOP OF ROM) */ 25 | #endif 26 | __THIS__.A = 0; 27 | __THIS__.X = 0; 28 | __THIS__.Y = 0; 29 | __THIS__.S = 0xFF; 30 | __THIS__.P = Z_FLAG | R_FLAG | I_FLAG; 31 | __THIS__.PC = KI_READWORD(__THISP_ VEC_RESET); 32 | __THIS__.iRequest = 0; 33 | __THIS__.iMask = ~0; 34 | } 35 | else if (__THIS__.iRequest & IRQ_NMI) 36 | { 37 | KM_PUSH(__THISP_ RTO8(__THIS__.PC >> 8)); 38 | KM_PUSH(__THISP_ RTO8(__THIS__.PC)); 39 | KM_PUSH(__THISP_ (Uword)(__THIS__.P | R_FLAG | B_FLAG)); 40 | #if BUILD_M65C02 || BUILD_HUC6280 41 | __THIS__.P = (__THIS__.P & ~(D_FLAG | T_FLAG)) | I_FLAG; 42 | __THIS__.iRequest &= ~IRQ_NMI; 43 | #else 44 | __THIS__.P = (__THIS__.P & ~T_FLAG) | I_FLAG; /* 6502 bug */ 45 | __THIS__.iRequest &= ~(IRQ_NMI | IRQ_BRK); 46 | #endif 47 | __THIS__.PC = KI_READWORD(__THISP_ VEC_NMI); 48 | KI_ADDCLOCK(__THISP_ 7); 49 | } 50 | else if (__THIS__.iRequest & IRQ_BRK) 51 | { 52 | KM_PUSH(__THISP_ RTO8(__THIS__.PC >> 8)); 53 | KM_PUSH(__THISP_ RTO8(__THIS__.PC)); 54 | KM_PUSH(__THISP_ (Uword)(__THIS__.P | R_FLAG | B_FLAG)); 55 | #if BUILD_M65C02 || BUILD_HUC6280 56 | __THIS__.P = (__THIS__.P & ~(D_FLAG | T_FLAG)) | I_FLAG; 57 | #else 58 | __THIS__.P = (__THIS__.P & ~T_FLAG) | I_FLAG; /* 6502 bug */ 59 | #endif 60 | __THIS__.iRequest &= ~IRQ_BRK; 61 | __THIS__.PC = KI_READWORD(__THISP_ VEC_BRK); 62 | KI_ADDCLOCK(__THISP_ 7); 63 | } 64 | else if (__THIS__.P & I_FLAG) 65 | { 66 | /* interrupt disabled */ 67 | } 68 | #if BUILD_HUC6280 69 | else if (__THIS__.iMask & __THIS__.iRequest & IRQ_INT1) 70 | { 71 | KM_PUSH(__THISP_ RTO8(__THIS__.PC >> 8)); 72 | KM_PUSH(__THISP_ RTO8(__THIS__.PC)); 73 | KM_PUSH(__THISP_ (Uword)(__THIS__.P | R_FLAG | B_FLAG)); 74 | __THIS__.P = (__THIS__.P & ~(D_FLAG | T_FLAG)) | I_FLAG; 75 | __THIS__.PC = KI_READWORD(__THISP_ VEC_INT1); 76 | KI_ADDCLOCK(__THISP_ 7); 77 | } 78 | else if (__THIS__.iMask & __THIS__.iRequest & IRQ_TIMER) 79 | { 80 | KM_PUSH(__THISP_ RTO8(__THIS__.PC >> 8)); 81 | KM_PUSH(__THISP_ RTO8(__THIS__.PC)); 82 | KM_PUSH(__THISP_ (Uword)(__THIS__.P | R_FLAG | B_FLAG)); 83 | __THIS__.P = (__THIS__.P & ~(D_FLAG | T_FLAG)) | I_FLAG; 84 | __THIS__.PC = KI_READWORD(__THISP_ VEC_TIMER); 85 | KI_ADDCLOCK(__THISP_ 7); 86 | } 87 | else if (__THIS__.iMask & __THIS__.iRequest & IRQ_INT) 88 | { 89 | KM_PUSH(__THISP_ RTO8(__THIS__.PC >> 8)); 90 | KM_PUSH(__THISP_ RTO8(__THIS__.PC)); 91 | KM_PUSH(__THISP_ (Uword)((__THIS__.P | R_FLAG) & ~B_FLAG)); 92 | __THIS__.P = (__THIS__.P & ~(D_FLAG | T_FLAG)) | I_FLAG; 93 | __THIS__.PC = KI_READWORD(__THISP_ VEC_INT); 94 | KI_ADDCLOCK(__THISP_ 7); 95 | } 96 | #else 97 | else if (__THIS__.iMask & __THIS__.iRequest & IRQ_INT) 98 | { 99 | KM_PUSH(__THISP_ RTO8(__THIS__.PC >> 8)); 100 | KM_PUSH(__THISP_ RTO8(__THIS__.PC)); 101 | KM_PUSH(__THISP_ (Uword)((__THIS__.P | R_FLAG) & ~B_FLAG)); 102 | #if BUILD_M65C02 103 | __THIS__.P = (__THIS__.P & ~(D_FLAG | T_FLAG)) | I_FLAG; 104 | #else 105 | __THIS__.P = (__THIS__.P & ~T_FLAG) | I_FLAG; /* 6502 bug */ 106 | #endif 107 | __THIS__.PC = KI_READWORD(__THISP_ VEC_INT); 108 | KI_ADDCLOCK(__THISP_ 7); 109 | } 110 | #endif 111 | } 112 | K_OPEXEC(__THISP); 113 | } 114 | -------------------------------------------------------------------------------- /nsfplug_ui/NSFPanDialog.cpp: -------------------------------------------------------------------------------- 1 | // NSFPanDialog.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "NSFDialogs.h" 6 | #include "NSFPanDialog.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | using namespace xgm; 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // NSFPanDialog 18 | 19 | NSFPanDialog::NSFPanDialog(CWnd* pParent /*=NULL*/) 20 | : CDialog(NSFPanDialog::IDD, pParent) 21 | { 22 | //{{AFX_DATA_INIT(NSFPanDialog) 23 | // ClassWizard 24 | //}}AFX_DATA_INIT 25 | } 26 | 27 | void NSFPanDialog::DoDataExchange(CDataExchange* pDX) 28 | { 29 | CDialog::DoDataExchange(pDX); 30 | //{{AFX_DATA_MAP(NSFPanDialog) 31 | // ClassWizard 32 | //}}AFX_DATA_MAP 33 | } 34 | 35 | void NSFPanDialog::SetDialogManager(NSFDialogManager *p) 36 | { 37 | for(int i=0;iLoadIcon(IDI_MIXER); 70 | SetIcon(hIcon, TRUE); 71 | 72 | RECT rect; 73 | int x = 0; 74 | int y = 0; 75 | int maxx = 0; 76 | int maxy = 0; 77 | rect.top = 0; 78 | rect.bottom = 0; 79 | rect.left = 0; 80 | rect.right = 0; 81 | 82 | const int SPLIT = 15; 83 | 84 | for(int i=0;i