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

[Feature request] Adding optimized "Xtreme" series of cores by KMFDManic for better performances or new emus #17

Open
nowhereman87 opened this issue Dec 19, 2024 · 32 comments

Comments

@nowhereman87
Copy link

nowhereman87 commented Dec 19, 2024

You may have seen this before, developer @KMFDManic has been tuning and modifying for years his versions of Retroarch cores and other emus for very limited hardware such as Nintendo, SEGA, PCE "mini" consoles and others similar low specs systems.
Many times he achieved great improvements in performance and was able to run games that were previously impossible compared to the regular versions of the cores.

https://github.com/KMFDManic?tab=repositories&q=&type=&language=&sort=stargazers

https://www.reddit.com/r/PlaystationClassic/comments/yks6wo/kmfdmanic_xtreme_core_update_for/

Atomiswave on minis: https://www.youtube.com/watch?v=xxasH2zcwgE

Sega System 32 MAME: https://www.youtube.com/watch?v=wkXFz8DrOBY

https://github.com/KMFDManic/NESC-SNESC-Modifications/releases/tag/v.2K22-10-31-2022

https://github.com/KMFDManic/mame2003-xtreme

https://github.com/KMFDManic/mame2003-plus-libretro

https://github.com/KMFDManic/FBNeo-Xtreme-Amped

MorpheusCast Xtreme (dreamcast emu) https://github.com/KMFDManic/MorpheusCast-Xtreme

LudicrousN64 Xtreme https://github.com/KMFDManic/ludicrous-2k24-xtreme-amped

Is there a chance that some of these will be ported or incorporated into Emu4Vita Plus to obtain better performance than the current ones or some additional system on Vita?

Thanks in advance!

@noword
Copy link
Owner

noword commented Dec 19, 2024

I will check them. Thank you.

@nowhereman87
Copy link
Author

( Sorry, just fixed all links ) Thanks in advance for considering.

@KMFDManic
Copy link

Specific Cores will benefit lower spec, such as MAME 2003 Xtreme and Ludicrous N64. The Phaenon Xtreme is a fork of Yabause/Yabanshiro fixing up Saturn to be more relevant to lower spec.

It's case by case scenario, and knowing specific Cores that struggle on this platform can best help me advise a path core of action.

Ludicrousn64, I have two forks, both of which are really nice for low spec. I will be finetuning them to final builds for a release in near future, too, on my platforms.

@nowhereman87
Copy link
Author

nowhereman87 commented Dec 22, 2024

@KMFDManic thinking about it quickly makes me say that any of the "heavy" systems for the minis also would be welcome in an improvement even if it is minor for Vita, obviously Saturn that can barely be used on few 2D games, and most of N64 and Dreamcast, for which Rinnegatamante believes to have done everything possible already.
But going further back there are cases like FX chip and most demanding games for SNES and GBA, and clearly the heavier boards in 2D arcades, like SEGA System32, its successors and almost all Midway games, many of which drag heavily on regular MAME and FBNeo cores, maybe it would be nice an alternative or optimized version of PCSX ReARMed if we can dream.
Others here could name some specific systems and boards, if I could make just one request, I would like to be able to run the classic arcade Mortal Kombat games at a decent speed.
Thank you very much in advance for being interested, I always wished your developments to reach PSVita.

@KMFDManic
Copy link

@nowhereman87 Initially, in the Mini Classic Scene, competition tried to prevent me from even posting Xtreme Cores. I just knew that many of the Cores were more favorable in PC environments, and not so much for us on lower spec. That is what made me start fixing them up as the things arose. It isn't necessarily always about "demanding". It can sometimes be seen from the optimistic pessimistic route. I tend to intentionally "break" accuracy to pull off running stuff better than it feasibly should for us.

In the case of Outfoxies for Arcade, which doesn't work with sound on 2003, but does TOO slow on FBNEO...

Outfoxies Before and After Results

https://www.youtube.com/watch?v=GykjNXqjITc&t=108s

I have a background in music theory, which was a college level course I had taken in high school. They put me through some crazy obstacles and tasks, including having to write an original musical composition following the formula of what notes can go into which notes. He'd play music from Bach or Beethoven, etc, for several seconds, and we'd have to notate everything we heard on paper, note for note, chord for chord. Other than that, my general music aptitude has made it reasonable to be able to muck with timing perimeters and not make it so far gone that we are listening to alvin and the chipmunks whilst playing at a decent FPS, haha.

You can see what I mean with the decent roll out fix up of OutFoxies in my FBNEO Fork. Did same for Cave SHMUPS, like Deathsmiles, Mushihimesama...

Running Mushihimesama on 1.008 Ghz Processor low spec

https://www.youtube.com/watch?v=s9x2aSvSYkE&t=170s

It ultimately comes down to whatever comes to mind or what people may suggest to me. I work things out in a way that would probably annoy a lot of accuracy purists. But, for us, lower spec wise...what other options do we have:)?

System 32, is fixed up in my 2003 Xtreme Fork. It was made far more accurate by Mahoneyt944, Grant2258, Arcadez2003, of MAME 2003 Plus Team, whom have all been great collaborators in humoring me on things that would typically break accuracy! The more Xtreme Stuff stays strictly in Xtreme. The stable enough stuff is in Plus.

FX Chip runs well enough with the Mednafen Faust Core I tweaked. Otherwise, you can overclock it within 2005/2010 SNES9x, but don't bother trying to run on current 9x.

Atomiswave requires substantial amount of RAM...SO, unless you have adequate RAM or ability to run Virtual Ram, your results may be hit or miss.

@noword
Copy link
Owner

noword commented Dec 23, 2024

Thanks guys, I will test FBNeo-Xtreme-Amped and mame2003-xtreme.

If all goes well, I will replace the official libretro version。

@noword
Copy link
Owner

noword commented Dec 23, 2024

The new version with core of Xtreme. Plz test them.

MAME20034VitaPlus_0.11.vpk.zip
FBNeo4VitaPlus_0.11.vpk.zip

@surlup
Copy link

surlup commented Dec 23, 2024

The new version with core of Xtreme. Plz test them.

MAME20034VitaPlus_0.11.vpk.zip FBNeo4VitaPlus_0.11.vpk.zip

with Extreme Core Mame MK 2 get 50-53 FPS use setting TurboBoost :Auto_max which is I think This is Amazing...
this is On VITA3K/PSVITA Emulator
WhatsApp Image 2024-12-22 at 20 47 18

@nowhereman87
Copy link
Author

@KMFDManic thanks for the explanation and the video examples, those are really impressive. I also consider that due to the limitations of our hardware in PSVita, precision can be put on the back burner and I consider it preferable to have fluidity even if it is 90% in speed of the real game sacrificing as few frames as possible, but yes, ultimately I go for performance/playability. Likewise, instead of precision in emulation I much prefer that the sound is more than acceptable.
I am really not an expert and I don't know what elements need to be ported so that your cores could run on official PSVita RA or this Emu4Vita. I hope you have a Vita available to do some tests and experiments, there is a great community that is excited about this new frontend.
I've been talking to some friends who agree that they would like to see better performance in arcades games from the second half of the 90s, especially those that have complex scaling effects and large sprites, like system32 or the examples you showed of shumps from around the year 2000. And several agree that we would like the best possible fluidity in the heaviest part of SNES and PS1 through PCSX ReARMed that still doesn't come close to Adrenaline/the official PSEMU, which although it runs almost perfectly, DOES NOT RUN all the games (...by the way, would be possible a port of Duckstation Core for Vita???)
And well we all agree that we would like to see if the Saturn miracle is possible even if it's just running a couple of titles in a playable way.

@nowhereman87
Copy link
Author

nowhereman87 commented Dec 23, 2024

Wow, thanks a lot @noword for the quick reply and making those builds, I'll go try them out now to compare with the Mortal Kombat and others with similar choppy performance.

(by the way, on the regular core you include of MAME 2003+ I met a bug in the control mapping since when adding coins and pressing start both players 1 and 2 were enabled and then the controls were shared for both players simultaneously, making it unplayable, this for Mortal Kombat 2 and others games as Mexico 86 start on dipswitchs menu and I can't find a way out of it )

As a sidenote, another friend user suggested that he would like to have a core for the MSX System on Emu4VitaPlus, which I suppose is easier to implement than the others discussed on this thread (I think fMSX https://github.com/libretro/fmsx-libretro is not on Vita Retroarch builds )

@Vecinagamer
Copy link

Brutal and wonderful all this content friends

@KMFDManic
Copy link

Glad 2003 Xtreme worked out. Any other specific Cores, let me know, and I can try to modify them to best handle Vita specs.

Ironically and coincidentally, a friend of mine asked if it was worth getting a vita a couple weeks ago. He had played mine before. I had just never hacked it as of yet. I decided to for at least PS1, PSP, VITA games.

PS1 can work well for you. It would just need some modification, which I can do. Duckstation will only work well if you have GLES 3.0 or higher. Otherwise, you would be stuck running in slow software mode.

N64 is one you should be able to run with my Ludicrous, as well.

And, least not forget, PPSSPP has capability of running stuff, too...the built in PSP emulator can, as well.

Mortal Kombat games I can get to run full speed, with a little recoding, too.

@Snowbro88
Copy link

@KMFDManic Hi, actually, heavier cores have been tried separately like Dreamcast or N64, Saturn seems impossible to me, of the cores that currently work on Vita but are a bit lacking, the Sharp x68000, they are just a bit slow or the audio crackles.

I think PC FX should not be so demanding, 3DO the same, well, but these platforms are already out of the conventional and I don't know how much real interest there is in the community or on your part.

It's just a suggestion, thanks for your work.

@KMFDManic
Copy link

@Snowbro88 PC-FX is a no go. It is incredibly slow. PC-98 and Sharp X68000 can be fixed up fine, however.

3DO I had to fix up to work well for low spec. It can run stuff like Demolition Man on my modified Core.

SFII demonstration for 3DO

https://youtu.be/021HhAt286U?si=gbN1wOa4lyH2_i69

SFII would typically run ultra slow for our relative specs. Had to think outside the box to get it to function like in my video.

Luckily, ive mostly worked with every Core there is, so have an idea what we can and can get away with.

Older video of PC-FX fix up...can fix it up better now if needed though.

https://youtu.be/RL0N3WAA_20?si=SwzzGfkvyDP9FEK_

@Snowbro88
Copy link

@KMFDManic would it be possible to consider adding an even more optimized version of UAE4ARM to Emu4vita? The current by chips fr is already quite good but there are some heavy games that do not reach full speed, for example Jim power or those with the AGA chipset, it is also not compatible with CD 32, at least in its Vita version.

@nowhereman87
Copy link
Author

nowhereman87 commented Dec 24, 2024

I've been testing the games I mentioned and unfortunately so far seems to me that I haven't achieved better fluidity than in the regular MAME 2003 and FBNeo cores, ironically on the Midway games I've met lower framerates, more choppiness and stuttering in the sound.
However with MAME 2003 Xtreme the controls work just fine and by default it set the stick to control the aim in System 32 games like Jurassic Park and Alien 3 The Gun. Also as a detail, I noticed that some sprites that are not render in the regular version do appear with this core.

@KMFDManic Is there a combination of settings you could recommend for Vita? I'm not sure how I would set the "reverse overclock" level.
I guess your cores needs to be specifically modified and optimized for the Vita hardware to take better advantage of your work and achieve the improvements seen in your videos on the mini consoles etc.
It's good to know that you have a Vita, I hope you find the time to make specific Vita adjustments and contribute to this project.

@noword however, I consider it positive if you keep them as new options beside the regular ones in the next build so maybe more users can test, also because these Xtreme cores have many additional configurations and settings to continue experimenting and it's always good to have several options for arcade games. I will continue testing, thanks in advance to both of you and Merry Christmas!

@KMFDManic
Copy link

@nowhereman87 have retroarch settings, video, output, video synch toggled off. Have turbo boost at X6 for 2003 Xtreme. Reverse OC you can go backwards a little at a time til you hit performance you want. Midway game wise, I can do some core updating to get them to run faster and keep you posted:)

And, ill offer up an alternative way to run Midway even faster!

@Snowbro88 ill drop updated source for puae which will run aga games fine. And you can run cd32 version too.

Let me know if there are any other things to look into.

Midway should be a very easy fix up. So, just be patient on that one.

@KMFDManic
Copy link

@nowhereman87 have retroarch settings, video, output, video synch toggled off. Have turbo boost at X6 for 2003 Xtreme. Reverse OC you can go backwards a little at a time til you hit performance you want. Midway game wise, I can do some core updating to get them to run faster and keep you posted:)

And, ill offer up an alternative way to run Midway even faster!

@Snowbro88 ill drop updated source for puae which will run aga games fine. And you can run cd32 version too.

Let me know if there are any other things to look into.

Midway should be a very easy fix up. So, just be patient on that one.

another thing 2003 Xtreme can do:)

https://youtu.be/wtR1zHhRkgc?si=uI44-NvUhccYGA0O

@nowhereman87
Copy link
Author

nowhereman87 commented Dec 24, 2024

Thanks for the advices, will keep testing. However, some of those RA settings can't be set so far on this frontend I believe.

Please, If you can do something for the Midway boards arcade games even if it's just the Mortal Kombat ones, I'd really appreciate it, it's a pity there isn't a way to play these arcade versions in an acceptable way on Vita (The closest thing would be using the PSP Midway Arcade Treasure compilation but it doesn't include Ultimate and has port limitations and blurry graphics)

Also,...I'd like to know how your custom Mame 2003 + core turns out on these, I understand that it is better for romhacks like the MK Plus versions and that it has other additional optimizations. Thanks!

@KMFDManic
Copy link

@nowhereman87 I can add romhacks to Xtreme, as well. Ill take a look at midway speed boost for the time being. I can get about any game to run better. I just do them as they come to mind or are suggested or requested, for the most part.

@Snowbro88
Copy link

@nowhereman87 in MAME 2003 Xtreme I noticed better performance in Irem, Data East and Gaelco games, just by putting the turbo boost on Aggressive, the other SEGA, Konami, Taito, etc. games from 90s boards still run slow.

I'm not sure if the reverse overclock should be increased or decreased to gain performance?

In FB Neo Xtreme I couldn't get better results than in the normal version.

I should mention that I consider that the mini and classic console versions that were the target of the Xtreme cores are more powerful than a PS Vita, that could be the reason for not getting the best results, maybe PS Vita doesn't meet the minimum requirements for example CPU.

I also consider that it's a good idea to keep the regular and Xtreme cores in Emu4vita+ to compare the performance.

@KMFDManic
Copy link

@Snowbro88 youd want to go in reverse to get better performance. Underclocking helps lower spec. Overclocking helps higher spec.

Outfoxies is a good test game for fbneo normal and my build. It will require bios in same directory as game to run, though.

Same as 2003 Xtreme. FBNEO, I fix for lower spec what I need to.

The Midway Games ill touch up for Xtreme next. Then, ill go from there.

@Snowbro88
Copy link

@KMFDManic I think that perhaps the most optimal solution for the cores in MAME is to first base yourself on the current versions that have already been optimized for Vita as @nowhereman87 suggests and then add to this your turbo boost and the tweaks present in your Xtreme cores.

@KMFDManic
Copy link

@Snowbro88 it doesnt quite work like that. It ultimately comes down to specifically how it (the core) is built for whichever platform. For different platforms I work with, I have to build the same Cores quite differently. If certain optimization flags and build perimeters are missed or overlooked, you could lose some of the Xtreme properties, unfortunately, in the process.

I'd need to know if anything special was done in the build process for any given Core, to make them compatible with Vita.

So, in essence, it is the building behavior that helps the Core just as much as any Xtreme addictions I've added.

As an example...Someone attempted to run a scummvm build I was working on, with a particular game...it ran about 8-11 FPS, if even that. I personally looked into it, discovered the build was the problem in that case.

Aside from that, anything that stands out in the Cores, I can generally fix up, case by case scenario.

These Cores were meant with 1.008-1.53 Ghz Clock Speeds in mind, as far as low spec optimizations. But, they handle nicely on higher spec, too.

So, in a nutshell, would have to determine, comparatively speaking...any differentials in build process, and adapt the core and or build process accordingly, for best results.

Ill be updating Amiga Core source too which will also be nice for a ton of games, test wise already:)

There is always room for improvement, in any case!

@KMFDManic
Copy link

@nowhereman87 @Snowbro88 I didn't even realize this personally. BUT, Mortal Kombat 1 Arcade on real hardware only ran around 53-54 FPS. It never actually ran at 60 FPS. I did a speed boost test on Xtreme 2003, and was able to easily get the game to run 53-54 FPS steady. It would be kind of interesting to see how the game would even handle beyond 54 FPS. But, that is what the game actually ran at. I believe the same was for MK 2 and 3. No matter the case, I will do a little more testing, then should have improved enough MK to stay at 54 FPS even on Vita with 2003 Xtreme. To go beyond 54, i'd have to alter things a bit more, since the game, itself, doesn't even run faster than that under ordinary circumstances, heh. I will play around with it, though.

And, to confirm I was on the right path...Little tidbit...Before we got Midway Games fixed for 2003...ones like Tron, Tapper, etc. (due to sound frequency issues), MAME 2000 was the best candidate to run Midway Games. MK 1 ran best on MAME 2000. BUT, I have tried to make it so 2003 can run it just as well as the less accurate 2000, if not better...With my test coding changes, I tested same exact MK 1 on 2000 AND 2003 Xtreme...Both had absolutely identical performance and speed, which means it worked. I then tested an earlier build of MK coding with 2003, next to 2000...And, 2000 ran better. So, as of right now, I have 2000/2003 pretty much identical. Still, I would like to see if I can break things enough to push the game to go past 54 FPS and see how things play out. And, maybe add some of the MK hacks in, to boot.

@nowhereman87
Copy link
Author

nowhereman87 commented Dec 26, 2024

@nowhereman87 in MAME 2003 Xtreme I noticed better performance in Irem, Data East and Gaelco games, just by putting the turbo boost on Aggressive, the other SEGA, Konami, Taito, etc. games from 90s boards still run slow.

I also consider that it's a good idea to keep the regular and Xtreme cores in Emu4vita+ to compare the performance.

@Snowbro88 I'm glad to hear that. Yes, I've also been testing other non Midway games that normally run a bit slow for me, like "In the Hunt", and I see that they run very smoothly now with the Xtreme core, actually flawless. Another that runs better is Irem' Dream Soccer 94, with reverse overclock about 105. Thanks for testing!

@KMFDManic Right, It seemed to me so with Mortal Kombat games, since 53 fps it's the peak FPS I was able to achieve at any time during emulation with both versions of the cores. However, with Xtreme the stuttering was constant and greater than with the regular core.
Thanks for checking it out and looking into PSVita now! I hope you can get some new juice out of your Vita and then we'll all benefit.

@noword
Copy link
Owner

noword commented Jan 18, 2025

@KMFDManic https://github.com/KMFDManic/FBNeo-Xtreme-Amped can't post Issuse, so I have to post here.

libretro/libretro-common@80d7a25
Change the string_replace_substring API
from

char *string_replace_substring(const char *in,
      const char *pattern, size_t pattern_len,
      const char *replacement, size_t replacement_len);

to

char *string_replace_substring(
      const char *in,          size_t in_len,
      const char *pattern,     size_t pattern_len,
      const char *replacement, size_t replacement_len);

Can you update your codes too. This problem cause the #28

@KMFDManic
Copy link

@noword Let me touch up my Repo and make sure it works, then will let ya know:) Thanks:)

@Snowbro88
Copy link

@KMFDManic Hi, since you're here, I'm wondering if you've had time to look at those Retroarch cores that are close to full speed on Vita? For example, Sharp x68000, PC 98, Neo CD, or improve Amiga UAE4ARM so that it's compatible with CD 32, or PUAE with good performance on Vita, for example.

In fact, with several of these cores, only the sound crackles a bit and perhaps with optimization or some adjustment or tweaks these cores can reach full speed and good audio without using frameskip.

Regards.

@KMFDManic
Copy link

@Snowbro88 UAE4ARM is mostly good for A1200 Games. I mostly use PUAE, otherwise. I have been fixing up my build of PUAE, which should work well enough for you once it is finalized. I have frameskip set to 1, since the way performance/speed work, overall, it is barely noticeable, and is absolutely necessary for jim power game. But, MOST other games run fine with it disabled.

PC-98 I will be checking out again, as well. Will update links to my Repos, once I am happy and done with the ones you've mentioned. I will see on the CDTV Support for UAE4ARM.

@Snowbro88
Copy link

Snowbro88 commented Jan 30, 2025

@KMFDManic Great boss, just one last question, when you have one of these optimized cores and you are happy with the results obtained on Vita, will these cores be added to the normal version of retroarch? I ask this because it seems that nobody is in charge of maintaining the specific version of Vita anymore, for example there are cores like chimera SNES or mednafen Supafaust that were never added to the retroarch Vita version or the same with the last commit to fix the audio in UAE4ARM, it is still broken in the normal retroarch compilation.

Or would it be possible to consider that your cores were directly added to Emu4vita++ from @noword like FB Neo and MAME 2003 Xtreme that really gave good results on Vita?

Thanks for the interest and greetings.

@KMFDManic
Copy link

I am playing around with some testing and updates of Cores, that may potentially help Vita users. Thanks all for being patient:)

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

No branches or pull requests

6 participants