5 years agoUse [[fallthrough]] attribute.
Naram Qashat []
Use [[fallthrough]] attribute.

5 years agoMinor change to use constexpr.
Naram Qashat []
Minor change to use constexpr.

5 years agoUse std::filesystem::path for reading/writing files.
Naram Qashat []
Use std::filesystem::path for reading/writing files.

Also remove fstream_wfopen.h as it is no longer needed.
Also make XSFFile not store the string of the path but store the path as std::filesystem::path.

5 years agoAdd warnings to building with GCC/Clang.
Naram Qashat []
Add warnings to building with GCC/Clang.

* These were mostly copied from the old Makefile.
* The files including wxWidgets need -Wno-old-style-cast done in the code via pragmas because I do not want to disable that warning for the rest of the files. (It might've been overkill for some places where wxWidgets was included, but whatever.)

5 years agoAdd wxWidgets-based configuration dialog boxes.
Naram Qashat []
Add wxWidgets-based configuration dialog boxes.

* Removes the configuration dialog boxes that used my DialogBuilder.
* Move default configuration values to be inlined within the headers.
* Moved 2SF's and GSF's XSFConfig classes to their own headers to accommodate the new wxWidgets dialog boxes.
* Make it so NCSF's SoundView dialog can be toggled on or off from the configuration dialog box.

5 years agoReplace #ifdef _DEBUG with #ifndef NDEBUG
Naram Qashat []
Replace #ifdef _DEBUG with #ifndef NDEBUG

5 years agoAdd override keyword.
Naram Qashat []
Add override keyword.

5 years agoMinor changes to the RegEx validator.
Naram Qashat []
Minor changes to the RegEx validator.

5 years agoAlso add the RegEx validator to the CMake script.
Naram Qashat []
Also add the RegEx validator to the CMake script.

5 years agoAdd a RegEx validator for use with wxWidgets.
Naram Qashat []
Add a RegEx validator for use with wxWidgets.


5 years agoSilence various Visual Studio warnings:
Naram Qashat []
Silence various Visual Studio warnings:

* Fix the ones in my code where I could use a proper type or valid casts.
* Ignore the designer-time and compiler-time warnings in vendor code or in my code where I am unable to suppress them via casting.
(Most of these were ignored already before introducing the CMake scripts, because they were in vendor code or were annoying to deal with.)

5 years agoMake it so zlib's submodule being dirty is ignored.
Naram Qashat []
Make it so zlib's submodule being dirty is ignored.

(This is because of what I mentioned in the last commit, where zlib's CMake script modifies a file in the submodule.)

5 years agoAdd CMake scripts in preparation for wxWidgets changes.
Naram Qashat []
Add CMake scripts in preparation for wxWidgets changes.

(One downside here, zlib's CMake script renames its zconf.h... which in turn means that the submodule now thinks there are uncommitted changes. :/)

5 years agoAdd submodule for wxWidgets.
Naram Qashat []
Add submodule for wxWidgets.

This is in preparation for replacing my DialogBuilder with wxWidgets for the configuration dialog boxes. DialogBuilder will still be included for now for the currently unused info dialog boxes.

5 years agoAdd 3-clause BSD license to the repo.
Naram Qashat []
Add 3-clause BSD license to the repo.


5 years agoFix warning about invalid index.
Naram Qashat []
Fix warning about invalid index.


5 years agoIgnore Visual Studio warning about using GetTickCount().
Naram Qashat []
Ignore Visual Studio warning about using GetTickCount().

(The only way to use GetTickCount64() would be to change the Windows version target up from 2000 to Vista.)

5 years agoTurns out that the trailing return type isn't actually needed here.
Naram Qashat []
Turns out that the trailing return type isn't actually needed here.


5 years agoMissed a uint32_t -> std::uint32_t.
Naram Qashat []
Missed a uint32_t -> std::uint32_t.


5 years agoRename SBNKInstrument(Range) to SBNKInstrument(Entry).
Naram Qashat []
Rename SBNKInstrument(Range) to SBNKInstrument(Entry).

(SBNKInstrument -> SBNKInstrumentEntry and SBNKIntrumentRange -> SBNKInstrument)
The old names didn't really make much sense when I started porting the creation tools code to C#, so might as well fix them here too.

5 years agoVarious changes:
Naram Qashat []
Various changes:

* Use enum class instead of enum (except for the enums for the resource IDs, not really necessary there).
* For NCSF specifically, included a function to convert an enum class to its underlying integral type (as this is needed for use with the std::bitset class).
* Cleanup headers so all the ones needed in a file are explicitly included even if they may possibly be included in another header.
* Used forward declarations in a few spots.
* Explicitly namespaced all (u)int*_t uses (this might seem like overkill, but it helps me see when the standard types are being used with a simple search for std::).
* Made sure it all builds with MinGW-w64 as well (both gcc and clang).
* Removed some std::move from DialogBuilder.cpp based on clang's warnings for that.
* Replaced use of std::copy_n on strings in DialogBuilder.cpp with my CopyToString functions that use wcscpy.
* Replaced CHAR_MIN/CHAR_MAX in eqstr.h and ltstr.h with std::numeric_limits<char>::min/max().

5 years agoReplaced the SDAT record types enum with constants.
Naram Qashat []
Replaced the SDAT record types enum with constants.


5 years agoCorrect a few warnings Visual Studio was complaining about.
Naram Qashat []
Correct a few warnings Visual Studio was complaining about.


5 years agoCleanup a few comments and strings.
Naram Qashat []
Cleanup a few comments and strings.


5 years agoUse C++17 std::filesystem functions instead of my own.
Naram Qashat []
Use C++17 std::filesystem functions instead of my own.


5 years agoRemove now unnecessary using std::placeholders.
Naram Qashat []
Remove now unnecessary using std::placeholders.


5 years agoReplace std::rand with RNG based on actual DS RNG.
Naram Qashat []
Replace std::rand with RNG based on actual DS RNG.

(This also means the playback of songs with randomness in them will be deterministic now.)

5 years agoCorrect size of file ID in INFOEntry structures to 32-bit.
Naram Qashat []
Correct size of file ID in INFOEntry structures to 32-bit.


5 years agoReplace std::not1 with a lamba.
Naram Qashat []
Replace std::not1 with a lamba.


5 years agoIgnore Visual Studio 2019's warning about using TerminateThread.
Naram Qashat []
Ignore Visual Studio 2019's warning about using TerminateThread.


5 years agoUse std::make_unique where possible.
Naram Qashat []
Use std::make_unique where possible.


5 years agoRemove some now unnecessary codecvt lines.
Naram Qashat []
Remove some now unnecessary codecvt lines.


5 years agoMove TagList's code to get tag order into its own function.
Naram Qashat []
Move TagList's code to get tag order into its own function.

Also uses a lambda instead of binding.

5 years agoIgnore Visual Studio 2019's arithmetic overflow warning.
Naram Qashat []
Ignore Visual Studio 2019's arithmetic overflow warning.

It is obnoxious and only in the IDE and not at compile-time.

5 years agoReplace memcpy/memset with std::copy_n/std::fill_n.
Naram Qashat []
Replace memcpy/memset with std::copy_n/std::fill_n.


5 years agoCorrect typos in the function names in the loads of GSF and SNSF.
Naram Qashat []
Correct typos in the function names in the loads of GSF and SNSF.

(This probably came about from copying the code from the 2SF player and not fixing the names.)

5 years agoRemove the copy constructors from SBNK, SDAT and SSEQ.
Naram Qashat []
Remove the copy constructors from SBNK, SDAT and SSEQ.

(They were probably holdovers from copying the code from the NCSF creation tools.)

5 years agoA few more conversion changes:
Naram Qashat []
A few more conversion changes:

* To go along with the previous change, XSFConfig now had internal get/set value functions that use type traits to choose between the enum and non-enum versions. (This also means I do not need to manually double-cast enums now.)
* Fix bug with the Windows API string conversions, so they do not include the trailing null byte in the output string.
* Added function to trim trailing 0s (and the decimal point if necessary) from a string that came from a double.

5 years agoSome conversion replacements:
Naram Qashat []
Some conversion replacements:

* Replace the (w)stringify functions with the standard std::to_(w)string functions.
* Replace convertTo with versions that use type_traits to determine which standard string conversion function to call, as well as handle enums specically.

5 years agoReplace deprecated wstring_convert with Windows API functions.
Naram Qashat []
Replace deprecated wstring_convert with Windows API functions.


5 years agoRemove last modification date from files.
Naram Qashat []
Remove last modification date from files.

(I never remember to update these and besides, GitHub history can show when they were last modified.)

5 years agoVarious updates:
Naram Qashat []
Various updates:

* Fix build with Visual Studio, updating projects to Visual Studio 2019 (as that is what I have installed).
* Changed C++ language standard to C++ 17.
* Add files for in_2sf's spu from Coda's recent commit.
* Add files for zlib now that it is being included as a submodule (removes the need for the zlib DLL as well).
* Remove common.props (due to the aforementioned zlib inclusion as well as the winamp headers also being in the project now).
* Minor NCSF file in the SSEQ player, the check for when to process tracks should've been >=, not >.

5 years agoMerge pull request #5 from ahigerd/master
Naram Qashat []
Merge pull request #5 from ahigerd/master

Update for modern compilers, update 2sf core, add MSVC cross-compile support

5 years agouse .PHONY instead of FORCE
Adam Higerd []
use .PHONY instead of FORCE

5 years agoswitch to git submodule for zlib
Adam Higerd []
switch to git submodule for zlib

5 years ago2sf: fix JIT enable, fix sample rate
Adam Higerd []
2sf: fix JIT enable, fix sample rate

5 years agofix mingw build, clean up new warnings
Adam Higerd []
fix mingw build, clean up new warnings

5 years agoadd sharp interpolator option, fix makefile dependencies
Adam Higerd []
add sharp interpolator option, fix makefile dependencies

5 years agoupdate for C++17 compliance, update to latest 2sf, add WINE cross-compile makefiles
Adam Higerd []
update for C++17 compliance, update to latest 2sf, add WINE cross-compile makefiles

6 years ago[Framework] Super minor cleanups.
Naram Qashat []
[Framework] Super minor cleanups.


6 years ago[NCSF] Super minor cleanups.
Naram Qashat []
[NCSF] Super minor cleanups.


6 years ago[NCSF] Minor possible fix in sample increment
Naram Qashat []
[NCSF] Minor possible fix in sample increment

* While I am unsure if this would've ever happened, this will prevent the locations from being out-of-bounds.

6 years ago[NCSF] Enable portamento when setting those registers.
Naram Qashat []
[NCSF] Enable portamento when setting those registers.

(Thanks to Coda Highland for the fix.)

6 years ago[NCSF] <stdexcept> is actually needed...
Naram Qashat []
[NCSF] <stdexcept> is actually needed...

(It probably never triggered any errors in the past because of it being implicitly included by some other header file.)

6 years ago[NCSF] Fix PSG output.
Naram Qashat []
[NCSF] Fix PSG output.

* Changed the base timer and actually utilize the note number from the note definition even for PSG. Thanks to Kurausukun for informing me about the issue and helping to provide a sample to demonstrate the issue.
* Correct the frequency output in the debug sound view (using DeSmuME's method directly resulted in frequencies that were 3 octaves higher than what they should have been).

6 years ago[NCSF] Small typo (or rather non-removal) in the previous fix
Naram Qashat []
[NCSF] Small typo (or rather non-removal) in the previous fix


6 years agoMerge remote-tracking branch 'origin/master'
Naram Qashat []
Merge remote-tracking branch 'origin/master'


6 years agoPrevent .vs from being committed
Naram Qashat []
Prevent .vs from being committed


6 years ago[NCSF] Apply channel modulation fix from fincs
Naram Qashat []
[NCSF] Apply channel modulation fix from fincs


8 years agoMerge pull request #2 from zeromus/patch-1
Naram Qashat []
Merge pull request #2 from zeromus/patch-1

Update XSFPlayer_2SF.cpp

8 years agoUpdate XSFPlayer_2SF.cpp
zeromus []
Update XSFPlayer_2SF.cpp

Make it substantially more obvious how to hack the 2sf player to output at a different samplerate by removing the secret implicit 44100 based calculation

11 years ago[NCSF] Update version and README for the previous change.
Naram Qashat []
[NCSF] Update version and README for the previous change.

11 years agoFix unsigned underflow with a loop offset of 0 on an ADPCM SWAV.
Naram Qashat []
Fix unsigned underflow with a loop offset of 0 on an ADPCM SWAV.

Also a minor optimization when reading the SWAVs.

11 years ago[NCSF] Update README file for the previous 2 commits.
Naram Qashat []
[NCSF] Update README file for the previous 2 commits.

11 years ago[NCSF] Applied sinc modification from kode54:
Naram Qashat []
[NCSF] Applied sinc modification from kode54:

Sinc mode should not scale the window, just the sinc pulse.

11 years ago[NCSF] Utilize the PLAYER blocks in the SDAT if they exist.
Naram Qashat []
[NCSF] Utilize the PLAYER blocks in the SDAT if they exist.

Backwards compatibility is kept by treating the lack of PLAYER info as
if all channels are able to be allocated.

11 years ago[NCSF] Very minor cleanups.
Naram Qashat []
[NCSF] Very minor cleanups.

11 years ago[2SF] A few commits from the asmjit project.
Naram Qashat []
[2SF] A few commits from the asmjit project.

11 years ago[NCSF] Bump version number for the previous fixes.
Naram Qashat []
[NCSF] Bump version number for the previous fixes.

11 years agoAdding a .gitignore to stop git from trying to version certain files.
Naram Qashat []
Adding a .gitignore to stop git from trying to version certain files.

11 years ago[NCSF] Documented what FSS functions were originally used.
Naram Qashat []
[NCSF] Documented what FSS functions were originally used.

* Changed default of modDelay to 0.
* Also minor cleanup.

11 years ago[NCSF] Reversed the order of the PSG and Noise channel allocations.
Naram Qashat []
[NCSF] Reversed the order of the PSG and Noise channel allocations.

This was suggested by fincs as the proper way to fix channels being
cutoff incorrectly.
(Also moved volume assignment so it was less duplicated.)

11 years ago[NCSF] Changed sinc interpolation to a Nuttall 3-term Window on suggestion from kode54.
Naram Qashat []
[NCSF] Changed sinc interpolation to a Nuttall 3-term Window on suggestion from kode54.

11 years ago[NCSF] Fixed unintentional infinite loop in the previous attack rate calculation fix.
Naram Qashat []
[NCSF] Fixed unintentional infinite loop in the previous attack rate calculation fix.

11 years ago[NCSF] Changes to the Sound View debug window:
Naram Qashat []
[NCSF] Changes to the Sound View debug window:
* No longer has the hold/busy items.
* Source Address replaced with State.

11 years ago[NCSF] Partial fix to channels being unintentionally cut off.
Naram Qashat []
[NCSF] Partial fix to channels being unintentionally cut off.

11 years ago[NCSF] Minor correction to the attack rate calculation.
Naram Qashat []
[NCSF] Minor correction to the attack rate calculation.

(Basically, it should never allow the same volume level as the previous
calculation.)

11 years ago[NCSF] Corrected attack rate calculation.
Naram Qashat []
[NCSF] Corrected attack rate calculation.

11 years ago[NCSF] Minor edit with the debug Sound View so it doesn't use a reference.
Naram Qashat []
[NCSF] Minor edit with the debug Sound View so it doesn't use a reference.

11 years ago[NCSF] Bump version number for the previous volume fixes.
Naram Qashat []
[NCSF] Bump version number for the previous volume fixes.

11 years ago[NCSF] One more volume fix, the default volume is 127, not 64.
Naram Qashat []
[NCSF] One more volume fix, the default volume is 127, not 64.

11 years ago[NCSF] Correctly handle the SSEQ volume from the INFO block.
Naram Qashat []
[NCSF] Correctly handle the SSEQ volume from the INFO block.

11 years ago[NCSF] REALLY remove minor instance of variable shadowing.
Naram Qashat []
[NCSF] REALLY remove minor instance of variable shadowing.

11 years ago[NCSF] Remove minor instance of variable shadowing.
Naram Qashat []
[NCSF] Remove minor instance of variable shadowing.

11 years ago[NCSF] Move track allocation into the SSEQ command handler.
Naram Qashat []
[NCSF] Move track allocation into the SSEQ command handler.

This was suggested by fincs after I found some sequences that appeared
to do track allocations later in them than expected originally.

11 years ago[NCSF] Minor code changes to reduce code duplication.
Naram Qashat []
[NCSF] Minor code changes to reduce code duplication.

* Made a function in the Override struct to centralize where it
determines whether to use the override value or not.
* Made a function that returns the number of bytes that a command needs,
and used that to remove all the conditionals for processing a command to
instead handle that within the IF command itself.
Thanks to fincs and Henke37 for the suggestions to do this.

11 years ago[NCSF] Implemented the random, variable, and conditional commands. Also fixed loop counter.
Naram Qashat []
[NCSF] Implemented the random, variable, and conditional commands. Also fixed loop counter.

11 years agoReverted the sound changes back to the original FSS code, but with the fix to clamp the total volume.
Naram Qashat []
Reverted the sound changes back to the original FSS code, but with the fix to clamp the total volume.

Also commented out the code that uses the SSEQ's volume, it seems as if
the DS doesn't use it so I probably shouldn't be using it either.

11 years ago[NCSF] Removed the Cnv_Scale function as it seemed to cause sounds to be too loud in some cases.
Naram Qashat []
[NCSF] Removed the Cnv_Scale function as it seemed to cause sounds to be too loud in some cases.

11 years ago[NCSF] Fix volume issues with a little help from the Nintendo DS SDK.
Naram Qashat []
[NCSF] Fix volume issues with a little help from the Nintendo DS SDK.

Also added a clone of DeSmuME's Sound View that is only build during a
debug build, which helped to identify the above issues.

11 years agoMade note of update to zlib 1.28. (Should actually say 1.2.8, but I'll fix that in the future.)
Naram Qashat []
Made note of update to zlib 1.28. (Should actually say 1.2.8, but I'll fix that in the future.)

11 years ago[NCSF] Should've updated the version number before.
Naram Qashat []
[NCSF] Should've updated the version number before.

11 years ago[NCSF] Minor comment fix from the previous NCSF commit.
Naram Qashat []
[NCSF] Minor comment fix from the previous NCSF commit.

11 years ago[2SF] Update from asmjit.
Naram Qashat []
[2SF] Update from asmjit.

11 years ago[NCSF] Interpolation changes:
Naram Qashat []
[NCSF] Interpolation changes:

* Removed Cosine, 4-Point B-Spline, 6-Point B-Spline, and 6-point
Osculating.
* Added 4-Point Legrange and 6-Point Legrange.
* Changed wording of the Sinc interpolation to mention that it is
16-point.

11 years agoRemoving this file as it doesn't help since common.props is already tracked, trying another route.
Naram Qashat []
Removing this file as it doesn't help since common.props is already tracked, trying another route.

11 years agoTrying to get git to ignore changes I make to common.props in the future (have to be able to change it to build the DLLs).
Naram Qashat []
Trying to get git to ignore changes I make to common.props in the future (have to be able to change it to build the DLLs).

11 years agoThis should've never got committed as it was, oops.
Naram Qashat []
This should've never got committed as it was, oops.

11 years ago* Small Makefile changes.
Naram Qashat []
* Small Makefile changes.

* Removed a couple files that were not being used.
* Cleanups found with clang's -Weverything (and shutting it up about a
lot of things that were ridiculous, as well as ignoring some of the
warnings still coming up).

11 years ago[2SF] Minor edit of a preprocessor line.
Naram Qashat []
[2SF] Minor edit of a preprocessor line.