About MMC5's 2 square channels
Moderator: Moderators
-
- Posts: 130
- Joined: Mon May 25, 2009 2:20 pm
About MMC5's 2 square channels
Hello, I was wondering about something with the 2 square channels provided by MMC5 mapper. I have support for this in my game so music or sound can use them anytime. And so far i've only ever done it 1 single time with the Item Shop theme in my game. But there's something kind of weird I noticed that I dont quite understand.
Apparently these 2 squares are exactly the same as the regular NES 2 squares as mentioned on the nesdev wiki page, except a few differences.
reference:
http://wiki.nesdev.com/w/index.php/MMC5 ... .245003.29
But... something that page did not mention is that they seem to be louder than the normal squares. Why is that ?? or is that the meaning of one of those bullet points ? I've tested by playing square 1/2 channels normally ...then switched the pointers to the MMC5 ones only, and i can hear a very noticeable difference in the volume of the whole song. The MMC5 channels are like a couple "ticks" louder than the normal square's.
I checked the debugger just in case, and there is nothing wrong there. The same "volume" is writen to $4000 or $5000 reguardless.
Whats the deal with this louder volume ?? It should really be explained in the wiki page.
or is it quote "polarity of all MMC5 channels is reversed compared to the APU" ??
i dont know what that phrase means.
Apparently these 2 squares are exactly the same as the regular NES 2 squares as mentioned on the nesdev wiki page, except a few differences.
reference:
http://wiki.nesdev.com/w/index.php/MMC5 ... .245003.29
But... something that page did not mention is that they seem to be louder than the normal squares. Why is that ?? or is that the meaning of one of those bullet points ? I've tested by playing square 1/2 channels normally ...then switched the pointers to the MMC5 ones only, and i can hear a very noticeable difference in the volume of the whole song. The MMC5 channels are like a couple "ticks" louder than the normal square's.
I checked the debugger just in case, and there is nothing wrong there. The same "volume" is writen to $4000 or $5000 reguardless.
Whats the deal with this louder volume ?? It should really be explained in the wiki page.
or is it quote "polarity of all MMC5 channels is reversed compared to the APU" ??
i dont know what that phrase means.
Last edited by kuja killer on Mon Dec 21, 2020 4:42 am, edited 1 time in total.
Re: About MMC5's 2 square channels
Why do you think that FCEUX is emulating the volume accurately?
-
- Posts: 130
- Joined: Mon May 25, 2009 2:20 pm
Re: About MMC5's 2 square channels
i wasnt asking about the emu specifically. but uhhh, what do you mean ?? that fceux does it wrong ?
Re: About MMC5's 2 square channels
How loud expansion sound is, is a very complex topic ! It depends on the resistors on the cartridges, and, if you use a western NES with a modified adapter, how the NES and the adapter were modified to add extension sound.
Also even on original Famicom it will very from the very model of Famicom you use.
Various emulators have various strategies when it comes to emulating loudness of expansion sound.
Also even on original Famicom it will very from the very model of Famicom you use.
Various emulators have various strategies when it comes to emulating loudness of expansion sound.
Useless, lumbering half-wits don't scare us.
Re: About MMC5's 2 square channels
FCEUX is not a particularly accurate emulator overall, but even if that wasn't the case, you generally shouldn't take things you observe in emulators as facts. Expansion audio in particular is an aspect that can be affected by several factors, so unless you have a real MMC5 cartridge and a few different consoles to run tests on, it'll be hard to tell what the volume is actually like in real situations.
-
- Posts: 130
- Joined: Mon May 25, 2009 2:20 pm
Re: About MMC5's 2 square channels
huh i see. Yea i dont have an real nes/famicom or anything like that so i wouldn't know in person.
Re: About MMC5's 2 square channels
The other thing you asked about:
If you play almost the same pitch at the same time at the same volume etc, you will instead get something that sounds like the C64 SID "phasing"/"PWM" sound.
Means that if you play the same pitch at the same time, at the same volume, and the same duty %, on both an internal and external pulse channel, that it will mysteriously be very quiet instead.kuja killer wrote: ↑Sun Dec 20, 2020 11:18 pm "polarity of all MMC5 channels is reversed compared to the APU" ??
i dont know what that phrase means.
If you play almost the same pitch at the same time at the same volume etc, you will instead get something that sounds like the C64 SID "phasing"/"PWM" sound.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: About MMC5's 2 square channels
Because they're not louder, on any MMC5 cartridge I've measured. However, the parts used aren't exactly high precision, and I'm sure some MMC5 carts are a little louder or a little quieter than others.kuja killer wrote: ↑Sun Dec 20, 2020 11:18 pmBut... something that page did not mention is that they seem to be louder than the normal squares. Why is that ??
If you're talking about a cartridge you have, I'd love an extra point of data to consider, but if you're just asking about an emulator I think lidnariq already made the point that your question is really about the emulator not the MMC5.
Just means that they're inverted. Upside down. If you use the narrow pulse on the 2A03, the narrow part sticks "up" in voltage. On the MMC5 the narrow part sticks "down".kuja killer wrote: ↑Sun Dec 20, 2020 11:18 pmor is it quote "polarity of all MMC5 channels is reversed compared to the APU" ??
i dont know what that phrase means.
Re: About MMC5's 2 square channels
And if you generate similar sounds in sync (one channel "sticks up" as much as another "sticks down"), they cancel each other, resulting in silence.rainwarrior wrote: ↑Mon Dec 21, 2020 3:07 pmJust means that they're inverted. Upside down. If you use the narrow pulse on the 2A03, the narrow part sticks "up" in voltage. On the MMC5 the narrow part sticks "down".
-
- Posts: 130
- Joined: Mon May 25, 2009 2:20 pm
Re: About MMC5's 2 square channels
Oh okay. didn't know. well again i wasn't meaning to actually ask about fceux specifically. It just is the main one i use to develop my megaman romhack with since day 1, and i was kinda concerned why it seemed those MMC5 squares were playing louder for some reason than the normal squares. I didnt ever mess with the sound settings or anything like that, on the emu.rainwarrior wrote: ↑Mon Dec 21, 2020 3:07 pm Because they're not louder, on any MMC5 cartridge I've measured. However, the parts used aren't exactly high precision, and I'm sure some MMC5 carts are a little louder or a little quieter than others.
If you're talking about a cartridge you have, I'd love an extra point of data to consider, but if you're just asking about an emulator I think lidnariq already made the point that your question is really about the emulator not the MMC5.
So guess it's just fceux the problem itself then. Did not know. And as i said i dont own a NES or any carts or anything. so i cant test my game in real-life. I wish i could though
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: About MMC5's 2 square channels
FWIW if you actually built your own famicom carts for this, you could set the mix balance however you want with the resistors placed on the board.
Re: About MMC5's 2 square channels
try it in a variety of emus and see what happens. Even if the target is real NES hardware, most stuff gets run on emulators more anyways. If it sounds good in other emulators it might just be a fluke with FCEUXkuja killer wrote: ↑Mon Dec 21, 2020 8:17 pm So guess it's just fceux the problem itself then. Did not know. And as i said i dont own a NES or any carts or anything. so i cant test my game in real-life. I wish i could though
Re: About MMC5's 2 square channels
The internal and MMC5 pulse channels should stay in sync because they are both derived from the CPU clock. Do we know if the phase offset between the 2 is predictable? They restart their phase when the most significant part of the frequency is written to like the internal ones I think, don't they?
I have also wondered a similar thing along these lines. With the internal pulse channels, care must be taken not to write to the most significant frequency bits during vibratos because it will reset the phase at each write, creating an undesirable artifact. The workaround involves using the sweep register to change the most significant part without resetting the phase.
Since the MMC5 appears to have zero support for sweep, I am wondering, do we know for sure that the MMC5 restart the phase like that? And if so, is there therefore no known workaround for vibrato artifacts?
Re: About MMC5's 2 square channels
Pedantically predictable, yes, but quickly out of scope for the 2A03. You can take advantage of the phase reset to put them at a known phase alignment using timed code.
Musically, however, I've never heard anyone deliberately use cancellation, as opposed to the "subtly out of tune" PWM sound.
I believe the wiki is Rainwarrior's notes, so I trust them completely.Since the MMC5 appears to have zero support for sweep, I am wondering, do we know for sure that the MMC5 restart the phase like that? And if so, is there therefore no known workaround for vibrato artifacts?
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: About MMC5's 2 square channels
Yes, the MMC5 resets phase with the register that writes the high bits of period. This is explicitly mentioned on the wiki.
No, there's no sweep workaround with no sweep unit available.
No, there's no sweep workaround with no sweep unit available.