It is currently Mon Aug 21, 2017 1:10 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Tue Jun 27, 2017 7:49 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18813
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Wed Jun 28, 2017 2:25 am 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 905
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?


Top
 Profile  
 
PostPosted: Thu Jun 29, 2017 8:58 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1860
Location: WhereverIparkIt, USA
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.

tepples wrote:

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


Top
 Profile  
 
PostPosted: Thu Jun 29, 2017 9:50 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18813
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Thu Jun 29, 2017 10:00 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5544
Location: Canada
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).


Top
 Profile  
 
PostPosted: Thu Jun 29, 2017 10:37 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1860
Location: WhereverIparkIt, USA
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


Top
 Profile  
 
PostPosted: Wed Jul 05, 2017 11:26 pm 
Offline
Site Admin
User avatar

Joined: Mon Sep 20, 2004 6:04 am
Posts: 3451
Location: Indianapolis
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.


Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 5:03 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1686
Location: DIGDUG
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


Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 5:14 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 787
Location: Gothenburg, Sweden
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.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 7:36 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2924
Location: Tampere, Finland
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: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 5:46 pm 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1860
Location: WhereverIparkIt, USA
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.

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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:
File comment: INL solderless expansion audio board installed. Still has enough room to reattach outer cover when installed.
2017-06-27 15.02.00.jpg
2017-06-27 15.02.00.jpg [ 1.64 MiB | Viewed 502 times ]
File comment: Clipping tabs to remove inner cover.
2017-06-27 14.06.56.jpg
2017-06-27 14.06.56.jpg [ 2.23 MiB | Viewed 502 times ]
File comment: Outer cover removed & upside down, inner cover intact.
2017-06-27 14.06.50.jpg
2017-06-27 14.06.50.jpg [ 2.32 MiB | Viewed 502 times ]

_________________
If you're gonna play the Game Boy, you gotta learn to play it right. -Kenny Rogers
Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 6:04 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6042
Location: Seattle
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.

Top
 Profile  
 
PostPosted: Thu Jul 06, 2017 6:25 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18813
Location: NE Indiana, USA (NTSC)
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
removing_cover.jpg [ 458.48 KiB | Viewed 492 times ]
Top
 Profile  
 
PostPosted: Fri Jul 07, 2017 11:46 am 
Offline
User avatar

Joined: Mon Apr 04, 2011 11:49 am
Posts: 1860
Location: WhereverIparkIt, USA
[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


Top
 Profile  
 
PostPosted: Fri Jul 07, 2017 12:41 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1686
Location: DIGDUG
Can someone explain what the potential applications (uses) are of the expansion port?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group