GP2X Getting Proper Tv-out Resolution With No Scaling At All


rlyeh

Certified Guru
Joined
Mar 25, 2003
Messages
277
Age
46
Location
49°9' East latitude, 126°43' South longitude: in y
Website
www.retrodev.info
Hello world\n,

Sometimes I get spare time enough to come back and code a lil. After two days of intensive work I think I've managed to get out tv-out images with no scaling at all.

My NTSC mode is giving a 320x240 resolution. This mode is filling fully the TV with no black borders at all. Looks real nice.

My PAL mode is giving a 320x288 area, so you get a 320x240 area surrounded by two 320x24 black areas. You know the image is centered on screen, but the canvas size is slighty larger (so there are two black bands on screen, over and bottom of image). This mode deserves a lil more work yet, to get rid off those black areas properly.

Anyways both 320x240 images are 1:1 aspect ratio, so they look very nice with no scaling artifacts at all.

I'll keep you informed.

edit: some tech stuff: basically you're getting a pure 640x480 and 640x576 video modes on screen, with a pixel size x2, meanwhile your framebuffer sizes are 320x240 and 320x288.
 
Cool

Can you use the full 320x288 area? Also any way of using the space outside the 320 width (in the overscan area)? The Atari800 could display stuff in the spare lines at the top/bottom. Also it had extra wide modes that were usually just offscreen. It doesn't really make sense on the gp2x screen, but would be cool to support that properly on TV out. So the scrolltexts can go right on/off the screen etc.

Mark
 
foft said:
Cool

Can you use the full 320x288 area? Also any way of using the space outside the 320 width (in the overscan area)? The Atari800 could display stuff in the spare lines at the top/bottom. Also it had extra wide modes that were usually just offscreen. It doesn't really make sense on the gp2x screen, but would be cool to support that properly on TV out. So the scrolltexts can go right on/off the screen etc.

Mark
Yep you can use 320x288 fully (but only with PAL mode).
No you can't use overscan area yet. Although I think I could eventually do a custom video mode (with a fixed width including emulated overscan) with a lil of work. So... any suggested resolution for your atari800 emu?
 
Last edited by a moderator:
Nice one :) I've not had any spare time for months to try and fix this, so I'm glad you managed to find a couple of days instead ;). Did you start from the kernel code, or did you have to throw that rubbish away and start again from scratch?
 
rlyeh said:
Yep you can use 320x288 fully (but only with PAL mode).
No you can't use overscan area yet. Although I think I could eventually do a custom video mode (with a fixed width including emulated overscan) with a lil of work. So... any suggested resolution for your atari800 emu?
The main area it used was 320x192. There were usually borders at the top, bottom, left and right. But old TVs all differed considerably on how large... So the main area used is 320x240. Outside that it was mostly stuff changing the background colour and very occasionally things used a wider mode.

Anyway full PAL is 352x288 and NTSC 352x240. Though of course the full area isn't usually visible.

If it can do that properly with interlace and knowing which frames its on that would be great for video out. I never could get my PC to output that mode nicely by using slow VGA clocks.... If only it had a USB2 input I could use my GP2X for my PVR:) (edit: Of course I'd want 704x288 for that...)

Mark
 
Last edited by a moderator:
Call me dumb but does this mean TV-Out now gets displayed without being cut off at the bottom and right sides(NTSC)?

I'm not sure what this development means.
 
this means that all programs shown at 320x240 on the LCD will appear fullscreen on TV without filters? i prefer pixel repetition instead of filtering if it's 2x scaling. i think this is what Rlyeh is saying?
 
ryleh, a question: are different horizontal resolutions possible? does your work open the possibility of sending the often arbitrary horizontal resolutions of console emulators to a tv (as-is, without "pillarbox"?)
ie. genesis @ 320, nes @ 256, snes @ 256 @ 512, atari @ 192, and so on.

Megatog615 said:
Call me dumb but does this mean TV-Out now gets displayed without being cut off at the bottom and right sides(NTSC)?

I'm not sure what this development means.
earx said:
this means that all programs shown at 320x240 on the LCD will appear fullscreen on TV without filters? i prefer pixel repetition instead of filtering if it's 2x scaling. i think this is what Rlyeh is saying?
in response to both (i hope), the explanation is that the gp2x currently omits a few scanlines when sending an ntsc signal. i think it's similar with pal. it's not terrible but kind of annoying. i think what happens is that the image is sent at the wrong number of lines and then is scaled down. ryleh's solution will send the correct signal without any scaling artifacts.

earx, i think you mean that you're afraid of the nastiness that is created when hardware scaling is used? in this case, you won't notice anything like that, just a good clean signal.

jbrodack said:
so how would this be implemented? a game by game basis? a patch to the firmware?
i was kind of hoping there'd be a way to include it in open2x such that everything is sent correctly.
 
Last edited by a moderator:
The problem is(for me at least), when I use TV-Out on any of the TVs in my house(all NTSC), they are all cut off at least 10% on the bottom, and by at least 25% on the right side. So I'm losing quite a bit of the image, almost as if it's being scaled too high.
Another problem is the video player plays the video with a huge black border at the left side of the screen.

I'm not sure if this addresses that, but I'm keeping my hopes up.
 
Megatog615 said:
The problem is(for me at least), when I use TV-Out on any of the TVs in my house(all NTSC), they are all cut off at least 10% on the bottom, and by at least 25% on the right side. So I'm losing quite a bit of the image, almost as if it's being scaled too high.
Another problem is the video player plays the video with a huge black border at the left side of the screen.

I'm not sure if this addresses that, but I'm keeping my hopes up.
Same problem here, same hopes too. Also I get it all in B&W
 
Last edited by a moderator:
Back
Top