Hacking [RELEASE] UAE4ALL - Amiga emulator

rsn8887

Well-Known Member
Member
Joined
Oct 8, 2015
Messages
956
Trophies
1
Age
46
Website
www.patreon.com
XP
3,619
Country
United States
Depends on the game. Many games have sound fx and music, but some only sound fx during game. Try Turrican 2 and see if it works -> it has sound fx AND music in game.

New release v1.90:

https://github.com/rsn8887/uae4all2/releases/latest

I added an option to change keyboard style between original, warm, cool, and dark. Thanks @wronghandsfor the idea, for drawing all the awesome new keyboards, and for the screenshot!

Changelog:

1.90

- Add keyboard style option with many choices: original, warm, cool, dark (thanks @wronghands)

- On Switch, quit gracefully when using home button to exit

- Speed up rendering of savestate menu when thumbnails are displayed



 

swit

Member
Newcomer
Joined
Jan 21, 2019
Messages
17
Trophies
0
Age
34
XP
93
Country
Poland
I'm testing 1.91 version on vita and it looks like "frameskip 1 or 0" option is missing. I'm pretty sure the option was present few versions ago (I think it's the only way to make Aladdin run at stable framerate). Or maybe I'm blind and it's still there - in such case please let me know where to find it.
 
Last edited by swit,

rsn8887

Well-Known Member
Member
Joined
Oct 8, 2015
Messages
956
Trophies
1
Age
46
Website
www.patreon.com
XP
3,619
Country
United States
I removed it because I think emulation with frameskip is horribly stuttery and only gives a very small speed up. I’d personally rather not play a game at all, or play it on a different system, then play it with frameskip.

But, yes, I can put the option it back in a future release if you really want to play games that way.
 

swit

Member
Newcomer
Joined
Jan 21, 2019
Messages
17
Trophies
0
Age
34
XP
93
Country
Poland
But, yes, I can put the option it back in a future release if you really want to play games that way.
yes, please.
I removed it because I think emulation with frameskip is horribly stuttery and only gives a very small speed up.
personally I don't see much of a difference in some games. Not sure why since normally framerate stuff is very noticable to me.
I’d personally rather not play a game at all, or play it on a different system, then play it with frameskip.
there are games that I can't get into working full speed with sound on vita (Aladdin, Shadow of the Beast) From what I see 2 frames below expected framerate makes the music choppy, so if I can't get the locked framerate with the A500 and A1200 presets (with 22k sound rate and scale filter disabled), I'm using frameskip. Maybe I'm missing some kind of optimization option that could make those games run fullspeed? Not sure if it changes anything but I'm running WHLOAD games stored in DIR (rather then HDF) via X-bench frontend installed on a small HDF and configured to auto start in place of Workbench.

edit:
considering "Sharp_Bilinearr_Simple" shader eats up some resources (often enough to ruin locked framerate - Lion King is a good example of this) and "NONE (perfect 2x)" makes the screen smaller I'd like to request (if possible) a shader option without performance hit but with larger screen estate (perfect 3x?). Ideally an option to stretch the image into wide fullscreen would be nice too (especially if it could be done without affecting performance).
 
Last edited by swit,

rsn8887

Well-Known Member
Member
Joined
Oct 8, 2015
Messages
956
Trophies
1
Age
46
Website
www.patreon.com
XP
3,619
Country
United States
I tested Beast a while ago and don't remember such problems. But maybe I didn't listen closely enough?

Concerning the settings you mentioned: Why on earth would you use 22 kHz? To gain speed? Don't use it. It is not native frequency on the Vita and sounds absolutely terrible. In my first tests I thought 44 KHz worked best. I use 48 kHz nowadays. I now think 48 KHz works better than the other frequencies, because it isn't rendered using the Vita's BGM mode. I think it is more native to the Vita.

The shader (sharp-bilinear-simple) causes no slow down, that's why it is enabled by default. If you don't like how it looks, yes, disable it. But there's really no reason to disable it to gain speed.

New version done:
https://github.com/rsn8887/uae4all2/releases/latest

1.92

- add frameskip option back in
- on Vita, also use 48 kHz as default sound frequency (seems to work a bit better)

EDIT: I just saw your edit about the shader. I never noticed any slowdown. Which locked frame rate are you talking about? Amiga is 50 Hz, Vita is 60 Hz, so there will always be some frames displayed twice. Unless you use NTSC 60 Hz mode, but then the Amiga games will run too fast. Also, even in 60 Hz mode, the sound and video can never be fully synced, so even then occasionally there will be some stuttering. There's no locked frame rate in this emulator, unless you turn sound off and use 60 Hz.

--------------------- MERGED ---------------------------

BTW: Perfect 3x is useless on Vita: 544/3 = 181. No game uses that few lines. On Switch this is already implemented, since it has 720p/1080p native resolutions.

Stretching to widescreen is not useful since it would distort the image (circles would become ellipses).

--------------------- MERGED ---------------------------

You asked about optimization methods. Sometimes it helps to use A1200 config, but then set CPU Frequency to 7 MHz. Most games use custom chips more than CPU.

--------------------- MERGED ---------------------------

I just tested Lion King AGA and Beast again, using default A1200 config (48 kHz sound, shader on), booting from hdf. No slowdown or choppy music. What config are you using that gives you choppy music in these games?
 
Last edited by rsn8887,
  • Like
Reactions: Muxi

swit

Member
Newcomer
Joined
Jan 21, 2019
Messages
17
Trophies
0
Age
34
XP
93
Country
Poland
Concerning the settings you mentioned: Why on earth would you use 22 kHz? To gain speed? Don't use it. It is not native frequency on the Vita and sounds absolutely terrible. In my first tests I thought 44 KHz worked best. I use 48 kHz nowadays. I now think 48 KHz works better than the other frequencies, because it isn't rendered using the Vita's BGM mode. I think it is more native to the Vita.
yep, I'm trying to get the best performance possible. After changing it to 48 kHz I don't see any difference compared to 22 kHz in framerate, so I will stick with it, thanks.

New version done:
that was fast, thanks :)

The shader (sharp-bilinear-simple) causes no slow down, that's why it is enabled by default. If you don't like how it looks, yes, disable it. But there's really no reason to disable it to gain speed.
sharp-bilinear-simple definitely eats some resources. Test case with WHLOAD Lion King AGA (PAL, so with expected 50 FPS):
1. A500 preset (A1200 is slower) with sharp-bilinear-simple shader = 47-48 FPS, choppy music
2. A500 preset with NONE (perfect 2x) = 49-51, perfect music (I think it's actually locked 50 since I can't see any jerky frames with this, even though status line displays this range)

edit:
You asked about optimization methods. Sometimes it helps to use A1200 config, but then set CPU Frequency to 7 MHz. Most games use custom chips more than CPU.
I just tested Lion King AGA and Beast again, using default A1200 config (48 kHz sound, shader on), booting from hdf. No slowdown or choppy music. What config are you using that gives you choppy music in these games?
Tested it again with default A1200 preset and CPU freq changed to 7MHz. Same results as above (47-48 FPS, choppy music with sharp-bilinear-simple shader)
The only difference that I can think of is the fact that I'm running Lion King from DIR, not HDF (I have only Workbench and X-bench on HDF).

Could you please upload your default config file that you have used to test Lion King with the shader? I can test if it will fix it for me. (maybe there is some setting not changed via preset)

edit2:
I'm on Vita 1000 and I'm not using overclock plugin. Maybe you have Vita CPU set to 500Mhz?

But even if that's the reason why you have locked framerate with shader it still doesn't explain why on my end there is a difference between shaders performance where (according to your post) there should be none.

edit3:
Stretching to widescreen is not useful since it would distort the image (circles would become ellipses).
there is audience for stretched look :) At this point I'm playing all PSX games on vita with 4:3 aspect ratio stretched to 16:9 and it doesn't bother me at all.
 
Last edited by swit,

rsn8887

Well-Known Member
Member
Joined
Oct 8, 2015
Messages
956
Trophies
1
Age
46
Website
www.patreon.com
XP
3,619
Country
United States
There's no need for what you are doing, the Vita has plenty benough resources to emulate Lion King AGA without slow-down, with 48 kHz sound, with shader, in A1200 mode, and still plenty of CPU time left.

Something must be wrong in your setup, because I get smooth gameplay 49-51 fps in Lion King AGA, using the default A1200 config. To make sure I was using defaults, I just deleted (renamed) my config using Vitashell. Then I started the emulator (v1.92), I ONLY selected "A1200" on main config, went to hard disc config, mounted my hdf files, and booted the game. I didn't change any other config.

This means in my config, shader was on, A1200 was set to 14 MHz, sound at 48 kHz, etc... all the defaults.

I have two suspicions:
a) The only difference seems to be that you are booting from hd dir, not hdf. (Apart from b), see below).

My suggestion: can you double-check using default configuration options and booting a hdf in your case (not hd dir)? See PM I sent. To see if you get full speed emulation in that case? That would mean hd dir is somehow slowing things down.

Be aware, you might have a game specific config saved. When you mount your hd dir or hdf, make sure none of your configuration options suddenly change. UAE looks for a game-specific config file when inserting new disks or HDs. You can look for those configs in the ux0:/data/uae4all2/config folder to make sure there are none. Or you can use the main menu "delete config" option to delete those conveniently.

b) You are running some kind of plugin that prevents UAE4All2 from increasing the CPU and Bus frequencies on startup. The Emulator starts with code like this:
scePowerSetArmClockFrequency(444);
scePowerSetGpuClockFrequency(222);
scePowerSetBusClockFrequency(222);
scePowerSetGpuXbarClockFrequency(222);
To increase speed when it starts.
Almost all homebrew does that. I could imagine maybe you have some plugin running that somehow overrides those commands.
So maybe try to disable all plugins apart from storagemgr. To see if a plugin is to blame.

EDIT: The more I think about it, I feel like probably b) is the problem... but we will see.

--------------------- MERGED ---------------------------

Here's my config I used to test Lion King:
https://mega.nz/#!VIAFzIAJ!yMzA2dmzH5-pBzCdTjGdXJ8r2JD2rGSr3IHBWyrxdsQ

But as I said, it is just the default UAE starts up with, then selected "A1200", then mounted hdf.

--------------------- MERGED ---------------------------

I could imagine you might have some plugin that "resets" the Vita clock settings to stock, even though UAE is trying to increase them. Or maybe even a plugin that messes with display (something that tries to hook into the display routine to display a menu or something).

The only plugins I have running are: storagemgr, nonpdrm, nopsmdrm, henkaku, and download_enabler
 
Last edited by rsn8887,

swit

Member
Newcomer
Joined
Jan 21, 2019
Messages
17
Trophies
0
Age
34
XP
93
Country
Poland
I could imagine you might have some plugin that "resets" the Vita clock settings to stock, even though UAE is trying to increase them. Or maybe even a plugin that messes with display (something that tries to hook into the display routine to display a menu or something).

The only plugins I have running are: storagemgr, nonpdrm, nopsmdrm, henkaku, and download_enabler
This is it, thanks! After disabling ALL plugins other then storagemgr Lion King runs fullspeed with shader (it also fixes an issue that I had in lion king on start screen, where it worked faster then it should). Here is how my initial config.txt looked like:
# For users plugins, you must refresh taiHEN from HENkaku Settings for
# changes to take place.
# For kernel plugins, you must reboot for changes to take place.

*KERNEL
ur0:tai/storagemgr.skprx
ur0:tai/nonpdrm.skprx
ur0:tai/nopsmdrm.skprx
ur0:tai/repatch.skprx
ur0:tai/reF00D.skprx
ur0:tai/kuio.skprx
ur0:tai/ioPlus.skprx
ur0:tai/LOLIcon.skprx
ux0:app/PSPEMUCFW/sce_module/adrenaline_kernel.skprx

*main
ur0:tai/henkaku.suprx
ur0:tai/shellbat.suprx
ur0:tai/pngshot.suprx
ur0:tai/download_enabler.suprx

*NPXS10015
ur0:tai/henkaku.suprx

*NPXS10016
ur0:tai/henkaku.suprx

*!PSPEMUCFW
*ALL
ur0:tai/vsh.suprx
ur0:tai/VitaGrafix.suprx

I can already confirm that it's not the most obvious suspect (LOLIcon.skprx) since the issue is present without it. I will test one by one which plugin is responsible for this.
 

rsn8887

Well-Known Member
Member
Joined
Oct 8, 2015
Messages
956
Trophies
1
Age
46
Website
www.patreon.com
XP
3,619
Country
United States
Awesome! I am glad we found the issue. You can probably go back to 48 kHz sound, too.

Now you just have to check which one it is. That plugin might slow down other home-brew that uses similar code, too. Like ScummVM, BasiliskII, Rocks'n'Diamonds, Cannonball, SDLPop, etc.
 
Last edited by rsn8887,

swit

Member
Newcomer
Joined
Jan 21, 2019
Messages
17
Trophies
0
Age
34
XP
93
Country
Poland
The plugin responsible for these problems is "PSV-VSH-Menu" (kuio.skprx, vsh.suprx). Once again thank you for help. UAE4All works great now :) As for other homebrew indeed Cannonball now works fullspeed too (previously had quite bad framerate).
 
Last edited by swit,
Joined
Aug 17, 2008
Messages
777
Trophies
0
XP
1,004
Country
Australia
VSH menu was reported by a couple of people to cause slowdown in retroarch also, removing it or excluding it from retroarch (with a halt point in their taihen config.txt) resolved the issue.
 

mrdude

Developer
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,227

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: :rofl2: :rofl2: