EverDrive N8 alleged mapper inaccuracies

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

tepples
Posts: 22018
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

EverDrive N8 alleged mapper inaccuracies

Post by tepples » Sat Mar 21, 2020 10:40 am

Blue Mario on the FamiTracker.org Discord server provided a list of observed inaccuracies in the EverDrive N8 and EverDrive N8 Pro.


Everdrive N8/N8 Pro Expansion Audio and Mapper Bugs/inaccuracies

General:
  • Bus conflicts don't work, anything relating to the hardware relying on it just doesn't function correctly.
  • Features not used/rarely used are often unimplemented/not working, each chip will have it's own extra detail on what does and doesn't work.
VRC6:
  • Mostly accurate, up until you distort the sawtooth wave using the extra volume capabilities.
  • Most pulse waves seem to be off by around 1-2%.
FDS:
  • Modulation is broken, sometimes it tries to work, but doesn't.
  • Lowpass isn't emulated.
  • FDS BIOS uses a special custom BIOS instead, which doesn't work with some unlicensed titles (namely the Super PIG games)
5B:
  • Other sound modes (noise, envelope) don't work and as such, can't be combined with others to make different sounds. Using values to mix tone and one of the other two features or using an unused feature by itself produces nothing.
  • Analogue output isn't emulated, but it is approximated, by sampling the 5B squares at a ridiculous 50 MHz. (50 000 000 Hz, more than the 96 000 Hz or 44 100 Hz of most .wav files)
MMC5:
  • Pulses are not inverted.
  • PCM is missing the eighth bit, making it essentially a clone of the 7-bit PCM feature of the stock 2A03.
VRC7:
  • Patches use approximations of the real chip, so anything using the expansion audio doesn't work by default.
  • Custom patches suffer from high feedback.
N163:
  • Multiplexer hiss from 5+ channels isn't present.
  • Wave sizes past 32 aren't supported.
Additional:
  • Proprietary PCM chips do not work.
  • N8 Pro spams $00 writes to DPCM, leading to lots and lots of DPCM bugs.

User avatar
Ben Boldt
Posts: 563
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: EverDrive N8 alleged mapper inaccuracies

Post by Ben Boldt » Sat Mar 21, 2020 12:03 pm

tepples wrote:
Sat Mar 21, 2020 10:40 am
N163:
  • Wave sizes past 32 aren't supported.
I have never seen ANYTHING other than a real Namco-163 chip that supports this. I think this is partially because our Wiki needs refinement.

Also, I have noticed that, just looking visually at the sound wave produced in 4-channel mode, the real Namco-163 is very balanced and well-centered, and emulators show a lot of very jerky DC offset stuff going on, audible as extra pops everywhere. I think we have a future task to really define precisely how that chip works.

Pokun
Posts: 1492
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: EverDrive N8 alleged mapper inaccuracies

Post by Pokun » Sat Mar 21, 2020 2:07 pm

For me nothing expansion audio ever works as it should, so I avoid playing any such games on the Everdrive (besides I have many of those games).

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by rainwarrior » Sat Mar 21, 2020 2:40 pm

Ben Boldt wrote:
Sat Mar 21, 2020 12:03 pm
I have never seen ANYTHING other than a real Namco-163 chip that supports this. I think this is partially because our Wiki needs refinement.
No, the source of that misunderstanding is Goroh's document from 1997, which many older emulators based their implementation on. The wiki has been quite clear that the length register is 6 bits wide for about 8 years now. PowerPak's implementation has the excuse that it's older than this. If Everdrive has an excuse, it's because it's based on older documents or implementation, not the wiki.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by rainwarrior » Sat Mar 21, 2020 2:45 pm

tepples wrote:
Sat Mar 21, 2020 10:40 am
Analogue output isn't emulated, but it is approximated, by sampling the 5B squares at a ridiculous 50 MHz. (50 000 000 Hz, more than the 96 000 Hz or 44 100 Hz of most .wav files)
What exactly are you trying to ridicule here? It's unclear to me what problem this causes that you're describing.
tepples wrote:
Sat Mar 21, 2020 10:40 am
Multiplexer hiss from 5+ channels isn't present.
Good. Nobody needs that. :P


Maybe worth pointing out that a lot of things on that list are irrelevant to extant games and only matter for homebrew music that wants to make use of features no game ever did, e.g. 5B noise or envelope. I don't really want to through every point right now, but I just want it clear that much of that list is irrelevant to people not doing new experiments with the sound hardware.

User avatar
Ben Boldt
Posts: 563
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: EverDrive N8 alleged mapper inaccuracies

Post by Ben Boldt » Sat Mar 21, 2020 8:26 pm

rainwarrior wrote:
Sat Mar 21, 2020 2:40 pm
Ben Boldt wrote:
Sat Mar 21, 2020 12:03 pm
I have never seen ANYTHING other than a real Namco-163 chip that supports this. I think this is partially because our Wiki needs refinement.
No, the source of that misunderstanding is Goroh's document from 1997, which many older emulators based their implementation on. The wiki has been quite clear that the length register is 6 bits wide for about 8 years now. PowerPak's implementation has the excuse that it's older than this. If Everdrive has an excuse, it's because it's based on older documents or implementation, not the wiki.
I stand corrected. Is there an emulator that does this properly that you know of? I put a lot of work into the music scores for a Namco-163 version of Final Fantasy and I found that my cartridge sounded great, very smooth, and the waveform looked great. When I play it with several different emulators, I do have a lot of extra pops and much uglier waveform than the real chip -- drastically different looking. Back when I first started working on that hack, I had wanted to use some samples longer than 32 and they did not work correctly on any emulator I tried. If I could find a good emulator for this, I might go back and revisit that using better samples. It is pretty close to complete as it is. I got derailed from it when I did all of that MMC5 stuff...

tepples
Posts: 22018
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by tepples » Sat Mar 21, 2020 8:55 pm

As far as I'm aware from my interactions with the FamiTracker Discord, the Namco 163 audio emulation in rainwarrior's NSFPlay should be pretty good. As for emulators that take .nes format (not .nsf format), I haven't done much testing myself.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by rainwarrior » Sat Mar 21, 2020 11:12 pm

I haven't had a habit of testing emulators for audio accuracy, so I don't really know who gets N163 right, but I'd assume Mesen does at the very least (or if it doesn't, might next week if you point it out now ;) ). The one game that demonstrates this easily is Rolling Thunder, which needs it for some bass tones in its first level.

User avatar
Memblers
Site Admin
Posts: 3861
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by Memblers » Sun Mar 22, 2020 4:05 am

I have a Famicom EverDrive (older version), and the expansion audio has problems. It's there, but it's almost entirely drowned out by the 2A03. Impedance mismatch or something? It's my only complaint with this otherwise great cart, though. It's worth knowing, if one wants to get an FC version for whatever reason. Hopefully fixed in the Pro, I don't know.

bunder
Posts: 11
Joined: Fri Nov 23, 2012 2:20 am

Re: EverDrive N8 alleged mapper inaccuracies

Post by bunder » Sun Mar 22, 2020 5:44 am

I don't have a way to confirm or deny but I've seen reports on krikzz's forum that the pro might have issues on HDMI modded consoles

User avatar
Ben Boldt
Posts: 563
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: EverDrive N8 alleged mapper inaccuracies

Post by Ben Boldt » Sun Mar 22, 2020 9:49 am

rainwarrior wrote:
Sat Mar 21, 2020 11:12 pm
I haven't had a habit of testing emulators for audio accuracy, so I don't really know who gets N163 right
I didn't test many myself either, just a few.

Confirming that Mesen is better than FCEUx at keeping the waveform centered. I have not tested samples longer than 32 on Mesen.

FCEUX:
n163_FCEUX.png

Mesen:
n163_Mesen.png

Richard Bannister's port of Nestopia on Macintosh (by far the worst):
n163_nestopia.png

Source waveform shown highlighted green:
Namcot-Table-0.png
Namcot-Table-0.png (860 Bytes) Viewed 2994 times

If you look carefully, you can also tell that the source waveform shape is flipped vertically on FCEUx. Not sure which is right, also not sure if the real thing gets flipped by the console between exiting the cart and exiting the console. The mesen one is a little stretched wider because it records WAV audio at 48khz versus fceux recording at 44.1kHz.

User avatar
rainwarrior
Posts: 7824
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by rainwarrior » Sun Mar 22, 2020 1:43 pm

Ben Boldt wrote:
Sun Mar 22, 2020 9:49 am
f you look carefully, you can also tell that the source waveform shape is flipped vertically on FCEUx. Not sure which is right, also not sure if the real thing gets flipped by the console between exiting the cart and exiting the console
There isn't a correct answer for a single channel like that. Esp. with different amplifier processes between various models, Famicom vs. NES vs. Twin etc. there's often arbitary inversions going on. The overall polarity doesn't really matter for an emulator, only the relative polarity of channels during mixing has an audible effect.

Play N163 vs 2A03 with two easily orientable waveforms (e.g. narrow pulse, or saw) and you can see if the polarity is matched or opposite.

Emulators often get polarities flipped, esp. with expansion audio. Before I took over NSFPlay, I think it actually arbitrarily inverted every second N163 channel as a sensible way to improve the signal headroom. Once again, it's one of these issues that doesn't actually make an appreciable difference in any existing game. Matters when you start doing new experiments and want to phase cancel or something.

I've been keeping a collection of audio test ROMs, BTW. Some of these do things that would verify polarity but I don't think there are any explicit tests for it, but there's no end to the things you could write specific tests for. IIRC, MMC5 is the only one that has an inverted polarity relative to the 2A03, and everything else is the same polarity (i.e. positive number = positive output across the board), but what I'd really defer to is NSFPlay, because I've definitely verified the polarity of its output against hardware recordings for everything it implements. Unfortunately not every test I've ever done is archived, but that's why I started keeping this collection:

https://github.com/bbbradsmith/nes-audio-tests
Last edited by rainwarrior on Sun Mar 22, 2020 3:37 pm, edited 1 time in total.

naI
Posts: 113
Joined: Fri Jun 26, 2009 4:58 pm

Re: EverDrive N8 alleged mapper inaccuracies

Post by naI » Sun Mar 22, 2020 3:15 pm

Memblers wrote:
Sun Mar 22, 2020 4:05 am
I have a Famicom EverDrive (older version), and the expansion audio has problems. It's there, but it's almost entirely drowned out by the 2A03. Impedance mismatch or something? It's my only complaint with this otherwise great cart, though. It's worth knowing, if one wants to get an FC version for whatever reason. Hopefully fixed in the Pro, I don't know.
One of the main attractions of the Pro is the fact that is has a proper op-amp to mix the expansion audio to the right levels without clipping.

tepples
Posts: 22018
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: EverDrive N8 alleged mapper inaccuracies

Post by tepples » Sun Mar 22, 2020 5:27 pm

And what a lot of older emulators didn't emulate is that if I remember correctly, the N163's volume control fades toward 8, not 0. Given that there are 15 volume levels and 15 M2 cycles per full cycle of the N163 WSG, my pet theory is that it uses the volume register to control a pulse width modulator that switches a 4-bit DAC's input between the waveform value and 8.

For example, if the current waveform value is 3 and the volume is 11, it outputs
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8, 8, 8

Or if the current waveform value is 14 and the volume is 2, it outputs
14, 14, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8

User avatar
Ben Boldt
Posts: 563
Joined: Tue Mar 22, 2016 8:27 pm
Location: Minnesota, USA

Re: EverDrive N8 alleged mapper inaccuracies

Post by Ben Boldt » Sun Mar 22, 2020 9:36 pm

tepples wrote:
Sun Mar 22, 2020 5:27 pm
And what a lot of older emulators didn't emulate is that if I remember correctly, the N163's volume control fades toward 8, not 0. Given that there are 15 volume levels and 15 M2 cycles per full cycle of the N163 WSG, my pet theory is that it uses the volume register to control a pulse width modulator that switches a 4-bit DAC's input between the waveform value and 8.

For example, if the current waveform value is 3 and the volume is 11, it outputs
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8, 8, 8, 8

Or if the current waveform value is 14 and the volume is 2, it outputs
14, 14, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
Do you suppose this could be visible if we were to directly probe pin 1 audio output of the Namco-163? Or would that already be coming out sufficiently low-passed to obscure it?

Edit:
To be clear, I have never looked at it before, just wondering if any of us think we could benefit from seeing it.

Post Reply