GBM Video Driver - Retro Gaming - Tinkering Image Howto

Moderators: mdrjr, odroid

GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Sun Sep 09, 2018 11:20 pm

DIY GBM GPU Driver Retro Gaming Tinkering Showcase Image Howto

Hi all, I didn't know exactly where to place this post, somewhere in XU3/XU4 sub forum ? somewhere in VU5A sub forum ? somewhere in gaming ? there is a Howto about
VU5A Display, Howto install GBM enabled Userspace Drivers and Howto build Retro Gaming Emulators, so I decided to place it here 8-) First of all this Howto will showcase
the use of the Mali GBM enabled userspace library in real live, how good it works and for what it can be used. For all the showcases it uses a VU5A display ( really a nice toy )

Image

The Howto will install an Ubuntu 18.04 minimal image for XU3/4 and prepare the use of the GBM Mali Driver for it,
as a result PPSSPP will run notorious hard to emulate games pretty good and without tearing



Download and install the Image:

https://odroid.in/ubuntu_18.04lts/ubuntu-18.04-4.14-minimal-odroid-xu4-20180531.img.xz

Extract and write it on eMMC or SD

Installing and configure:

login for that image is:

user:root
pw:odroid


Update the image:

Code: Select all
apt update && apt full-upgrade -y


Get some package requirements:

Code: Select all
apt-get install mali-x11 libx11-dev libsm-dev libxext-dev git cmake mercurial libudev-dev libdrm-dev zlib1g-dev pkg-config libasound2-dev alsa-utils htop bc ifupdown2 net-tools libssl1.0-dev mlocate bluez libfreetype6-dev libgbm-dev


Add User + add to groups:

Code: Select all
adduser odroid
usermod -aG sudo,adm,audio,operator,input,video,tty,staff,games,users,plugdev,netdev,bluetooth,disk odroid


Logon with created user:

Code: Select all
su - odroid


Enable color prompt:

Code: Select all
sed -i '1iforce_color_prompt=yes' ~/.bashrc
su odroid


Turn the mali-x11 display driver in GBM enabled one, this is normally relatively easy to do by only update eglplatform.h which is multi platform (ie. fbdev x11 and GBM)
But we want update the other headers too !

Code: Select all
cd /usr/include/EGL
sudo rm eglplatform.h
sudo wget https://www.khronos.org/registry/EGL/api/EGL/eglplatform.h
cd /usr/include/GLES2
sudo rm *
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES2/gl2platform.h
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES2/gl2.h
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES2/gl2ext.h
cd /usr/include/GLES3
sudo rm *
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES3/gl3.h
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES3/gl31.h
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES3/gl32.h
sudo wget https://www.khronos.org/registry/OpenGL/api/GLES3/gl3platform.h


Phew done, now get the new driver binary:

Code: Select all
cd ~
wget http://deb.odroid.in/bigmali.tar
tar xf bigmali.tar libmali.so
sudo mv libmali.so /usr/lib/arm-linux-gnueabihf/mali-egl/.


add a missing symbolic link:

Code: Select all
sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so.1


add new directory, open up vi editor for /usr/local/lib/pkgconfig/gbm.pc

Code: Select all
sudo mkdir /usr/local/lib/pkgconfig
sudo vi /usr/local/lib/pkgconfig/gbm.pc


and add this into a new file:

prefix=/usr/local
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
Name: libgbm
Description: A small gbm implementation
Version: 19.0.0
Cflags: -I${includedir}
Libs: -L${libdir} -lgbm


save and close vi

add symbolic links for libgbm:

Code: Select all
cd /usr/local/lib/
sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so libgbm.so
sudo ln -s libgbm.so libgbm.so.19
sudo ln -s libgbm.so.19 libgbm.so.19.0.0
sudo ldconfig


get gbm.h and delete the one from mesa

Code: Select all
cd /usr/include
sudo rm gbm.h
sudo wget -O gbm.h https://pastebin.com/raw/5QUd011t


checkout SDL2, build and install it:

Code: Select all
cd ~
hg clone http://hg.libsdl.org/SDL SDL2
cd SDL2
./configure --disable-video-opengl --enable-video-kmsdrm


after configure is finished you should see this line Video drivers : dummy x11(dynamic) kmsdrm(dynamic) opengl_es1 opengl_es2 vulkan

now we have to edit SDL_config.h to permanently dlopen our libgbm.so.19 instead of the libgbm.so.1 from Mesa and start to build and install it:

Code: Select all
sed -i -e 's/libgbm.so.1/libgbm.so.19/g' include/SDL_config.h
make -j7
sudo make install


after building is done -> time to test !

Code: Select all
cd test
./configure
make -j7
./testgles2


You should see a spinning cube, wait some seconds and quit with ESC key

And if you are on VU5A, you will notice something like this which is TOO SLOW:

INFO: 56.89 frames per second

It should reach 60fps, if not it's a real problem for emulators, if they try to just hold 60fps and they can't, then it will really slow down things a lot, very good to observe on PPSSPP game intro videos

Building the Kernel for >60fps on VU5A:

As we have to patch the kernel to get more then 56fps, I will open an PR and maybe you can get this patch included in mainline and updated bei the apt package system,
but here a quick reminder on how to do it by our own.

So the pixel clock and probably some H or V sync timing values of HDMI PHY config are not right for that VU5A Display, more explanation here https://github.com/hardkernel/linux/commit/6cb93b55deffdd634a0a114384da2f238493af6d
Ok so Hardkernel took the closest one but they choose it to be on the lower side of 60fps, for emulation it's better to choose the higher side of 60fps, so at the end we will have a fixed frame rate of 64fps, it can't be higher then that but lower, which is ok.

checkout the kernel, you will need some GB free of space ! We choose to take the HDMI PHI config from the next higher pixel clock, what is really inside this HDMI PHY config is unknown to the public
I have asked several developers but no one could give me an answer, only in kernel 3.10 there is some small code to change this 32byte long config, so only some few bytes are known, but they don't change the refresh rate :(

Code: Select all
git clone https://github.com/hardkernel/linux.git
cd linux
wget -O VU5A.patch https://pastebin.com/raw/aWEYArWL
patch -p1 < VU5A.patch

make odroidxu4_defconfig
make -j7
sudo cp arch/arm/boot/zImage /media/boot/.
sudo cp arch/arm/boot/dts/exynos5422-odroidxu4.dtb /media/boot/.
sudo make modules_install


time to reboot and test fps again

Code: Select all
cd SDL2/test
./testgles2


now you should see something like this

INFO: 64.01 frames per second

In the next post we will build PPSSPP, after this we will build RetroArch with GBM KMSDRM backend + some libretros, it's huge, but for today -> see you later !


Have Fun
Last edited by AreaScout on Fri Sep 21, 2018 6:35 pm, edited 4 times in total.
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby mad_ady » Mon Sep 10, 2018 1:23 am

Great work! It belongs in the magazine!
User avatar
mad_ady
 
Posts: 4466
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby rooted » Mon Sep 10, 2018 3:46 am

I don't know how you figured all that out but I'm glad you did. I agree this could be a nice feature for the magazine.

What are those tiny speakers? They sound amazing.
User avatar
rooted
 
Posts: 5474
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby odroid » Mon Sep 10, 2018 11:13 am

Very exciting project!
It seems to be a technical concept for the ODROID-GO Advance.

Can you please check the God of War performance with only four LITTLE cores?
Edit /media/boot/boot.ini something like this and you can disable four big cores.
Code: Select all
setenv bootrootfs "maxcpus=4 console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"

I want to know the PPSSPP performance without big A15 cores to see a feasbility of the battery powered Exynos-5422 portable device with a 3.5inch 480x320 MIPI LCD.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby memeka » Mon Sep 10, 2018 1:43 pm

odroid wrote:Very exciting project!
It seems to be a technical concept for the ODROID-GO Advance.

Can you please check the God of War performance with only four LITTLE cores?
Edit /media/boot/boot.ini something like this and you can disable four big cores.
Code: Select all
setenv bootrootfs "maxcpus=4 console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"

I want to know the PPSSPP performance without big A15 cores to see a feasbility of the battery powered Exynos-5422 portable device with a 3.5inch 480x320 MIPI LCD.


PPSSPP should work great even with little cores since it actually uses the GPU, and the resolution you want to use is quite small.
I know GPU is slowed down by the little cores (probably because of memcpy since zero-copy is not working with gbm drivers - hope @mdrjr can fix this soon) but it should still be ok for small resolution.
User avatar
memeka
 
Posts: 4025
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Mon Sep 10, 2018 3:27 pm

odroid wrote:Very exciting project!
It seems to be a technical concept for the ODROID-GO Advance.

Can you please check the God of War performance with only four LITTLE cores?
Edit /media/boot/boot.ini something like this and you can disable four big cores.
Code: Select all
setenv bootrootfs "maxcpus=4 console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0"

I want to know the PPSSPP performance without big A15 cores to see a feasbility of the battery powered Exynos-5422 portable device with a 3.5inch 480x320 MIPI LCD.


Code: Select all
odroid@odroid:~/usb/ppsspp$ cat /proc/cmdline
maxcpus=4 console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0  HPD=true vout=hdmi usbhid.quirks=0x0eef:0x0005:0x0004 smsc95xx.macaddr=00:1e:06:61:7a:39 false s5p_mfc.mem=16M


@odroid

unplayable 44% Speed, compared to 100% with all 8 cores, but still better compared to other SBC's, this game is really hard to emulate there are for sure some special PSP hacks in there, that game was tuned on the bare maximum that hardware could archive I believe, absolutely incredible how good it runs, I have seen desktop PC's struggle with it.

rooted wrote:I don't know how you figured all that out but I'm glad you did. I agree this could be a nice feature for the magazine.

What are those tiny speakers? They sound amazing.


@rooted

Those are the once from HK sold with that Display, they are really cool looking and sound is very good

RG
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby odroid » Mon Sep 10, 2018 3:49 pm

Thank you for the test result.
Please try "maxcpus=5" and let me know the speed rate. I think 4+1 cluster is still acceptable to play 4~5 hours continuously with a 3000mAh Li-Polymer battery.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby memeka » Mon Sep 10, 2018 4:06 pm

@AreaScout also try ppsspp with frameskipping on little cores.
User avatar
memeka
 
Posts: 4025
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Mon Sep 10, 2018 5:18 pm

memeka wrote:@AreaScout also try ppsspp with frameskipping on little cores.


I use 2 times Frameskipping as a standard and Auto frameskip off, with 3 times it's not smooth anymore, 2 times it's still smooth and Auto frameskip on does things slow down (audio hickups) on GoW which is totally the way around compared to all other games

RG
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Mon Sep 10, 2018 5:40 pm

odroid wrote:Thank you for the test result.
Please try "maxcpus=5" and let me know the speed rate. I think 4+1 cluster is still acceptable to play 4~5 hours continuously with a 3000mAh Li-Polymer battery.


Code: Select all
odroid@odroid:~$ cat /proc/cmdline
maxcpus=5 console=tty1 console=ttySAC2,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro fsck.repair=yes net.ifnames=0  HPD=true vout=hdmi usbhid.quirks=0x0eef:0x0005:0x0004 smsc95xx.macaddr=00:1e:06:61:7a:39 false s5p_mfc.mem=16M


No still unplayable < 70% Speed, but with that combination (4+1) I think 80% of the games would be playable, GoW is really CPU/GPU hungry

But it's just slow, all graphic effects are there and it's smooth slow which is already a good sign
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby odroid » Mon Sep 10, 2018 6:07 pm

Appreciate your test. It is very helpful to understand what GoW is a very heavy game to emulate.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Mon Sep 10, 2018 6:14 pm

odroid wrote:Appreciate your test. It is very helpful to understand what GoW is a very heavy game to emulate.


Tekken 6, Indiana Jones - Staff of Kings, The Lord of the Rings: Aragorn's Quest

All playable with 4+1 2xPSP
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby memeka » Mon Sep 10, 2018 6:33 pm

wow GoW must be really heavy.
i always used tekken 6 as a benchmark...
User avatar
memeka
 
Posts: 4025
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Mon Sep 10, 2018 7:02 pm

@odroid

I know everything is about Gameboy like devices a.t.m, but a nice case for VU5A as traveling device, but it on table with a pillar and play games, read email, write notes, like a device in the middle between cellphone and laptop, able to just connect a keyboard or a gamepad would be nice ;)

RG
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Tue Sep 11, 2018 9:56 pm

memeka wrote:wow GoW must be really heavy.
i always used tekken 6 as a benchmark...


Yes and there are thousands of videos out there on YouTube how to squeeze out all of the performance on your Android Cellphone with choosing the right settings !
On a modern Mali G71 MP20 GPU this game runs with 3xPSP (hi ODROID N2 hopefully)

https://www.youtube.com/results?search_query=ppsspp+god+of+war+chains+of+olympus+settings

But still not bad for our 6 years old T-628 GPU
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Wed Sep 12, 2018 12:14 am

Building PPSSPP

Image

Checkout the source + apply some patches:

Code: Select all
cd ~
git clone --recursive https://github.com/hrydgard/ppsspp.git


As the source is finished downloading do apply a patch

FFmpeg needs to build before the ppsspp binary is build, the pre-build binaries are all for soft floating points and we need hardfp

Code: Select all
cd ppsspp/ffmpeg
wget -O ffmpeg.patch https://pastebin.com/raw/nH6fR6gu
patch -p1 < ffmpeg.patch
./linux_arm.sh
cd ..


Before we can start to compile we have to turn our /usr/include/GLES2/gl2ext.h into an vendor specific one by disable the use of GL_EXT_buffer_storage, a backup file is created gl2ext.h.back
Our Mali library does not include/export that function so we can't define it.

Code: Select all
sudo sed -i.bak '/^\#ifndef GL_EXT_buffer_storage$/,/^$/d' /usr/include/GLES2/gl2ext.h


You may want to set the use of only 4 cores in FFmpeg for tinkering and experimenting, I have observed that FFmpeg with threading doesn't work out very well when all cores are choosen with
HMP (switching higher demanding tasks from LITTLE to the BIG CPU's), for this you can edit this file:

Core/HW/MediaEngine.cpp Line number 475 to use only 4 cores (better for switching from 4 LITTLE to 4 BIG instead using all 8 cores)

But this was observed in Moonlight with GameStreaming 1080p video files, PPSSPP video files are not that big and maybe therefore not so CPU intensive so that may only impact very little to nothing

Code: Select all
av_dict_set(&opt, "threads", "4", 0);


Now to generate the Makefile

Code: Select all
cmake -DUSING_EGL=OFF -DUSING_GLES2=ON -DUSE_FFMPEG=YES -DUSE_SYSTEM_FFMPEG=NO .


And start compiling the binary with

Code: Select all
make -j7


If you are on VU5A you have now touchscreen capabilities in menu and you can also enable 'On-Screen touch controls' if you want ;)

https://youtu.be/QegJlwflkZk?t=374

And you can now brand your emulated PPSSPP to an unique region by generate a locale for it, that would be for my country de_AT, so:

Code: Select all
sudo locale-gen de_AT.UTF-8
sudo update-locale LANG=de_AT.UTF-8


Some Games may use it for In-Game Language

And attached I have my settings for GoW + some texture replacements for Star Wars - The Clone Wars and Star Wars - The Force Unleashed so the Games are playable

edit: new updated ppsspp.zip file

Code: Select all
odroid@odroid:~$ tree -d .config/ppsspp/
.config/ppsspp/
└── PSP
    ├── PPSSPP_STATE
    ├── SAVEDATA
    │   ├── ULES01284SAVE00
    │   └── ULES01376SYSDATA
    ├── SYSTEM
    │   └── CACHE
    └── TEXTURES
        ├── ULES00981
        └── ULES01284

10 directories


ppsspp.zip
(8.61 KiB) Downloaded 2 times


Have Fun
Last edited by AreaScout on Fri Sep 21, 2018 9:23 pm, edited 9 times in total.
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby odroid » Thu Sep 13, 2018 9:14 am

Thank you for the detail and beautiful guide :D
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Thu Sep 13, 2018 5:50 pm

odroid wrote:Thank you for the detail and beautiful guide :D


And there is more about to come !

@all

There was still a circular dependencies linkage error in my PPSSPP tutorial, I have fixed and updated the post, further more I will look into get this Upstream in an acceptable state
stay tuned the next days/weeks

RG

P.S.: So don't forget to always pull the latest updates from Upstream
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Sat Sep 15, 2018 12:54 am

Building and configure RetroArch



Get source code and apply patch + build:

First we need a small patch which prevents us to have the menu with only a black background, ok let's start

Code: Select all
git clone https://github.com/libretro/RetroArch.git
cd RetroArch
wget -O retro.patch https://pastebin.com/raw/1SCeb8EG
patch -p1 < retro.patch
./configure --enable-opengles3 --enable-opengles --enable-neon --enable-floathard --enable-freetype
make -j7
sudo make install
retroarch



Apply some useful settings:

First of all this is a suggestion from me to you to setup RetroArch, after it's installed you don't have to follow that tutorial anymore !

Update the Assets (Icons, background pictures and stuff), you can find it here:

MainMenu -> Online Updater -> Upate Assets I suggest you to Update also this packages Core Info Files, Joypad Profiles, Database, GLSL Shaders
and of course you should use the Core Updater to get some emulators :)

Enable Advanced Settings:

Settings -> User Interface -> Show Advanced Settings -> ON

Enable Threaded Video - It will boost up emulation a lot:

Settings -> Video -> Threaded Video -> ON

Enable FPS counter, it is helpful to see how fast the emulation runs, especially when you setup things:

Settings -> Onscreen Display -> Onscreen Notifications -> Display Framerate -> ON

Settings -> Onscreen Display -> Onscreen Notifications -> Show frame count on FPS Display -> OFF

Settings -> Driver -> Audio Driver -> alsathread

and if you are on VU5A:

Settings -> Onscreen Display -> Onscreen Notifications -> Notification size -> 18

Settings -> Onscreen Display -> Onscreen Notifications -> Notification X position -> 0.010

Settings -> Onscreen Display -> Onscreen Notifications -> Notification Y position -> 0.010

If you have already games somewhere in a folder on your XU4, scan for your games:

Import Content -> Scan Directory choose your root game folder to let RetroArch scan for your games, they will appear on the right side of the menu after some time

That's it for now, next time mame libretro 0.200 will be compiled because the one online seems not to work and I have some speed 'hacks' for it + some more emulator specific settings

Have fun
Last edited by AreaScout on Sat Sep 22, 2018 8:17 pm, edited 1 time in total.
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Wed Sep 19, 2018 6:15 am

Building and configure Versatile Commodore Emulator with no-border hack

Image

Prolog

You may have noticed that the PPSSPP guide was broken sometimes, either the patches didn't apply to current master or I simply forgot something for the new patch :o
The good news it, today my changes got merged into master and if you have that modified header files mentioned in the PPSSPP howto it will build out of the box (ffmpeg still needs patch) :)
I am happy that this commit is done, it was not easy to solve that puzzle but at the end it worked out and I had some good help from the project maintainers.

Ok now to vice libretro ... yes vice before mame libretro ;)

Checkout the source and apply a patch:

Get some pre-requirements

Code: Select all
sudo apt-get install bison


Checkout the source and apply the no-border patch for VIC-II Commodore machines if you want
This will remove the border of C64 and C128 machine models, the games are way better to view without it
this is more or like a quick and dirty way to do it, a better approach would be to add it to the libretro config
able to adjust it from within RetroArch, maybe I will add that too.
If a game draws inside those borders it will not work and the core will probably segfault, but not a lot of games
are drawing into the border.

Code: Select all
git clone https://github.com/libretro/vice-libretro.git
cd vice-libretro
wget -O noborder.patch https://pastebin.com/raw/VwtSDj50
patch -p1 < noborder.patch


Start to build a Commodore machine of your choice, valid machine types are:

x128, x64, x64sc, x64dtv, x64scpu, xplus4, xvic, xcbm5x0, xcbm2, xpet

You must add a EMUTYPE variable followed by the machine type you want to build, if you don't x64(C64) is default

Code: Select all
make EMUTYPE=x64 -f Makefile.libretro -j7


If you want to build more then one machine type, don't forget to run clean (make EMUTYPE=x64 -f Makefile.libretro -j7 clean) on the project otherwise the core will not work

Do some RetroArch config:

Copy the binary into RetroArch core folder

Code: Select all
cp vice_x64_libretro.so ~/.config/retroarch/cores/.


Start RetroArch select the vice core, either start the core without game or with, hit the Guide button on your game controller or F1 on the keyboard and scroll down to Options
enter it and disable DriveTrueEmulaton->OFF, with, it will take very long to load a game and set Controller0Type to joystick

I also enable a Aspect Ratio of 16:10, I think it's a good compromise between 4:3 and 16:9

Settings -> Video -> Aspect Ratio -> 16:10

With the Start button you activate the nuklear GUI settings (Select button has to pressed once to activate mouse) from there you can choose the C64 Joyport, machine cpu, sid type and more
The Onscreen keyboard is activated with the x button (Xbox layout)

That should be all

Have fun
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q

Re: GBM Video Driver - Retro Gaming - Tinkering Image Howto

Unread postby AreaScout » Sat Sep 22, 2018 6:18 pm

.
Building and configure Reicast core - a Dreamcast emulator

Image



Checkout the source and apply a patch as usual:

Code: Select all
cd ~
git clone https://github.com/libretro/reicast-emulator.git
wget -O xu4.patch https://pastebin.com/raw/pfVjnVs3
patch -p1 < xu4.patch
platform=odroid ARCH=arm make -j7
strip reicast_libretro.so
cp reicast_libretro.so ~/.config/retroarch/cores/.


First you need some bios for NAOMI and Dreamcast here are some good links how they called and where to place them

https://www.libretro.com/index.php/reicast-libretro-now-supports-naomi-other-additions/

and

https://docs.libretro.com/library/reicast/

If you want to know the md5 checksum of the NAOMI bios file you can take a look into the core info file /home/odroid/.config/retroarch/cores/reicast_libretro.info

Inside a game open RetroArch menu and go to core options find the following settings and change them to:

reicast_framerate = "normal"
reicast_enable_rttb = "enabled"
reicast_threaded_rendering = "enabled"

This are the most important to get a decent speed

Have fun
User avatar
AreaScout
 
Posts: 595
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4Q


Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest