MMC5 pulse channels
Moderator: Moderators
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
MMC5 pulse channels
I have a few questions about the MMC5 pulse channels. The wiki seems to suggest they behave identical to the APU pulse channels but without hardware sweep.
1. How are the envelope and length counter clocked? Are they tied to the APU frame counter somehow, or does the MMC5 have its own frame counter substitute? If it uses its own frame counter, when is it clocked and can it be reset like the APU frame counter? Is there a register at $5017?
2. Does the condition still apply that a frequency of less than 8 is silenced?
3. Do the MMC5 pulse channels phase reset when you write the high frequency bits?
I haven't run into any MMC5 NSFs that appear to be using the envelope or length counter (and some emulators don't seem to implement them), so it's really hard to figure out what should happen here; I'm not entirely certain the MMC5 pulse channels are even supposed to have an envelope or length counter. Many of the few MMC5 games don't seem to even use its audio features.
1. How are the envelope and length counter clocked? Are they tied to the APU frame counter somehow, or does the MMC5 have its own frame counter substitute? If it uses its own frame counter, when is it clocked and can it be reset like the APU frame counter? Is there a register at $5017?
2. Does the condition still apply that a frequency of less than 8 is silenced?
3. Do the MMC5 pulse channels phase reset when you write the high frequency bits?
I haven't run into any MMC5 NSFs that appear to be using the envelope or length counter (and some emulators don't seem to implement them), so it's really hard to figure out what should happen here; I'm not entirely certain the MMC5 pulse channels are even supposed to have an envelope or length counter. Many of the few MMC5 games don't seem to even use its audio features.
Re: MMC5 pulse channels
For one thing, the best known MMC5 game uses MMC5 probably because Konami found that cheaper than getting VRC6 certified by NOA. For another, no 72-pin games use the audio features, and this best known MMC5 game is 72-pin only.rainwarrior wrote:Many of the few MMC5 games don't seem to even use its audio features.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Yeah I wouldn't expect it from 72-pin MMC5 games. I'm coming from an NSF player perspective, so it's possible some of these games might be using the MMC5 channels exclusively for sound effects.
NSFs that are labelled MMC5 on Zophar.net:
- Ishin no Arashi
- Gun Sight
- Bandit Kings of Ancient China
- Uchuu Keibi Tai SDF
- Shin 4-Nin Uchi Mahjong
- Romance of the Three Kingdoms 2
- Nobunaga's Ambition 2
- Metal Slader Glory
- Just Breed
Just Breed and Shin 4-Nin Uchi Mahjong use MMC5 channels for music. Metal Slader Glory does not, but the NSF contains a large number of sound effects that use mostly MMC5. Uchuu Keibi Tai SDF and Gun Sight have sound effects in the NSF but they are 2A03 only (as is the music). The rest don't use them for music and don't contain sound effects in the NSF. Ishin no Arashi seems to overflow the stack on NSFPlay (not sure why yet) but plays on VirtuaNSF with no MMC5 channels used.
So anyhow, that's a grand total of 3 games I know of that used the MMC5 audio. Not a great sample size. None of them appear to be using the envelope or length counter.
On another note, is it possible to mod a 72-pin MMC5 cart to output audio, or will I need to find a Famicom cart if I want to try and test this? (Or does anyone out there have an MMC5 they can test for me?)
NSFs that are labelled MMC5 on Zophar.net:
- Ishin no Arashi
- Gun Sight
- Bandit Kings of Ancient China
- Uchuu Keibi Tai SDF
- Shin 4-Nin Uchi Mahjong
- Romance of the Three Kingdoms 2
- Nobunaga's Ambition 2
- Metal Slader Glory
- Just Breed
Just Breed and Shin 4-Nin Uchi Mahjong use MMC5 channels for music. Metal Slader Glory does not, but the NSF contains a large number of sound effects that use mostly MMC5. Uchuu Keibi Tai SDF and Gun Sight have sound effects in the NSF but they are 2A03 only (as is the music). The rest don't use them for music and don't contain sound effects in the NSF. Ishin no Arashi seems to overflow the stack on NSFPlay (not sure why yet) but plays on VirtuaNSF with no MMC5 channels used.
So anyhow, that's a grand total of 3 games I know of that used the MMC5 audio. Not a great sample size. None of them appear to be using the envelope or length counter.
On another note, is it possible to mod a 72-pin MMC5 cart to output audio, or will I need to find a Famicom cart if I want to try and test this? (Or does anyone out there have an MMC5 they can test for me?)
Using the pinout at the wiki and images of a Famicom and NES MMC5 board, it looks like they actually left in place the unpopulated holes for audio on NES boards. So it seems you just need 3 resistors and 3 capacitors, and the values are silkscreened on the PCB.rainwarrior wrote:On another note, is it possible to mod a 72-pin MMC5 cart to output audio, or will I need to find a Famicom cart if I want to try and test this? (Or does anyone out there have an MMC5 they can test for me?)
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Alright, I've answered my own questions.
It does have envelope and length counters, they work the same as APU except the length counter runs twice as fast. $5017/$4017 seems to have no effect on them.
Phase reset does happen like with the APU.
Square channels are never silenced because of their frequency values, unlike the APU.
It does have envelope and length counters, they work the same as APU except the length counter runs twice as fast. $5017/$4017 seems to have no effect on them.
Phase reset does happen like with the APU.
Square channels are never silenced because of their frequency values, unlike the APU.
Last edited by rainwarrior on Wed May 16, 2012 6:04 pm, edited 1 time in total.
@rainwarrior
Is MMC5 audio popular among Famitracker tunes? I'd like to add MMC5 audio support, but would need a few NSFs.
Is MMC5 audio popular among Famitracker tunes? I'd like to add MMC5 audio support, but would need a few NSFs.
Zepper
RockNES author
RockNES author
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Zepper you can make MMC5 tunes with Famitracker. It's probably the least popular expansion after 5B (which isn't supported by Famitracker yet, and most players don't support all its features). I only ever used it once, personally, and that was because I wanted 4 identical channels for a string quartet: http://www.youtube.com/watch?v=_vbBFzhFkXQ
There were a few entries using MMC5 at the last FamiCompo Mini, and there are a bunch of MMC5 Famitracker modules if you search the forums. Coincidentally, there's a demo compo running currently specifically for MMC5, though it won't finish for a few weeks: http://famitracker.com/forum/posts.php?page=1&id=3481
There are no NSFs I know of that use MMC5s envelope, or length counter, other than the test I posted in my expansion audio thread. Since I implemented its PCM channel in NSFPlay there have been a few tests of that. You can't use envelope or length counter in Famitracker either, so it won't help you test that. If you implement MMC5 with no PCM, envelope, or length counter, you'd still be able to play any existing game NSFs that I know of fine (though there are some extra non-audio bits in there to implement like a multiply register and some extra ram, etc. that's all in the NSF spec document).
There were a few entries using MMC5 at the last FamiCompo Mini, and there are a bunch of MMC5 Famitracker modules if you search the forums. Coincidentally, there's a demo compo running currently specifically for MMC5, though it won't finish for a few weeks: http://famitracker.com/forum/posts.php?page=1&id=3481
There are no NSFs I know of that use MMC5s envelope, or length counter, other than the test I posted in my expansion audio thread. Since I implemented its PCM channel in NSFPlay there have been a few tests of that. You can't use envelope or length counter in Famitracker either, so it won't help you test that. If you implement MMC5 with no PCM, envelope, or length counter, you'd still be able to play any existing game NSFs that I know of fine (though there are some extra non-audio bits in there to implement like a multiply register and some extra ram, etc. that's all in the NSF spec document).
Re: MMC5 pulse channels
Metal Slader Glory does use the MMC5 pulse channels for a few music tracks. Not guaranteeing this is an exhaustive list, but MMC5 audio is used for at least the following music tracks: 10, 32, 45. For reference, the specific NSF used was from zophar.net:
http://www.zophar.net/download_file/25827
204,928 bytes
2014-02-25 021132 UTC (might be one hour off)
MD5: 121c29ee5e5cf5625dfcc3a47a998183
SHA-1: 3504fa24bc18c4ffcd9cba0cac7aadc8f44373b4
http://www.zophar.net/download_file/25827
204,928 bytes
2014-02-25 021132 UTC (might be one hour off)
MD5: 121c29ee5e5cf5625dfcc3a47a998183
SHA-1: 3504fa24bc18c4ffcd9cba0cac7aadc8f44373b4