Skip to content

Releases: Raibatsu/raikopon

Experimental video speedup, upstreamed, UI updates

Choose a tag to compare

@Raibatsu Raibatsu released this 22 Jul 00:53

Some people mentioned that they could get videos to play better at the start of Ultra Sun/Ultra Moon and LBZ (let me know if there are more games like this) by setting CPU clock speed at 25% or 50%. I spent quite a lot of while digging that, and its probably because of the fact that MVD is still stubbed. I'm not sure. Well, since I can't code for poop, I basically did what every average joe would do: hook the frontend of the emulator to listen to "MovieLib" or y2c changes that would trigger a "video playback". its very hacky. So as soon as the frontend listens to these two messages, they drop the clock speed by a mentioned value - you can change it in "Movie CPU Throttle" in third setting ingame overlay. its set to 25% by default.

Changelog:

  • Upstreamed to latest Dekopon build, removed a few things that I had already implemented like screen swapping, linear filtering etc.
  • Added an experimental video speedup hack. Can be changed in ingame overlay > 3rd setting > "Movie CPU Throttle". Not per-game right now. Works with Ultra Sun/Ultra Moon and LBZ - let me know how this works in other games pls.
  • UI updated and now requires you to press A to actually change since otherwise, the joystick would usually change settings while you were moving in settings or ingame menu.
  • New icon with a fedora, absolutely the best thing to ever happen honestly.

Fixed several ingame crashes, updated icon, true pause support

Choose a tag to compare

@Raibatsu Raibatsu released this 21 Jul 19:20

I kept getting a few pings from y'all that several games - Pokemon X/Y most of all - was crashing a crazy ton while playing. Turns out, it was because of an old commit where games that wanted to access an old memory location couldn't because it was still inhabited by a stale READ-only memory bit. Spent a crazy amount of time and AI tokens to compare my work with Tico Azahar because it wasn't happening there. Finally figured it out, whew.

Changes:

  • Fixed ingame crashes for many games. If you still find any crashes in any game, please do let me know.
  • Icon has been updated by a very generous colleague - Noihs (I need to add an About page to give proper credits as well soon). Now y'all won't confuse this with Dekopon, right?
  • Now when you open ingame overlay (with Plus and Minus key pressed at once) - the games properly pause. This was a long needed feature.
  • Work towards improving launch games & saving/loading faster.
  • Added missing implementation of cro_helper with the help of Tico-Azahar code. This should help considerably with stability too.

If you are using a forwarder, please remove and then re-add this NSP so that you get the newer, updated icon.

[Experimental] Added new icon, fixed crashes in Pokemon X/Y

Choose a tag to compare

Will make a proper release for it in a little whle

[Highly experimental] Force Core Clocks to be 25% for video playback

Choose a tag to compare

@Raibatsu Raibatsu released this 21 Jul 08:23

Okay so I was roaming Tico's discord server and people mentioned that videos play back better if the core clocks are set to 25% and I swear I was banging my head on the wall literally yesterday trying to fix this issue. First I thought maybe its an MVD issue but MVD hasn't been fully implemented yet.
Added a manual, cheap hook from the frontend - definitely a hack if anything but it kinda works? its still highly experimental and will cause issues, no doubt. Basically if the emulator detects you're playing a video, the core clocks are forced to 25%, and then when the video is supposedly finished playing, it'll reset back to original value.

Test and lemme know pls.

Added per-game Cheats menu in-game

Choose a tag to compare

@Raibatsu Raibatsu released this 20 Jul 16:48

Since our performance is pretty much good enough for most games, I wanted to focus more on other basic stuff that Azahar already has, that we don't have access to right now.

Here's the first of the major changes that I really want to add:

  • Added per-game Cheats menu. You can press L/R keys on ingame menu to access Cheats menu. Here you can add/remove/modify/enable/disable individual cheats for your loaded game.
  • You can also put the cheats inside the cheats folder in your directory: dekopon/cheats/.txt.
  • For cheats to take effect, you may have to leave an in-game room and re-enter. Another sure-fire way is to restart if you can't see it in action, for example 60 FPS cheats.
  • Disabled Right Eye Rendering by default since 90% games take benefit of it being disabled. For games that have visual artifacts, you can still enable it in in-app, dw.

Add 'Disable Right Eye Rendering' & improved audio latency

Choose a tag to compare

@Raibatsu Raibatsu released this 20 Jul 05:02

Okay, so the biggest difference why Tico Azahar had considerably better performance than Dekopon or this fork was because drum roll it had the option to disable Right Eye Rendering. Disabling it instantly gives 30-40% or sometimes even more FPS at the same settings. It does cause graphic issues in some games such as Metroid, so I have kept it as a toggle in overlay settings too.

Changelog:

  • Added thread priority backend code from Tico Azahar (only implemented for audio right now, but we might use this later for other optimizations, very useful).
  • Added option to Disable Right Eye Rendering (enabled by default). Massive thanks to Rolli for pointing that out to me, saved my forehead.
  • Added option to change Texture Filter in ingame overlay.
  • Fixed crashes in Ultra Sun and Ultra Moon when using Z boost. Kirby Robobot also does not crash on boot now. Played through an entire level and zero crashes for now. Please report if you do see any crashes though.

Think the performance is better now, so I can focus on some other smaller gimmicks and features now.

Upstreamed from Dekopon & borrowed optimizations from Tico

Choose a tag to compare

@Raibatsu Raibatsu released this 20 Jul 04:07

One thing I genuinely didn't know was how performant Tico's version of Azahar is over Dekopon. Luckily, Dan has made his changes public. However, since there is a significant difference in implementation between Dekopon and Tico, I had to manually nitpick the changes. I saw a great performance boost in Zelda Link Between Worlds and Mario 3D World (Mario is still far from being as good as it is on Tico for some reason, I'll look into what else I can pull off).

Here are the changes I added, including from Tico, from Dekopon, and some on my own:

  • Build now uses LTO. The original dev has a warning saying to keep it disabled, but enabling it does give a pretty good performance boost, Reduces build size by a little bit as well. Might cause issues, let me know if it does.
  • Added option to change between texture filters (all 5 texture filters available in Azahar are available: 1: Anime4K, 2: Bicubic, 3: ScaleForce, 4: xBRZ, 5: MMPX.)
  • Added option to toggle Linear Filtering and Integer Scaling.
  • Changed the core schedulers to be more... freely available (this is the biggest change I moved over from Tico). Gives a good performance boost and helps compile shaders faster. Additionally, ensures that games run better on lower clock speeds, still not as good as original Tico though.
  • Reverted the IO optimizations that I did for entering/leaving Pokemon battles. Unfortunately, while it did help between battles, it caused games like Pokemon X/Y to hang on a black screen due to IO hanging. Might take a look at further optimizations that don't break functionality.

Imported changes from Dekopon:

More shader goodies & slight performance boost in CPU-bound games

Choose a tag to compare

@Raibatsu Raibatsu released this 19 Jul 15:57

Picking up from where we left before in the experimental build, shaders were being compiled async but we ran into a small, big issue. When you had accumulated a bunch of shaders - like maybe 1000+ - you'd run into a small issue: when you'd play the game again, you'd have to recompile all those 1000+ shaders at the start of the game, every single time. That was a horrible experience I'm sure and I don't think none of us finish games in one sitting. So, I asked AI to generate me a screen at the start and it did. Truly marvelous stuff, I tell you. Also, the cache isn't invalidated at the start anymore, as it shouldn't, so consequent shader compilations are considerably faster. From 4-5 minutes to 20-25 seconds.

Changes:

  • Added a shader compilation screen at the start, before completely booting into the game.
  • Pulled from azahar-emu#2318 - referenced by original Dekopon project. This gives a really nice 10-20% performance boost in CPU-bound games. It is a bit experimental but it works really well. Free performance boost, yay!
  • Modified IO to be faster and more accurate. This was primarily meant to be aimed at Pokemon games, where jumping into battle caused the frames to drop to like 3-4 FPS for a second or two. The FPS still drops but they're less noticeable.

Read the older experimental changelog: #v1.0.0.3-rai for other changelog if you haven't updated.

Lemme know if any game crashes, since this is highly experimental and I probably don't know what I am doing.

PS. I am looking for someone to design a custom design for my fork pretty pls. Not paid since I don't expect to be paid for this either, its all for the community!

More Screen Swapping Stuff - Upstreamed project too

Choose a tag to compare

@Raibatsu Raibatsu released this 19 Jul 02:04

Okay so, there were a few of you who wanted to add more options to swap screens so I spent a few hours today doing just that. Luckily, @PalindromicBreadLoaf - the original dev who I forked this project from - added custom screens support. That helped a crazy lot.

L3 + Minus button should work for all screens now, as should be expected.

Have fun, I'm gonna go experiment on shader stuttering now.

[Experimental] Shaders compile while playing game, implemented Boost mode

Choose a tag to compare

@Raibatsu Raibatsu released this 19 Jul 05:11

Okay, so Switch already comes with a Boost mode built-in that a lot of games use. It basically temporarily overclocks the CPU to 1.7 GHz while the GPU is downclocked to less than 100 MHz. This lets the CPU do most of the heavy lifting while its needed and GPU isn't necessary. Since shader compilation is a CPU-intensive task, I was like - hey, lets let the CPU boost itself while it compiles shaders. Turns out it does work. Really, really well. Only downside I see right now is that you'd get slightly worser battery life since the overclocking, but I've made it so that it downclocks to your normal clock speeds as soon as the shaders are done compiling. Lemme know how it works for y'all.
Also:

  • Added a small GUI indicator on top-left portion of the screen that shows if shaders are compiling and how many are left. Similar to how you see in CEMU and other emus.
  • Divided the shader compilation to 3 cores (0, 2, 3). This takes the load off core 3, which was otherwise the backbone for shader compilation (I know I said it was core 2 in my previous release, it's apparently core 3. OR AS FAR AS I KNOW, I AM DUMB OK).

If I had to compare, this makes Dekopon shader compilation much similar to how Tico does it, but with less stutters? Expect to see a bunch of shader explosions and bad renders while the shaders compile though.
Have fun, y'all.