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

DPCM Doesn't play when playing exported .nsf #337

Open
DarkZapOTron opened this issue Mar 4, 2025 · 10 comments
Open

DPCM Doesn't play when playing exported .nsf #337

DarkZapOTron opened this issue Mar 4, 2025 · 10 comments
Labels
bug Something isn't working nsf-driver sound engine used in NSF/assembly file export

Comments

@DarkZapOTron
Copy link

I exported all .NSF versions you can export from Dn-FamiTracker, and none of them played DPCM at all. However when I exported from the original FamiTracker DPCM played fine. Just in case it helps, the song I was playing uses DPCM and Namco-163.

@Gumball2415
Copy link
Collaborator

Gumball2415 commented Mar 4, 2025

what version of DnFT did you use to export the .nsf? also, may you provide a test module for debugging?

@DarkZapOTron
Copy link
Author

I used version 0.5.1.1. Also, you mean test module as in .ftm?

@Gumball2415
Copy link
Collaborator

yes, the .ftm or .dnm file which can reproduce this bug

@DarkZapOTron
Copy link
Author

@DarkZapOTron
Copy link
Author

it sounds fine in Dn-Famitracker, the issue is just in the .nsf on the everdrive

@DarkZapOTron
Copy link
Author

I created the song in the original FamiTracker from 2015, could that be the problem?

@Gumball2415 Gumball2415 added bug Something isn't working nsf-driver sound engine used in NSF/assembly file export labels Mar 4, 2025
@Gumball2415
Copy link
Collaborator

it shouldn't be an issue. my current speculation is that it has to do with either DnFT's driver or NSF compiler.

@DarkZapOTron
Copy link
Author

Yeah, it's probably one of those. Also, I just checked the .nsf on an .nsf player and it had the same issue.

@DarkZapOTron DarkZapOTron changed the title DPCM Doesn't play on the Everdrive N8 Pro DPCM Doesn't play when playing exported .nsf Mar 4, 2025
@DarkZapOTron
Copy link
Author

Thanks for helping figure out the issue could be!

@Gumball2415
Copy link
Collaborator

Gumball2415 commented Mar 11, 2025

the NSF driver is partially compiled to a kernel binary "shell" (or "glob" as i've called it) in a header file.

the caveat with this is that compile-time definitions are fixed, especially for the amount of N163 channels; this is set to eight channels.

in 0CC, this was simply patched by writing a single byte to the identity table wherever the DPCM channel was indexed, but this breaks whenever the driver changes or is updated due to being a fixed address.

https://github.com/Dn-Programming-Core-Management/Dn-FamiTracker/blob/02b40e91c5b6c03c4927e8ec1630dc09b7e28528/Source/Compiler.cpp#L852C1-L854C3

indeed, when the driver was modified/patched in Dn 0.5, this patching was liable to break sooner or later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nsf-driver sound engine used in NSF/assembly file export
Projects
None yet
Development

No branches or pull requests

2 participants