$4011 vs MMC5 $5011 for PCM streaming?
Moderator: Moderators
$4011 vs MMC5 $5011 for PCM streaming?
Taking a look at the MMC5 spec, I noticed among other useful features (like large window PRG-RAM banks) was an 8 bit PCM channel, similar to $4011, only with 8 bits vs $4011's 7 bits, and also with the ability to directly read from memory which looks like it may save a few clock cycles
Are there drawbacks to using MMC5 $5011? Does it require modding a powerpak for use? is it widely supported among emulators? Obviously using MMC5 would make it hard to put on a regular cart, though the RAM features alone are pretty appealing. Reading the wiki it sounds like this channel may not be as loud as 4011 anyways, or have some other issues when mixed with the main NES audio? Looking at the past forum topics, it seems like everyone feels $5011 has no advantage, but it seems like all things being equal, allowing twice as much dynamic range is still a fairly big advantage.
Are there drawbacks to using MMC5 $5011? Does it require modding a powerpak for use? is it widely supported among emulators? Obviously using MMC5 would make it hard to put on a regular cart, though the RAM features alone are pretty appealing. Reading the wiki it sounds like this channel may not be as loud as 4011 anyways, or have some other issues when mixed with the main NES audio? Looking at the past forum topics, it seems like everyone feels $5011 has no advantage, but it seems like all things being equal, allowing twice as much dynamic range is still a fairly big advantage.
Re: $4011 vs MMC5 $5011 for PCM streaming?
The auto-read is basically unusable, unfortunately. You have to somehow tickle a read from the relevant memory region only when you want to, and not otherwise, and at best you save 4cy on a write to $5011.frantik wrote: ↑Thu Dec 10, 2020 2:09 pm Taking a look at the MMC5 spec, I noticed among other useful features (like large window PRG-RAM banks) was an 8 bit PCM channel, similar to $4011, only with 8 bits vs $4011's 7 bits, and also with the ability to directly read from memory which looks like it may save a few clock cycles
If they'd made it so that the 1KB of MMC5-internal RAM could have been used as a FIFO to it, that would have been a game-changer. Unfortunately, they didn't.
That the hardware assist isn't useful is pretty big in terms of actual games. You're basically constrained to using the MMC5 scanline IRQ, the DPCM IRQ, or timed code. (The MMC5A's cycle-timed IRQ wasn't documented until last year)Are there drawbacks to using MMC5 $5011?
You're right that it's strictly better than $4011 in terms of raw streaming capabilities, especially in combination with not also serving as a volume control on the triangle and noise channels.
Same as any other expansion audio.Does it require modding a powerpak for use?
The answer at least used to be "no" but that might have changed. Because it's so inconvenient to use, I think only one commercial game used it.is it widely supported among emulators?
Re: $4011 vs MMC5 $5011 for PCM streaming?
For my drum machine, I'm already dedicating a 16kb bank to samples, so reading from this area only during sample playback is no problem. And saving 4 clocks is actually useful when you've only got 81 total to work with. But it does seem like they could have implemented it in a better waylidnariq wrote: ↑Thu Dec 10, 2020 2:29 pmThe auto-read is basically unusable, unfortunately. You have to somehow tickle a read from the relevant memory region only when you want to, and not otherwise, and at best you save 4cy on a write to $5011.frantik wrote: ↑Thu Dec 10, 2020 2:09 pm Taking a look at the MMC5 spec, I noticed among other useful features (like large window PRG-RAM banks) was an 8 bit PCM channel, similar to $4011, only with 8 bits vs $4011's 7 bits, and also with the ability to directly read from memory which looks like it may save a few clock cycles
If they'd made it so that the 1KB of MMC5-internal RAM could have been used as a FIFO to it, that would have been a game-changer. Unfortunately, they didn't.
hmm I may have to give it a try sometime, though the powerpak modding and poor emulator support seem like turn offs. But especially if I get synths working in addition to samples, being able to use triangle without affecting volume would be cool. And even if i still use 4011, being able manipulate samples in RAM would be a very desirable feature of MMC5That the hardware assist isn't useful is pretty big in terms of actual games. You're basically constrained to using the MMC5 scanline IRQ, the DPCM IRQ, or timed code. (The MMC5A's cycle-timed IRQ wasn't documented until last year)Are there drawbacks to using MMC5 $5011?
You're right that it's strictly better than $4011 in terms of raw streaming capabilities, especially in combination with not also serving as a volume control on the triangle and noise channels.
Same as any other expansion audio.Does it require modding a powerpak for use?
The answer at least used to be "no" but that might have changed. Because it's so inconvenient to use, I think only one commercial game used it.is it widely supported among emulators?
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: $4011 vs MMC5 $5011 for PCM streaming?
...except no existing PowerPak MMC5 mapper implements it.
I don't think the advantage is that large. Yes, it can go louder, but $4011 PCM isn't exactly suffering from being too quiet. Otherwise the difference in quality between 7-bit and 8-bit audio is negligible.
All things are not equal, for reasons already mentioned. Poor hardware support. Poor emulator support. Etc.
I agree that's a useful property.
Re: $4011 vs MMC5 $5011 for PCM streaming?
ah well then it's not really worth even bothering with if it can't easily be implemented on the real thing. And the volume being affected on the triangle can also be a good thing if it's desired...rainwarrior wrote: ↑Thu Dec 10, 2020 2:58 pm ...except no existing PowerPak MMC5 mapper implements it.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: $4011 vs MMC5 $5011 for PCM streaming?
This is actually pretty significant. $5011 vs. $4011 completely aside, MMC5 probably has the best support of any mapper for large PRG-RAM.
Emulator support for that varies, but it's a good interface for it at least. I made a test ROM in case you want to investigate its viability.
Re: $4011 vs MMC5 $5011 for PCM streaming?
Thanks, I'll check out that test ROM. The huge ram bank windows of MMC5 would allow for some fun stuff like mixing two samples, reversing, volume manipulation, bit crushing, etcrainwarrior wrote: ↑Thu Dec 10, 2020 3:14 pmThis is actually pretty significant. $5011 vs. $4011 completely aside, MMC5 probably has the best support of any mapper for large PRG-RAM.
Emulator support for that varies, but it's a good interface for it at least. I made a test ROM in case you want to investigate its viability.
Re: $4011 vs MMC5 $5011 for PCM streaming?
Everdrive N8 Pro (Famicom) supports MMC5 audio.
nesdoug.com -- blog/tutorial on programming for the NES
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: $4011 vs MMC5 $5011 for PCM streaming?
Does it support MMC5 PCM or just the squares?
Re: $4011 vs MMC5 $5011 for PCM streaming?
I can't find any technical information. I don't own one. Maybe next year I will get one.
nesdoug.com -- blog/tutorial on programming for the NES
Re: $4011 vs MMC5 $5011 for PCM streaming?
I don't have the PRO either, but it looks like it was made open-source.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: $4011 vs MMC5 $5011 for PCM streaming?
Seems to be code there for the PCM channel. That's nice at least, sounds like N8 Pro actually makes MMC5 PCM accessible.
Re: $4011 vs MMC5 $5011 for PCM streaming?
That is good to know at least it's feasible to get it working some real hardware
A crazy idea i had just now.. I wonder if you could output to both 4011 and 5011 and have it output an even louder signal.. maybe some kind of poorman's 16 bit? probably get some clipping somewhere i bet especially on emulators
A crazy idea i had just now.. I wonder if you could output to both 4011 and 5011 and have it output an even louder signal.. maybe some kind of poorman's 16 bit? probably get some clipping somewhere i bet especially on emulators
Re: $4011 vs MMC5 $5011 for PCM streaming?
We've floated that idea before, but the problem is that it'd probably require calibration on each individual console that it's used on.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: $4011 vs MMC5 $5011 for PCM streaming?
If you want to make it 50% louder, you can send the same value to both (inverted on one).
If you want to increase bit depth, if you could rely on MMC5 chips having a very consistent output volume (which you can't, but hypothetically if you could) I guess theoretically you could figure out a big table of all possible output levels and it'd have a few more bits of depth. "16-bit" is probably a massive stretch, I'd guess more like 9 or 10 at best. However, it's only hypothetical because this is actually impossible due to the inconsistency of both the 2A03 and MMC5 mixing.
However, if you want to produce extra bit fidelity, you could also jitter the values up and down in some sort of PWM/dither scheme, at the cost of a more dense output loop. (This is not an MMC5 specific idea, $4011 can do the same.)
I think someone proposed a method of playing DPCM samples while playing PCM to do fine manipulations like that, which is a method that might play nicely with an IRQ approach. I can't find the thread for that one at the moment though.
Edit: I think this was the DPCM + PCM method I was thinking of:
http://forums.nesdev.com/viewtopic.php?f=2&t=20014
If you want to increase bit depth, if you could rely on MMC5 chips having a very consistent output volume (which you can't, but hypothetically if you could) I guess theoretically you could figure out a big table of all possible output levels and it'd have a few more bits of depth. "16-bit" is probably a massive stretch, I'd guess more like 9 or 10 at best. However, it's only hypothetical because this is actually impossible due to the inconsistency of both the 2A03 and MMC5 mixing.
However, if you want to produce extra bit fidelity, you could also jitter the values up and down in some sort of PWM/dither scheme, at the cost of a more dense output loop. (This is not an MMC5 specific idea, $4011 can do the same.)
I think someone proposed a method of playing DPCM samples while playing PCM to do fine manipulations like that, which is a method that might play nicely with an IRQ approach. I can't find the thread for that one at the moment though.
Edit: I think this was the DPCM + PCM method I was thinking of:
http://forums.nesdev.com/viewtopic.php?f=2&t=20014