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

I.K.E.M.E.N GO on Raspberry Pi 4 [Now with an Install Guide!]

Scheduled Pinned Locked Moved Ideas and Development
golangikemenikemen gomugentutorial
151 Posts 19 Posters 53.1k 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.
  • S
    SuperFromND
    last edited by SuperFromND 8 Mar 2021, 03:50 3 Aug 2021, 02:49

    Another update from me, I have managed to create an almost fully-functioning RetroPie scriptmodule for IKEMEN GO! Keyword there being almost, because while it can indeed download, compile and install IKEMEN GO, and while said build can be started, it hangs when trying to load.

    There's a really odd quirk, though I'm not sure if it's the fault of IKEMEN or a consequence of xinit, but for whatever reason the engine fails to find LUA script files (that it needs) if you try to run it from anywhere other than the directory Ikemen_GO itself is installed in. So for example, if you ran IKEMEN GO from /foo/bar/ but it needs a file from/the/monkey/paw.png, it'll try to find the file at /foo/bar/paw.png! Thankfully this can be fixed with a very simple shellscript to manually change the directory to IKEMEN GO's and run that through XINIT: like so:

    #!/bin/bash
    cd /opt/retropie/ports/ikemen-go
    MESA_GL_VERSION_OVERRIDE=4.3 ./Ikemen_GO

    There's also something rather strange I encountered: when running IKEMEN GO from runcommand (making use of XINIT:, which is used in a few other scriptmodules like uqm and ags), it hangs on a black screen (assuming that the LUA issue mentioned above is solved already). It's not just refusing to run, as it will crash out if you have certain controllers plugged in when starting the engine up, but once it has started it just hangs indefinitely, leaving you with a black screen.

    It's not just displaying to the wrong screen either; even grabbing a keyboard and spamming the Esc key to try and quit IKEMEN GO doesn't do anything, it's just flat-out frozen. There's actually been at least one other project that has gotten this black screen issue through XINIT:, though sadly the thread never elaborated on it nor provided a solution.

    However, manually starting xinit and then running it... works perfectly fine! This seems to suggest that I might just need to tweak the launch command more, so perhaps someone more savvy and experienced with XINIT: related stuff in RetroPie could come and assist (paging @mitu perhaps?)

    I should mention that there's a second way of running stuff that requires xinit in RetroPie, and that's using xinit -e 'command'. Unfortunately, trying that instead crashes due to xinit not having permission to access /dev/tty0, crashing before we even get a chance for IKEMEN GO to run. Now, there is a fix for this, and I confirmed that it DOES allow IKEMEN GO to run from runcommand.

    The only problem is that the fix is this:

    # a very, VERY bad idea, especially for a game with user-made content
    ikemen-go = "sudo xinit -e '/opt/retropie/ports/ikemen-go/ikemen-go.sh'"
    default = "ikemen-go"

    For those not super savvy with how Linux works, sudo is essentially the Linux equivalent of running a program as an administrator in Windows, and is really only supposed to be used as a last resort, and not for general use like this.

    I actually ran into this exact same conundrum back in 2018 while trying to get Flash and Java games running on RetroPie, and I did technically find a solution that didn't require sudo xinit. That solution was using a chmod command on Xorg to allow it to run from a script:

    sudo chmod ug+s /usr/lib/xorg/Xorg
    

    Of course, since as you can see this also makes use of the sudo command, it's not a safe or elegant solution to this problem either.

    So to recap:

    • Running IKEMEN GO manually works fine
    • Running IKEMEN GO from XINIT: hangs at a black screen
    • Running IKEMEN GO from xinit -e isnt possible without a huge security risk

    Thankfully, aside from the palette issues joam described above, and the controller bug mentioned earlier in this thread that's planned to be remedied soon anyways, this is the last major issue that needs to be fixed before IKEMEN GO could be feasibly added to RetroPie. And given the circumstances and the fact that running source ports through XINIT: is clearly possible already, this could very well be ready for testing soon. We're in the endgame.

    ▲▼▲▼▲▼▲▼▲▼
    IKEMEN Go
    SRB2Kart
    ▼▲▼▲▼▲▼▲▼▲

    S 1 Reply Last reply 3 Aug 2021, 21:51 Reply Quote 0
    • J
      joamjoamjoam
      last edited by 3 Aug 2021, 08:25

      @SuperFromND Nice work!! It’s really coming along now.

      A small update in the palette corruption issue. I’ve narrowed it down to being one of 4 things:

      1. A bug in the shaders that only shows on arm.
      2. A bug in the v3D driver (Mesa) when drawing textures
      3. A bug with the Go glfw pacakage or GLFW itself when running on the pi.
      4. A bug in the Ikemen_GO source that’s is causing the textures drawn from the sprites/palettes to be messed up on the pi only.

      I think one of the first 3 is most likely since a remote c server shows no issues and OpenGL 2.1 support for the pi is relatively new.

      Things I’ve tried to no avail:

      • Printing palettes being read from SFF files and looking for discrepancies from what’s is defined in fighter factory.

      • using Mesa 20.3 v3D drivers for OpenGL for the pi.

      We also would need to rewrite the shaders in openGLES 2 if we wanted to support other Pi devices as the pi4 is the only pi that can handle OpenGL 2.1.

      1 Reply Last reply Reply Quote 1
      • S
        SuperFromND @SuperFromND
        last edited by 3 Aug 2021, 21:51

        I found something that works with XINIT:! This is probably not the ideal way (I'm sure that either mitu or Jools will point out if there's a better way to handle it), but I found out that chaining the launch commands into xterm will cause IKEMEN GO to boot correctly from EmulationStation:

        ikemen-go = "XINIT:/opt/retropie/ports/ikemen-go/ikemen-go.sh"
        default = "ikemen-go"
        
        #!/bin/bash
        export MESA_GL_VERSION_OVERRIDE=2.1
        xterm -g 320x240+0+0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'

        So all that's left is for me to clean up this scriptmodule a tiny bit, maybe adding some symlinks to intergrate it a bit better with RetroPie's folder structure, and then we can have people test it!

        ▲▼▲▼▲▼▲▼▲▼
        IKEMEN Go
        SRB2Kart
        ▼▲▼▲▼▲▼▲▼▲

        1 Reply Last reply Reply Quote 0
        • H
          h2805270
          last edited by 4 Aug 2021, 10:48

          It will be pretty interesting to see a highly customizable fighting game engine be used on RetroPie for various fighting games.

          Speaking of which, I haven't heard from the OpenBOR board in a couple of months. I wonder if they are still active...

          1 Reply Last reply Reply Quote 0
          • J
            joamjoamjoam
            last edited by joamjoamjoam 8 Apr 2021, 15:06 4 Aug 2021, 12:25

            A little bit more info on the palette issue. The issue is definitely caused by the shaders. For some reason the OpenGL texture mapping for the 1d texture palette is not mapping correctly when running in the pi hardware. I verified that palettes being read from sff files match on both the pi and my windows PC.

            I think the issue is related to the difference in texture precision on the two devices. Unfortunately I think this is as far as I can take it unless there’s someone on the Dev team who knows what these shaders are doing and are willing to play around with some of the texture types for the pi to get more precision.

            Edit: we’ll nvm after about 3 days of no progress I went to document what I found and what line was causing it in case someone smarter than me wanted to look at it.

            In render.go there’s a line in the fragment shader around render.go:70 that maps the pallet texture to the 2d sprite.

            Line 70
            Vec4 c = texture1D(pal, r*0.9961)

            Simply tweaking the constant from .9961 to .9966 yielded the below results.

            It stood out to me cause it had a hard coded constant by tweaking the constant by small amounts all the palettes lined up from the elecbyte logo to the characters in a match.

            Also Ignore Gandalf's staff being transparent. That's just me being bad at editing sprites with Fighter Factory. All the characters I dint touch match exactly to how they play on Windows.

            texturesFixed (Small).jpg

            S 1 Reply Last reply 4 Aug 2021, 20:17 Reply Quote 0
            • S
              SuperFromND @joamjoamjoam
              last edited by SuperFromND 8 Apr 2021, 22:40 4 Aug 2021, 20:17

              @joamjoamjoam Nice work! Really interesting that a single constant value was all that it took to break (and now fix) palettes, kinda makes me wonder how exactly that bit of code came about in the first place. Once again, a massive thank you for your help!

              Also, I just now finished my first draft of the scriptmodule:

              #!/usr/bin/env bash
              # This file is part of The RetroPie Project
              #
              # The RetroPie Project is the legal property of its developers, whose names are
              # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
              #
              # See the LICENSE.md file at the top-level directory of this distribution and
              # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
              #
              rp_module_id="ikemen-go"
              rp_module_desc="I.K.E.M.E.N GO - Clone of M.U.G.E.N to the Go programming language"
              rp_module_licence="MIT https://raw.githubusercontent.com/Windblade-GR01/Ikemen-GO/master/License.txt"
              rp_module_help="Copy characters, stages, screenpacks, etc. to $romdir/ports/ikemen-go"
              rp_module_section="exp"
              function depends_ikemen-go() {
              getDepends golang-go libgl1-mesa-dev xinit xorg xorg-dev libopenal1 libopenal-dev libgtk-3-dev libasound2-dev freeglut3-dev
              }
              function sources_ikemen-go() {
              gitPullOrClone "$md_build" https://github.com/Windblade-GR01/Ikemen-GO.git
              }
              function build_ikemen-go() {
              go clean
              go mod tidy
              make TAGS='-tags al_cmpt' linux
              # grabs default screenpack and content required for the game to run; note that the screenpack has a CC-BY-NC 3.0 license
              make elecbyte
              md_ret_require="$md_build/Ikemen_GO"
              }
              function install_ikemen-go() {
              cp 'elecbyte/LICENCE.txt' 'ScreenpackLicense.txt'
              mkdir save sound
              md_ret_files=(
              'Ikemen_GO'
              'License.txt'
              'ScreenpackLicense.txt'
              'data'
              'save'
              'sound'
              'font'
              'external'
              'elecbyte/chars'
              'elecbyte/stages'
              'elecbyte/data'
              'elecbyte/font'
              )
              }
              function configure_ikemen-go() {
              mkRomDir "ports/ikemen-go"
              addPort "$md_id" "ikemen-go" "I.K.E.M.E.N GO" "XINIT:$md_inst/ikemen-go.sh"
              moveConfigDir "$md_inst/chars" "$romdir/ports/ikemen-go/chars"
              moveConfigDir "$md_inst/stages" "$romdir/ports/ikemen-go/stages"
              moveConfigDir "$md_inst/data" "$romdir/ports/ikemen-go/data"
              moveConfigDir "$md_inst/external" "$romdir/ports/ikemen-go/external"
              moveConfigDir "$md_inst/font" "$romdir/ports/ikemen-go/font"
              moveConfigDir "$md_inst/sound" "$romdir/ports/ikemen-go/sound"
              moveConfigDir "$md_inst/save" "$configdir/ports/ikemen-go"
              cat >"$md_inst/ikemen-go.sh" << _EOF_
              #!/bin/bash
              export MESA_GL_VERSION_OVERRIDE=2.1
              xterm -g 1x1+0+0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'
              _EOF_
              chmod +x "$md_inst/ikemen-go.sh"
              chown -R $user:$user "$md_inst"
              }

              As you can see there's still some weirdness that should be sorted out (specifically the wall of moveConfigDirs could probably be reduced, chown -R $user:$user "$md_inst" may be over-scoped, and make elecbyte probably should go in a game_data_ function), but this is still good enough to install IKEMEN GO in a way that works well with RetroPie's file structure.

              If you know how to install a scriptmodule into RetroPie manually, this should be testable! Just in case you don't though, here's a super-quick rundown of the procedure:

              • If you haven't already, enable SSH on RetroPie.
              • Open up whatever SSH program you prefer (I use PuTTY) and log into your Pi.
              • Navigate to /home/pi/RetroPie-Setup/scriptmodules/ports using the cd command.
              • Start up a text editor with elevated priveleges using sudo nano ikemen-go.sh.
              • Paste the contents of the scriptmodule above (in PuTTY, this can be accomplished by first copy-pasting the scriptmodule's contents in this post, and then simply right-clicking the PuTTY window), then press: Ctrl-X, then Y, then Enter / Return to save the file and exit nano.
              • If done correctly, there should be a new file called ikemen-go.sh present (You can verify this by running ls ikemen-go.sh). You can now exit your SSH program.
              • From here, you can access and run the scriptmodule like any other; by going into RetroPie Setup and going to "Manage Packages". IKEMEN GO will be under "Experimental".

              Addendum: Just for funsies, I made a launching.png image in the style of the Pixel theme's launching images, themed after the default screenpack in IKEMEN:
              launching.png

              ▲▼▲▼▲▼▲▼▲▼
              IKEMEN Go
              SRB2Kart
              ▼▲▼▲▼▲▼▲▼▲

              T 1 Reply Last reply 5 Aug 2021, 01:53 Reply Quote 1
              • T
                Troopaking @SuperFromND
                last edited by Troopaking 8 May 2021, 03:32 5 Aug 2021, 01:53

                @superfromndso I'm gonna test this soon.
                Installing now . Would love to have side by with my mugen

                1 Reply Last reply Reply Quote 0
                • J
                  joamjoamjoam
                  last edited by 5 Aug 2021, 03:47

                  @SuperFromND

                  Yeah it had to do with hoe precise, or imprecise, floating point operation were on the pi vs x86. It wasn't all unselfish either lol I wanted some MUGEN on piCade.

                  I tried installing the screen pack but was greeted with a permission error on start up.

                  something about save/stats.json. the ports/ikemen-go folder was missing the save folder also. even after copying a working save folder from my dev branch i got the same error.

                  let me know if there anything you want me to try. feel free to reach out on discord too.

                  Also on an unrelated note, I saw your video on the discord and your sound was working perfectly. on my pi4 the sound is garbled and terrible. I'm glad its not a real issue and did you do anything special to fix it?

                  S 1 Reply Last reply 5 Aug 2021, 04:02 Reply Quote 1
                  • S
                    SuperFromND @joamjoamjoam
                    last edited by SuperFromND 8 May 2021, 05:06 5 Aug 2021, 04:02

                    @joamjoamjoam Ah, I see! The save/stats.json error happens whenever IKEMEN is unable to write to the save folder (this is also why the chown command is there).

                    I set it up so that IKEMEN GO symlinks the save folder to the /opt/retropie/configs/ports/ikemen-go directory since that's where configs typically go in RetroPie; it's possible that some write permissions might be preventing it on your side and I simply didn't realize this due to my permissions possibly being set up non-standard (I use a USB stick to store my ROM collections, and I achieved it by manually symlinking on RetroPie to point to it; I think I might've chmod -R 777'd my configs folder and forgot about it).

                    This could probably be fixed really easily; as in just changing it to redirect to the roms location instead. Not a huge loss!

                    # the line in question:
                    moveConfigDir "$md_inst/save" "$configdir/ports/ikemen-go"
                    # the (very simple) fix:
                    moveConfigDir "$md_inst/save" "$romdir/ports/ikemen-go/save"

                    As for the sound thing... I have no idea actually! It just worked flawlessly whenever I installed it, though it was noticeable quiet (I ended up manually boosting the audio volume, both in IKEMEN's config.json and in post using MAGIX Vegas).

                    ▲▼▲▼▲▼▲▼▲▼
                    IKEMEN Go
                    SRB2Kart
                    ▼▲▼▲▼▲▼▲▼▲

                    J 1 Reply Last reply 5 Aug 2021, 04:58 Reply Quote 0
                    • J
                      joamjoamjoam @SuperFromND
                      last edited by joamjoamjoam 8 May 2021, 06:44 5 Aug 2021, 04:58

                      @superfromnd ah I see let me set the permission correctly in there and then I’ll try reinstalling the scripts with that change for the romdir.

                      The pi has a really bad sound system and it’s most notable in the volume outputted. If you get a usb sound card like this one on Amazon it makes it a lot better.

                      Sabrent USB External Stereo Sound Adapter:
                      Sabrent USB External Stereo Sound Adapter for Windows and Mac. Plug and Play No Drivers Needed. (AU-MMSA) https://www.amazon.com/dp/B00IRVQ0F8/ref=cm_sw_r_cp_api_glt_fabc_J3BVS30PKHX1RQX2MP17?_encoding=UTF8&psc=1

                      Heres the permission for the configs directory if your interested:
                      permissions.png

                      So a chown and chgrp to pi on the ikemen folder /opt/retropie/configs/ports worked perfectly and it matched what other ports were doing so I think adding in those will work a charm.

                      The audio issue is still there however so it might be an issue with my HDMI display and getting sound out of it. I see you were using composite audio out. I grabbed my bluetooth speaker and plugged it into the pi and voila perfect sound. Theres probably some HDMI audio issues with Alsa when using openAL or some configuration I might need to do.

                      So I think the three outstanding issues are

                      1. add a chown and chgrp to pi for ikemen config folder
                      2. add joystick support (i think we need to pipe DInput into Ikemen but im not sure how the joysticks work on the pi). Ill handle this one and see if i can get my fight stick up and running
                      3. Maybe add a basic config.json file for the pi since it defaults to being windowed 640x480. I had to manually set the fullscreen option to get it full screen for my 1080p display (which I think is unfortunately more common than CRTs these days.) We could use the opputunity to set the default audio volume a little higher for the pi too.
                      S 1 Reply Last reply 5 Aug 2021, 19:34 Reply Quote 0
                      • S
                        SuperFromND @joamjoamjoam
                        last edited by SuperFromND 8 May 2021, 21:22 5 Aug 2021, 19:34

                        @joamjoamjoam
                        The permissions thing could be sorted out really easily, something like this:

                        function configure_ikemen-go() {
                        mkRomDir "ports/ikemen-go"
                        addPort "$md_id" "ikemen-go" "I.K.E.M.E.N GO" "XINIT:$md_inst/ikemen-go.sh"
                        moveConfigDir "$md_inst/chars" "$romdir/ports/ikemen-go/chars"
                        moveConfigDir "$md_inst/stages" "$romdir/ports/ikemen-go/stages"
                        moveConfigDir "$md_inst/data" "$romdir/ports/ikemen-go/data"
                        moveConfigDir "$md_inst/external" "$romdir/ports/ikemen-go/external"
                        moveConfigDir "$md_inst/font" "$romdir/ports/ikemen-go/font"
                        moveConfigDir "$md_inst/sound" "$romdir/ports/ikemen-go/sound"
                        moveConfigDir "$md_inst/save" "$configdir/ports/ikemen-go/save"
                        cat >"$md_inst/ikemen-go.sh" << _EOF_
                        #!/bin/bash
                        export MESA_GL_VERSION_OVERRIDE=2.1
                        xterm -g 320x240+0+0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'
                        _EOF_
                        chmod +x "$md_inst/ikemen-go.sh"
                        chown -R $user:$user "$configdir/ports/ikemen-go/save"
                        }

                        I might have to tweak it a little bit (maybe using mkRomDir to create the folder with user-owner permissions instead of using a second chown command), and admittedly I haven't tested this fix yet, but that should do it, I think.

                        That's really interesting that you mentioned fullscreen; for whatever reason whenever I tried to set the fullscreen parameter in IKEMEN to true, it just crashes out entirely, no error log or anything. Maybe it's because I'm not using a window manager like matchbox? That might also explain why my IKEMEN window isn't centered when running on a CRT, resulting in accidental underscan.

                        I don't think a default config is really necessary here; a quiet volume is rather easy to remedy by the end user anyways, and adding a custom "default" config might cause issues down the road.

                        ▲▼▲▼▲▼▲▼▲▼
                        IKEMEN Go
                        SRB2Kart
                        ▼▲▼▲▼▲▼▲▼▲

                        T J 2 Replies Last reply 6 Aug 2021, 12:00 Reply Quote 0
                        • T
                          Troopaking @SuperFromND
                          last edited by 6 Aug 2021, 12:00

                          @superfromnd i just installed and got the json error as well. Permission denied ... I see you are working on a fix. Greatly appreciated
                          Would love to have this next to mugen .

                          J 1 Reply Last reply 6 Aug 2021, 13:58 Reply Quote 0
                          • J
                            joamjoamjoam @SuperFromND
                            last edited by 6 Aug 2021, 13:55

                            @superfromnd looks good . I think the chown needs to for the /opt/retropie/configs/ports/ikemen-GO folder to be safe. then since ikemen runs as the pi user anything it creates should have the right permissions.

                            About the default config i agree its better to not make assumptions on what people want I'm sure they can figure out how to use the ikemen settings. I would suggest that we set he fullscreen mode by default but it sounds like it may not work for everyone. I know that retroie has some built-in underscan/overscan options that might need to be applied.

                            Fullscreen does work for me using HDMI and booting it straight from Emulation Station. If you find anything else about this let me know and i can take a look in the code to see if we need to fix something there.

                            1 Reply Last reply Reply Quote 1
                            • J
                              joamjoamjoam @Troopaking
                              last edited by 6 Aug 2021, 13:58

                              @troopaking In case your wanting a quick fix until Super can get the scriptpack out all you need to do is

                              sudo chmod 666 /opt/retropie/configs/ports/ikemen-go
                              chown pi /opt/retropie/configs/ports/ikemen-go
                              chgrp pi /opt/retropie/configs/ports/ikemen-go
                              mkdir /opt/retropie/configs/ports/ikemen-go/save

                              1 Reply Last reply Reply Quote 0
                              • H
                                h2805270
                                last edited by 6 Aug 2021, 17:17

                                When I have some time, I can make a "IKEMEN GO Pi" logo if anyone wants it.

                                After all, this version is very specifically tweaked.

                                1 Reply Last reply Reply Quote 1
                                • S
                                  SuperFromND
                                  last edited by SuperFromND 8 Jul 2021, 20:31 6 Aug 2021, 19:43

                                  Okay, status update: turns out that you DO need to chown the entire /ports/ikemen-go directory, as otherwise IKEMEN crashes due to not being able to write Ikemen.log as well as saving screenshots. I've moved the save folder to a subdirectory in the config folder anyways since that just looks nicer.

                                  My current scriptmodule looks like this, tested and confirmed to install IKEMEN GO correctly:

                                  #!/usr/bin/env bash
                                  # This file is part of The RetroPie Project
                                  #
                                  # The RetroPie Project is the legal property of its developers, whose names are
                                  # too numerous to list here. Please refer to the COPYRIGHT.md file distributed with this source.
                                  #
                                  # See the LICENSE.md file at the top-level directory of this distribution and
                                  # at https://raw.githubusercontent.com/RetroPie/RetroPie-Setup/master/LICENSE.md
                                  #
                                  rp_module_id="ikemen-go"
                                  rp_module_desc="I.K.E.M.E.N GO - Clone of M.U.G.E.N to the Go programming language"
                                  rp_module_licence="MIT https://raw.githubusercontent.com/Windblade-GR01/Ikemen-GO/master/License.txt"
                                  rp_module_help="Copy characters, stages, screenpacks, etc. to $romdir/ports/ikemen-go\n\nNOTE: Both IKEMEN GO and this module are W.I.P and may not work fully yet, if at all. Use at your own risk!"
                                  rp_module_section="exp"
                                  function depends_ikemen-go() {
                                  getDepends golang-go libgl1-mesa-dev xinit xorg xorg-dev libopenal1 libopenal-dev libgtk-3-dev libasound2-dev freeglut3-dev
                                  }
                                  function sources_ikemen-go() {
                                  gitPullOrClone "$md_build" https://github.com/Windblade-GR01/Ikemen-GO.git
                                  }
                                  function build_ikemen-go() {
                                  go clean
                                  go mod tidy
                                  make TAGS='-tags al_cmpt' linux
                                  # grabs default screenpack and content required for the game to run; note that the screenpack has a CC-BY-NC 3.0 license
                                  make elecbyte
                                  md_ret_require="$md_build/Ikemen_GO"
                                  }
                                  function install_ikemen-go() {
                                  cp 'elecbyte/LICENCE.txt' 'ScreenpackLicense.txt'
                                  mkdir save sound
                                  md_ret_files=(
                                  'Ikemen_GO'
                                  'License.txt'
                                  'ScreenpackLicense.txt'
                                  'data'
                                  'save'
                                  'sound'
                                  'font'
                                  'external'
                                  'elecbyte/chars'
                                  'elecbyte/stages'
                                  'elecbyte/data'
                                  'elecbyte/font'
                                  )
                                  }
                                  function configure_ikemen-go() {
                                  mkRomDir "ports/ikemen-go"
                                  addPort "$md_id" "ikemen-go" "I.K.E.M.E.N GO" "XINIT:$md_inst/ikemen-go.sh"
                                  moveConfigDir "$md_inst/chars" "$romdir/ports/ikemen-go/chars"
                                  moveConfigDir "$md_inst/stages" "$romdir/ports/ikemen-go/stages"
                                  moveConfigDir "$md_inst/data" "$romdir/ports/ikemen-go/data"
                                  moveConfigDir "$md_inst/external" "$romdir/ports/ikemen-go/external"
                                  moveConfigDir "$md_inst/font" "$romdir/ports/ikemen-go/font"
                                  moveConfigDir "$md_inst/sound" "$romdir/ports/ikemen-go/sound"
                                  moveConfigDir "$md_inst/save" "$configdir/ports/ikemen-go/save"
                                  #MESA_GL_VERSION_OVERRIDE works around an OpenGLES version detection bug
                                  cat >"$md_inst/ikemen-go.sh" << _EOF_
                                  #!/bin/bash
                                  export MESA_GL_VERSION_OVERRIDE=2.1
                                  xterm -g 1x1+0+0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'
                                  _EOF_
                                  chmod +x "$md_inst/ikemen-go.sh"
                                  #required so IKEMEN doesn't crash when trying to write log file
                                  chown -R $user:$user "$md_inst"
                                  chown -R $user:$user "$configdir/ports/ikemen-go/save"
                                  }

                                  I still need to write a remove_ikemen-go function since right now it doesn't do anything, and maybe move make elecbyte into a game_data_ikemen-go function, but other than that it seems mostly good.

                                  Also, if it's possible, I'd like to figure out how to get IKEMEN GO to display centered; right now it just displays itself in the top-left corner of the screen (which is probably due to a lack of window manager running). On HDMI you can just use a video mode override to force 640x480, but you can't do that on Composite which is fixed ever-so-slightly off, at 720x480.

                                  ADDENDUM 8/6/2021 10:13PM: I figured out that this ikemen-go.sh configuration allows IKEMEN GO to run in matchbox:

                                  #!/bin/bash
                                  export MESA_GL_VERSION_OVERRIDE=2.1
                                  xset -dpms s off s noblank
                                  matchbox-window-manager -use_titlebar no &
                                  xterm -g 1x1+0+0 -e 'cd /opt/retropie/ports/ikemen-go && ./Ikemen_GO'

                                  Curiously though, instead of starting the window centered like one would expect, instead it runs the game in the bottom-left corner, not the top-left. Fullscreen also doesn't crash the engine anymore, though it also doesn't work properly as the viewport ends up offsetting itself vertically. (The effect can be reduced by switching the game's resolution to 720p, but it doesn't fix it.)

                                  This at least proves it's possible to run the game with matchbox, but hilariously it seems to actually do nothing at all to improve the IKEMEN GO experience on RetroPie.

                                  ▲▼▲▼▲▼▲▼▲▼
                                  IKEMEN Go
                                  SRB2Kart
                                  ▼▲▼▲▼▲▼▲▼▲

                                  J 1 Reply Last reply 7 Aug 2021, 09:35 Reply Quote 0
                                  • J
                                    joamjoamjoam @SuperFromND
                                    last edited by 7 Aug 2021, 09:35

                                    @superfromnd Yeah i thought i saw someone in the discord talking about having it center by default. The initial window position is handled in the code by glfw. Interestingly on the desktop version of raspbian it was always starting in bottom right corner lol.

                                    I think the better fix for this situation would be to use fullscreen since that matches what every other retropie port/emulator does so I think its what the average retropie user would expect. We could probably add the window start position to the options but we would have to submit a feature request and get it approved.

                                    1 Reply Last reply Reply Quote 1
                                    • S
                                      SuperFromND
                                      last edited by SuperFromND 8 Jul 2021, 22:57 7 Aug 2021, 20:07

                                      I thought I had a lead to fixing the fullscreen bug; turned out to not be anything but I thought it was worth mentioning here anyways:

                                      When starting IKEMEN GO in Matchbox, this warning would pop up briefly:

                                      WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown
                                      

                                      I thought that this was somehow related, and a quick Google search lead me to find that installing at-spi2-core fixes this warning. Unfortunately, that's all it does, as it doesn't affect IKEMEN GO whatsoever (the warning didn't affect IKEMEN GO at all, whether it was there or not).

                                      It also seems like fullscreen in general is just kinda wonky in IKEMEN GO, at least for me: toggling fullscreen on and then off causes the IKEMEN GO window's viewport to be offset a bit, at least on Windows 7:
                                      fullscreen weirdness.png
                                      I'll report this as a bug on their Github, and hopefully fixing this will also fix fullscreen stuff in Matchbox.

                                      If all else fails, we can at least just tell folks to use the video mode override in RetroPie to "force" full-screen (although this wouldn't work on composite out due to it using a fixed 720x480 resolution.) My own workaround for composite is just deliberately configuring the Pi to have an offset overscan:

                                      # /boot/config.txt settings I use for IKEMEN GO on CRT
                                      # Note that these are only grouped here for visual convenience
                                      # In the actual file, search for these lines and uncomment/adjust accordingly
                                      
                                      enable_tvout=1
                                      disable_overscan=1
                                      overscan_scale=1
                                      overscan_left=30
                                      overscan_right=-10
                                      

                                      ▲▼▲▼▲▼▲▼▲▼
                                      IKEMEN Go
                                      SRB2Kart
                                      ▼▲▼▲▼▲▼▲▼▲

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        duiz
                                        last edited by 7 Aug 2021, 23:07

                                        I'm new to the topic so apologies of this is a tired question. But what exactly is the compatibility for MUGEN titles on IKEMEN? Can this basically play most MUGEN games on the pi, or do they need to be recompiled for IKEMEN specifically?

                                        S 1 Reply Last reply 7 Aug 2021, 23:12 Reply Quote 0
                                        • S
                                          SuperFromND @duiz
                                          last edited by 7 Aug 2021, 23:12

                                          @duiz IKEMEN GO is fully backwards compatiable with MUGEN stuff, pretty much the exact same file structure (with the only big difference being a lack of mugen.cfg, with config.json taking that functionality).

                                          I actually tested Hyper Dragon Ball Z over here on Twitter, and it pretty much worked with near-zero hassle (the only thing I had to modify was a single line in system.def to fix a broken file path).

                                          ▲▼▲▼▲▼▲▼▲▼
                                          IKEMEN Go
                                          SRB2Kart
                                          ▼▲▼▲▼▲▼▲▼▲

                                          D 1 Reply Last reply 8 Aug 2021, 00:13 Reply Quote 0
                                          49 out of 151
                                          • First post
                                            49/151
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received