maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Cool hack: making the "get started" app play your flash games! (https://talk.maemo.org/showthread.php?t=25010)

b-man 2008-11-16 01:50

Cool hack: making the "get started" app play your flash games!
 
1 Attachment(s)
I was fiddling with some of my applications and came up with this really cool trick; hacking get started to play flash games.

This can be done simply by doing the following assuming you have downloaded the game to your memory card, i used Super Mario Flash:

Code:


sudo gainroot

cd /usr/share/tutorial-applet/

mv N800-tutorial.swf N800-tutorial.swf.old

cp /media/mmc1/SuperMario.swf /usr/share/tutorial-applet/

mv SuperMario.swf N800-tutorial.swf

exit

It's quite simple :)

I'll probibly whip up a small app that allows you to select witch games you want to play instead of having to go thrue the whole prosess over and over again.

--Eenjoy! :D

lcuk 2008-11-16 02:10

Re: Cool hack: making the "get started" app play your flash games!
 
neat!
is performance any better than normal browser embedding?

I know people have shied away from flash due to requiring the browser, if this hack can be applied and we get a performance boost lots of nice things become possible.

b-man 2008-11-16 03:25

Re: Cool hack: making the "get started" app play your flash games!
 
From my experience, it looks and runs pretty well, although it will occasionally give me a strange "out of memory" error, but that usually can be fixed by enabling virtual memory. :)

jethro.itt 2008-11-16 20:28

Re: Cool hack: making the "get started" app play your flash games!
 
Quote:

Originally Posted by b-man (Post 242319)
Code:

sudo gainroot
cd /usr/share/tutorial-applet/
mv N800-tutorial.swf N800-tutorial.swf.old
cp /media/mmc1/SuperMario.swf /usr/share/tutorial-applet/
mv SuperMario.swf N800-tutorial.swf
exit


Does the "Getting started" application follow links (I don't have it installed to try)? If it does, you don't need to copy anything, just create a symbolic link:

Code:

cd /usr/share/tutorial-applet
mv N800-tutorial.swf N800-tutorial.swf.old
ln -s /media/mmc1/SuperMario.swf N800-tutorial.swf

This way no additional space is needed on the internal drive.

EL_EASY 2008-11-18 16:45

Re: Cool hack: making the "get started" app play your flash games!
 
Quote:

Originally Posted by
[CODE

sudo gainroot

cd /usr/share/tutorial-applet/

mv N800-tutorial.swf N800-tutorial.swf.old

cp /media/mmc1/SuperMario.swf /usr/share/tutorial-applet/

mv SuperMario.swf N800-tutorial.swf

exit

[/CODE]

It's quite simple :)

I'll probibly whip up a small app that allows you to select witch games you want to play instead of having to go thrue the whole prosess over and over again.

--Eenjoy! :D

Thank you B-man for you great work...First of all, I'm newbie so easy with me...Look I downloaded the game to my memory card fine!!!,but how or where I have to put those code above. can you tell me step by step procedure?

jmjanzen 2008-11-18 21:05

Re: Cool hack: making the "get started" app play your flash games!
 
First, you'll want to install "rootsh" if you haven't already. Click here. (The first command won't work without rootsh.)

After installing rootsh, go to the "Utilities" menu and run "X Terminal" (a.k.a. xterm). Type the code in there.

(Tip: if you want to copy-and-paste the code, double-click on the beginning of a line, keep the stylus held down, and drag to select the entire line, then click-and-hold on the selected text, and choose "Copy". In xterm, go to Edit > Paste. That's how I would/will do it.)

EL_EASY 2008-11-19 15:57

Re: Cool hack: making the "get started" app play your flash games!
 
Quote:

Originally Posted by jmjanzen (Post 242943)
First, you'll want to install "rootsh" if you haven't already. Click here. (The first command won't work without rootsh.)

After installing rootsh, go to the "Utilities" menu and run "X Terminal" (a.k.a. xterm). Type the code in there.

(Tip: if you want to copy-and-paste the code, double-click on the beginning of a line, keep the stylus held down, and drag to select the entire line, then click-and-hold on the selected text, and choose "Copy". In xterm, go to Edit > Paste. That's how I would/will do it.)


Thank you Jmjanzen for your help. First i downloaded rootsh fine,, then I followed everything you said above and look what was the result: am I doing anything wrong ?

~ $ sudo gainroot
Root shell enabled

BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # cd /usr/share/tutorial-applet/
/bin/sh: cd: can't cd to /usr/share/tutorial-applet/
/home/user # mv N800-tutorial.swf N800-tutorial.swf.old
mv: cannot rename 'N800-tutorial.swf': No such file or directory
/home/user # cp /media/mmc1/SuperMario.swf /usr/share/tutorial-applet/
cp: cannot stat '/media/mmc1/SuperMario.swf': No such file or directory
/home/user # mv SuperMario.swf N800-tutorial.swf
mv: cannot rename 'SuperMario.swf': No such file or directory
/home/user # exit

qwerty12 2008-11-19 16:42

Re: Cool hack: making the "get started" app play your flash games!
 
Quote:

Originally Posted by EL_EASY (Post 243162)
Thank you Jmjanzen for your help. First i downloaded rootsh fine,, then I followed everything you said above and look what was the result: am I doing anything wrong ?

~ $ sudo gainroot
Root shell enabled

BusyBox v1.6.1 (2008-05-22 10:32:35 EEST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # cd /usr/share/tutorial-applet/
/bin/sh: cd: can't cd to /usr/share/tutorial-applet/
/home/user # mv N800-tutorial.swf N800-tutorial.swf.old
mv: cannot rename 'N800-tutorial.swf': No such file or directory
/home/user # cp /media/mmc1/SuperMario.swf /usr/share/tutorial-applet/
cp: cannot stat '/media/mmc1/SuperMario.swf': No such file or directory
/home/user # mv SuperMario.swf N800-tutorial.swf
mv: cannot rename 'SuperMario.swf': No such file or directory
/home/user # exit

You probably uninstalled it. You can get the package back by extracting the rootfs from a diablo image, mounting it, and dpkg-repacking it all on a linux computer (this worked for me but I don't know what the redistribution terms are) . Or the easiest way is to reflash (and no the package isn't on the system updates repo).

qole 2008-11-19 20:12

Re: Cool hack: making the "get started" app play your flash games!
 
BTW, I see no speed increase here over running the SWF through the browser... Click on the game.swf file in your file manager, and it will auto-start the browser with the game in it. Then fullscreen the browser, and off you go. Or make a menu item that runs the browser with file:///media/mmc1/games/mario.swf as the parameter....

But the hack is still cool.

nickar 2008-12-01 18:06

Re: Cool hack: making the "get started" app play your flash games!
 
Hi people,
do you know that all flash games are reproducible with kmplayer?
They run reasonably faster than in the browser, and you can scale it or play it in full screen!


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8