VGA output via fpga

Includes but not limited to: SNES, Genesis, Sega CD, PlayStation 1, Nintendo 64, Dreamcast, Game Gear and I guess the Virtual Boy.

Moderator:Moderators

Post Reply
User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:
VGA output via fpga

Post by marshallh » Wed Jun 15, 2011 10:34 pm

Got a nice 19" LCD with VGA/DVI from a neighbor. Wanted to use with my n64.

Wired fpga to digital RGB on the RCP.

Image

Image

Image

Basically verilog scan doubler right now, going to go full framebuffer next.

I work on many projects all at once.
Image

User avatar
eagle5953
Moderator
Posts:1892
Joined:Mon Jul 07, 2008 5:06 pm
360 GamerTag:eagle5953
Steam ID:eagle5953
Contact:

Re: VGA output via fpga

Post by eagle5953 » Wed Jun 15, 2011 11:22 pm

Very cool! What's your endgame with this project?

User avatar
blaze3927
Portablizer
Posts:1114
Joined:Mon Dec 08, 2008 6:14 am
360 GamerTag:notjames
Location:Australia
Contact:

Re: VGA output via fpga

Post by blaze3927 » Thu Jun 16, 2011 1:18 am

beautiful
Australian Kaillera server
[url]hhttp://i56.tinypic.com/ncb0wi.gif[/url]

User avatar
Link83
Posts:111
Joined:Sun Jan 04, 2009 7:08 pm

Re: VGA output via fpga

Post by Link83 » Thu Jun 16, 2011 6:58 am

This is fantastic marshallh! :D When its finished would you consider selling completed PCB's?

Also, I assume that at the moment it linedoubles 240p games to give 480p? So I just wondered if you also plan to support 480i, 288p and 576i modes? (I think those are the N64's main video output modes?)

User avatar
eagle5953
Moderator
Posts:1892
Joined:Mon Jul 07, 2008 5:06 pm
360 GamerTag:eagle5953
Steam ID:eagle5953
Contact:

Re: VGA output via fpga

Post by eagle5953 » Thu Jun 16, 2011 9:15 am

Link83 wrote:Also, I assume that at the moment it linedoubles 240p games to give 480p? So I just wondered if you also plan to support 480i, 288p and 576i modes? (I think those are the N64's main video output modes?)
AFAIK, it doubles the scanrate from 15hz to about 31hz, which is the VGA standard. The refresh rate, not the resolution.

User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:

Re: VGA output via fpga

Post by marshallh » Thu Jun 16, 2011 9:21 am

The n64 only outputs 240p and 480i. Horizontal resolution can be anything.

There's some interference in interlaced mode so I need to double buffer everything in SDRAM to get any further. And that's a real mess, so it probably won't happen for a while.
Image

User avatar
Link83
Posts:111
Joined:Sun Jan 04, 2009 7:08 pm

Re: VGA output via fpga

Post by Link83 » Thu Jun 16, 2011 2:09 pm

marshallh wrote:The n64 only outputs 240p and 480i. Horizontal resolution can be anything.

There's some interference in interlaced mode so I need to double buffer everything in SDRAM to get any further. And that's a real mess, so it probably won't happen for a while.
Really? I thought that PAL N64 games set the video output mode to 288p or 576i at 50Hz? I read through some of the N64 SDK (Introductory Manual and Functions Reference Manual) but didnt find any info about the video modes available.

Also, when converting 480i output would it be possible to double the lines in each field to give one complete frame? (Rather than deinterlacing) Or is that what you meant by 'double buffer'?

User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:

Re: VGA output via fpga

Post by marshallh » Thu Jun 16, 2011 2:31 pm

Yeah, you're right those are for the pal modes. The point of 480i is to give more lines of resolution so you'd have to combine both fields into a 480 tall buffer. Double buffering meaning the fpga can be clocking in the picture from the N64 while outputting the other buffer to VGA.
Image

User avatar
Link83
Posts:111
Joined:Sun Jan 04, 2009 7:08 pm

Re: VGA output via fpga

Post by Link83 » Thu Jun 16, 2011 2:42 pm

So i'm guessing it might be hard/impossible to convert PAL video modes into VGA? (Due to them being 50Hz)

For 480i output I thought doubling each field into one complete frame might give a clearer output and prevent 'fingering' when there is motion between fields?:-
http://lurkertech.com/lg/fields/#whydoicare" onclick="window.open(this.href);return false;
Especially since we have access to the digital video data.

Also, after a bit more searching I found some video mode info in the SDK Functions Reference Manual, and apparently their are 42 different video display modes! (For the RCP at least) I found this part interesting:-
N64 Functions Reference Manual - Video Interface (VI) Management wrote:In low resolution (320 pixels by 240 lines), you have a choice between non-interlaced and interlaced mode. Non-interlaced mode repeats the same frame each field. Interlaced mode interpolates between adjacent lines, weighting 75% of the line above plus 25% of the line below in the first field, and then weighting 25% of the line above plus 75% of the line below in the second field. Note that there is no flicker because there are no high spatial frequencies.

In high resolution (640 pixels by 480 lines), you have a choice between normal interlace and deflickered interlace. Normal interlace uses just the data rendered in one field to display that field. This mode can use one high resolution frame buffer without additional double buffering because one field can be displayed while the next is being rendered without stepping on each other. However, any single pixel with high detail will flicker because it is only displayed in one field. Deflickered interlace averages adjacent lines to filter out the high frequency vertical detail, but at the cost of requiring double buffering of the entire high resolution frame because both rendered fields are used to display each field.

User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:

Re: VGA output via fpga

Post by marshallh » Thu Jun 16, 2011 4:03 pm

If you double each field in 480i you are throwing away 1/2 the image data.
Image

User avatar
Link83
Posts:111
Joined:Sun Jan 04, 2009 7:08 pm

Re: VGA output via fpga

Post by Link83 » Fri Jun 17, 2011 4:25 am

Hmm, i'm a little confused - I thought VGA was capable of supporting 640x480 at 60 frames per second? (480p60)

So for 480i output if you take the 60 interlaced fields and then double the lines in each field you should get 60 complete frames? (I guess you would have to move the finished frames up or down one line to account for the original interlaced field starting on an odd or even line) I also thought that 240p output was updated 60 times a second (60Hz) so doubling each pixel/line (320x240->640x480) would produce 480p at 60fps?

This thread has some interesting info:-
http://forum.doom9.org/showthread.php?t=157080" onclick="window.open(this.href);return false;
I wasn't aware that the N64 can switch between 240p and 480i in the middle of a game :shock: For instance Majora's Mask apparently uses 480i for the bomber kid's notebook of appointments, but 240p for the rest of the game.

Snow_Cat
Posts:463
Joined:Fri Aug 13, 2010 12:40 pm
Steam ID:Snow_Cat
Location:Here
Contact:

Re: VGA output via fpga

Post by Snow_Cat » Sat Jun 18, 2011 8:52 am

^ ^ ^ ^ This has much potential.

User avatar
Triton
Moderator
Posts:7397
Joined:Mon May 24, 2004 12:33 pm
360 GamerTag:triton199
Steam ID:triton199
Location:Iowa
Contact:

Re: VGA output via fpga

Post by Triton » Wed Jun 22, 2011 8:12 pm

I wasn't aware that the N64 can switch between 240p and 480i in the middle of a game :shock: For instance Majora's Mask apparently uses 480i for the bomber kid's notebook of appointments, but 240p for the rest of the game.
The amiga is capable of similar feats, switching resolutions between applications and such, lots of video modes possible too, you think this would work for amiga marshal?

User avatar
Link83
Posts:111
Joined:Sun Jan 04, 2009 7:08 pm

Re: VGA output via fpga

Post by Link83 » Thu Jul 07, 2011 7:50 pm

Sorry to bump this thread, but I am quite excited by this project and just wondered if there had been any more progress? I have just been thinking about the possibilities, like could this also support Component Video output? Or maybe even HDMI output, to keep the signal digital all the way from the RCP to the display? Or since it uses an FPGA what about some form of user selectable anti-aliasing? Maybe it could even support optical audio output? Just some thoughts I had...

User avatar
hidiosoman
Posts:88
Joined:Fri Jan 08, 2010 8:44 pm

Re: VGA output via fpga

Post by hidiosoman » Fri Jul 08, 2011 1:20 pm

It would really set a portable apart from the rest if they used this with a 5" VGA screen. I know of someone who uses emulators just for the HD mods which this would rival, especially with official hardware.

Also would be nice for use on my home console...

Post Reply