1. MarioKartFan

    MarioKartFan GBAtemp Regular
    Member

    Joined:
    Aug 27, 2019
    Messages:
    251
    Country:
    Algeria
    @justinweiss

    No crashes in six hours of testing. When I saw your note I immediately flipped on dithering in all titles. Realized that was a tad aggressive and switched it back off in some as there is still a performance hit in some titles. Excellent work as always. Selfishly I hope you continue driving this emulator further along. It’s simply remarkable how far you’ve come in one month.
     
    justinweiss likes this.
  2. TheBeverage

    TheBeverage Advanced Member
    Newcomer

    Joined:
    Mar 13, 2015
    Messages:
    73
    Country:
    United States
    Thanks for the info! I also noticed the gofile links seem to have expired, or at least they’re showing as file not found for me.
     
  3. MarioKartFan

    MarioKartFan GBAtemp Regular
    Member

    Joined:
    Aug 27, 2019
    Messages:
    251
    Country:
    Algeria
    @justinweiss

    Do you have any ideas for how to address the stutters that sporadically occur when certain special effects are used? For example, Crash Team Racing runs full speed in races, but between races when Aku Aku appears in a flash of smoke, it stutters until the smoke disappears. Alternatively, in Final Fantasy IX, some of the spells (in particular Blizzara) result in momentary slow downs while an ice effect appears. I’ve played with settings enough to think that something in the programming itself needs to improve.

    Your performance improvements have ironed out so many wrinkles that the relatively few ones that remain stick out. Thanks as always.
     
    Last edited by MarioKartFan, Sep 29, 2020
    justinweiss likes this.
  4. Zense

    Zense GBAtemp Advanced Maniac
    Member

    Joined:
    Apr 20, 2008
    Messages:
    1,768
    Country:
    Italy
    Has anyone tried seeing if the overclocking settings can overcome these slowdowns, like how they did for MGS?
     
    Last edited by Zense, Sep 29, 2020
  5. Larsenic

    Larsenic Member
    Newcomer

    Joined:
    Oct 23, 2019
    Messages:
    20
    Country:
    Argentina
    Does not help with the slowdowns caused by these effects. I'm currently playing Xenogears and when smoke or fire effects cover a relatively large part of the screen (ie. when the effect get close to the camera), the fps drops hard.
    I tried setting cpu clock to 60 and the drops are exactly the same. When the same effects are smaller (ie. farther from the camera), the slowdown diminishes.
    So I believe the problem is not the effects themselves, maybe something related to how transparency is handled. Even more geometrically complex scenes where these effects are not present run full-speed.
    Other games suffer from this too, battle sequences in Front Mission 2 rely heavily in similar smoke effects and slow down considerably.
     
    Zense and MarioKartFan like this.
  6. MarioKartFan

    MarioKartFan GBAtemp Regular
    Member

    Joined:
    Aug 27, 2019
    Messages:
    251
    Country:
    Algeria
    One key difference is that MGS saw its framerate tanking even though retroarch was reporting 59.9 fps. When these special effects pop, the framerate can dip into the high 30s low 40s. Only for a moment or two, but still there.

    I’m just an amateur, but I think you’re onto something here. Your description of the slowdowns matches mine perfectly.
     
    Last edited by MarioKartFan, Sep 29, 2020
    Larsenic and Zense like this.
  7. Zense

    Zense GBAtemp Advanced Maniac
    Member

    Joined:
    Apr 20, 2008
    Messages:
    1,768
    Country:
    Italy
    Good explanation/hypothesis! I've also noticed that changing from dynamic to static camera in FFIX does help at times to reduce the slowdown during such effects. This makes the camera stay further away than dynamic camera so it seems in line with your findings.
     
    Last edited by Zense, Sep 29, 2020
  8. Dahavoc

    Dahavoc Member
    Newcomer

    Joined:
    May 26, 2017
    Messages:
    13
    Country:
    Gambia, The
    thx for the guide and download!
     
  9. wanderindirk

    wanderindirk Member
    Newcomer

    Joined:
    Aug 29, 2014
    Messages:
    35
    Country:
    Vietnam
    I think MarioKartFan's observation is absolutely spot-on here. Those out-of-cutscene slowdowns in MGS never really make performance look janky, just slow (but still somehow smooth, like "running through syrup" as MarioKartFan once put it), whereas these special effects slowdowns both really make the framerate drop hard and the game janky. So I don't think overclocking could address the core issue here.

    I also agree that this might be related to how transparency is handled, but since I'm also an amateur I don't know exactly how transparency effects are regulated by both the Blending and Lighting settings. In any case, disabling either of these settings will drastically improve the framerate, and disabling both at the same time will raise it to full speed 99% of the time (but this I think we all already know).

    I've worked around these frame drops by not making the game process the related special effects. I played through both MoH games by looking/being far away from explosions whenever possible (I wouldn't have thought this action movie trope could actually become useful), and when shit really hit the fan I'd disable Lighting for a while. In comparison, disabling Blending can really make some games unplayable, so in most cases I'd leave it on. I think games with pre-rendered background traditionally don't suffer too badly in terms of graphics when Lighting is disabled, so I'd do that too when necessary (but the recent improvements have really diminished that necessity quite a lot); also, disabling camera movement during battle always helps in FF games, as Zense has pointed out.

    Personally I've come to accept this problem as one big caveat I'll have to endure permanently, since I have the feeling this is the limit of the 3DS and probably of the current unai renderer as well. The same kinda goes with the inability to enable dithering. Though the recent introduction of threaded audio and video does manage to raise the fps quite a lot during these demanding sfx segments (anywhere between 5-15 frames in the games I've been testing), there's still a lot of ground to be covered in order to reach full speed. I was testing Syphon Filter 1 the other day, and seeing the game suffer during the underground station mission, which was basically surrounded by flames and smoke, was a bit sad when compared to the incredible framerate of the very next level which had a huge quasi open world map and lots of enemies and even weather effect.

    Having said that, I won't be surprised if one day justinweiss simply emerges victorious and introduces a brand new renderer (or some other magic) which then starts another revolution like unai previously did. That's how incredibly capable he's proven himself to be times and times again during the development of this project.
     
    Last edited by wanderindirk, Sep 29, 2020
  10. justinweiss

    justinweiss GBAtemp Regular
    Member

    Joined:
    May 29, 2016
    Messages:
    106
    Country:
    United States
    Yeah, the slowdowns seem to happen when there's lots of overlapping blending. The blending routines are already down to about 10 cycles per pixel, not much more room to work with. It's possible to blend two pixels at once, but the tricky part there is getting the rest of the function to work two-at-a-time and not get slower. I'm also not convinced blending is the worst problem, but just that when you're doing lots of blending you're also doing lots of drawing (since each pixel can need to draw multiple polygons). Or it could also be that there are other things the PSX GPU often does when blending that unai isn't handling well. (Maybe it's forcing vram transfers?) There are some very surprising slowdowns, like the fact that Diablo doesn't go much above 45 fps or that Chrono Cross will sometimes drop 5-10 fps when a dialog box pops up, which might have some interesting clues.

    This is something that will take measurement to see what's actually happening. These functions are so low level, though, that getting accurate measurement is hard. So it's an experimental, slow process. But weird symptoms that I don't understand often means there's a place things can be improved.
     
  11. wanderindirk

    wanderindirk Member
    Newcomer

    Joined:
    Aug 29, 2014
    Messages:
    35
    Country:
    Vietnam

    Dude it is absolutely beautiful to see you thinking out loud like this even though I don’t really understand a word of the technical stuff you were talking about. Since I’m an easygoing person I find that the core is already too good as is, and if it turns out that no further substantial improvements are to be made or one day you just decide to call it a day with the project, I can still proudly tell others that my 3DS can play PSX games well. This is sentimental stuff for me since I never transitioned to HD gaming, I stopped right at the PS2 and later the 3DS. I’ve decided that the N3DS I currently own is the last gaming system I will ever buy, and there’s also the possibility that the 3DS is gonna be the last true handheld system that Nintendo will ever produce. Getting PSX to play on my 3DS fills up one very important part of my personal gaming history (and I guess getting PS2 would make it complete but that’s unreasonable), and I just hope that my 3DS won’t get pulverized before I’ve played every single game I want to and can play on it.

    So here’s just somebody telling you that for each and every single day that you still work on this project, there will also be me cheering you on on the sideline :)
     
    justinweiss and kenseiden like this.
  12. TheBeverage

    TheBeverage Advanced Member
    Newcomer

    Joined:
    Mar 13, 2015
    Messages:
    73
    Country:
    United States
    Are the gofile links down for everyone or am I just having an issue with the site?
     
  13. MarioKartFan

    MarioKartFan GBAtemp Regular
    Member

    Joined:
    Aug 27, 2019
    Messages:
    251
    Country:
    Algeria
    They’re down.
     
    TheBeverage likes this.
  14. justinweiss

    justinweiss GBAtemp Regular
    Member

    Joined:
    May 29, 2016
    Messages:
    106
    Country:
    United States
  15. MarioKartFan

    MarioKartFan GBAtemp Regular
    Member

    Joined:
    Aug 27, 2019
    Messages:
    251
    Country:
    Algeria
    How to account for his rise to the top? Maaan, the man is NON-STOP.

    Here’s to weird symptoms and to the hope that you continue to find them intriguing and crush these last few issues.
     
    Last edited by MarioKartFan, Oct 3, 2020
    justinweiss likes this.
  16. TheBeverage

    TheBeverage Advanced Member
    Newcomer

    Joined:
    Mar 13, 2015
    Messages:
    73
    Country:
    United States
    Fantastic, thank you! I've tried out:

    FCEUmm, which seems unchanged (it was working fine already).

    SNES9x 2005+, which unfortunately does not seem to gain performance in certain games that are still hovering around 50-55fps at times (Tetris Attack in-game and the SMRPG intro are quick tests). Threaded video and audio do not seem to impact performance here. Performance isn't lowered either, though, it's just the same as before. However, to my surprise, a long standing bug in 2005+ where the audio would crackle at higher volumes on the internal speakers has been resolved, so that in itself is great as it's been driving me crazy for months.

    Genesis Plus GX also seems to work as well as it did before, but I don't use that nearly as much as the others so take that as you will.

    I was most interested in PCSX, naturally. Crash 1 seems to work best with non-threaded dsp. Threaded video seems to offer a few extra fps, bringing me from 53-55 to about 57-59. From here disabling sound reverb and interpolation got me to hit 60fps (well, 59.8338, but you know) but with constant drops below if I wasn't standing still. Shadows etc are still a bit strange, but that's the same as before. Overall a fantastic boost to performance here.*

    I noticed the horizontal downscaling from Hi-Res Downscaling enabled when video output is set to 1:1PAR seems to result in uneven pixels on some elements, when it should probably use bilinear filtering (assuming there is minimal overhead to that). The global bilinear filtering setting seems to have no effect. Disabling Pixel Skip and Hi-Res Downscaling while setting the regular Retroarch video setting to 4:3 works for this purpose instead.

    Proper Scaling vs Uneven Pixels:
    IMG_0424.jpeg IMG_0425.jpeg

    I was also somewhat surprised that Hi-Res Downscaling and Pixel Skip didn't increase performance, as theoretically the game should only be rendering 256x240 pixels rather than 512x256. Not sure about that one.

    dsp_thread gave me some odd results. in fact seemed to significantly harm performance, bringing it down to the mid 40s, where it stayed through multiple game restarts (with dsp and threaded_dsp selected) until I closed Retroarch entirely. I'm not sure if this is a bug, because other posts in the thread seem to suggest very different results. Worse, when starting Crash again, I would get this message during launch and have to force power off my 3DS. It is easily reproducible for me, crashes every time. I have actually not been able to run this game since, so that's a point of confusion for me.

    IMG_0426.jpeg

    I also tried Chrono Cross. Again threaded video seemed to make no difference -- at this point I'm not sure if this function is working properly on my system. The Enable Pixel Skip and Hi-Res Downscaling worked excellently on the 480i menus here, bringing them up to 60fps in the intro naming screen (and about 58fps when in the intro area -- easily brought up to 60fps by disabling reverb and audio interpolation). The downscaling could still use a pass of bilinear filtering, the selection arrow below is an obvious example of rough scaling, but performance wise this is really fantastic. Turning Pixel Skip on and off does not seem to make a visual difference. With dsp_thread not enabled I get about 55-56fps in the opening hallway -- again independent of threaded video being on or off. Disabling reverb and audio interpolation only added about 1-2fps here.

    IMG_0427.jpeg

    I closed Retroarch entirely before trying Chrono Cross with dsp_thread to make sure it worked properly for this game. To clarify, all I'm doing is going to Settings > Drivers and changng audio to dsp_thread, so if that is the wrong way to enable this it may explain my issues. In this game it seemed to have no impact on performance whatsoever, giving the same fps readings as the above paragraph.

    After this I tried loading Crash Bandicoot again... same issue. I also got the same issue trying to load another game, Gradius Gaiden.

    I've also included screenshots of all my other PCSX settings, which were unchanged except for those mentioned. I have Video Synchronization on and Audio Synchronization off in the main settings.

    IMG_0428.jpeg IMG_0429.jpeg

    After, I went in and deleted my Retroarch config (and core options file) in an attempt to fix the crashing bug. Emotionally speaking, this only hurt me slightly. Fortunately, this did the trick, and the games loaded without issue. I'm not quite bold enough to test anything else out on them lest I have to make my configurations over again, but hopefully there is some useful information here! This is my first time using anything but the standard Retroarch releases, using your .cia file pack here, so I apologize if I made any stupid assumptions or errors.

    Thanks a lot for working on this!

    *From above, once I played Crash again, it started out in the upper 50s, but after about a minute of play dropped to around 45-49fps. Restarting the game and the emulator both did nothing. I even deleted the PCSX options file to make sure I hadn't ticked some wrong setting, same performance! Strange indeed.
     
    justinweiss and Zense like this.
  17. justinweiss

    justinweiss GBAtemp Regular
    Member

    Joined:
    May 29, 2016
    Messages:
    106
    Country:
    United States
    Thanks for trying it out!

    The hi-res downscaling preference doesn't render some pixels, and drops those empty pixels entirely when rendering the buffer, so there's nothing to bilinear filter. Theoretically you could put a smoothing filter on top of it. You would still end up with uneven pixels, though, because it's always skipping entire pixels.

    Crash will downscale from 512 to 320, and keeps the whole vertical resolution, so it's not as big a difference as something like Chrono Cross (which drops something like 3/4 of the pixels in the menus). I think it still gained a few fps though, I forget the impact of each change.

    Driver changes need a restart of RetroArch, they unfortunately don't take effect immediately.

    A few other people have run into this problem, but it seems to go away after wiping the configuration files. It seems to only happen with .cia builds, so it may be related to how they are built. I don't know as much about how those work, and haven't found anything out about this. Hopefully someone will discover which setting is causing the problem.

    It's usually faster to have it the other way around -- audio sync on and video sync off. I think you can actually run into a pacing issue with threaded video, audio sync off, and video sync on -- I filed https://github.com/libretro/RetroArch/issues/11302 with some of my findings.

    There are some newer changes (threaded rendering on pcsx and some possible crash fixes when quitting) that aren't in those big core bundles, just the .3dsx files that are floating around here -- at some point I will rebuild them, but I haven't had the time lately.

    EDIT: Oh yeah, one other thing I don't think I've mentioned: Enable Hi-Res Downscaling uses Pixel Skip internally, so enabling Pixel Skip when Hi-Res Downscaling is already enabled will have no effect.
     
    Last edited by justinweiss, Oct 7, 2020
  18. Dartz150

    Dartz150 Yet another Onii-chan
    Member

    Joined:
    May 5, 2010
    Messages:
    2,161
    Country:
    Mexico
    Messing around with settings make me saw that forced interlacing speeds up a lot of games at the cost of having half of the lines drawn. I was wondering if it would be possible to make that same setting to do something like this: to switch between drawn lines at each frame, making the unseen lines be visible the next frame and switch to the previous lines in the following frame. It would give a noticeably flicker effect in some cases but imo it would look much better than what it currently is and save nearly the same processing resources.

    EDIT: Just looked into the "interlaced" concept and it seems it already does this, though it should be switching the drawn lines each frame so the "scanline" effect is not visible like it is now.
     
    Last edited by Dartz150, Oct 7, 2020
    wanderindirk, justinweiss and Zense like this.
  19. justinweiss

    justinweiss GBAtemp Regular
    Member

    Joined:
    May 29, 2016
    Messages:
    106
    Country:
    United States
    Here's some updated zips, should be in sync with the newest everything. There's also an additional patch to SNES9x2005 to get the Super Metroid / Link to the Past randomizer working. I also noticed some new gpSP core options while I was looking at updates, so take a look at that one!

    - 3dsx: https://v2.femto.pw/hrij
    - cia: https://v2.femto.pw/9pjj

    I think there was an incomplete setting in unai to do exactly this, but there are some comments in the source talking about how bad it looked, so I didn't spend any time on it. Good idea, though!
     
    Last edited by justinweiss, Oct 9, 2020
  20. NanashiFinal13

    NanashiFinal13 GBAtemp Regular
    Member

    Joined:
    May 1, 2017
    Messages:
    294
    Country:
    Argentina
    Thanks for the updated builds! One one note, pcsx rearmed cia version now crash everytime that you close a game and try to open another. This problem was not present on the previous cia build that you uploaded weeks ago. Other than that, the cia version works great, im glad to have a cia version with threaded rendering option. Games like Medievil gain some fps, on some situations still have some framedrops, like when you fight on the water, but the game drop less frames than before. X- Unmei no Tatakai now works great with the threaded option activated (and with region on PAL). Later i will test more games and report it here.
     
    Zense likes this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Unofficial, RetroArch, builds