//now activate TV out by opening this device
tv=open("/dev/cx25874",O_RDWR);
//set TV video mode (mode 3 is 720x480Ix16_30Hz NTSC; mode 4 is 720x576Ix16_50Hz PAL)
//note: there are other video modes supported by the module driver (modes 0,1 and 5) but they do not work at all in our gp2xs/tvs. trust me.
ioctl(tv, _IOW('v', 0x02, unsigned char), 4);
That page is just about handling tv out once it's been activated. http://wiki.gp2x.org/wiki/Cx25784 is the page you need for enabling tv out. With that code you can still only activate the crappy dvd modes gph have provided for us (ie, unnecessary scaling of 320x240 screens with far too much overscan). Rlyeh has mentioned that he's looking into setting a true 320x240 game mode but I don't know how far he's got. I tried myself a couple of days ago and got a nice 320x240 display fitting perfectly on the screen, only problem is the output was completely white .Thank you very much! I will try that as soon as possible.
I was referring to this wiki page:
http://wiki.gp2x.org/wiki/TV-out_support
I was clear about the settings, but not about the code to "activate" the TV-Out.
How do you desactivate the tv-out and come back to LCDmode ?
http://wiki.gp2x.org/wiki/Cx25784 is the page you need for enabling tv out. With that code you can still only activate the crappy dvd modes gph have provided for us (ie, unnecessary scaling of 320x240 screens with far too much overscan). Rlyeh has mentioned that he's looking into setting a true 320x240 game mode but I don't know how far he's got. I tried myself a couple of days ago and got a nice 320x240 display fitting perfectly on the screen, only problem is the output was completely white .
Well only the 320x240 were white, the border was still black. I'm only assuming it was 320x240 because that was what I was trying to set. I suppose it could have been any resolution really . Did you manage to set the overscan to reasonable values on your 720x576 mode?
Got any tricks for programming the DPC correctly? It's easy enough to get the cx25874 to generate color bars at 640x480, but I'm not even sure where to set the pixel clock for the DPC.However I managed to get a full working 720x576 mode by hw registers & cx25874 directly (instead of using kernel driver solution).