krishenriksen / AnberPorts

AnberPorts for Anbernic RG351P/M and RG351V running ArkOS, 351elec and The RA.
https://github.com/sponsors/krishenriksen
MIT License
104 stars 19 forks source link

Port Request:MKXP #51

Open Chiffon-Pudding opened 3 years ago

Chiffon-Pudding commented 3 years ago

Hello. I have successfully built and run "MKXP"(https://github.com/Ancurio/mkxp) on ArkOS on RG351P. https://www.reddit.com/r/RG350/comments/kuy4d2/mkxp_with_arkos_on_rg351p/ 118498970-7d7d3380-b761-11eb-91aa-1d42b324221d

MKXP is licensed under the GPL-2.0 License,and this allows us to run RPG Maker XP/VX/VXAce games. It appears to work well, although there are some somewhat heavy running, some graphical bugs and font problems (by default, problems with Japanese, etc.), and a few games that don't work (e.g. when using the Win32API).

The libraries required for this binary are as follows.

For the latest version of Arkos, these will be installed by installing the following package, which takes up 31.5 MB of space.

If you want to test the operation with the current build, follow the steps below. Access the game console to the network and make sure to update the OS of your game console to the latest version, and install the above package. For ArkOS, access via ssh and execute the commands in the following order.

  1. "sudo apt update"

  2. "sudo apt install libsigc++-2.0-0v5 libphysfs1 libboost-program-options1.67.0 libruby2.5"

  3. Next, Download and unzip the zip file.mkxp_rd.zip

  4. Copy "mkxp.bin.aarch64" and "mkxp_rd.sh" into "/roms/bios/".

  5. Create a folder "rtp" in "/roms/bios/", which is the same folder used by easyRPG.

  6. Download the official RPGMaker RTP and copy it so that "Standard", "RPGVX", and "RPGVXAce" are in "/roms/bios/rtp/".

  7. Create a "SoundFonts" folder in "/roms/bios/", and create an "sf2" folder in it.

  8. Copy "GMGSx.sf2" into the "/roms/bios/SoundFonts/sf2/" folder. This is not required, but if not done, Midi will not play." GMGSx.sf2" is a SoundFont that can output sounds similar to MSGS (used in RPGMaker XP, VX, and VXAce). It is in the public domain.

  9. Create a "mkxp" folder in "/roms/ports/" and copy the game you want to play into it so that it becomes "/roms/ports/mkxp/Your_game/". The game folder should have Game.ini directly under it. The name of the game folder can be anything you want, but it may not work well if it contains spaces.

  10. Copy "Project1.sh" into "/roms/ports/mkxp/" and rename it to "Your_game.sh". This is the same name as the game folder you just installed. This is because the shell script interprets the name of the game folder as the name of the shell script's own file in the same folder as the shell script itself, minus the ".sh".

You can install as many games as you like, as long as your SD card is full. Don't forget to install a shell script with the same name as the game folder.

Once you have done this, you will find the "MKXP" folder in the "PORTS" section of EmulationStation, and in it you should see the game you have installed. Select it, run it, and the game will start.

It is possible to specify MKXP runtime options in the shell script "mkxp_rd.sh". The arguments passed to the "mkxp_rd.sh" have the highest priority,and in this order: mkxp_rd.conf in the game folder, /roms/bios/mkxp_rd.conf, the arguments listed in the "mkxp_rd.sh", and the mkxp defaults.

/roms/bios/mkxp_rd.conf is a global configuration file. If there are any items set in the config file in the game folder, they will take precedence, but it is convenient to put the settings you want to use for all games here. There are three differences between the settings in "mkxp_rd.sh" and the default settings in mkxp: --vsync=true, --midi.chorus=true, and --midi.reverb=true.

You can use mkxp_rd.conf as it is, which is a renamed version of mkxp.conf. However, it is not recommended to use mkxp.conf.sample as it is, because the large number of lines slows down the process. You can also specify XP_RTP, VX_RTP, VXAce_RTP, and MKXP_PATH as additional arguments; in addition to the --RTP argument, RTP will recognize the official RTP listed in Game.ini and automatically load it from the paths specified in these arguments if necessary. MKXP_PATH can be the path of the mkxp executable itself.

mkxp hardcodes fonts and key configs and builds them into the binary. Currently, my build uses WenQuanYi_Micro_Hei.ttf. Only the filename of WenQuanYi Micro Hei.ttf is renamed space to underscore, and it is licensed under the Apache License V2.0, GNU General Public License version 3.0 (GPLv3). This font file was downloaded from the following URL:https://github.com/topikachu/createfont/blob/master/WenQuanYi%20Micro%20Hei.ttf The key configuration is used as described in the reddit page above. I believe that decisions about these hard-coded fonts and key configurations should be made in consultation.

The build procedure is as shown in the link above, but it is known that the latest version of ArkOS fails to build (undefined reference error). This binary was generated by forcing (dependency issues) libboost 1.67-dev and libboost-program-options1.67-dev to be installed and built on L4T Ubuntu on Nintendo Switch.

I was able to build "MKXP-Z"(https://github.com/night-burst/mkxp-z), but when I try to run it, I get an "Error initializing SDL: No available video device" error and it immediately quits. "NW.js" (for RPGMaker MV, Ver. 0.23.7... the only version with Arm64 build https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/tag/v0.23.7) does not output anything and quits immediately too.

I use a lot of machine translation services(DeepL). I apologize if there are any strange parts.

Ancurio commented 2 years ago

ウチのソフトと色々と苦難したようですね。それはすみません。特にフォントの問題は認識しています、取り敢えずは Fonts/ に置いてmkxp.confかcommand line parameterで指定する手もありますがbinaryに密着させるフォントをどうか設定できたほうがいいと分かってます。

今度は自分でもportしようと思ってますからよかったらウチらのDiscordに参加しませんか?招待はこちら: https://discord.gg/A8xHE8P

英語じゃなくても全然平気ですから :) mkxp-zの開発者も日本語okですし

Manurocker95 commented 1 year ago

I was able to build "MKXP-Z"(https://github.com/night-burst/mkxp-z), but when I try to run it, I get an "Error initializing SDL: No available video device" error and it immediately quits.

Can you share how did you manage to see the logs for MKXP-Z errors? I ended compiling for ARM by cross-compiling and on my M1 mac but both crash (even if they work on ubuntu ARM x64).

This is the compiled version of mkxp-z but it crashes without logs nor anything...

mkxp-z.zip