MININIM next major release

A free software implementation of Prince of Persia 1.
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

MININIM next major release

Post by oitofelix »

Greetings Prince of Persia Community!

Just to put me on track with MININIM development again and to facilitate testing for people interested in the next major release of MININIM, I built a self-contained package ready to run under GNU/Linux x86_64. It represents the state of development of the next release branch at December 2017. More recently I just upgraded the code to use Lua 5.3 (before it used 5.0).

https://github.com/oitofelix/mininim/re ... _64.tar.xz

Don't expect everything to work perfectly. Be aware that several planned features are not completely implemented yet. Please, let me know any issues you have with this alpha release.

PS: I'll try to be less perfectionist between releases, making more frequent builds---as soon as new meaningful features become ready. This way users of MININIM can benefit from incremental improvements without needing to have computer literacy up to the task of building the source code themselves. After all, it seems that even technically competent people find somewhat challenging to build MININIM. So, let me do what I can to help.

PS: I fixed a rendering bug for the palace environment and uploaded a new tarball. URL is the same.
Last edited by oitofelix on September 28th, 2020, 7:31 am, edited 1 time in total.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: MININIM next major release

Post by atrueprincefanfrom18 »

Wow, it works great! Thanks for creating it!

Yes, it's a bit difficult and complex to compile it, as compared to the SDLPoP and Apoplexy, there's no make file so it makes things worse.

Yes, I'll test more and let you know here if I find bugs :)
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

atrueprincefanfrom18 wrote: September 26th, 2020, 9:20 am Wow, it works great! Thanks for creating it!
You're welcome.
atrueprincefanfrom18 wrote: September 26th, 2020, 9:20 am Yes, it's a bit difficult and complex to compile it, as compared to the SDLPoP and Apoplexy, there's no make file so it makes things worse.
Actually, there are makefiles; those are created by the configure script, which in turn is created by the bootstrap script. Canonical GNU build system.
atrueprincefanfrom18 wrote: September 26th, 2020, 9:20 am Yes, I'll test more and let you know here if I find bugs :)
Thanks!
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
atrueprincefanfrom18
Site Shah
Site Shah
Posts: 1782
Joined: January 21st, 2020, 2:53 pm
Contact:

Re: MININIM next major release

Post by atrueprincefanfrom18 »

Cannot reach the Princess room, as soon as I reached it, the GUI got closed and I could see this on the console:

Code: Select all

MININIM> ./mininim: line 14: 11903 Segmentation fault      (core dumped) "$app_path/lib/mininim" --library-path "$app_path/lib" "$app_path/lib/mininim-exec" "$@"
By the way, nice fixes of almost all bugs ;)
Love to create new MODS :)

My complete list of mods until now!

My channel. Do consider subscribing it! :)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: MININIM next major release

Post by Norbert »

I run into:
@ren ~/Desktop/mininim-200925-gnu-linux64 $ ./mininim
/home/norbert/Desktop/mininim-200925-gnu-linux64/lib/mininim-exec: init_video (void): failed to initialize display
I currently have a VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev cd).
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

Norbert wrote: September 26th, 2020, 1:50 pm I run into:
@ren ~/Desktop/mininim-200925-gnu-linux64 $ ./mininim
/home/norbert/Desktop/mininim-200925-gnu-linux64/lib/mininim-exec: init_video (void): failed to initialize display
I currently have a VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev cd).
Did you have an X11 server running and the DISPLAY environment variable was set properly?

What's the exact version of GNU/Linux you are running? What's the result of

Code: Select all

lsb_release -a
or

Code: Select all

cat /etc/issue
?
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: MININIM next major release

Post by Norbert »

I'm currently using a very simple PC. Maybe its GPU, a basic onboard chip, is missing a feature.
Or the (MESA?) driver is not compatible with Allegro, or something.

Here's the info you requested:
==========
@ren ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 20
Release: 20
Codename: ulyana
@ren ~ $ cat /etc/issue
Linux Mint 20 Ulyana \n \l

@ren ~ $ set|grep DISPLAY
DISPLAY=:0.0
SDL_VIDEO_FULLSCREEN_DISPLAY=0
@ren ~ $
==========
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: MININIM next major release

Post by Norbert »

More info:
==========
@ren ~ $ lspci | grep VGA
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev cd)
@ren ~ $ lsmod | grep "kms\|drm"
drm_kms_helper 184320 1 amdgpu
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
drm 491520 7 gpu_sched,drm_kms_helper,amdgpu,ttm
@ren ~ $ find /dev -group video
/dev/fb0
/dev/dri/card0
@ren ~ $ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-48-generic root=UUID=e23d3f8c-38dc-4339-97d4-4755ad40a022 ro quiet splash
@ren ~ $ find /etc/modprobe.d/
/etc/modprobe.d/
/etc/modprobe.d/blacklist.conf
/etc/modprobe.d/alsa-base.conf
/etc/modprobe.d/dkms.conf
/etc/modprobe.d/amd64-microcode-blacklist.conf
/etc/modprobe.d/blacklist-oss.conf
/etc/modprobe.d/blacklist-rare-network.conf
/etc/modprobe.d/blacklist-ath_pci.conf
/etc/modprobe.d/blacklist-firewire.conf
/etc/modprobe.d/iwlwifi.conf
/etc/modprobe.d/osspd.conf
/etc/modprobe.d/blacklist-framebuffer.conf
/etc/modprobe.d/intel-microcode-blacklist.conf
/etc/modprobe.d/blacklist-modem.conf
@ren ~ $ cat /etc/modprobe.d/*kms*
# modprobe information used for DKMS modules
#
# This is a stub file, should be edited when needed,
# used by default by DKMS.
@ren ~ $ ls /etc/X11/xorg.conf
ls: cannot access '/etc/X11/xorg.conf': No such file or directory
@ren ~ $ glxinfo | grep -i "vendor\|rendering"
direct rendering: Yes
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
Vendor: X.Org (0x1002)
OpenGL vendor string: X.Org
@ren ~ $ grep LoadModule /var/log/Xorg.0.log
[ 6.290] (II) LoadModule: "glx"
[ 6.308] (II) LoadModule: "amdgpu"
[ 6.315] (II) LoadModule: "ati"
[ 6.333] (II) LoadModule: "modesetting"
[ 6.334] (II) LoadModule: "fbdev"
[ 6.335] (II) LoadModule: "vesa"
[ 6.357] (II) LoadModule: "fbdevhw"
[ 6.359] (II) LoadModule: "fb"
[ 6.361] (II) LoadModule: "dri2"
[ 6.576] (II) LoadModule: "glamoregl"
[ 6.718] (II) LoadModule: "ramdac"
[ 7.066] (II) LoadModule: "libinput"
@ren ~ $ lspci -k | grep -EA3 'VGA|3D|Display'
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev cd)
DeviceName: OnBoard IGD
Subsystem: Hewlett-Packard Company Picasso
Kernel driver in use: amdgpu
@ren ~ $
==========
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

Norbert wrote: September 26th, 2020, 6:11 pm I'm currently using a very simple PC. Maybe its GPU, a basic onboard chip, is missing a feature.
Or the (MESA?) driver is not compatible with Allegro, or something.
I made a debug alpha-release to hopefully track down this issue. You can get it here:

https://github.com/oitofelix/mininim/re ... bug.tar.xz

After running mininim, the file allegro.log will be generated in the top level directory. That may help we figure out what's wrong.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

atrueprincefanfrom18 wrote: September 26th, 2020, 9:53 am Cannot reach the Princess room, as soon as I reached it, the GUI got closed and I could see this on the console:
Fixed that in this commit. Thanks for reporting!

There aren't any actors in any cutscenes, though. That's because I have to export an interface from the C engine to the Lua world for cutscene programming. This will allow mods to build their own arbitrary cutscenes for the introduction, ending and level transitions.
atrueprincefanfrom18 wrote: September 26th, 2020, 9:53 am By the way, nice fixes of almost all bugs ;)
:P
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: MININIM next major release

Post by Norbert »

oitofelix wrote: September 26th, 2020, 8:16 pmAfter running mininim, the file allegro.log will be generated in the top level directory.
Attached.
Attachments
allegro.log.txt
(165.67 KiB) Downloaded 85 times
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

Norbert wrote: September 26th, 2020, 10:45 pm Attached.
The critical code in Allegro that seems to be failing is this:
if (glXGetConfig (dpy, v, GLX_RGBA, &rgba)
|| glXGetConfig (dpy, v, GLX_USE_GL, &use_gl)
|| glXGetConfig (dpy, v, GLX_BUFFER_SIZE, &buffer_size)
|| glXGetConfig (dpy, v, GLX_RED_SIZE, &eds->settings[ALLEGRO_RED_SIZE])
|| glXGetConfig (dpy, v, GLX_GREEN_SIZE, &eds->settings[ALLEGRO_GREEN_SIZE])
|| glXGetConfig (dpy, v, GLX_BLUE_SIZE, &eds->settings[ALLEGRO_BLUE_SIZE])
|| glXGetConfig (dpy, v, GLX_ALPHA_SIZE, &eds->settings[ALLEGRO_ALPHA_SIZE])
|| glXGetConfig (dpy, v, GLX_DOUBLEBUFFER, &double_buffer)
|| glXGetConfig (dpy, v, GLX_STEREO, &eds->settings[ALLEGRO_STEREO])
|| glXGetConfig (dpy, v, GLX_AUX_BUFFERS, &eds->settings[ALLEGRO_AUX_BUFFERS])
|| glXGetConfig (dpy, v, GLX_DEPTH_SIZE, &eds->settings[ALLEGRO_DEPTH_SIZE])
|| glXGetConfig (dpy, v, GLX_STENCIL_SIZE, &eds->settings[ALLEGRO_STENCIL_SIZE])
|| glXGetConfig (dpy, v, GLX_ACCUM_RED_SIZE,
&eds->settings[ALLEGRO_ACC_RED_SIZE])
|| glXGetConfig (dpy, v, GLX_ACCUM_GREEN_SIZE,
&eds->settings[ALLEGRO_ACC_GREEN_SIZE])
|| glXGetConfig (dpy, v, GLX_ACCUM_BLUE_SIZE,
&eds->settings[ALLEGRO_ACC_BLUE_SIZE])
|| glXGetConfig (dpy, v, GLX_ACCUM_ALPHA_SIZE,
&eds->settings[ALLEGRO_ACC_ALPHA_SIZE])) {
ALLEGRO_DEBUG("Incomplete glX mode ...\n");
al_free(eds);
return NULL;
}
eds->settings[ALLEGRO_SINGLE_BUFFER] = !double_buffer;
Perhaps your card doesn't have some of the needed capabilities?

One of the steps in the script that generates such self-contained package is to copy all DRI drivers to lib/dri (and all of their dependencies to lib) directory inside the package.

Code: Select all

# copy dri drivers
cp -r /usr/lib/x86_64-linux-gnu/dri $RELEASE_DIR/lib
cp $(libdep $RELEASE_DIR/lib/dri/*.so) $RELEASE_DIR/lib
Here $RELEASE_DIR is the top level of the self-contained package. It might be the case that the driver for your card is lacking there; so I'd recommend executing those two commands (with a proper $RELEASE_DIR setup) and trying again.

PS 1: libdep is

Code: Select all

# function to output library dependencies of executables
function libdep () {
    ldd "$@" | grep -o '\W/[^ ]*' | sort -u
}
PS 2: I can reproduce the problem and it seems the procedure above doesn't fix it. The problem appears to be somewhat related to Ubuntu 20.04. Ubuntu 18.04 (and derivatives) seems to work fine.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

Norbert wrote: September 26th, 2020, 1:50 pm I run into:
@ren ~/Desktop/mininim-200925-gnu-linux64 $ ./mininim
/home/norbert/Desktop/mininim-200925-gnu-linux64/lib/mininim-exec: init_video (void): failed to initialize display
I currently have a VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev cd).
Built a package that for me works on both Ubuntu 20.04 and 18.04 derivatives. You can get it here. Please, let me know whether it works properly for you.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5743
Joined: April 9th, 2009, 10:58 pm

Re: MININIM next major release

Post by Norbert »

oitofelix wrote: September 27th, 2020, 7:25 amPlease, let me know whether it works properly for you.
Yes, it works. :)
474MB is a lot though, hopefully in the future it can ship with less libraries, maybe use dynamic libraries again.
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM next major release

Post by oitofelix »

Norbert wrote: September 27th, 2020, 12:28 pm 474MB is a lot though, hopefully in the future it can ship with less libraries, maybe use dynamic libraries again.
I'm glad you pointed that out. I was able to make changes to the build system and reduce the executable size to 13M, so the entire uncompressed archive amounts to 22M including the assets. You can find this new alpha release here. Please, let me know whether it works fine for you.

PS: It has always been using dynamic libraries. I don't know if building a truly static executable is feasible. Hopefully that won't be needed for distributing largely compatible and self contained executables.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
Post Reply