-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Conversation
A 2 player demo can be seen here on a Pi4: https://www.youtube.com/watch?v=qplfGymaDPI And here is a video series of tests using the Pi5: https://www.youtube.com/watch?v=ZODiTiOgxSg |
@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.)
|
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 This pkg could happily be removed after the first install and the emulator would continue to run after the changes were made.
@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
@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 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 https://github.com/DirtBagXon/model3emu-code-sinden/actions/runs/8952871828 |
I left "Allow edits by maintainers" enabled - you are of course able to do as you see fit with the scriptmodule. |
Perhaps I can help answer the question about the necessity of the overclock. |
@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:
|
Sounds good. "pull the code from upstream" - Are you referring to https://github.com/trzy/Supermodel or to my ABS multi-mouse for Linux and the other enhancements aren't in the "official" repo, my Also it is worth pointing out that the * Just in case you aren't familiar with the recent changes in the official repo. |
Some notes install or remove xorg package by default it's a bad idea for sbc devices needed hold xorg for working GPU fine in mainline distros Edit: And Xinit i'ts only needed for devices without Desktop |
OK, I've done a few tests and I'm late to report the results. I have modified the module in the PR Changes/simplifications from the proposed PR:
What doesn't work/needs change:
|
X11 was added, as in testing we could only get the display in the top left corner without it. This was in both the older (4.8 Pi4) RetroPie and early testing with the PI5 using Bookworm Lite. There are outstanding issues in the official Supermodel repo covering Wayland and Linux display environments, this worked, gave usable centered game display, so we went along with it.
Provided the mouse co-ordinates, within KMS/DRM, are "absolute" within the game video window, these are detected by the third party The The symlinking could most certainly be simplified in the scriptmodule when |
In regard to the
|
@cmitu I've tried under Jetsonnano compile from source and running near ~45-60fps at -res=2560,1440 working fine no graphicals errors detected in Sega rally 2 |
@cmitu - Just to confirm which I'll see if I can trace it back where I might be able to patch into the I assume in the |
OK, so this was the reason for adding
I'm using the expected ones ( RetroPie can do the resolution change ('desktop resolution') with the |
My modifications to the scriptmodule don't assume nor install any X11 related libs. If your distro's SDL is support |
@cmitu I mean reference to supermodel3.sh has dependencies xserver-xorg and remove xserver-xorg-legacy |
@mrcmunir - Refer to cmitu's proposed scriptmodule changes here: cmitu@807ccd6 It has none of the packages you are concerned about. |
Ah ops I'm undestand now I recheck that and doesn't view due exclude tegra i'm added aarch64 for run script but seems doesn't download git correctly.returned git error 128 .
Edit : Seems _get_branch_supermodel3 not working correctly |
Hm, I don't see why the errors show up. Are you using an older RetroPie version which doesn't know about |
Ok now it compiles correctly no problem detected :) |
@cmitu Thanks, the revised scriptmodule works well for me. I like the decision to move the shortcuts to subfolders of the I'm currently using a Pi5 running Bookworm Lite with RetroPie installed. I don't pretend to understand the use cases for the "XINIT:" prefix on the command line, but I can say that from my observation, without it, the game runs in a smaller "window" than when "XINIT:" is used. But other than that I notice no difference to the game's performance. It is centered on the screen, but just smaller. The absence of XINIT also causes a mouse cursor to become visible, so I recommend adding I suggest that the addition of a duplicate entry in emulators.cfg including the "-borders" argument is superfluous and clutters the emulator list unneccessarily. Considering that there are only a small handful of shooting games available, the use of a .commands file should be sufficient to apply the argument as necessary to those games specifically. I say this as a Sinden Lightgun user primarily interested in Lightgun games myself. Of course, if you think it's absolutely necessary then I'm not going to argue. |
Guys, I have pushed a change to a
I think this may be causing the issue in Linux. It could possibly address both the Anyway you could test it by pulling the DirtBagXon/model3emu-code-sinden@391ec44 This does fix a weird issue I have seen running |
Thanks, I'll give it a try. @Widge-5 Thank you for the test and recommendations, I'll include some of them in the module.
Maybe the modifications added by @DirtBagXon will change this. The difference is in the SDL videodriver used, I have updated the module now and updated the build steps so that platform optimization flags are added to the compiler parameter. |
Tested With this changes The window looks smaller than before in fullscreen by default . |
I've compiled usng the latest scriptmodule, and using DirBagXon's Here is a picture of my TV screen running Magical Truck Adventure without XINIT: I realise now that the window size seen in the "without" picture appears to be similar (if not the same) as if I had chosen a 640x480 video mode with XINIT. Could this suggest that the KMS/DRM driver is automatically choosing a 640x480 mode? Additionally @cmitu, i realise nobody has answered your question " |
I'll take a stab and say that the lightgun alignment is due to what the game believes the screen resolution to be and what it's actually displaying in KMS/DRM. Also the |
@Widge-5, @mrcmunir thank you both for testing and reporting back.
I think
Yes, that's correct, without specifying a resolution, it defaults to 640x480. You can verify the current resolution with I have re-tested with specifying the resolution explicitely when launching the emulator and it seems to work better w.r.t. window scaling, without using I'm interested, @Widge-5, if you could test again with lightguns and see if this time they work correctly. Otherwise, I guess we'll have to use |
I've used the new scriptmodule and it did add the This is what I think is happening witht he picture sizing. The environment is a 640x480 space and it's rendering the emulator at 1:1 pixel resolution within that space. Sega Model 3's native resolution was 496x384, so that is also the default res of Supermodel 3; consequently it appears to be in a smaller "window" within the space of that video-mode. the With regard to the variation between where the lightgun is pointing and where shots land on screen: This is behaviour we had observed in Supermodel some time ago, but the issue happily went away after DirtBagXon implemented manymouse enabling multiplayer lightgun gaming in Supermodel on the Pi. I don't know the intricate details but it also allowed for perfect absolute raw mouse positioning which wasn't previously available. |
So I have played around with the supermodel code in order to see if I can achieve differing results, but the bottom line is the SDL2 behaviour of this function in KMS/DRM.
Docs state https://wiki.libsdl.org/SDL2/SDL_SetWindowFullscreen:
The KMS behaviour is different to the X11 behaviour on this call and doesn't appear to force the videomode change correctly. This could be the SDL2 libs still have unresolved issues, from @cmitu quote here: "the KMSDRM video driver has gained the ability to change the resolution at runtime." I'm not certain this can be remedied on the emulator side without swaying away from the official core functions and resulting in a rewrite to work with KMS/DRM. All hail 'portable' SDL :) |
Yes, it's probably related to the SDL2 version. Note that with the latest SDL2 (but should work with 2.26.3 which is used by RetroPie-Setup on Bookwom) the resolution change does occur.
No, I don't expect that to be solved by the emulator. Based on the tests so far (thank you again @Widge-5 and @mrcmunir) I think we'll keep the |
@cmitu doesn't run due res=%XRES%,%YRES% doesn't seems return resoluton working correctly value and back to emulationstation |
|
Yes by X11-xserver-utils package and xrandr working.
I'm running Ubuntu 22.04 base with X11 session |
Ok, I'll test on a desktop session and see what's going on. What's the output of |
I was able to solve it now :) For some reason xrandr does not work as expected. |
All good. As this is an OpenGL implementation, there were no other simple tricks we could have tried, there is no My only comment on the current scriptmodule, supports Widge's comments earlier, that there is no need for the separate The Sinden Discord guys are all over these settings and are the only group that would require the border currently in any case. |
I think |
Ah, so I see you're still forcing the emulator to run at a higher resolution by default. |
I see. As far as I'm concerned it's easier to use the menu (with the gamepad) to change a config than, but I guess if users are knowledgeable enough we can leave it out and just document it.
Yes, I intend to test it with and without |
I think it just simplifies and also removes potential questions on "what is this option?" from non-Sinden users. Also if you wanted to apply the border on a PC using |
The resolution issue has come up on the official repo issues again, my feeling is that there maybe should be an option to be able to not pass a This should be an option for SBC's, while the PC could force the higher resolution via Those non-standard resolutions are what kill the performance on the Pi, most PC should be fine to handle some upscaling. But also the native resolution for these games is |
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:
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 justsupermodel
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.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.