Hi-Def NES HDMI Adapter for the NES

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

Moderator: Moderators

User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

I have finished the FPGA side pretty much of this project now. In the last few days I have added:

* scanline generators (two kinds- NES locked and free run)

* menu! menu now lets you set up all of the video parameters from the controller.

* MMC5 audio (totally new core)
* VRC6 audio (heavily rewrote)
* FDS audio (totally new core)
* N106 audio (some rewriting)
* sunsoft5B audio (some rewriting)
* VRC7 (some rewriting)

* Audio FIR filter (2 stage)

The audio stuff is ported from the FPGA NES project and have been gone over again to fix bugs, update old code and all that. Some of it was early verilog I had written and it was ugly so it got rewritten.

The FPGA resources are now totally used up:

* logic elements: 98%
* pins: 100%
* PLLs: 100%
* multipliers: 2 left
* blockrams: 100%

This means that the scanline generators are going to have to stay as they are but I think it should be fairly usable. I tried a bunch of "NES locked" scanline generator ideas people mentioned in here and on the IRC channel but they all looked pretty bad and noticeable, unfortunately.

Setting the 1080p mode to 3x scanlines (a "scanline" every 3 HDMI lines) which is higher resolution than the NES and then using one of the scalers looks fairly passable. If you want "real" scanlines, then 720p or 480p modes will need to be used. PAL systems will have to use the free run mode most likely since the scaling on them is non-integer due to hardware restrictions between the PPU frame and the HDMI frame.

All expansion audio is implemented and works now. The VRC7 needs some slight tweaking but seems to be pretty close. At the time I implemented this I didn't know about the ADSR control bit so I will add that.

I have each source separate, and relative volumes of all channels are adjustable against each other. I still need to write a boatload of menu code to allow you to adjust all the parameters though (relative volumes) but the hardware side is all done at least.

Each chip and in some cases sub channels are all individually pannable. This includes the original NES channels (all are pannable individually), VRC6 (individually pannable), MMC5 (same), and the others are pannable as a unit. VRC7 has 2 outputs that can be panned individually left/right, each being a set of 3 channels.

There's a FIR filter to cut out most of the aliasing from the audio and works quite decent. Looped noise sounds pretty decent. There's still a tiny bit of aliasing on very very very high frequency squares but this is unavoidable. The only time I could hear it was when I used a program that let me manually poke the sound registers.

I will release another update video soon outlining some of the new features I added in the last week.
/* this is a comment */
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Hi-Def NES HDMI Adapter for the NES

Post by lidnariq »

kevtris wrote:PAL systems will have to use the free run mode most likely since the scaling on them is non-integer due to hardware restrictions between the PPU frame and the HDMI frame.
So, the 2C07 is active for 240/312 = 77% of the frame, while the 2C02 is active for (224 to 240)/262 = 85% to 92%, and 720p and 1080p are active for 96% of the frame... how many scanlines tall is your circular buffer? It looks like you would need 63 for 2C07→720p@50... oy.

Would it be better to offer windowboxed output instead of nonuniform scanlines? I assume PAL-market HDTVs support the same de-windowboxing scalers that I've seen in NTSC-land.
There's a FIR filter to cut out most of the aliasing
Why not IIR? A Butterworth or Chebyshev-I lowpass should be more efficient in terms of multiplications per sample per sharpness, assuming that the group delay doesn't get too large.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

lidnariq wrote:
kevtris wrote:PAL systems will have to use the free run mode most likely since the scaling on them is non-integer due to hardware restrictions between the PPU frame and the HDMI frame.
So, the 2C07 is active for 240/312 = 77% of the frame, while the 2C02 is active for (224 to 240)/262 = 85% to 92%, and 720p and 1080p are active for 96% of the frame... how many scanlines tall is your circular buffer? It looks like you would need 63 for 2C07→720p@50... oy.

Would it be better to offer windowboxed output instead of nonuniform scanlines? I assume PAL-market HDTVs support the same de-windowboxing scalers that I've seen in NTSC-land.
There's a FIR filter to cut out most of the aliasing
Why not IIR? A Butterworth or Chebyshev-I lowpass should be more efficient in terms of multiplications per sample per sharpness, assuming that the group delay doesn't get too large.
it's 32 scanlines high and I cannot make it bigger. This already was bigger than I was hoping I'd need, but 50fps 720/1080p is kinda dumb. they simply lengthen the hblank on each scanline, instead of increasing vblank. This means as you surmised, that I need a larger buffer, and this is indeed the case. I letterbox PAL slightly to fit and not run out of buffer. It's literally as tall as I can make it before the buffer starts to wrap, within 5-8 HDMI scanlines (I chose a height that looked best when vertically scrolling).

I thought about an IIR and I might give it a try before release.
/* this is a comment */
User avatar
game-tech.us
Formerly akaviolence
Posts: 157
Joined: Thu Oct 22, 2009 10:21 am
Location: Central Indiana

Re: Hi-Def NES HDMI Adapter for the NES

Post by game-tech.us »

Video of Kevin putting together the 1st prototype board using stencil and solder paste, his vacuum tool, and his reflow oven.
https://www.youtube.com/watch?v=xJ3WJ_eCNTU
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

I have put up a video outlining all of the features of the Hi Def NES adapter's video functionality now it's here:

https://www.youtube.com/watch?v=qlb0E_jkYts

I show off the scanlines, stretching, interpolation and scalers.
/* this is a comment */
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by Great Hierophant »

Outputting and upscaling a hi-def picture of a retro console is becomming more popular. Here is a similar idea for the Gameboy : https://www.kickstarter.com/projects/50 ... -boy-class. However, the hdmyboy project is much less ambitious because it is converting the digital data that would go to the LCD, it does not monitor palette entries nor does it emulate the APU.
ccovell
Posts: 1045
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by ccovell »

Hmmm... that timeline is missing a lot between 1990 and 2013, namely Brian Provinciano's digital VGA capture of the GB & GBA, etc.

http://web.archive.org/web/200611131557 ... /index.php
http://www.assemblergames.com/forums/sh ... GA-Adapter
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

Well the audio update video has been posted showing off all of the expansion audio capabilities, along with cropping.

https://www.youtube.com/watch?v=HNBVzGaworw


Enjoy! (yeah the sunsoft 5B was a lot quieter than it should'a been. that's why there is a gain control!)

Going to work on palettes next and flesh out the rest of the menu next.
/* this is a comment */
Lyjal
Posts: 18
Joined: Wed Aug 06, 2014 3:45 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by Lyjal »

Those sound chips are found on the cart, correct? But since you are spying the CPU and PPU you don't get any of the sound info when it comes from the cart, right? I am just a little confused why you need to have the chip support enabled. Also, can you just leave all the chips enabled all the time? Or does that just mess everything up?
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

Lyjal wrote:Those sound chips are found on the cart, correct? But since you are spying the CPU and PPU you don't get any of the sound info when it comes from the cart, right? I am just a little confused why you need to have the chip support enabled. Also, can you just leave all the chips enabled all the time? Or does that just mess everything up?
yes the chips are on the carts but since I need the sound in digital format I am generating it myself (and then you can use a powerpak or similar to play games with extra chips without needing the cart)

you can leave the chips on but you might get random noises if the games use the same register addresses as the sound chips.
/* this is a comment */
Lyjal
Posts: 18
Joined: Wed Aug 06, 2014 3:45 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by Lyjal »

I see. Thanks.

And then the 16 line cropping is just to take off what is normally not seen on an NTSC TV?

Also, what are the palettes you are talking about? Border palletes or are they for the menu?

This project is really cool and innovative. It looks like this is an approach that can be applied to other consoles. I will definitely be getting in line when production begins.
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

Lyjal wrote:I see. Thanks.

And then the 16 line cropping is just to take off what is normally not seen on an NTSC TV?

Also, what are the palettes you are talking about? Border palletes or are they for the menu?

This project is really cool and innovative. It looks like this is an approach that can be applied to other consoles. I will definitely be getting in line when production begins.

yes, the cropping removes the stuff that normally is in overscan. many games have lots of "junk" at the edges and top of the screen so this would hide that.

the palettes are the RGB palettes used to render the NES graphics.

thanks for the words of encouragement :-)
/* this is a comment */
User avatar
game-tech.us
Formerly akaviolence
Posts: 157
Joined: Thu Oct 22, 2009 10:21 am
Location: Central Indiana

Re: Hi-Def NES HDMI Adapter for the NES

Post by game-tech.us »

Kevtris and I check out the Hi-Def NES on my 19" lcd tv.
We also test the zapper out and talk about what's going on with the project.

http://youtu.be/aZ4i-hHkPBQ
User avatar
game-tech.us
Formerly akaviolence
Posts: 157
Joined: Thu Oct 22, 2009 10:21 am
Location: Central Indiana

Re: Hi-Def NES HDMI Adapter for the NES

Post by game-tech.us »

This is my first real attempt at putting the pcbs of the Hi-Def NES HDMI kit in to a Nintendo Top Loader.
http://youtu.be/PS8SZirjtoQ
User avatar
kevtris
Posts: 504
Joined: Sat Oct 29, 2005 2:09 am
Location: Indianapolis
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

Here's the 4th update!

Things added since last time:

* DVI Mode
* Screen is centered
* Pixel masking fixed
* Set the relative audio volumes
* Fixed extraneous pixels
* Hot keys were added
* Overclocking
* Palettes!
* Menu info is now correct
* Fixed the powerpak NSF player

https://www.youtube.com/watch?v=i9gUVcU ... e=youtu.be

Enjoy!
/* this is a comment */
Post Reply