Guys give me suggestions: VRC7 vs N163?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

w7n
Posts: 10
Joined: Wed May 15, 2013 9:33 am

Guys give me suggestions: VRC7 vs N163?

Post by w7n »

I initially chose VRC7 for my hack because of its advanced sound, but now I find that I can likely handle N163 sounds even better, so I'm considering switching to it. The problem is though, are there any features present in VRC7 that is not present in N163? I haven't found such features.
Also, how is the emulation of 4-screen mirroring in N163?
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Guys give me suggestions: VRC7 vs N163?

Post by lidnariq »

VRC7's IRQ works differently. VRC7 has 6 voices of 2-op FM synthesis; N163 has up to 8 (but you should probably stop at 6) voices of wavetable synthesis.

I wouldn't count on any emulator to handle 4-screen mirroring with the N163 correctly. Honestly, it's not even clear what "correctly" means in the context of an emulator.

Extra details:
The N163's banking control registers can address up to 288 KiB of CHR memory, in two separate ICs (one, maximum 256 KiB; the other, maximum 32 KiB). All existing cartridges always use the NES's built-in nametable memory in the 32 KiB slot.

The N163 is fairly unique in that it makes almost no distinction between nametable and pattern table addresses: there are twelve banking registers, and they can put almost any 1KiB bank of memory in any of the twelve banks.

One could easily replace (or augment) the 2 KiB of NES CIRAM with an 8 or 32 KiB RAM on the cartridge, providing more than enough RAM to do this. However, whether that extra memory is used for CHR-RAM or nametables is entirely a function of what the program does as it executes.

TL;DR: It's not clear what the "4-screen mirroring bit" in the iNES header means in the context of the N163.
A NES 2.0 header that specified both CHR-RAM and CHR-ROM is more obvious, but I don't think any emulators support that.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Guys give me suggestions: VRC7 vs N163?

Post by Dwedit »

I'd assume "4 screen" on N163 just means treat it as if there's 4K of RAM hardwired to the name table memory and ignore any banking.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Guys give me suggestions: VRC7 vs N163?

Post by lidnariq »

But that's not supported by the hardware. We're talking about the behavior that's defined by approximately 5 games and trying to extrapolate it to things where it doesn't really make sense.

Alternatively, to look at another way: the four-screen layout flag is well-defined when the hardware connects PPU /A13 to CIRAM /CE: there it always means one of "disable the 2 KiB NTRAM and add 4 to 8 KiB of RAM instead" or "selectively enable the 2 KiB NTRAM and add 2 KiB of RAM over the rest of the address space".

So, yes, you could disable the NTRAM, and replace it with 4 KiB of RAM ... that the N163 controls ... but there were never any (significant number of ) 4 KiB RAMs. And so maybe it actually means add an 8 KiB RAM instead? It's not well defined.

Or you could instead replace the NTRAM with 4 KiB of RAM and bypass the 163's CHR-ROM/NTRAM enables altogether ... but that hamstrings the mapper.

so there's no good argument to think that one of them is "right". And the simplest (stupidest) definition (ignore the 163's CHRRAM enable, just enable the 4 KiB of RAM over the nametable space) can/will produce bus conflicts.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Guys give me suggestions: VRC7 vs N163?

Post by Bregalad »

If your question is solely about sound, my personal opinion is that the VRC6 is really the superior extension sound chip. I do not like how the VRC7 sounds, but it is personal.

I do not think 4 screen mirroring is possible with any mapper that allows extra sound. The only games that ever used this were on MMC3 (2 games) and on a custom mapper designed for this (one game). Emulators will support 4 screen mirroring on more mappers, especially those who do not have advanced mirroring control but those who does (such as N163 or MMC5) are definitely out of the question.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Guys give me suggestions: VRC7 vs N163?

Post by tepples »

There were plenty of 2K RAMs though, as used in Gauntlet. These were decoded to $2800-$2FFF.

On Namco 129 and 163, nametable banks $E0 and $E1 mean the console's built-in video memory. Values $E2-$FF are mirrored to $E0-$E1.

Now the question: When banks $E0-$FF are selected, does the mapper still drive CHR A14-A11 based on bits 4-1 of the bank number? For example, if one bank is set to $E0 and another bank is set to $E2, can it tell the difference by looking at A11? If so, the mapper's CHR A11 output can be fed through the Gauntlet circuit.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Guys give me suggestions: VRC7 vs N163?

Post by lidnariq »

tepples wrote:Now the question: When banks $E0-$FF are selected, does the mapper still drive CHR A14-A11 based on bits 4-1 of the bank number? For example, if one bank is set to $E0 and another bank is set to $E2, can it tell the difference by looking at A11? If so, the mapper's CHR A11 output can be fed through the Gauntlet circuit.
Yes, it's clear that the N163 was designed to support up to a 32 KiB RAM in that manner.

My point is that for this hardware and iNES encapsulation, specifying "4 screen mirroring" in the iNES header is intrinsically ambiguous. It is not clear exactly which of all the possible variants I mentioned before is intended. And I definitely don't expect multiple emulators to be consistent.


In fact, by emulator, specifying 4 screen does:
FCEU-0.98, FCEUX-HEAD, Nintedulator: ignores the flag altogether
no$nes, NestopiaUE-master: boots up with naïve 4-screen, but subsequent writes to $C000-$DFFF can only select pages 0 or 1 of NTRAM
puNES-master: does tepples's suggestion
w7n
Posts: 10
Joined: Wed May 15, 2013 9:33 am

Re: Guys give me suggestions: VRC7 vs N163?

Post by w7n »

Bregalad wrote:If your question is solely about sound, my personal opinion is that the VRC6 is really the superior extension sound chip. I do not like how the VRC7 sounds, but it is personal.
I have more experience with NES music than most of you guys I think. In fact, the VRC6 sounds can even be simulated with N163. However, emulation of N163 audio is faulty with many emulators... Without this issue, the N163 is probably the best sound chip on the Famicom, but very underdeveloped in games though(most games just use a few square/sine/saw waves, Megami Tensei II is probably the game which uses it best but still it's very underdeveloped).

The main questions here are
> Are there any features in VRC7 (besides the sound) that's not supported in N163
> Does major emulators support 4-screen mirroring with N163

Anyway, after reading all those replies, I'll probably just stick with VRC7. Thanks folks, you can continue discussing about it though.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Guys give me suggestions: VRC7 vs N163?

Post by Bregalad »

w7n wrote: > Are there any features in VRC7 (besides the sound) that's not supported in N163
Yes. An N163 can only have a repeated periodic waveform with an envelope applied to it. A VRC7 channel on the other hand, cann apply a carrier modulator to a modulatee, allowing the waveform to change over time when a note is sustained. It is also possible to use a trick to get white noise or a square wave. Unfortunately only one "custom" instrument can be used at a time, and can be used in combination with any of the 15 built-in instruments.
Does major emulators support 4-screen mirroring with N163
I haven't checked, but it's very likely they does not. (Nor with the VRC7 for that matter). The only mappers which shouls be emulated correctly with 4-screen mirroring are :
- Mappers with no mirroring control (such as NROM, UNROM etc, etc....)
- Mappers where games already exist with 4-screen mirroring (MMC3 and another mapper)
In fact, the VRC6 sounds can even be simulated with N163.
I had never realized, but this appears correct ! The N163 is indeed extremely powerful and definitely was undeused in commercial games. However when using the chip to it's fullest, music doesn't sound like NES music anymore, way too many tracks, and too many different sounds ! I had this DKC2 example from Famitracker, it's just insane it sounds closer to SNES music than NES music.

With VRC7 the music also looses it's NES characteristic, while with VRC6, MMC5 or FDS I belive it sound more like enhanced NES music, but still maintain the specific NES sound.
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Re: Guys give me suggestions: VRC7 vs N163?

Post by Disch »

One thing to keep in mind with N163 is that it sounds like ass when you add more than 4 channels. This isn't reflected in many emulators because they don't add the aliasing.
User avatar
za909
Posts: 229
Joined: Fri Jan 24, 2014 9:05 am
Location: Hungary

Re: Guys give me suggestions: VRC7 vs N163?

Post by za909 »

With the N163, you need to sacrifice a lot of ROM space (and presumably CPU time) to really make use of its potential by rewriting the waveform every frame. You can cycle through a full loop of a string ensemble-sample for example, but you need to have a lot of waveforms to simulate the sound developing over time. This is the demo I like to show people
And also this one
The HuC6280 in the PC-Engine was similarly under-utilised, but the game could do the same waveform updates every frame (or even more frequently with an interrupt if you're willing to sacrifice more CPU for it)
With the VRC7 you can get sounds that slowly change over time much more easily.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Guys give me suggestions: VRC7 vs N163?

Post by Bregalad »

The question is, does those chips in real hardware support rewriting the wavetable while playback is enabled and without resetting the phase of the channel?
I'm fairly confident that the FDS sound chip and GameBoy's channel 3 have wavetables which cannot be rewritten without resetting the sound channel, causing an annoying side effect similar to writing to $4003 or $4007 on the NES's square wave channels.

The GBA's channel 3 can have two wavetable banks and by double-buffering them any change to the wavetable can be made, but the sappy engine used by 90% of GBA games didn't support that, so nobody outside of the demo-scene made an usage to it.
With the N163, you need to sacrifice a lot of ROM space (and presumably CPU time) to really make use of its potential by rewriting the waveform every frame. You can cycle through a full loop of a string ensemble-sample for example, but you need to have a lot of waveforms to simulate the sound developing over time. This is the demo I like to show people
And also this one
I am not surprised that it is technically possible and that someone made an attempt. I am however surprised, because it sound much better than what I'd have expected (considering the waveform is updated only every frame and not every oscillation like it is supposed to). I guess it works especially well with SMW which seriously underuses the SPC700's possibilities.
One thing to keep in mind with N163 is that it sounds like ass when you add more than 4 channels. This isn't reflected in many emulators because they don't add the aliasing.
Not only the aliasing, but also the high frequency whistle when switching from channel to channel which should fall into the audible range when 7 or 8 channels are used.
As long as the aliasing/whistle is not emulated, people will continue to abuse the N163 and assume it sounds fine.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Guys give me suggestions: VRC7 vs N163?

Post by lidnariq »

In practical manners, the N163's aliasing should only really be audible for 7 or 8 channels. The only reason for a threshold of 4 is that all the commercially released games used only 4 or 8.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Re: Guys give me suggestions: VRC7 vs N163?

Post by Bregalad »

It depends if you use a waveform close to a sine wave where there will be no aliasing, or one close to a saw wave where there definitely will be some. In theory it is of course possible to design your song so that the waveform is automatically prefiltered when reaching high notes, so I guess it's possible to reach clean sound with 6 channels.

With 7 or 8 channels even if there will be no aliasing there will be high frequency whistling.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Guys give me suggestions: VRC7 vs N163?

Post by lidnariq »

My point is that, if the different voices are uncorrelated, the N163's sound's channel multiplexing produces an alias of the intended sound at every multiple of the channel repetition frequency.
Post Reply