maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 7 / Leste (https://talk.maemo.org/forumdisplay.php?f=66)
-   -   Porting apps to Leste (https://talk.maemo.org/showthread.php?t=101427)

Maemish 2023-07-03 08:54

Porting apps to Leste
 
To this thread you can tell about porting apps to Leste, from maemo 5 or somewhere else, how and which you have ported, what difficulties you have found and tips how to solve them.

teroyk 2023-07-04 09:51

Re: Porting apps to Leste
 
Could The Maemulator ( https://thp.io/2023/maemulator/ ) to be part a solution to run Bounce Evolution (2009) or Angry Birds or another closed source Maemo 5 apps in Leste?

Maemish 2023-07-04 20:40

Re: Porting apps to Leste
 
Nice find!

norayr 2023-07-26 11:32

Re: Porting apps to Leste
 
i wrote a part of the wiki page, starting from here:

https://leste.maemo.org/Development/...antle_packages

on what should be done by a person to just technically port, package, build and put to maemo-leste store.

Maemish 2023-07-29 08:36

Re: Porting apps to Leste
 
Thank you for the instructions! Really thorough walk through and well documented the steps with links!

teroyk 2023-08-13 12:30

Re: Porting apps to Leste
 
Is there any Python programmer to port these Maemo 5 apps to Leste?:
https://wiki.maemo.org/PyMaemo/Statistics

teroyk 2023-08-26 09:15

Re: Porting apps to Leste
 
Can somebody update UKeyboard Creator for Leste? Or how I should edit keyboard layouts?

Here is UKeyboard Creator for N800-N810 web page:
http://upir.cz/maemo/keyboards/
and current sources (it seems that there is .deb for N900, but how to download it from git??):
https://repo.or.cz/w/ukeyboard.git

Arno_11 2023-09-08 18:41

Re: Porting apps to Leste
 
Hi all,

I've just created a Picodrive fork working on Leste.

https://github.com/Arno1103/picodrive-leste

It is based on a existing Raspberry fork and works very well on the n900: Megadrive, MegaCD and even 32X game are working.
Of course it needs few improvements like fullscreen mode or easy custom keys mapping.
But it already works at full speed with sound !

The only tricky thing to get it working has been key mapping because it is hardcoded and it was impossible to click on START button. I just modified 2 lines of code to fix it (but a bit hard to find)
No .deb available atm but here is the process to run it easely:

In the directory of your choice:
Code:

git clone https://github.com/Arno1103/picodrive-leste .
Code:

sudo git submodule update --init --recursive
Code:

sudo ./configure && make
Then run a game:

From the same directory:
Code:

./PicoDrive /<path_to_the_game>/<name_of_the_game>
(for example: ./PicoDrive /home/user/sonic2.md)

And disable hildon composition while playing:
Ctl + Shift + N

Running just
Code:

./PicoDrive
shows the menu UI with all options. Tweaking them allow Virtua Racing Deluxe to run at 25-40 fps (without sound) for example.
('Backspace' for OK/Start button and 'e' for Escape)

I think i'll be able to provide a deb package soon.

Feel free to give your advice or suggestions.

Maemish 2023-09-08 23:35

Re: Porting apps to Leste
 
The Psycho Pinball is what I need with Picodrive. Have to try.

Arno_11 2023-09-11 11:12

Re: Porting apps to Leste
 
Quote:

Originally Posted by Maemish (Post 1575610)
The Psycho Pinball is what I need with Picodrive. Have to try.

Psycho Pinball works at full speed with sound :)

Arno_11 2023-09-11 11:56

Re: Porting apps to Leste
 
After Picodrive, here is PCSX_rearmed for Leste on N900.

https://github.com/Arno1103/pcsx_rearmed_leste

It works full speed using GPU_UNAI, CPU clock set at 57% and Dynarec recompiler.
(note: PS1 full speed is around 25 fps with PAL and around 30 fps with NTSC games)

Similar key mapping hardcoded modifications to Picodrive has been done with pcsx to be able to navigate in the menu and select the right GPU plugin and other essential things.

To run it easely, just clone the repo in the directory of your choice:

Code:

git clone https://github.com/Arno1103/pcsx_rearmed_leste .
Code:

sudo git submodule update --init --recursive
Code:

sudo ./configure && make
With a good uSDcard it takes around 15 min to compile.

Then as usual with psx emulators, the configuration is a bit tricky:

Create a /bios directory in your pcsx folder and add scph1001.bin bios file.

Create a /.pcsx directory (in your pcsx folder) and create a pcsx.cfg file inside with read-write access.

Now you are ready to launch the GUI:

From your pcsx folder run:
Code:

./pcsx
See numerous pcsx threads for settings: the main ones are GPU_UNAI, CPU clock speed 57~100% and 'disable dynarec OFF'

ATM sound is not working because of a missing plugin.

Arno_11 2023-09-19 11:56

Re: Porting apps to Leste
 
I modified few things to optimize compilation and now sound is working well with pcsx.

Works perfectly in Gran Turismo for example (frameskip 1, gpu_unai, builtin_spu, disable cd audio, enable XA decoding, cpu clock 57)

Same settings for Tekken 3 (but frameskip 2 or 3)

Arno_11 2023-09-21 19:02

Re: Porting apps to Leste
 
I successfully built a .deb package for PCSX_rearmed_leste and another one for Picodrive-leste (with much more difficulties but working well now).

Will be available soon.

Arno_11 2023-09-24 18:59

Re: Porting apps to Leste
 
If someone wants to test pcsx_rearmed, here is a temporary link:

https://www.dropbox.com/scl/fi/zxwap...nxb9k2bcn&dl=0

Pcsx_rearmed with sound should work out of the box with HLE bios. Frameskip must be adjusted depending of the game. Other settings are already optimized for N900.
For more game compatibility, please use a psx bios like scph1001.bin or scph7502.bin. (of course i can't provide them).
Bios path is /usr/games/pcsx/bios
(Menu keys are hardcoded: arrow keys, 'backspace' for enter, 'e' for exit/back)

Prefer performance mode in cpufreq and/or overclock for more fun (and don't forget to disable hildon compo while playing: Ctl+Shift+N)

Note: should work on Droid4 too.

I think Picodrive (.deb) will be ready in the next couple of days.

Arno_11 2023-09-25 15:08

Re: Porting apps to Leste
 
Tips: edit
Code:

/usr/games/pcsx/.pcsx/pcsx.cfg
and replace f11 by f for example to be able to switch to fullscreen.

BTW if you get troubles to save settings then run:

Code:

chmod 777 /usr/games/pcsx/.pcsx/pcsx.cfg

Arno_11 2023-09-28 06:37

Re: Porting apps to Leste
 
Here is Picodrive (.deb package) :

https://www.dropbox.com/scl/fi/93u41...kg8hnsgw7&dl=0

It should work out of the box but you need to manually change the config file permission:
Code:

  sudo chmod 777 /home/user/.picodrive/config2.cfg
Settings are already optimized: sound and frameskip are deactivated by default and Megadrive games run at 50-60 fps.
To play with sound just turn ON sound and set frameskip to 1. (30 fps)
Don't forget to save settings otherwise there are ignored.

For 32X games sound is laggy, just turn it off and set frameskip to 1. (25 fps)
Update: with the new ddx driver, it runs now at 40-50 fps (frameskip 0)

(note: by default START button is linked to BACKSPACE key)
This port is based on the last 1.92.3 version, not the old maemo one.

Arno_11 2024-01-21 22:23

Re: Porting apps to Leste
 
On N900 (and pcsx-rearmed), a game like Tekken3 is running really faster and smoother in Leste now, compared to the same game in Fremantle. Great.

I think it would be cool to port a NES emulator too, like iNES but sources seem not available.
It was previously possible to run several NES emulators through Retroarch but unfortunately it doesn't work well anymore and i don't really know why.

teroyk 2024-01-23 12:50

Re: Porting apps to Leste
 
Quote:

Originally Posted by Arno_11 (Post 1575914)
I think it would be cool to port a NES emulator too, like ines but sources seem not available.

There was NES/Famicom emulator called iNES for Maemo 5. I think maintainer was Marat Fayzullin, try contact him.

Some of NES games made by Konami are also available for MSX. And there is MSX emulator called fMSX for Maemo 5. It would be nice to see also for Leste.

But emulator what I think would be nice is SheepShaver. It emulates 90s Macs..Sources should be easy available. I think N900 might emulate this Mac: https://apple-history.com/6100
in full speed with it.

Arno_11 2024-01-24 17:31

Re: Porting apps to Leste
 
Same problem for both emulators: iNES and fMSX are not free sources unfortunately.
But yeah i can try to contact iNES maintainer.

For SheepShaver, definitely over my skills.

teroyk 2024-01-26 11:21

Re: Porting apps to Leste
 
Quote:

Originally Posted by Arno_11 (Post 1575922)
Same problem for both emulators: iNES and fMSX are not free sources unfortunately.
But yeah i can try to contact iNES maintainer.

Luckily or unluckily iNES and fMSX has(had) same Maemo maintainer. I PMed his email address to you.

Arno_11 2024-02-03 17:51

Re: Porting apps to Leste
 
I got an answer from iNES/fMSX maintainer. Well...not really positive so i'll rather have a look at Retroarch and see if i can get it working again.

Arno_11 2024-02-10 10:54

Re: Porting apps to Leste
 
I got Retroarch working again. Settings are a bit tricky and it is recommended to modify them from .config/retroarch/retroarch.cfg to avoid GUI crash.
Retroarch is from Leste devuan repo and not really optimised for N900 or D4 so we can't expect to run 'heavy' cores from there... but QuickNES and fMSX work fine :)

Arno_11 2024-02-17 10:03

Re: Porting apps to Leste
 
Few more things:

I never noticed that Pcsx-rearmed for Leste works fine with neon-gpu (builtin_gpu) plugin:
As Fremantle, it works only with stock CPU frequencies (or maximum 720MHz). It works full speed.

Games tested: Gran Turismo, Tekken3, Motoracer 2, FFVIII, ISS Pro Evo, Medal of Honor, Metal Gear Solid


Now i'll have a look at android-808 and clort previous work on DrNokSnes to get it working with Leste: I'm already able to compile/build it but get a segmentation fault when i run it on my N900 at the moment.
Not sure it will be easy to debug.

Arno_11 2024-02-18 22:55

Re: Porting apps to Leste
 
DrNokSnes works now on N900 with Leste :)

I've been able to run (and play) Super Mario World, Secret Of Mana and Mickey Magical Quest.

SNES games work full speed (audio OFF) in fullscreen with keyboard or touch screen virtual buttons.
With audio ON, sound is very good but framerate is unstable for the moment.

There is still a bit of work because GUI is broken. (something is probably wrong with dependencies)
For the unstable framerate, i got a similar issue with pcsx and a lack of optimisation somewhere is probably the root cause.
Configuration/settings are not easy to use btw.
But anyway, games work fine :)

I'll upload a new fork on github soon.

Thanks to android-808 and clort.

Arno_11 2024-02-19 17:51

Re: Porting apps to Leste
 
Finally, the tricky user config file was the key to solve most issues...
With the right parameters SNES games work now @full speed with sound@48000Hz ! (@805-850MHz)
With stock frequencies, sound@48000Hz is ok with a bit more audio buffer (4096) and/or frameskip=2.
Now i'll try to 'repair' the GUI if i find time in the next couple of weeks.
Then, making a debian package should be trivial :)

teroyk 2024-02-22 20:11

Re: Porting apps to Leste
 
Quote:

Originally Posted by Arno_11 (Post 1575961)
N900 or D4 so we can't expect to run 'heavy' cores from there... but QuickNES and fMSX work fine :)

Feeling stupid to get fMSX work..any small simple setup quide?

Arno_11 2024-02-23 20:49

Re: Porting apps to Leste
 
I can't run a single game with fMSX anymore...not sure why. Probably something wrong with bios roms. This emulator is a nightmare to configure...
By the way, you need MSX.ROM, MSX2.ROM, MSX2P.ROM, MSX2PEXT.ROM and MSX2EXT.ROM.
If their names are different, it doesn't work.
That's all i know.

Edit: it works again with bios files from http://fms.komkon.org/fMSX/

You should download all of them.

Arno_11 2024-03-16 18:32

Re: Porting apps to Leste
 
For guys who want to try Leste (and eventually help to port some apps or fix some bugs), there is now a new (and amazing) way to install Leste on any Android phone (no rooted device needed, minimum Android 8):
Diejuse found a way to modify a Leste raspberry pi3 image and run it using PRoot (pseudo root).
That's highly experimental at the moment but most Maemo Leste features are already working. (i'm writing this post using Leste on a Redmi Note 12).

It's quite easy to install directly from Android.

Here is Diejuse github link with all the process :

https://github.com/diejuse/proot_MaemoLeste_on_Android

Arno_11 2024-03-19 20:56

Re: Porting apps to Leste
 
My DrNokSnes fork is on github now:

It is based on the initial commit that clort used to fork android-808 DrNokSnes version.

The main issue (and the root cause of many troubles) was the user config file.
The initial code has been cleaned up a bit and several files have been removed

https://github.com/Arno1103/drnoksnes-leste

The GUI is still broken. (Not too much time available to figure out what is going wrong).

To be able to build DrNokSnes, additional packages are needed:

x11proto-xsp-dev from android-808 repo

https://github.com/android-808/x11proto-xsp

libxsp0 and libxsp-dev from android-808 repo

https://github.com/android-808/libxsp

libsdl-haa from android-808 repo

https://github.com/android-808/sdlhaa

(Edit: libtool-bin and quilt are needed to build these packages, there are available in Leste repo using apt))

The packages are easy to build using:

Code:

dpkg-buildpackage -uc -b
Install them with:

Code:

dpkg -i package_name.deb

Then clone drnoksnes-leste repo in the directory of your choice:

Code:

git clone https://github.com/arno1103/drnoksnes-leste .
Then run:

Code:

sudo ./configure && make
(It takes around 15min)

The last step is to copy drnoksnes config file in the correct directory.
From your repo, run:

Code:

cp www/drnoksnes.conf /home/user/.config/
To run a game directly from your repo directory:

Code:

./drnoksnes your_game.sfc
(Key mapping and other options can be modified in drnoksnes.conf)

Note: it is recommended to disable Hildon compositing like other emulators

Arno_11 2024-05-30 20:01

Re: Porting apps to Leste
 
Picodrive is now available in Extras repo (using Hildon-Application-Manager).

It works fine but config file permissions still need to be modified by hand (config2.cfg) to be able to modify and save custom settings.

The next release should solve this (little) issue but the emulator already runs at 30 fps with sound on N900 with default settings.

Pcsx-rearmed should be available soon.

Arno_11 2024-06-06 07:12

Re: Porting apps to Leste
 
Here is the Picodrive Leste wiki link:

https://leste.maemo.org/Extras/picodrive

HtheB 2024-06-06 10:07

Re: Porting apps to Leste
 
Great work!

Arno_11 2024-06-08 11:08

Re: Porting apps to Leste
 
That's still under construction but here is the Pcsx_rearmed Leste wiki link:

https://leste.maemo.org/Extras/pcsx_rearmed

HtheB 2024-06-15 20:21

Re: Porting apps to Leste
 
Quote:

Originally Posted by Arno_11 (Post 1576080)
That's still under construction but here is the Pcsx_rearmed Leste wiki link:

https://leste.maemo.org/Extras/pcsx_rearmed

What about porting RetroArch?

Arno_11 2024-06-16 10:07

Re: Porting apps to Leste
 
As previously mentioned, RetroArch works fine already but 'generic' cores like Pcsx or Picodrive or Snes9x are to heavy for N900. They need a lot of optimisation and specific settings to work properly and most of the time, that's not enough unfortunately.

Arno_11 2024-06-28 16:10

Re: Porting apps to Leste
 
Pcsx_rearmed is available in Extras repository now.

It works 'out of the box' but user config file ownership must be modified to be able to save custom settings:

As root:

Code:

chown user /usr/game/pcsx/.pcsx/pcsx.cfg
That's it. See wiki for more details (I'll try to add more stuff soon).

Arno_11 2024-07-07 19:58

Re: Porting apps to Leste
 
DrNokSnes is also available through Hildon Application Manager now.

GUI is still broken but the emulator works fine from command line:

Code:

/usr/bin/drnoksnes -c /usr/games/drnoksnes.conf /your_game_path
So it is still a work in progress.

I'll try to add a wiki soon.

Note: it can only work on armhf devices and it has been only tested on N900 at the moment.

By the way i'm not sure it is useful or necessary to build it for arm64 since Retroarch should work fine on most 64bits devices.

Arno_11 2024-07-14 22:04

Re: Porting apps to Leste
 
DrNokSnes is now fully working with his GUI.
The main issue was -again- config files and wrong parameters in the desktop file.

Here is the DrNokSnes wiki link (WIP):

https://leste.maemo.org/Extras/drnoksnes

Halftux 2024-08-30 15:03

Re: Porting apps to Leste
 
1 Attachment(s)
Here is bomberman which works in the vm but on the droid 4 it is not centered. I have no really time to fix it.
I already fixed automake and libtool. So it can be compiled just by

Code:

dpkg-buildpackage -b
debhelper (>= 4.0.0), libgtk2.0-dev, libosso-dev (>= 1), libsdl1.2-dev

But debian files should be also updated, I increased only compat level from 4 to 5.

Maybe someone likes to play with the code.

Arno_11 2024-11-30 22:38

Re: Porting apps to Leste
 
1 Attachment(s)
Hello guys,
Chatgpt works fine on N900 through command line using some curl commands.
But i'm currently writing a GTK2 client in C using libcurl: it already works fine with low CPU and RAM usage for assistants, vision, tts, stt and other options.
It has been quite a challenge for me to parse JSON stuff from OpenAI correctly and to be able to keep previous chats in memory/logs (to give a kind of memory to the AI like the website does).
It still needs to become more user-friendly and lot of code must be cleaned.
I'll try to share it before the end of the year.
(NOTE: API key is needed of course)


https://talk.maemo.org/attachment.ph...1&d=1733005973


All times are GMT. The time now is 13:02.

vBulletin® Version 3.8.8