Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSF Driver and Export Fixes #262

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a7487a0
Use CCompiler pointer for writing ASM export title
Gumball2415 Jan 2, 2024
febc65e
Decouple NSFDRV header from driver data
Gumball2415 Jan 13, 2024
72148d6
Refactor auxiliary assembly data generation
Gumball2415 Feb 6, 2024
1f9e366
Add NSF stub file for .asm export
Gumball2415 Feb 16, 2024
b52993e
Fix assembly period table export
Gumball2415 Feb 16, 2024
861f682
Fix N163 instrument load clobbering Kxx state
Gumball2415 Feb 16, 2024
0954020
Fix VRC7 period table assembly export
Gumball2415 Feb 17, 2024
31075be
Fix S5B init clobbering Kxx state
Gumball2415 Feb 17, 2024
e67e701
Implement "glob" multichip assembly export
Gumball2415 Feb 17, 2024
eeb7835
Write carrier frequency regardless of Kxx state
Gumball2415 Feb 17, 2024
e390204
Fix debug constexpr
Gumball2415 Feb 27, 2024
3c08177
Update effect bytecodes in row skip handling
Gumball2415 Feb 27, 2024
b57faeb
Fix NSF driver phase reset behavior
Gumball2415 Feb 27, 2024
3ef2be3
Handle Gxx delay commands in both row and frame...
Gumball2415 Feb 27, 2024
c0d46f5
Ignore invalid pattern data upon NSF export
Gumball2415 Mar 1, 2024
9abc231
Specify overflow in driver bank allocation
Gumball2415 Mar 1, 2024
716f8e6
Specify what parts of pattern data are invalid
Gumball2415 Mar 1, 2024
04f6190
Fix S5B instrument duty envelopes
Gumball2415 Mar 21, 2024
d7c481b
Account for HOLD_INSTRUMENT in pattern checking
Gumball2415 Mar 21, 2024
71f4f62
Include N163 period table in asm export
Gumball2415 Mar 22, 2024
6f2c743
Clamp pitch and hi-pitch envelope period results
Gumball2415 Mar 22, 2024
ae6f162
Align first sample in assembly export
Gumball2415 Mar 25, 2024
e6b4d19
Fix and refactor phase reset code
Gumball2415 Apr 5, 2024
4a4582f
Remove hardcoded bank reference in song header
Gumball2415 Apr 11, 2024
6ee2084
Enable pitch sliding in linear pitch mode
Gumball2415 Apr 11, 2024
7738f83
Implement bankswitched assembly config exports
Gumball2415 Apr 11, 2024
4b88f22
Add bank 0 for nonbankswitching config
Gumball2415 Apr 26, 2024
b8425af
Refactor NSFe metadata generation
Gumball2415 Apr 30, 2024
fa05bd9
Fix NES ROM export data alignment
Gumball2415 Jun 21, 2024
8a3ee83
Fix DPCM segment start address in nonbankswitching
Gumball2415 Jun 21, 2024
d92a3a1
Refactor Pitch/HiPitch bend logic
Gumball2415 Jul 19, 2024
4cc1a5e
Apply N163 slide shift if linear pitch is disabled
Gumball2415 Jul 20, 2024
bdf33eb
Implement linear pitch period limit
Gumball2415 Jul 20, 2024
4ce047d
Refactor period limit subroutine
Gumball2415 Jul 20, 2024
718183d
Fix N163 portamento shift in linear period
Gumball2415 Jul 22, 2024
72f32a6
Refactor multifile export
Gumball2415 Jul 31, 2024
2106d58
Write length counter load when writing pitch
Gumball2415 Dec 25, 2024
81be243
Check wave index bounds before indexing wave data
Gumball2415 Dec 25, 2024
3c3f1a3
Avoid writing volume commands in DPCM channel
Gumball2415 Dec 25, 2024
ef3dd21
Include actual .asm file name in auxiliary data
Gumball2415 Dec 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,21 @@ add_subdirectory_optimized("Source/libsamplerate" EXCLUDE_FROM_ALL)
# compiling
include(cmake/exe.cmake)

#builds the .chm file
# builds the .chm file
add_custom_command(TARGET ${exe}
PRE_BUILD
COMMAND cmd /c ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compile-chm.bat
COMMAND move Dn-Famitracker.chm ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating help file...")

# builds the NSF driver
add_custom_command(TARGET ${exe}
PRE_BUILD
COMMAND cmd /c ${CMAKE_CURRENT_SOURCE_DIR}/Source/drivers/build.cmd
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Compiling NSF driver...")

target_compile_features(${exe} PRIVATE cxx_std_17)

if(COMMAND target_precompile_headers)
Expand Down
7 changes: 6 additions & 1 deletion Source/ChunkRenderBinary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ void CChunkRenderNSF::StoreDriver(const char *pDriver, unsigned int Size)
Store(pDriver, Size);
}

void CChunkRenderNSF::StoreNSFDRV(const char* pNSFDRV, unsigned int Size)
{
Store(pNSFDRV, Size);
}

void CChunkRenderNSF::StoreChunks(const std::vector<CChunk*> &Chunks)
{
// Store chunks into NSF banks
Expand Down Expand Up @@ -211,7 +216,7 @@ int CChunkRenderNSF::GetDATAChunkSize() const

void CChunkRenderNSF::StoreChunkBankswitched(const CChunk *pChunk)
{
switch (pChunk->GetType()) {
switch (pChunk->GetType()) {
case CHUNK_FRAME_LIST:
case CHUNK_FRAME:
case CHUNK_PATTERN:
Expand Down
1 change: 1 addition & 0 deletions Source/ChunkRenderBinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CChunkRenderNSF : public CBinaryFileWriter
CChunkRenderNSF(CFile *pFile, unsigned int StartAddr);

void StoreDriver(const char *pDriver, unsigned int Size);
void StoreNSFDRV(const char *pNSFDRV, unsigned int Size);
void StoreChunks(const std::vector<CChunk*> &Chunks);
void StoreChunksBankswitched(const std::vector<CChunk*> &Chunks);
void StoreSamples(const std::vector<const CDSample*> &Samples);
Expand Down
Loading