Infinite NES Lives teases expansion port dongle

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

Moderator: Moderators

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

Infinite NES Lives teases expansion port dongle

Post by tepples »

Infinite NES Lives has sent this Tweet about a jumper board that fits in the bottom expansion port of the front-loading NES, giving it mapper audio output capability like that of a Famicom. (Unlike the ENIO board, it doesn't include a DA15 for Famicom expansion controllers.)

It's time to count macrocells in your favorite mapper synth.
User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: Infinite NES Lives teases expansion port dongle

Post by Myask »

That looks slightly longer than it would need to be to fit underneath.

Any plans for a case for having that PCB not exposed, INL?
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by infiniteneslives »

It's not really something that can be cased. It's just long enough to make room for the log pot, and just barely allows the cover to be put back over the exp port if desired. So it's pretty ideal setup as is.

The log pot isn't necessary, but just a nice feature I wanted to add along with switch to toggle between the pot and fixed 47k resistor.
I'm starting to come of the mind that an mcu is a better target for audio synthesis, especially if the board doesn't have a large amount of programmable logic to spare. I'm envisioning some glue logic internal to a CPLD to communicate register writes to an mcu via SPI.

I'm curious how complex of a synth could be pulled off for the low cost of a resistor(s) and cap for a PWM DAC implemented in the same mcu as the CIC as I brought up previously. One of the biggest complications of implementing a synth with small amounts of programmable logic is cheaply implementing a DAC. A standalone DAC will run $0.50-1, but for that same price you can get a mcu with built in 12bit DAC with a device such as the STM32F051. Would like to do some testing to see how a PWM DAC compares to hardware DAC in practice though. I know delta sigma DACs have been suggested before, but I can't envision an implementation that wouldn't consume a decent chunk of logic to accomplish that.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by tepples »

The simplest delta-sigma DAC is just an accumulator that adds the current sample value output by each synth channel in turn and returns 1 when wrapping or 0 when not wrapping. That's what I meant by "Pulse density modulation adder (4 bits)" in the other topic.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by rainwarrior »

infiniteneslives wrote:The log pot isn't necessary, but just a nice feature I wanted to add along with switch to toggle between the pot and fixed 47k resistor.
I thought it was a disconnect switch. I find one necessary because some of my NES carts seem to leak a buzzing noise through it otherwise. Though, if the log pot goes all the way to 500k maybe that's enough to thoroughly attenuate it... I only have a linear 100k pot in my mod (though it does make ~47k an easy "centre" position).
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by infiniteneslives »

tepples wrote:The simplest delta-sigma DAC is just an accumulator that adds the current sample value output by each synth channel in turn.
Yes that adder, accumulator, clocking, and control logic can all get hefty depending on the logic budget though.

quote="rainwarrior"]I thought it was a disconnect switch. I find one necessary because some of my NES carts seem to leak a buzzing noise through it otherwise.[/quote]
Well it could be if the 47k fixed resistor is simply omitted. I haven't experienced any such buzzing with my fixed 47k over the years so I hadn't imagined a disconnect as necessary/useful. I'm curious what the buzzing culprits are doing with EXP6.

From what I recall, I found ~47k ohm to be at a convenient 3oclock position on the 500k log pot.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by Memblers »

I hope it's cheap enough to reasonably pack in with every cart. After it's field-tested and I finish my next board, I'd maybe buy 100 at a time, if that helps. This could be a great thing, I like what I see!

For audio out, another option is to use 2 PWMs through 2 different resistor values. This is limited by the accuracy of the resistors, so it can only take you so far. I was going to do that, but I'm going with an audio DAC instead.

For what can be synthesized with an MCU, you have the STM8 in mind? Assuming it's 16mhz, I think you could comfortably get 4 wavetable channels w/ volume control out of that at 48khz. Probably phase distortion synthesis also (Casio keyboard style). Going to 1 or 2 channels would give a fair bit of CPU time to play with.

The advantage I can see of FPGA vs MCU for audio, is that an FPGA could do more channels at a higher sample rate. Lower sample rates will have aliasing in the audio at higher freqs. I'm not terribly worried about aliasing, myself. If you hear my redesigned Squeedo, it's all mixed at 48khz with no down-sampling or anything.

I imagine you would want an external clock too, if using an RC oscillator the audio will be out of tune.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Infinite NES Lives teases expansion port dongle

Post by dougeff »

Are we to expect a user will tear off / cut off the plastic cover over the expansion port?

I feel also, the market for this has got to be ridiculously small.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by FrankenGraphics »

The exp port cover comes off nicely without use of force. Or i might not remember it correctly? Sorry, i've no access to my units for another month.

In any case, Nintendo must've expected their customers to take the lid off at the event of an official expansion.

The market for playing japanese games is not exactly the same as the market for playing homebrew. This thing covers both the first and potentially the future of the latter.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by thefox »

FrankenGraphics wrote:The exp port cover comes off nicely without use of force. Or i might not remember it correctly? Sorry, i've no access to my units for another month.
Under the actual cover (which doesn't require any force to insert/remove) there's a piece of plastic that comes off pretty easily with a tiny bit of force (by twisting it a few times).
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by infiniteneslives »

See attached photos at end of my post here. There's an other cover that is easily removed with your fingers. And an inner cover that has 6 little tabs that must be cut/clipped to access the expansion port. Nintendo designed the expansion port to be accessible by an average person.

If someone doesn't want to clip the little tabs holding the inner cover from the connector as their console is no longer in "mint condition" then sure they might not be interested in any device that uses the expansion port. Once the inner cover is clipped free it can't really be reinstalled. But the outer cover can be placed back over the expansion port to cover it up again. My design is just long enough to give enough board length to install the log pot, but also place the outer cover back over the expansion port when installed.
The market for playing japanese games is not exactly the same as the market for playing homebrew. This thing covers both the first and potentially the future of the latter.
Indeed, I've designed up some famicom to NES converter boards as well that properly send cart audio down to the expansion port via EXP6 which most adapters don't provide. They also properly handle mirroring to support 4 screen carts which is a common flaw with adapters on the market. I'll be bundling the famicom to NES adapter and solderless expansion audio board together for a price comparable to other adapters on the market which run for ~$25-30.
I hope it's cheap enough to reasonably pack in with every cart. After it's field-tested and I finish my next board, I'd maybe buy 100 at a time, if that helps. This could be a great thing, I like what I see!
The board itself is rather simple, hoping it won't be too much of a pain to assemble in large volumes in house. The most expensive part is the log pot, which isn't necessary if a fixed resistor is desirable. My goal is to allow homebrew games to bundle in a fixed resistor exp audio board for ~$5. Should be able to offer large quantities at discount once they're released, so just hit me up then if you're interested.
For what can be synthesized with an MCU, you have the STM8 in mind?
I really only have the stm8 in mind for a minimalist homebrew synth as it could be integrated into the CIC's mcu giving discrete mappers expansion audio on the cheap. I'm somewhat hopeful the stm32f030 running ~48Mhz with dual PWM DAC may be able to decently replicate some original audio expansions like VRC6, sunsoft5b, & FDS. I've yet to even start tinkering with them enough to be confident an stm32f0 will be adequate. Another consideration I've had is the stm32f051 as it includes a built in DAC for close to the price of a standalone DAC.
The advantage I can see of FPGA vs MCU for audio, is that an FPGA could do more channels at a higher sample rate.
Yes that's most certainly true. But a FPGA with adequate resources to differentiate itself from an MCU as significant entry fee with ~$3-5 FPGA, plus level shifters, fine pitched assembly, etc. If one's goals are to satisfy purists/audiophiles without much cost sensivity, FPGA is the obvious choice. It's debatable if a FPGA on that scale/cost makes sense for homebrew though.
I imagine you would want an external clock too, if using an RC oscillator the audio will be out of tune.
Yes that's a good point, another potential solution would be to use a NES clock source multiplied by a PLL if the mcu provides one. But most internal RC oscillators are tuneable, perhaps the mcu could finely tune itself with a calibration routine at boot/post warmup.

In the case of the STM8 CIC-synth idea it doesn't offer a PLL, and an external crystal may not align with the minimalist goals. STM8's RC oscillator is trimmable in ~0.5% which equates to ~80khz steps @ 16Mhz, I'd assume that itself is far too inaccurate for audio use. For homebrew, I'm thinking that could be overcome by a calibration routine where the mcu is able to determine it's near exact frequency and update it's tables or tuning coefficient accordingly. If the console CIC is present and operating the time between CIC data transfers would be available to calibrate against. But with the large number of disabled console CICs that option can't really be relied upon. One would probably have to rely on a NES software routine for calibration by the rom at startup. One would have to experiment to see how much drift occurs, it may prove necessary to tune more frequently than startup alone.
Attachments
INL solderless expansion audio board installed.  Still has enough room to reattach outer cover when installed.
INL solderless expansion audio board installed. Still has enough room to reattach outer cover when installed.
Clipping tabs to remove inner cover.
Clipping tabs to remove inner cover.
Outer cover removed & upside down, inner cover intact.
Outer cover removed & upside down, inner cover intact.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Infinite NES Lives teases expansion port dongle

Post by lidnariq »

infiniteneslives wrote:STM8's RC oscillator is trimmable in ~0.5% which equates to ~80khz steps @ 16Mhz, I'd assume that itself is far too inaccurate for audio use.
In music-ese, 0.5% is 8.6 cents. The general rule of thumb for a permissible Just Noticeable Difference for human ears is roughly 6-8 cents...

So ... it might actually just be on the near edge of ok; although only one setting could ever actually be in tune with the built-in hardware, there might actually always be one setting that's in tune with that spacing, one or two settings should be within 6 cents of the 2A03.
Last edited by lidnariq on Thu Jul 06, 2017 11:40 pm, edited 1 time in total.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by tepples »

Just another data point: This is what it looks like to remove the inner cover of the NES expansion port.

1. Bottom view of Control Deck
2. Outer cover removed with two fingers, revealing inner cover
3. Low-angle close-up
4. Break three of the six tabs
5. Lift and remove the inner cover
6. Expansion port revealed, ready to replace outer cover

Photo by Damian Yerrick
Licensed under Creative Commons Attribution 4.0
Attachments
removing_cover.jpg
User avatar
infiniteneslives
Posts: 2104
Joined: Mon Apr 04, 2011 11:49 am
Location: WhereverIparkIt, USA
Contact:

Re: Infinite NES Lives teases expansion port dongle

Post by infiniteneslives »

[quote=lidnariq]with that spacing, one or two settings should be within 6 cents of the 2A03.[/quote]

Thanks for the info and clarification edit lidnariq, that's what I was curious about but couldn't quickly determine the music-ese numbers of interest.

So there's more hope for getting the STM8 in tune with use of the built in RC trim alone. Question now becomes how well it stays in tune over time, temp, & voltage. They're factory calibrated for 5v @ 25C. Will have to do some experimentation to determine how frequently it should be tuned in practice.
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Infinite NES Lives teases expansion port dongle

Post by dougeff »

Can someone explain what the potential applications (uses) are of the expansion port?
nesdoug.com -- blog/tutorial on programming for the NES
Post Reply