I.K.E.M.E.N GO on Raspberry Pi 4 [Now with an Install Guide!]
-
@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.
-
@superfromnd Thanks for this. I have done a quick review only so far but appreciate the contribution.
-
Good news for composite-out/CRT people like me! I figured out how to make IKEMEN GO center itself in windowed mode, and thus display properly on CRT without an overscan hack!
Jools gave the scriptmodule a quick review and informed me of a few things that needed to be rectified, and one of them was the removal of a few unnecessary dependencies that were rendered redundant by their
-dev
package variants.Well, it turns out that the binaries installed by
apt-get install xorg
were the cause of IKEMEN GO not centering itself! Simply removing the package was all it took to fix it, and now it displays at the proper size on CRT (which looks pretty awesome and elegaic when you turn off all the other lights, by the way):
-
Progress report on the RetroPie submission: The review noted a few things that needed to change in the script. Most of it was relatively easy stuff, like using the
git_module_repo
system and some minor re-ordering of commands. The one that's proven to be more difficult is minimizing the number of dependencies that are installed. Here's a quick re-cap of those:- golang-go: Required; this is the language IKEMEN GO is written in.
- libgl1-mesa-dev: Required; Go-GLFW dependency.
- xinit: Required; this launches the X server for displaying the game.
- xorg: See below.
- xorg-dev: See below.
- libopenal1: Not required; libopenal-dev makes this redundant.
- libopenal-dev: Required; Go-GLFW dependency.
- libgtk-3-dev: Unsure. Originally added due to errors early on in this project.
- libasound2-dev: Required; Go-GLFW dependency.
- freeglut3-dev: Not required. Originally added due to errors early on in this project.
The two that have proven to be the most contentious are
xorg
andxorg-dev
.xorg-dev
is a dependency for Go-GLFW, and theoreticallyxorg
is unnecessary... right? Well, no, because if you exclude it in the scriptmodule, Xinit crashes due to not being able to find X:Parameters: Executing: xinit /dev/shm/retropie_xinitrc -- vt1 -keeptty xinit: unable to run server "X": No such file or directory Use the -- option, or make sure that /usr/bin is in your path and that "X" is a program or a link to the right type of server for your display. Possible server names include: Xorg Common X server for most displays Xvfb Virtual frame buffer Xfake kdrive-based virtual frame buffer Xnest X server nested in a window on another X server Xephyr kdrive-based nested X server Xvnc X server accessed over VNC's RFB protocol Xdmx Distributed Multi-head X server xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error
So by process of elimination,
xorg-dev
is the one that would need to be removed andxorg
by itself is good. Mystery solved... right? Well, no, because if you have justxorg
installed, then IKEMEN GO can start correctly...until a K.O. is achieved, which causes IKEMEN GO to crash with an error like this:./external/script/randomtest.lua:257: ./external/script/start.lua:1251: __len undefined stack traceback: ./external/script/start.lua:1251: in function 'f_turnsRecovery' ./external/script/global.lua:239: in function 'loop' <string>:1: in function <<string>:0> [G]: in function 'game' ./external/script/randomtest.lua:257: in function 'f' external/script/main.lua:2992: in function 'loop' external/script/main.lua:3076: in function 'loop' external/script/main.lua:4051: in main chunk [G]: ? stack traceback: [G]: in function 'game' ./external/script/randomtest.lua:257: in function 'f' external/script/main.lua:2992: in function 'loop' external/script/main.lua:3076: in function 'loop' external/script/main.lua:4051: in main chunk [G]: ?
It seems as if~xorg-dev
isn't installing certain packages thatxorg
is, but at the same timexorg
isn't installing something that's causing IKEMEN GO builds to be a little screwy as a result. Installing both does seem to fix the problem, but I imagine that's not ideal for RetroPie's maintainers.There's also the possibility the real cause is something less severe; these changes were made at the same time as some directory-creation and permission changes, so it's completely possible that IKEMEN GO just isn't able to read or write something and that's causing it to go kerpoot somehow.ADDENDUM: Scratch all that, turns out I was just being a tad paranoid; this doesn't seem to be a bug with the libraries, and
xorg
on it's own is sufficient after all. My reasoning: there's a consistent way of reproducing this crash, and there's a consistent way to fix it too:Starting up IKEMEN GO and going straight into Random Test causes the crash, but going into any other mode first and then Random Test averts the crash. I've actually seen this exact behavior when trying to make my own LUA addons before, so it's possible this is a bug on IKEMEN's side and not on the Pi specifically. Crisis averted.
ADDENDUM 2: This was indeed a bug on IKEMEN's side, and one of the devs fixed it once I posted about it. That's a relief.
-
@superfromnd Amazing to see such rapid progress on this. This might be the most exciting addition to RetroPie IMO.
-
Sweet looks good. I'm curious as to what the issue was so ill cruise by the Github and check it out.
Out of curiosity how does the Retropie/Script pack process go. Do you submit it to them for addition to the experimental packages??
-
@joamjoamjoam Correct! You create a scriptmodule and then PR it to the RetroPie/RetroPie-Setup Github for approval. If it's merged, it's added.
The randomtest fix was apparently this.
-
@superfromnd oh nice seems like it was completely unrelated a to a CRT or fullscreen then. Sweet let me know if there is anything else I can help out with to help make this a reality.
Side Note: I did find another bug on the pi side only where the command list for the characters is drawing some random white triangles when you try to view it. I might take a look at it this weekend. If i can confirm it ill post an issue in github to track the progress. Its most likely another difference in precision thing.
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.