simonkagstrom ([info]simonkagstrom) wrote,
@ 2008-07-26 13:25:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Frodo on a SE k810i
I managed to get Frodo / Cibyl to run on my new mobile phone:

loading-frodo

spy_vs_spy-frodo

It was pretty simple - the problem was that some methods were too large for this phone (I'd say a bug in the JVM). Turning on optimization solved that and Frodo now works fine.

In fact, it works fine enough for games to actually be playable! The frame rate is close to native, and the screen resolution is good enough to allow for all "important" parts to be visible (I've cut out most of the border). As you can see from the pictures, the screen is now rotated.

A frodo.jar binary is available for the brave and the source code can be checked out with subversion.



(Post a new comment)

Http sniffer using cibyl
(Anonymous)
2008-07-28 12:41 pm UTC (link)
Hello Simon,
I want to know if cibyl can be used to write http sniffers for J2ME enabled phones. Basically, i would want to capture http headers sent and received by the mobile browser.

(Reply to this) (Thread)

Re: Http sniffer using cibyl
[info]simonkagstrom
2008-07-28 01:34 pm UTC (link)
Not likely. Cibyl is still just plain J2ME, and what's running is normal Java bytecode in the JVM sandbox. Sniffing traffic to other applications is something I would doubt fits the J2ME security model :-)

(Reply to this) (Parent)

out of memory
(Anonymous)
2008-07-29 04:21 am UTC (link)
Hi, Simon.
Great to see j2me-frodo finished. Unfortunately it seems to need a lot of heap:
the app exits on my Nokia 6131 (series40 3rd edition) with 'out of memory', although i tried to remove as many files as possible to increase available space.
I've now 5 MB free, which seems to be not enough... (sniff) :-(
I guess it's time to get a new phone...
BTW: which games did you try running in the emulator?

(Reply to this) (Thread)

Re: out of memory
[info]simonkagstrom
2008-07-29 05:28 am UTC (link)
Sorry to hear that! The memory referrred to is RAM and not disk, so deleting files should not help you in this case. Frodo will allocate around 1800KB at startup, and this is probably what fails for you.

I've tried a number of games, and most seem to work. The main problem is that frodo currently lacks keyboard input (apart from the "LOAD .." sequence), so sometimes you e.g., need to type 'y' or 'n' to start a game and this isn't possible right now :-)

Spy vs Spy (on the image above) works great, and ik+ and "fist ii" also works fine (although the former only with the subversion trunk, not the build here). I've also played Bomb Jack and delta, but I'm unable to start e.g., Commando, and Boulder Dash (keyboard input).

Elite and ghosts' and goblins does not appear to start - I don't know why yet.

(Reply to this) (Parent)

Error on P990i
(Anonymous)
2008-08-02 07:59 pm UTC (link)
I managed to install frodo.jar on my P990i, it appears in the UIQ menu system. But when I try to run it, I get crashes in various forms. Sometimes, a "Java Powered" logo appears. Once, it gets to the point of asking me if frodo can be trusted to access the phone file system. Once, I got a screen blinking by saying "error 0". Hard to debug...

/jakob engblom

(Reply to this) (Thread)

Re: Error on P990i
(Anonymous)
2008-08-02 08:01 pm UTC (link)
Do you need some additional files to run something?

(Reply to this) (Parent)(Thread)

Re: Error on P990i
[info]simonkagstrom
2008-08-03 06:45 am UTC (link)
Sorry to hear that it fails on your phone!

You need a directory on one of your filesystem roots called frodo, which should contain one or more .d64 files. Anyway, even without this, frodo should still ask you to select a root filesystem (at least on my SE phone called C: or E:), so if you don't see that there is some other error.

Frodo is probably a quite good test for JVMs - my k810 fails if I make the binary only slightly larger with an unspecified error. At first I thought this was because of the very large instruction parser method, but it seems I can reproduce it with changes to basically any method.

Host-based JVMs does not have these problem, and interestingly I never had any problems on my older w810i phone - although the emulator was much too slow on that.

(Reply to this) (Parent)


[info]eichin
2008-11-17 04:14 am UTC (link)
On a whim, I fed it to a J2ME MIDP runner for Android but the converted app crashed immediately. (From the logcat output, it looks like it's a problem on the netmite side, but just thought you'd be interested to know...)

(Reply to this) (Thread)


[info]simonkagstrom
2008-11-17 06:30 am UTC (link)
OK, I didn't even know that existed, thanks for testing!

I also have problems running Frodo in a native J2ME environment, so it's perhaps not entirely surprising.

(Reply to this) (Parent)

How does it work
(Anonymous)
2008-12-26 02:40 pm UTC (link)
Is there any readme or anything else ? I downloaded th jar File and installed it on my Sony Erricson w890i. When i start the Programm, is see only the c64 screen. The only key that work is the 7. it will loade from c:\ or e:\ and find nothing. how can i make setting or anything else.

Regards Peter from Germany

(Reply to this) (Thread)

Re: How does it work
[info]simonkagstrom
2008-12-26 04:05 pm UTC (link)
You'll have to put something in the e:/frodo/ directory. Currently only .d64 games work. Pressing 7 will then load this game. 9 will switch between joystick ports and the rest of the keys are up/down/fire etc.

I'll do a proper wiki page for it someday. I've also done some interface improvements in the subversion trunk, but currently this doesn't run on my phone (SE k810) so I've not "released" it so far.

Thanks for testing and I hope you get it working!

(Reply to this) (Parent)(Thread)

Re: How does it work
(Anonymous)
2008-12-26 09:19 pm UTC (link)
thanks a lot now its working fine ;-)

Regards Peter from Hamburg / Germany --> and a merry xmas

(Reply to this) (Parent)(Thread)

Re: How does it work
[info]simonkagstrom
2008-12-27 09:26 am UTC (link)
Inspired by your comments I finally put together a new release of Frodo/Cibyl today and added the proper wiki page. The wiki page is available here:

http://code.google.com/p/cibyl/wiki/Frodo

and the new binary can be downloaded from here

http://cibyl.googlecode.com/files/frodo-2.jar

works fine on my k810i phone (albeit a bit slow) and should be quite a bit more usable than the current version.

I'll post more about it later :-)

(Reply to this) (Parent)

Re: How does it work
(Anonymous)
2009-01-03 01:41 am UTC (link)
Hello!
I cannot run properly Frodo on a N6300(with flash card) or SE-K800 (without card).
I put pirates.d64 file everywhere, but emulator say "?device not present error" :/
How 2 mount .d64 file as a "8" drive?
Happy New Year!

(Reply to this) (Parent)(Thread)

Re: How does it work
[info]simonkagstrom
2009-01-03 09:51 am UTC (link)
You should put it on your memory card in the frodo directory. When Frodo starts up, you are then allowed to select the filesystem root, which should be your memory card.

After this, you will get a list of games that you can "insert" into the floppy drive. If you see pirates there, everything should be OK. If not, frodo cannot find any games.

Start with selecting "Load from disk" in the menu.

(Reply to this) (Parent)(Thread)

Re: How does it work
(Anonymous)
2009-01-03 01:30 pm UTC (link)
Hello again!
I've put today frodo-2.jar and shinobi.d64 (and other .d64 files) into:
-root of basic memory in N6300
-into "frodo" directory in basic memory area
-root of memory card
-into "frodo" directory located in memory card
Now i'm trying to run emulator:
-"select fs root" - i see c: and e: locations.
-I Select E: and I see message asking me to permit the application to read data in "Memory Card". By selecting "Yes" phone show me a blank list with an "(empty)" on the top. It doesnt matter what i press, I cannot back any step - I could only exit from java application :/
-After selecting C: i see a message asking to permit read data in "Gallery". I clisk "Yes", one moment for a blank screen, and i see standard C64 screen :) But there is still "?Device not present error" :[
What im doing wrong? Maybe it's due to compatibility problems on Nokia?
PS. Emulator wont run on N6103. I'll check today evening at N6500.

(Reply to this) (Parent)(Thread)

Re: How does it work
[info]simonkagstrom
2009-01-03 05:57 pm UTC (link)
That is strange. The empty list should contain your .d64 files. Are they named .d64 or .D64 by the way? It's case-sensitive.

It could be some Nokia problem, but I think someone on j2meforums.com got it running on some sort of Nokia phone.

(Reply to this) (Parent)(Thread)

Re: How does it work
(Anonymous)
2009-01-05 03:40 pm UTC (link)
All files transmitted to phone via Bluetooth was renamed to ".D64". I've change manually names of all files and everything works fine now!
PS On the N6500 everything works fine too, at the same speed as in N6300 - about 30% of normal C64.
Thanks for help!

(Reply to this) (Parent)(Thread)

Re: How does it work
[info]simonkagstrom
2009-01-05 03:44 pm UTC (link)
Good to hear. Too bad about the speed though, I would have thought the Nokias were faster than that (my SE phone is probably 70% of the original speed).

Thanks for the testing! I'll look for .D64 in a future version :-)

(Reply to this) (Parent)

LG KU990 Viewty
(Anonymous)
2009-01-27 12:45 am UTC (link)
Can't get it to work at all on the LG Viewty.

I've created a frodo folder on the memory card and stuck one game under it (revenge.d64 - Revenge of the Mutant Camels, my default Frodo testing game! :) )

Frodo launches, attempts to access files (which I allow), shows an empty dialogue titled "Error", then a white screen, then dies.

:'(

(Reply to this) (Thread)

Re: LG KU990 Viewty
[info]simonkagstrom
2009-01-27 06:19 am UTC (link)
OK, sorry to hear that! I've found that Frodo is a very good test of how well the JVM adhers to the standard. The general result is ... not very well. Sure, it's a slightly special application (very big methods etc), but the purpose of Java is still write once - run everywhere.

As someone said, the real catch phrase should be write once - debug everywhere. I can get it to break on my phone as well by making the methods just a tiny bit larger. It still works in the emulator and on the host-based JVMs, so it's clearly a J2ME deficiency.

Well, well. Out of curiosity, does Sarien run on your phone?

(Reply to this) (Parent)(Thread)

Re: LG KU990 Viewty
(Anonymous)
2009-02-08 05:11 pm UTC (link)
I'm not sure. I stuck The Black Cauldron on it and selected the game, but it loads Time Quest (Demo) instead. I could be doing something wrong though, as I haven't used Sarien/AGI games before.

http://resolve.host.name/~taras/storage/hotlinked.images/lgsarien.jpg

The Viewty isn't exactly a great platform for gaming anyway, I was just curious :)

(Reply to this) (Parent)(Thread)

Re: LG KU990 Viewty
[info]simonkagstrom
2009-02-08 05:55 pm UTC (link)
Too bad, but thanks for testing anyway!

Time Quest is loaded from a "J2ME resource" so that should work basically everywhere, other games are loaded via a FileConnection and I suspect the bug is there. That would also explain why Frodo games doesn't load.

(Reply to this) (Parent)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…