I'm looking for some testing NSF files (I can't produce these myself, since IT2NSF doesn't support these particular features) so I can test Nestopia's ability for playing back NSF files with expansions. Specifically, I'm looking for just one right now...
- One that uses the Namco 163 expansion that uses a waveform that's greater than 32 samples (16 byte filesize). I already tested 8 channels using King of Kings, and there's no "hiss" (taking note of that caveat).
Rolling Thunder is the one example I know that uses a longer sample length than 32.
Otherwise just make one in Famitracker/PPMCK or code it yourself I guess?
Thanks! Rolling Thunder confirms a second fact: 32 sample length limit on playback for Nestopia. I compared my playback with this video (which appears to come from the actual hardware):
https://www.youtube.com/watch?v=CYfBYHJZB74
Code:
NstBoardNamcot163.cpp:292:
inline void N163::Sound::BaseChannel::SetWaveLength(const uint data)
{
const dword length = (0x20UL - (data & REG_WAVELENGTH)) << PHASE_SHIFT;
if (waveLength != length)
{
waveLength = length;
phase = 0;
}
enabled = data >> REG_ENABLE_SHIFT;
}
NstBoardNamcot163.hpp:84:
REG_WAVELENGTH = 0x1C,
Sure does have that limitation. At least it's a trivial patch, unlike adding the mixing noise.
I'm using the port by Richard Bannister. As for compiling this myself... I'd be very nervous to do so.
Well, at least it's an improvement from Game Music Box (especially with multi-expansion support).
If you're using Bannister's port, you're using linux? (or else macosx?) I've found compiling Nestopia from source to be really easy on linux.
Building Nestopia on Windows isn't too bad either (though I do it inside of a dedicated VM, because it requires a very specific version of Visual Studio to work -- newer versions wouldn't build it properly when I tried, but I think the project could be modified to work on newer versions, I just didn't care to spend the time).
Also, if you want the code fixed, you should ask the Nestopia Unofficial Edition guy to add it (he's responsive to issues submit there):
https://github.com/rdanbrook/nestopiaEdit: I can submit an issues request + patch for him, if someone tells me what needs to be changed (audio is really not my thing). I assume the limiter here is the
0x20UL part of the subtraction, but I'm not sure if REG_WAVELENGTH needs to be changed too (I have no idea what's special about 0x1C / %00011100).
0x20UL needs to become 0x100UL, and 0x1C needs to become 0xFC.
The numbers date to the older version (before rainwarrior's fixes) of the wiki (e.g.
from 2011) where it (incorrectly) claimed (8-L)*4 samples where L is stored in the 0x1C bits.
Awesome, thanks lidnariq. I'll file a GitHub issue with the Nestopia UE guy with those changes in question, and reference this thread for analysis/evidence. Edit: done --
https://github.com/rdanbrook/nestopia/issues/118Here's to hoping Richard Bannister can backport all this stuff for OS X. :\
The backporting shouldn't be necessary. Nestopia UE should build on OS X with few modifications (SDL-only mode, no GUI). Unfortunately I am not rich, and therefore don't own a Mac, but someone who does can likely get it to compile with little effort.
sorry to raise this back up but i had a question regarding something similar to this. A recent hack released uses mmc5 pcm emulation and the author states that:
"Nestopia is lacking the MMC5 PCM emulation, so the sample is not being played"
IS this something along the lines of the above issue? I did not want to make a new thread but since this is related figured i would ask here.
I don't know what would possess someone to use MMC5 PCM, other than utter novelty. It's redundant to the existing APU PCM feature, and poorly supported by emulators.
Anyhow, I'm not exactly sure what this thread is about, but if you want to report a feature request for Nestopia UE, it seems to have an issue tracker here:
https://github.com/rdanbrook/nestopia/issues
Thanks rainwarrior.
the reason why i added this here is because i was not sure if this issue is similar to the op reason for starting this thread. I am aware of nestopia UE but figured i would post this here and ask if the issue above i listed is similar to this or not. Is this something not a lot of emulators handle well or something?
here is the link for the hack, its not a rom so should be ok to post here:
http://acmlm.kafuka.org/board/thread.php?id=8211the author states that:
"During the introduction, I have a PCM sample going on (I borrowed it from Mike Tyson's Punch-Out!!) and I actually use the MMC5's PCM channel $5011, because the volume of this sample is low, and it sounds good with the bg music. (at least to me) But I encountered a problem. Nestopia is lacking the MMC5 PCM emulation, so the sample is not being played. So what I had to do, is create a separate patch, to allow $4011 (nes's PCM channel) to play the sample, but in doing this, the PCM sample is LOUD, and I don't like it, but I wanted people to experience the sample co-existing with the bg music introduction."
Divide each byte of the sample by 2, or shift it one bit to the right.
rainwarrior wrote:
I don't know what would possess someone to use MMC5 PCM, other than utter novelty. It's redundant to the existing APU PCM feature, and poorly supported by emulators.
A bit of a necro, but it sounds like it's referring to MMC5
raw PCM, which is definitely used by at least one official game (the Mahjong one, as I recall) and thus needs to be emulated.
*Spitfire_NES* wrote:
"During the introduction, I have a PCM sample going on (I borrowed it from Mike Tyson's Punch-Out!!) and I actually use the MMC5's PCM channel $5011, because the volume of this sample is low, and it sounds good with the bg music."
I was speaking directly in response to how MMC5 PCM had been used in a "recent hack" (which turned out to be infidelity's Mario All-Stars NES compilation hack). I thought this was not a good idea, and apparently so did its author, who changed this in a later revision. (Edit: I think infidelity eventually kept it in, after checking back.)
As for Shin-4-Nin Uchi Mahjong, I suppose its use there could have easily been done via the regular APU, but they didn't have to deal with emulators and their lack of support for the hardware feature.
If you're writing an emulator, sure, support it. I made an NSF test of it a while back, if it helps.
Quietust wrote:
rainwarrior wrote:
I don't know what would possess someone to use MMC5 PCM, other than utter novelty. It's redundant to the existing APU PCM feature, and poorly supported by emulators.
A bit of a necro, but it sounds like it's referring to MMC5
raw PCM, which is definitely used by at least one official game (the Mahjong one, as I recall) and thus needs to be emulated.
*Spitfire_NES* wrote:
"During the introduction, I have a PCM sample going on (I borrowed it from Mike Tyson's Punch-Out!!) and I actually use the MMC5's PCM channel $5011, because the volume of this sample is low, and it sounds good with the bg music."
Thanks for bringing this back up Quietust. I'd love to be able to get this supported in nestopia pc version and then try to submit the changes over to rdanbrook undead version. Is the relevant changes needed in the apu?