benheck.com Forums

Videogame Hacking
It is currently Sat Jun 24, 2017 7:49 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 152 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next
Author Message
 Post subject: VGA output via fpga
PostPosted: Wed Jun 15, 2011 10:34 pm 
Offline
Moderator
User avatar

Joined: Sat Sep 10, 2005 2:17 pm
Posts: 2986
Location: here and there
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


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Wed Jun 15, 2011 11:22 pm 
Offline
Moderator
User avatar

Joined: Mon Jul 07, 2008 5:06 pm
Posts: 1889
Very cool! What's your endgame with this project?

_________________
Trading Post Feedback / UWGB XBox / XBox Slim


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 1:18 am 
Offline
Portablizer
User avatar

Joined: Mon Dec 08, 2008 6:14 am
Posts: 1113
Location: Australia
beautiful

_________________
Australian Kaillera server
hhttp://i56.tinypic.com/ncb0wi.gif


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 6:58 am 
Offline
User avatar

Joined: Sun Jan 04, 2009 7:08 pm
Posts: 111
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?)


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 9:15 am 
Offline
Moderator
User avatar

Joined: Mon Jul 07, 2008 5:06 pm
Posts: 1889
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.

_________________
Trading Post Feedback / UWGB XBox / XBox Slim


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 9:21 am 
Offline
Moderator
User avatar

Joined: Sat Sep 10, 2005 2:17 pm
Posts: 2986
Location: here and there
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


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 2:09 pm 
Offline
User avatar

Joined: Sun Jan 04, 2009 7:08 pm
Posts: 111
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'?


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 2:31 pm 
Offline
Moderator
User avatar

Joined: Sat Sep 10, 2005 2:17 pm
Posts: 2986
Location: here and there
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


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 2:42 pm 
Offline
User avatar

Joined: Sun Jan 04, 2009 7:08 pm
Posts: 111
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
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.


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jun 16, 2011 4:03 pm 
Offline
Moderator
User avatar

Joined: Sat Sep 10, 2005 2:17 pm
Posts: 2986
Location: here and there
If you double each field in 480i you are throwing away 1/2 the image data.

_________________
Image


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Fri Jun 17, 2011 4:25 am 
Offline
User avatar

Joined: Sun Jan 04, 2009 7:08 pm
Posts: 111
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
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.


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Sat Jun 18, 2011 8:52 am 
Offline

Joined: Fri Aug 13, 2010 12:40 pm
Posts: 463
Location: Here
^ ^ ^ ^ This has much potential.


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Wed Jun 22, 2011 8:12 pm 
Offline
Moderator
User avatar

Joined: Mon May 24, 2004 12:33 pm
Posts: 7394
Location: Iowa
Quote:
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?

_________________
ImageImageImage
Visit us at Portablesofdoom.org


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Thu Jul 07, 2011 7:50 pm 
Offline
User avatar

Joined: Sun Jan 04, 2009 7:08 pm
Posts: 111
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...


Top
 Profile  
 
 Post subject: Re: VGA output via fpga
PostPosted: Fri Jul 08, 2011 1:20 pm 
Offline
User avatar

Joined: Fri Jan 08, 2010 8:44 pm
Posts: 88
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 152 posts ]  Go to page 1, 2, 3, 4, 5 ... 11  Next


All times are UTC - 6 hours


Who is online

Users browsing this forum: Baidu [Spider] and 3 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