• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Would you like to play Nokia (J2ME) games on Retropie?

Scheduled Pinned Locked Moved Ideas and Development
sdlemulatorawesome
304 Posts 22 Posters 145.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    Hex
    last edited by Hex 16 Aug 2017, 05:18

    @recompile I am in no way prioritizing libretro. We both have same goal. Integrate into Es and retropie.

    I just didnt know if ES will officially accept it or not without libretro and hence i suggested it. It is no way important if retropie is ok without libretro support.

    We are pretty much headed in the same direction.

    Edit : Can you tell me which controller you are using. Your program is crashing with segmentation faults (illegal memory access). I would like to get your controller working with a single source for C so it is easier to maintain. Did you see the paste bin files. What do you think of the syntax? If that works for you and i add your controller support then we are done. I would really like to keep this pace and get this project out of the garage.

    Feel free to pass all parameters passed after game Jar to C. That way i can add support as needed without needing changes to J

    R 1 Reply Last reply 16 Aug 2017, 05:35 Reply Quote 0
    • R
      recompile @Hex
      last edited by recompile 16 Aug 2017, 05:35

      @hex It's a Logitech f310

      Edit to add:
      @hex said in Would you like to play Nokia (J2ME) games on Retropie?:

      I just didnt know if ES will officially accept it or not without libretro

      I don't know what this means.

      1 Reply Last reply Reply Quote 0
      • H
        Hex
        last edited by Hex 16 Aug 2017, 05:51

        @recompile said in Would you like to play Nokia (J2ME) games on Retropie?:

        I don't know what this means.

        nevermind. We are not going ahead with libretro


        We still have to get audio working, key config page and m3g i believe.

        Would you be fine with me hosting the project on GitHub after we are done with audio and key config?

        1 Reply Last reply Reply Quote 0
        • P
          pjft
          last edited by 16 Aug 2017, 06:19

          I think this would be accepted even not being libretro. There are several such emulators.

          Of course, having a way to get the controllers easily set up, and ideally from the same config that ES uses would be a big help, though it can be done from the ES/RetroPie-Setup side where it writes a config file for your emulator. I think that's done for other emulators as well.

          Thanks for pursuing this!

          1 Reply Last reply Reply Quote 0
          • H
            Hex
            last edited by Hex 16 Aug 2017, 16:39

            @recompile for the command line parameters, can you pass all of the parameters passed after game file? C shall handle everything from there. If the parameters are insufficient/incorrect C shall just ingnore them. All j has to do is check if W and H params are proper ints or not. This way we save some of your time.

            I have got rotation working nicely.

            1 Reply Last reply Reply Quote 0
            • A
              Allanbuzzy
              last edited by 16 Aug 2017, 18:52

              I noticed it's pretty hard to find J2ME roms around the internet for some reason. I'm not sure this'll be possible as finding J2ME roms are pretty hard and risky, as the sites I tried to find looked too suspicious and malicious.

              "What do you play games on?"
              "A LEGO brick."
              "LEGO What?

              1 Reply Last reply Reply Quote 0
              • H
                Hex
                last edited by Hex 16 Aug 2017, 19:01

                @Allanbuzzy These sites are mostly defunct but have working links including downloads. These were optimized for mobile so might look funky on desktop. Probably thats what you are looking at rather than shady.

                Most of these sites were known as "WAP sites". WAP was the internet protocol on Java phones >> https://en.wikipedia.org/wiki/Wireless_Application_Protocol

                1 Reply Last reply Reply Quote 0
                • H
                  Hex
                  last edited by Hex 16 Aug 2017, 21:20

                  @recompile
                  [v0.8.1]
                  A few changes to C :

                  • Source is now anbu.cpp in dropbox folder
                  • Added rotation support
                  • Binary to be compiled as "anbu" (Call accordingly from J)
                  • Changed command line syntax
                  • Added help text and credits.
                  • Added Jhat mod (needs testing)

                  I didnt want the name to remain "sdl_" related. Hence the change.

                  Syntax :

                  anbu width height [-i interpolator] [-r]

                  [] optional params
                  -r to rotate frame. Save this in per game config
                  -i nearest default

                  The optional params will come from J if needed. Optional params are order insensitive.

                  java -jar freej2me.jar game.jar width height -i nearest -r
                  `-----------Not for C---------' `J chks int' `--J passes all to C
                  
                  1 Reply Last reply Reply Quote 0
                  • H
                    Hex
                    last edited by Hex 17 Aug 2017, 02:50

                    @recompile I tried to run it on pi3 for the first time. The games are not that playable. Do you tweak any JVM options for smoother playback? It takes a long time to see the game update on click.

                    EDIT : Oracle JDK has considerably better performance.

                    Also are you taping into sdterr from C ?

                    1 Reply Last reply Reply Quote 0
                    • H
                      Hex
                      last edited by Hex 17 Aug 2017, 07:23

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • H
                        Hex
                        last edited by 17 Aug 2017, 20:54

                        @recompile Can you share the build files and sources. I wanted to see how the events are handled on J's end

                        1 Reply Last reply Reply Quote 0
                        • R
                          recompile
                          last edited by recompile 25 Aug 2017, 08:29

                          Here's a libretro build:
                          http://drichardson-shared.s3.amazonaws.com/freej2me_libretro_2017-08-25.zip

                          For the moment, you're stuck in 240x320 mode, but you'll find quite a few games work just fine or were specifically designed for that mode (from what I can tell, it's the most common). Once I add per-game configs, you'll be able to play more.

                          I have some instructions in the zip, but I'll put them here for convenience.

                          Step 1: Install Oracle's JDK:

                          sudo apt-get update
                          sudo apt-get install oracle-java8-jdk
                          sudo update-alternatives --config javac
                          sudo update-alternatives --config java

                          Step 2:
                          Add the files: emulators.cfg and retroarch.cfg
                          to: /opt/retropie/configs/j2me

                          Be sure to set permissions to 666:
                          sudo chmod 666 /opt/retropie/configs/j2me/*

                          Step 3: Add the following to:
                          /etc/emulationstation/es_systems.cfg

                            <system>
                              <name>J2ME</name>
                              <fullname>Java 2 MicroEdition</fullname>
                              <path>/home/pi/RetroPie/roms/j2me</path>
                              <extension>.jar</extension>
                              <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ j2me %ROM%</command>
                              <platform>j2me</platform>
                              <theme>j2me</theme>
                            </system>
                          

                          Step 4:
                          Copy the files: freej2me_libretro.so and freej2me-lr.jar
                          to: /opt/retropie/libretrocores/lr-freej2me

                          Be sure to set permissions to 755:

                          sudo chmod 755 /opt/retropie/libretrocores/lr-freej2me/*

                          Step 5: Have fun
                          Add a j2me directory to your roms directory and copy over your game jars. Restart EmulationStation and play some games.

                          RetroPad mappings are as follows (hard-coded for the moment):

                          D-Pad (UDLR): 2, 8, 4, 6
                          A: 9
                          B: 7
                          X : 0
                          Y: 5
                          Start: Soft2
                          Select: Soft1
                          L1: 1
                          R1: 3
                          L2: *
                          R2: #

                          On the keyboard, arrows work as expected, numbers are numbers, and the numpad has 123 and 789 inverted. Additional mappings: q: soft1, w: soft2, e: *, r: #

                          Sorry for the delay, but I had to not look at this project for a while or I'd have lost my interest.

                          P 1 Reply Last reply 25 Aug 2017, 09:57 Reply Quote 2
                          • P
                            pjft @recompile
                            last edited by 25 Aug 2017, 09:57

                            @recompile Wow. Congrats on the launch, well done! What's the performance like on this in terms of libretro vs non-libretro, and any particular games you - or others - would recommend for the platform?

                            I don't have my Pi for a few weeks, but this deserves a proper celebration!

                            R 1 Reply Last reply 25 Aug 2017, 10:10 Reply Quote 0
                            • H
                              Hex
                              last edited by 25 Aug 2017, 10:05

                              @recompile I was under the impression that we were not doing one for libretro

                              Does the libretro make sdl_interface obsolete?

                              R 1 Reply Last reply 25 Aug 2017, 10:17 Reply Quote 0
                              • H
                                Hex
                                last edited by 25 Aug 2017, 10:10

                                @pjft Non lobretro supports custom resolutions and rotation support but not custom keybindings. It is great to use on PC with numpad. Libretro version is mostly targeted towards Pi.

                                1 Reply Last reply Reply Quote 0
                                • R
                                  recompile @pjft
                                  last edited by 25 Aug 2017, 10:10

                                  @pjft Thanks, though I wouldn't call it a launch until the per-game configs are done. It's a solid preview, however, which I'm pretty satisfied with for the moment.

                                  Performance is great on my pi3, though I haven't done a side-by-side with the older attempts so I can't say with any certainty if it's better or worse.

                                  For games you can play on it now, I can recommend Doom RPG, Orcs and Elves, ShadoWalker, Soul of Darkness, and Asphalt 6, Assassins Creed, and Castle of Magic off the top of my head.

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    recompile @Hex
                                    last edited by 25 Aug 2017, 10:17

                                    @hex said in Would you like to play Nokia (J2ME) games on Retropie?:

                                    I was under the impression that we were not doing one for libretro

                                    So was I, which is why I didn't bother you with it. I didn't think you were interested.

                                    @hex said in Would you like to play Nokia (J2ME) games on Retropie?:

                                    Does the libretro make sdl_interface obsolete?

                                    That's up to you. If you find value in that project, then I don't see any reason not to keep going.

                                    Speaking of, I still owe you a build that passes all the parameters. I'll try to get that to you in the next couple of days.

                                    1 Reply Last reply Reply Quote 0
                                    • H
                                      Hex
                                      last edited by 25 Aug 2017, 10:23

                                      @recompile Great work.

                                      @recompile said in Would you like to play Nokia (J2ME) games on Retropie?:

                                      So was I, which is why I didn't bother you with it. I didn't think you were interested.

                                      I was ok with not working on it as you were more interested in maintaining a single version. Looks like we both has some miscommunication.


                                      • I liked the Icon.

                                      • The main idea of having passed parameters is that the UI updates and features can be added later without disturbing the Jar file.

                                      • Does this version have m3g support ?

                                      • Libretro support is fantastic.

                                      • Once you think it is ready upto a level or if you would like my help with java stuff then I would be glad to help. Possibly host it on github?

                                      R 1 Reply Last reply 25 Aug 2017, 10:51 Reply Quote 1
                                      • R
                                        recompile @Hex
                                        last edited by 25 Aug 2017, 10:51

                                        @hex It happens.

                                        No m3g support yet. That's a surprisingly big project that is very likely to take longer than everything else so far. That is, if I do a complete implementation.

                                        I'll probably stub it out and add flesh it out as I find games that use various parts over time. Just a fun fact, that's what I did for javax.microedition.lcdui.game.TiledLayer, as I haven't found a game yet that uses it. Sprite, in the same package, is also anemic for that reason. I'll bet that'll get quite a few things working, even with a minimal implementation. I stubbed out javax.microedition.wireless because a game uses it, just to make it play, even though no actual communication ever happens. The game didn't seem to mind.

                                        Sins of the lazy.

                                        1 Reply Last reply Reply Quote 0
                                        • H
                                          Hex
                                          last edited by 25 Aug 2017, 14:06

                                          @recompile does it print out the class is not implemented yet if a game uses it?

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]