Hi-Def NES HDMI Adapter for the NES

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

Moderator: Moderators

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

Hi-Def NES HDMI Adapter for the NES

Post by kevtris »

Well I have been inactive for awhile on the forum, but I have not been inactive on development. I have been working on an HDMI adapter that connects to the NES CPU and PPU and extracts the video data from the EXP pins on the PPU, and turns it into HDMI.

So far I have gotten PAL and NTSC chips to work in it, and I can emit up to 1080p video, too.

There is a full on screen menu and a bunch of other things also.

I wanted to solicit people's ideas on what the defaults should be and what kind of palettes I should use.

Also, would built in copynes be useful?

Should the aspect ratio default to 4:3 or should it stretch to fit?

Here's a video of it in action:

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

And an introduction video with more info:

https://www.youtube.com/watch?v=QnQuBN3iYVA
/* this is a comment */
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by mikejmoffitt »

This is great. I am assuming you are pulling data in the same way the NESRGB board is.

Defaults are going to be hard to figure out for the palettes, but I would very much favor the following picture scaling / dimensions:

-1080p output resolution
-4:3 letterboxing with the image centered
-The internal 256x240 image is scaled to an integer multiple with nearest-neighbor, then scaled with interpolation to the full target size (this maintains pixel clarity while eliminating "fat pixels"

If the palette can look like the NESRGB palette for what is intended to resemble a "normal" NES, I would be happy with that color palette.

A few questions:

-How many frames' worth of latency do you have from the input to the output?
-Is the output refresh rate locked to the vertical sync of the captured image, so that there is no tearing nor the need to drop frames to compensate for drift (my biggest gripe with the XRGB mini / XPC4)?
-Do you have plans on digitizing the analogue audio and encoding it in the HDMI output?
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by tepples »

kevtris wrote:Should the aspect ratio default to 4:3 or should it stretch to fit?
In my opinion, pixel aspect ratio should match the PAR of the original TV system: 8:7 for NTSC or roughly 11:8 for PAL. Is there a way to add a zoom control? Or (wishful thinking) to even overlay the top or bottom status bar onto the playfield somehow so that it remains visible when zoomed in?

The second video appears to imply that the audio is emulated separately, including the expansions, so that it's entirely digital. No ADC for cart audio is planned.
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 »

-How many frames' worth of latency do you have from the input to the output?
-Is the output refresh rate locked to the vertical sync of the captured image, so that there is no tearing nor the need to drop frames to compensate for drift (my biggest gripe with the XRGB mini / XPC4)?
-Do you have plans on digitizing the analogue audio and encoding it in the HDMI output?
There's no frames of latency; the NES and HDMI are locked together in synchrony so I only need to buffer a couple scanlines. The HDMI is emitted a couple scanlines after the NES' PPU generated it.

Since the two are interlocked, there's no tearing or frame duplication or removal. Anything that gets dropped or modified after this point will solidly be your TV/monitor's fault. The HDMI generated by the board is fully standard complaint 60.00fps video and does not have its timing modified in any way. The NES is very very slightly underclocked to do this, around 0.15%. This is small enough that it isn't humanly detectible.

There is no analog input capability, but this is not a problem. I plan on having ALL the expansion chip audio implemented on here too. The verilog for all of those is written (yes even VRC7) so I can in theory drop this in.

Right now I have implemented the usual 5 NES audio channels. These are written in verilog and dupilcate the NES APU's audio functionality. This netted me a noise free digital version of the audio. DPCM was an interesting case because I have to generate it from the data the NES CPU fetches! I cannot just play DPCM samples; I must fetch the data off the bus as the CPU is reading it for playback, and generate my copy of the DPCM in synchrony with the CPU's.
In my opinion, pixel aspect ratio should match the PAR of the original TV system: 8:7 for NTSC or roughly 11:8 for PAL. Is there a way to add a zoom control? Or (wishful thinking) to even overlay the top or bottom status bar onto the playfield somehow so that it remains visible when zoomed in?
yeah I want to match the aspect ratio of the original. There's no way to add zoom, I do not have a frame buffer so I'm greatly constrained in the Y direction. I have full free control of the X direction though- I can easily stretch and shrink in this dimension.
/* this is a comment */
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Hi-Def NES HDMI Adapter for the NES

Post by lidnariq »

kevtris wrote:Also, would built in copynes be useful?
Seems like it would be easy to add, and the space inside the NES looks like it would probably be difficult to fit both in at the same time without explicitly combining them... on the other hand, AFAIK the spacing differs between every major revision of the NES/FC.
Should the aspect ratio default to 4:3 or should it stretch to fit?
I'd personally prefer it to default to 5:4 (NTSC) or 3:2 (PAL). (same as Tepples)
mikejmoffitt wrote:-1080p output resolution
Does 1080p emitted look any better/worse than 720p? Are televisions more or less likely to screw one up?
(Also 240×3 = 720, and 1080÷5 = 216; 225×4 = (1440x)900, and 262×4=1050(1280x1024) )
kevtris wrote:fully standard complaint 60.00fps video and does not have its timing modified in any way. The NES is very very slightly underclocked to do this, around 0.15%.
Is it supposed to be 60 Hz? Or 59.94?

Other thoughts: maybe provide extra cropping options, to control the amount of visible pop-on and artifact clash? In the original announcement from TheFox, I brainstormed up a few ideas, most of which are just cosmetic (although some are fairly pipe-dream-ly)

Also, maybe add cheat slowdown by skipping NMIs? Obviously some games won't like it, but others might be ok with it...

EDIT: Now that I'm watching the video, how do/can you compensate DPCM pitch for under/overclocking the CPU?
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by mikejmoffitt »

I only suggested 1080p because yeah, TVs that have to do less scaling will screw it up less.

If it's not too hard, a direct line doubling mode at <whatever> x 480 lines would be great, as would YPbPr outputs. I have an EDTV with 480 lines, so this would look perfect.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by tepples »

A 1080p TV will probably be scaling 1080-line video anyway because it assumes video is still authored for early adopter 1080-line CRT HDTVs that have overscan. A TV that assumes overscan will chop about 3% off each side and blow the rest up. A computer monitor won't assume overscan. But computer monitors often won't have audio output, so you may have to provide a separate headphone jack with analog audio on it.

How do you plan on making this available to the public? (Wishful thinking) Could you buy dead NES Control Decks, scavenge parts, refurbish them into working consoles, install fresh caps as needed, and install this mod?

I plan on developing a ROM that tests exactly how much an NES has been overclocked, by assuming that the line rate is ~15.7 kHz and counting the cycles that the PPU takes to render 240 lines. Will I have testers?
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by mikejmoffitt »

Even many mediocre televisions let you turn off such a design defect feature, letting it do a 1:1 pixel mapping. I think best results would come from optimizing output for properly configured sets.
User avatar
OldNESJunkie
Posts: 22
Joined: Sun May 31, 2009 11:41 am
Location: Nashville, TN USA
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by OldNESJunkie »

This would be great, and a CopyNES built in would be a bonus, for me anyways...
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by MottZilla »

Any chance you can add simulated scanlines? Something like how emulators have scanline video filters.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by tepples »

Some people are opposed to scanline spacing simulation on a philosophical level. I'm not entirely sure to what extent kev is among them.

EDIT: In #nesdev a couple nights ago, I proposed a more physically-motivated interpretation where gamma represents beam spreading, and kev didn't shoot it down.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Hi-Def NES HDMI Adapter for the NES

Post by rainwarrior »

Looks very nice!

So, it replaces both the PPU and APU with an FPGA? Would it be worthwhile to replace the CPU as well and build it on a new board, instead of modding an NES?
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Hi-Def NES HDMI Adapter for the NES

Post by MottZilla »

It doesn't replace the PPU, it is still required. It is spied on like the NESRGB before it. Without the NES PPU you won't have any video.
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 »

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

Re: Hi-Def NES HDMI Adapter for the NES

Post by rainwarrior »

Ah, I see. Well, I really like the idea of clean and modern output from the NES. Especially being able to get 60 fps output instead of interlaced 30 fps without an expensive converter would be great. I suppose it depends on how much this costs, as well. Do you have to desolder both the PPU and CPU to install?

I`d actually like to see the whole package, new and clean though. My old NES is a bit temperamental, and of course there`s the ZIF connector hassle. I'd love an all-new replacement.
Post Reply