game console project/HQVGA timing parameters

Discuss anything not related to the current Uzebox design like successors and other open source gaming hardware
Post Reply
User avatar
Vitis
Posts: 24
Joined: Thu Jul 10, 2014 7:00 pm

game console project/HQVGA timing parameters

Post by Vitis »

Greetings Uzeboxers,

I've been working on a microcontroller-based game console project as a fun way to improve my programming skills. I've searched the internet far and wide for 240x160 VGA (aka HQVGA aka 1/8 VGA) signal specifications, but I have yet to find them. I need to know all the parameters that comprise a 240x160 VGA signal including active video duration, front porch duration, back porch duration, hsync pulse length, vsync pulse length etc. I figured someone out there in Uzebox land might know where find such information.

-Vitis
CunningFellow
Posts: 1445
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: game console project/HQVGA timing parameters

Post by CunningFellow »

I thought VGA had a minimum V resolution of 480 and anything lower res than that had to be sum kind of line double/triple.

So for your 160 V resolution you would just do the normal 640x480 timing of syncs and then have the dot clock 2.66 times longer and display each row 3 times.

I don't think there is any think left that is a true "multisync" monitor and you have to be close to a defined standard these days.
User avatar
Vitis
Posts: 24
Joined: Thu Jul 10, 2014 7:00 pm

Re: game console project/HQVGA timing parameters

Post by Vitis »

You're probably right. I had thought that there was a separate standard for HQVGA, but I must have been mistaken. I'll try the line multiple approach and see how it works out.
hpglow
Posts: 269
Joined: Wed Apr 14, 2010 6:06 am

Re: game console project/HQVGA timing parameters

Post by hpglow »

This has been done you can fake 640x480 even on a 20mhz avr.

Here is a link: http://www.lucidscience.com/pro-vga%20v ... tor-1.aspx

This guy did a framebuffer, but if you did tile sprite based rendering you could make it more useable. Also I think if you took his tutorial and overclocked the AVR up to 25MHZ the maths would be easier since it would be closer to the clock for 640x480 VGA.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: game console project/HQVGA timing parameters

Post by uze6666 »

CunningFellow wrote:I thought VGA had a minimum V resolution of 480 and anything lower res than that had to be sum kind of line double/triple.

So for your 160 V resolution you would just do the normal 640x480 timing of syncs and then have the dot clock 2.66 times longer and display each row 3 times.

I don't think there is any think left that is a true "multisync" monitor and you have to be close to a defined standard these days.
That's also my understanding. If you look at timing tables for PC video modes, you can see it's basically the same pixel clock whether it's 320x200 or 640x480. http://martin.hinner.info/vga/timing.html

If you haven't seen it yet, I also recommend you check the excellent Lazarus VGA generator tutorial. It should answers pretty much all the questions you have regarding VGA generations on microcontrollers. Moreover he's doing it on AVR! :D
User avatar
makapuf
Posts: 13
Joined: Sun Jun 24, 2012 11:55 pm

Re: game console project/HQVGA timing parameters

Post by makapuf »

Well in fact generally it's the HSync signal that has a minimum for the monitor to sync.
Specs vary, but nowadays it's generally around 30kHz .
It depends on how fast tour refresh rate is (again range is in monitors specs) how large your vsync is but if you take 60Hz that's a minimum lines of 500. With vsync, that will be around 480, which is very standard.

Note that you can (and many do) send the same line twice (or three times in your case) or more to reduce vertical resolution while preparing the next line by example. So you're effectively syncing at 480 but producing a 160 lines image. Horizontal can be almost whatever.
Post Reply