Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sega Model3: supermodel #3918

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DirtBagXon
Copy link
Contributor

Just pushing this to see if there is any interest. Feel free to close if it's considered too problematic, I am aware it can require lots of tweaking per install.

This is the ARM optimised code, as used from Exarkuniv's "RetroPie-Extra", based on mechafatnick's original arm mods.

This branch has received tweaking, from the Sinden Pi guys, to Supermodel.ini and Games.xml for some time and is maintained.

It also has the following additions to the arm optimizations:

'Absolute' Mouse Input for light guns in Linux
Multiple Mouse Support : Allowing 2 players in lightgun games
Support for selecting a clone from within merged ROM set
Per game .commands file for individual game configuration
Log based Framerate Monitoring
Built-in Sinden border

The repo branch is here for reference: https://github.com/DirtBagXon/model3emu-code-sinden/tree/arm

I have made this rp_module_id="supermodel3" to avoid existing unofficial installs which seem to be just supermodel

It's now using a .commands file, based on game, to alter arguments.
With the addition of -game to select a clone within a MAME style merged ROM set, this has become particularly useful.

/opt/retropie/emulators/supermodel3/supermodel3 /home/pi/RetroPie/roms/arcade/scud.zip -game=scuddxo

It will run on a Pi4 and P5, without too many issues, on many games, so perhaps there should be a restriction in the scriptmodule for those model - looking for feedback or disinterest. Either is fine.

@DirtBagXon
Copy link
Contributor Author

DirtBagXon commented May 6, 2024

@cmitu
Copy link
Contributor

cmitu commented May 8, 2024

@DirtBagXon thanks for submitting this. The best way to gauge the interest would be the forums, but since this is already opened, we can continue here. I'll take a look at installing this to see how it works, but I have a few general questions first. As is, the scriptmodule will need modifications and I'm questioning whether it should be made available for other platforms and not only Pi4/Pi5 (PC/Rockchip 3399/Odroid/etc.)

  • Why is a desktop needed (X11/Xorg) to run the emulator ?
  • Does it needs an overclocked Pi4/Pi5 to run any game or the overclock is needed just for a few games ?
  • I'm only aware of @Exarkuniv's scripts, what other 3rd party installs are there ?

@DirtBagXon
Copy link
Contributor Author

Why is a desktop needed (X11/Xorg) to run the emulator ?

I'm aware X11 is legacy these days, but in many ways this emulator seems reliant on many specifics. The Sinden Pi guys have been the driving force for this project and spent hours attempting to get it working on the Pi5 bookworm release via Wayland. This solution was the best performing they were able to figure. cmitu - I bow to your knowledge of the RetroPie drivers if you are able to offer any other working solution.

The gldriver-test was required on Bookworm as it changed some X11 setup: https://github.com/raspberrypi-ui/gldriver-test/tree/master/usr/lib/systemd/scripts

This pkg could happily be removed after the first install and the emulator would continue to run after the changes were made.

Does it needs an overclocked Pi4/Pi5 to run any game or the overclock is needed just for a few games ?

@Widge5 has been testing this and documenting for some time, as seen in the linked videos, and a small overclock does give a bump in performance of course. But I believe some games will run happily on a Pi5 without. Perhaps the guys can comment further on their findings here.

This branch has been merged into other distros like Rockchip and PR's raised to aide that limited environment. i.e. ROCKNIX/distribution#45 - So I'm certain it will probably work, but don't have the hardware to confirm. I run this branch on my X86 linux, without issue, and it's far less demanding on GPU hardware than the current official Supermodel codebase. But we are running the -legacy3d engine by default here too.

I'm only aware of @Exarkuniv's scripts, what other 3rd party installs are there ?

@Exarkuniv's was the main one, for sure. But when we started this there were other attempts floating around that we attempted to avoid interfering with, hence the adoption of the supermodel3 name. There is an svn based one still I think I saw recently, with svn in the module name, but based from similar like this, but not arm optimised it seems.

https://github.com/mictjs/RetroPie-Extra-WIP/blob/master/scriptmodules/emulators/supermodel.sh

The compile is noisy as hell, but so is the official codebase for all OS on most recent commits, you can see these in the main branch of my repo in the GitHub actions section how noisy it is:

https://github.com/DirtBagXon/model3emu-code-sinden/actions/runs/8952871828

@DirtBagXon
Copy link
Contributor Author

I left "Allow edits by maintainers" enabled - you are of course able to do as you see fit with the scriptmodule.

@Widge-5
Copy link

Widge-5 commented May 9, 2024

Perhaps I can help answer the question about the necessity of the overclock.
In my video of The Lost World (the last of DBX's linked videos) my Pi5 wasn't overclocked. Nor was it overclocked in my earlier video of Star Wars Trilogy (https://youtu.be/K3yawtKgTfc) and the performance seemed to be very acceptable.
I first overclocked the Pi5 to try to help with LA Machine Guns which is notoriously heavyweight, but that one still could not play at full speed. I then left the overclock in place for my subsequent Supermodel 3 tests to get the best results. But I have recently tried Sega Rally 2, SCUD Race and Magical Truck Adventure all without overclocking and they all seem to run quite well without.
So as long as the game itself isn't too demanding, then overclocking isn't always necessary

@cmitu
Copy link
Contributor

cmitu commented May 9, 2024

@DirtBagXon, @Widge-5 thanks for the info. I'll test the emulator over the week-end and see what modifications we'll need. So far, my ideas are:

  • name the ARM optimized emulator supermodel-legacy and make it ARM/SBC only (i.e. no x86), retricting it to only the more powerfull platforms (pi4/pi4, rk3588 - OrangePi5/Radxa 5 - and maybe some tegra variants).
  • have a separate module named supermodel, which would pull the code from upstream, for x86 (PC). AFAIK, it needs OpenGL4 and won't run on a Pi5 (there are a few issues around it).

@DirtBagXon
Copy link
Contributor Author

DirtBagXon commented May 10, 2024

Sounds good.

"pull the code from upstream" - Are you referring to https://github.com/trzy/Supermodel or to my main branch ?

ABS multi-mouse for Linux and the other enhancements aren't in the "official" repo, my main repo branch is up-to-date with official repo, and contains the ManyMouse and other "unofficial" additions. It doesn't currently have the -game argument, but I plan on adding that.

Also it is worth pointing out that the -new3d is now very hardware intensive since fairly recent improvements on emulation (huge floating point calcs) and will be default in both "official" and my main branch for the PC scriptmodule you propose. You can of course switch it back down in the .ini or via cli argument*.

* Just in case you aren't familiar with the recent changes in the official repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants