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 146.3k 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.
    • HexH
      Hex
      last edited by Hex

      @recompile I was able to find out and fix the vertical misalignment. You had size medium in Font.java as zero.

      0_1506243221363_Screenshot from 2017-09-24 01-53-20.png


      Now I am stuck with the horizontal part. This method in particular:

      public int stringWidth(String str)
      	{
      		return str.length() * getPointSize() / 2;
      	}
      
      

      I know that the /2 is a hack (removed for the above image). The problem is that the font is not monospaced so plain multiplication is not going to work. So I need a way to get rendered text size. Some searches suggested FontMetrics.stringWidth. I tried to get that from Graphics2D but I am getting NULLPointers.

      Any ideas?

      Sent from 20,000 leagues under the sea.

      Powersaver Emulation station : https://github.com/hex007/EmulationStation
      ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

      recompileR 2 Replies Last reply Reply Quote 0
      • recompileR
        recompile @Hex
        last edited by

        @hex You're on the right track. You can see a working example of FontMetrics.stringWidth in PlatformGraphics.

        My solution was going to be to add a PlatformFont class, similar to what I did with Image and Graphics. (The idea being that those can be swapped out, leaving everything in the javax hierarchy the same.) That that's not strictly necessary as you should be able to just just use a PlatformImage and its graphics context and reap the same benefits.

        1 Reply Last reply Reply Quote 0
        • recompileR
          recompile @Hex
          last edited by

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

          You had size medium in Font.java as zero.

          That's correct, according to the spec:
          http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/lcdui/Font.html

          Be care with that sort of thing. I've found that just because something appears to work in one game doesn't mean it's correct -- and it can sometimes break other games.

          1 Reply Last reply Reply Quote 0
          • HexH
            Hex
            last edited by

            @recompile Thanks for pointing that out. I shall revert the change. I was able to hack up a working solution for the stringWidth problem. I am trying now to implement the PlatformFont as you suggested.

            Sent from 20,000 leagues under the sea.

            Powersaver Emulation station : https://github.com/hex007/EmulationStation
            ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

            1 Reply Last reply Reply Quote 0
            • BloodDragoonB
              BloodDragoon
              last edited by

              Hi all, been having problems with loading games on the emulator, i have Java Runtime Environment 8 update 144,both 64-bit and 32-bit installed (Java 9 didn't work for me for some reason), every time i boot the emulator it prompts me to select a game, i select a game, and... Nothing happens, just nothing happens, i saw a "config" file after i load my game i check it and there's a folder named "null", i check the folder, and there's the "game.conf" file, i attempt to edit it with Notepad++ and see a "nokia" string, its on, put it on "off", i save, try again, still nothing happens, every game i've tried it just goes to a "boot phase", closes the window, but then nothing happens, my OS is Windows 8, build 9200, hope you can fix it. Thanks!

              1 Reply Last reply Reply Quote 1
              • HexH
                Hex
                last edited by

                Which game are you trying to play? The support is for Linux primarily.

                Sent from 20,000 leagues under the sea.

                Powersaver Emulation station : https://github.com/hex007/EmulationStation
                ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                BloodDragoonB recompileR 2 Replies Last reply Reply Quote 0
                • BloodDragoonB
                  BloodDragoon @Hex
                  last edited by

                  @hex Medal of Honor Airborne: 2D, but as said above all games just don't boot.

                  1 Reply Last reply Reply Quote 0
                  • HexH
                    Hex
                    last edited by Hex

                    @BloodDragoon Resolution of your game?

                    Edit : I tried the 240x320 Medal of Honor Airborne and it works. Although it does gets stuck after the Operation Husky page1 comes.

                    Sent from 20,000 leagues under the sea.

                    Powersaver Emulation station : https://github.com/hex007/EmulationStation
                    ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                    BloodDragoonB 2 Replies Last reply Reply Quote 0
                    • BloodDragoonB
                      BloodDragoon @Hex
                      last edited by

                      @hex 240x360.

                      1 Reply Last reply Reply Quote 0
                      • BloodDragoonB
                        BloodDragoon @Hex
                        last edited by

                        @hex Ahh yes ,blghh, that one.

                        1 Reply Last reply Reply Quote 0
                        • recompileR
                          recompile @Hex
                          last edited by recompile

                          @hex The AWT port was originally developed for Windows, after I had given up on the RetroPie port as a result of the earlier failures. It's also very likely that most users will run this on Windows.

                          That particular game does work (I have the 240x320 version). I tried it on on his JRE version (1.8.0_144 64bit) on Windows 10 and it's working correctly. [Edit to add: I played through about half of the first level. So we've got a range of not working at all, hanging on the mission screen, to working fine.]

                          Does anyone have a Windows 8 machine to test it out on? Running it from the command line should show some output that would provide a clue as to a solution.

                          BloodDragoonB 1 Reply Last reply Reply Quote 0
                          • BloodDragoonB
                            BloodDragoon @recompile
                            last edited by

                            @recompile Okay, guide me how do i check what it outputs?

                            1 Reply Last reply Reply Quote 0
                            • HexH
                              Hex
                              last edited by Hex

                              @BloodDragoon You are using the touchscreen one. I have another which is non touchscreen which works perfectly

                              Can you post a photo of where it gets stuck?

                              This works

                              0_1506307570958_Screenshot from 2017-09-24 19-45-04.png

                              This hangs
                              0_1506307614284_Screenshot from 2017-09-24 19-45-40.png

                              Sent from 20,000 leagues under the sea.

                              Powersaver Emulation station : https://github.com/hex007/EmulationStation
                              ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                              BloodDragoonB 2 Replies Last reply Reply Quote 0
                              • BloodDragoonB
                                BloodDragoon @Hex
                                last edited by

                                @hex Video of problem here

                                1 Reply Last reply Reply Quote 0
                                • BloodDragoonB
                                  BloodDragoon @Hex
                                  last edited by

                                  @hex The game doesn't look like that for me.

                                  recompileR 1 Reply Last reply Reply Quote 0
                                  • HexH
                                    Hex
                                    last edited by Hex

                                    @BloodDragoon Does it even Load? The video shows that is doesnt load too.

                                    I cannot test it without the game jar file and sharing that on retropie is prohibited.

                                    Sent from 20,000 leagues under the sea.

                                    Powersaver Emulation station : https://github.com/hex007/EmulationStation
                                    ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                                    BloodDragoonB 1 Reply Last reply Reply Quote 0
                                    • BloodDragoonB
                                      BloodDragoon @Hex
                                      last edited by

                                      @hex Do not see your mail on your Github page...

                                      1 Reply Last reply Reply Quote 0
                                      • HexH
                                        Hex
                                        last edited by Hex

                                        @BloodDragoon Got it?

                                        Sent from 20,000 leagues under the sea.

                                        Powersaver Emulation station : https://github.com/hex007/EmulationStation
                                        ES dev script : https://github.com/hex007/es-dev/blob/master/es-tests.sh

                                        BloodDragoonB 1 Reply Last reply Reply Quote 0
                                        • recompileR
                                          recompile @BloodDragoon
                                          last edited by

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

                                          @hex The game doesn't look like that for me.

                                          That's interesting. It would explain the 'null' as well as why nothing seems to load for you. You'll get a 'null' if the jar manifest can't be read, and the application will terminate.

                                          Are you sure you have the j2me version of the game?

                                          You can confirm that you have the j2me version by examining the jar file. The jar file is easy, just change the extension from .jar to .zip and unpack it. You see a file called MANIFEST.MF in a folder called META-INF Post the content of that file here.

                                          BloodDragoonB 1 Reply Last reply Reply Quote 0
                                          • BloodDragoonB
                                            BloodDragoon
                                            last edited by

                                            Yes, cannot send for whatever reason...

                                            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.