I.K.E.M.E.N GO on Raspberry Pi 4 [Now with an Install Guide!]
-
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.
-
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 writeIkemen.log
as well as saving screenshots. I've moved thesave
folder to a subdirectory in theconfig
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 movemake elecbyte
into agame_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 inmatchbox
:#!/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. -
@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.
-
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:
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
-
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?
-
@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). -
@superfromnd Interesting. Has anyone tried that Justice League vs TMNT to see if that works?
-
@duiz Not to my knowledge, but theoretically it should work just fine.
-
Im having reproducing the fullscreen lets call it wonkiness that you saw on Windows 7. I have .97 release on windows 10 (a brand new laptop actually) and i can toggle fullscreen on and off without issue. What Ikemen version are you using?
I also installed a fresh retropie distro on a fresh sd card and was able to run the og scriptpack with the manual permissions fix without issues. Setting fullscreen on that also worked as intended on a 4k TV via HDMI.
I wonder if the issues you are seeing are related to overscan and running on your super fancy CRT. The fullscreen and resolution options are handle by a well tested graphics library (GLFW) so i wouldn't suspect that there is something wrong in the Ikemen source. It doesn't handle overscan natively as digital video outputs do no use overscan (usually) so that could explain why your video is offset. If there was anything that might be needed to be handled buy Ikemen it would be the sset your screen size stuff that games do where you have to shrink the screen until you see the arrows but that is done under the hood by just chaninging the resolution on the screen.
You can do this in the config.json by setting a custom resolution to see if it resolves the screen being off center.
Just for clarity the fullscreen bug you mention is the screen being off center leaving black bars on the screen or cutting off the screen etc? If so is this only on a CRT or does this also affect a screen using hdmi or other digital output?
-
I just added TMNT to my arcade last night and it converted to Ikemen just fine. Its as simple as taking all the Mugen files and copying them on top of the Ikemen files. Then you have to start Ikemen once to generate a config.json file in the save folder. After that copy the motif setting from data/mugen.cfg to the motif field in save/config.json.
-
@joamjoamjoam I just now re-tested fullscreen (using the regular launching script, not
matchbox
) and it seems to work on HDMI now, strangely enough! Previously it would just instantly crash the second I toggled it on, but I guess at some point that got fixed on RPi. Or maybe the crashing was always fixed on HDMI, and it only crashed when trying to run fullscreen on composite... actually that probably IS the reason.You can indeed just set a custom resolution (720x480) on IKEMEN to fill the screen on composite (though that's not ideal for me since that results in slightly upscaled sprites, which looks a little weird; it's something that can always be fixed later down the line though). Admittedly I spend almost all of my RetroPie time on HDMI anyways; the CRT I used to record demos was purely for looks (as MUGEN/IKEMEN running on a CRT just looks plain awesome).
The bug I was running into via
matchbox
was very different; the screen would be correctly set to the given resolution, but when trying to fullscreen,matchbox
would crop itself to the top-left corner and not adjust itself to the position of the game, resulting in most of the game's screen being cropped off:
I'm assuming that this is because of OpenGL fundamentally using the bottom-left corner as its basis instead of the top-left. Since the fullscreen crashes I was getting earlier have apparently fixed themselves,matchbox
won't be needed anyways, but it's still pretty odd. The main reason I was trying to use it was hope that it would center the IKEMEN window (which would solve my CRT display problems), but for whatever reason that doesn't seem to be the case. -
The crt does look pretty cool lol. Glad to hear the full screen on hdmi works. The problem with matchbox is that when Ikemen opens the window it doesn’t specify a location it just asks for a certain sized widow. So it’s up to whatever the X server defaults to when creating a new window it could be easily fixed by specifying a location like always start on top left etc in the source.
It looks like we finally have a working Ikemen implementation for RetroPie. Good job everyone!
-
@joamjoamjoam Huzzah indeed! 🎉
All that's left is to test my current scriptmodule on a fresh RetroPie install to verify that it does indeed work properly, and then I guess it'll be it'll be time to submit it to RetroPie! Or maybe I should post the script here and ask for people to test it themselves for a day or two before submitting?
Let me know, what do you guys think I should do?
ADDENDUM: I just installed a fresh copy of RetroPie on an SD card, no fancy USB mounting or anything, and ran the script and... it works! Although I did have to add one more
chown
since the files were being copied withroot
as the owner and644
permissions, meaning the user couldn't edit them.# Recursively set all files in the ports folder to be owned by the user, so that they can be edited (which is pretty important in a highly customizable game engine) chown -R $user:$user "$romdir/ports/ikemen-go/."
Took about 30 minutes to install from the scriptmodule, but once it did, it booted without any other hassle. Cue sigh of relief.
-
@superfromnd nice i would say submit it. i also ran it from a fresh install and only hit these permission errors. so since they are ironed out i say lets do it. If you post you the full script here ill run it one more again to test it out.
-
@joamjoamjoam Alrighty, here's the script:
#!/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\nConfig.json can be found at $configdir/ports/ikemen-go/save" 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" cat >"$md_inst/ikemen-go.sh" << _EOF_ #!/bin/bash export MESA_GL_VERSION_OVERRIDE=2.1 xterm -g 1x1+0+0 -e 'cd $md_inst && ./Ikemen_GO' _EOF_ chmod +x "$md_inst/ikemen-go.sh" chown -R $user:$user "$md_inst" chown -R $user:$user "$romdir/ports/ikemen-go/." chown -R $user:$user "$configdir/ports/ikemen-go/save" }
-
Worked for me with no permission changes on a fresh install.
-
@joamjoamjoam Awesome! I just submitted the PR:
https://github.com/RetroPie/RetroPie-Setup/pull/3384 -
@joamjoamjoam Amazing! Does this allow multiple MUGEN games to be installed or is it one game only per now? Basically wondering if it generates a game list like emulators do or not.
-
@duiz Right now, with how the file structure is set up, it just deals with one game for the sake of simplicity.
Theoretically it should be possible to set it up in a way to allow multiple MUGEN fullgames to be installed at once (as really all you need to do is point to different
system.def
files, which handle the selectable character/stages and screenpack from there; you can do this in IKEMEN viaIkemen_GO -m foo/bar/system.def
and it shouldn't be too hard to modify the script to pass a specificsystem.def
as an argument), but for now it's just the one. -
@superfromnd This sounds really exciting! I'll hold off on trying it until it is a bit more complete but I love the work you been doing! This is like a dream come true.
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.