Boot Straight Into Tv-out?


You could try writing a short program that swaps into tv mode (example code http://wiki.gp2x.org/wiki/Cx25784).
Then write a short shell script named autorun that runs the program and starts your menu of choice and put it in the root of your SD card.
Code:
#!bash

/mnt/sd/tvmode.gpe

cd /usr/gp2x
exec gp2xmenu
Substitute tvmode.gpe with whatever you called your program, and gp2xmenu with one of the other menus if you use them.

Now when you boot the gp2x with that SD card in it should run that script for you automagically.

If you're not up to writing your own I'll knock up a version later tonight.
 
Seems a bit like overkill but....
Could you spawn a separate thread, allow the main one to exit, have the new thread sleep (say 3/4 seconds) THEN have it kick the TVOut into life?

Just wondering :)
 
paeryn posted on Mar 21 2007 at 02:24 AM said:
Hmm it doesn't seem so easy, the first thing gp2xmenu does is run the autorun. Best stick with manually changing it.
Not if you call it with "--disable-autorun" :)

Try something like this:
Code:
#!/bin/sh
/mnt/sd/tvon.gpe
if [ -x "/mnt/sd/autorun2.gpu" ]; then
		cd /mnt/sd
		./autorun2.gpu
else
		cd /usr/gp2x
		./gp2xmenu --disable-autorun
fi
That will preserve the autorun functionality if you rename any autorun.gpus to autorun2.gpu.
 
Last edited by a moderator:
Great thanks for the replies.

It would be really helpful if someone could make a script and post it which would make an autorun file so when the GP2x is turned on it automatically goes into tv out mode. I don't want to have to navigate through the menus to get to tv out.

When I get time (!), I intend to experiment with getting an external screen (the PSone screen) working with the GP2x as a bigger screen. I have been looking to find out how to input a signal into the PSone screen, can then use the standard GP2x cable (audio and svideo) for output to screen.
 
I've just taken a look at my code and made it work. It's at http://gp2x.sector808.org/tvon.gpe

If you're using PAL you can just rename that to autorun.gpu, or if you're using NTSC you'll have to create a script (called autorun.gpu) and put this in it -
Code:
#!/bin/sh
./tvon.gpe -tvmode 3
It's hard coded to run gp2xmenu afterwards because trying to call the next app from a script seemed to just disable tvout (so ignore all the scripts above). Also, it only seems to work once - after running an app, quitting to return to the menu again will probably just give a blank screen.

Edit: Fixed the only working once problem. It now checks if tv is already enabled and doesn't try to activate it twice.
 
Thanks guys for your input. I will give it a bash (pun). Thanks Woogal for the code, appreciated.

Just had a thought, if you can boot straight into tv out mode (eg using a PSone screen), could you run the GP2x without its LCD screen - ie if you disconnected the LCD screen from the motherboard and booted, would the system go straight into tv out mode; or would it refuse to boot without an LCD present? Just thinking it would conserve battery power!
 
Back
Top