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

Spelunker HD NPUB30152 music tempo bug #16520

Open
Augusto7743 opened this issue Jan 6, 2025 · 6 comments
Open

Spelunker HD NPUB30152 music tempo bug #16520

Augusto7743 opened this issue Jan 6, 2025 · 6 comments

Comments

@Augusto7743
Copy link

Augusto7743 commented Jan 6, 2025

Quick summary

Hello.
Thanks for reading my topic. I wish an nice week for you.
I want add an topic with video upload with details about cpu usage.
Spelunker HD NPUB30152 happen an bug in sound doing music slow that not return to normal speed.

Details

CPU AMD FX 6300 6 cores 3500 MHz
RAM 4 GB ( Linux Lubuntu + RPCS3 use only RAM 2.8 GB )
GPU GF 640 GT driver 470
OS Linux kernel 6.10 LUbuntu 24.04
RPCS3 using default settings with SPU block size "mega"

Start the game and in some seconds the music tempo will be slow even if the game run in 100 % speed and not using totally the cpu cores.
That bug happen since RPCS3 versions from 2018 and was broken before the SPU LLVM was added in RPCS3.
Possibly an fix or optimization had done it that happen in AMD FX and in similar intel i5.

I have uploaded an video enabled performance overlay with details about that bug.
Perhaps you say the AMD FX is an cpu from 2014, but the game use less of 60 % cpu and run in 100 % speed. AMD FX run Killzone 2, Little Big Planet, Gran Turismo 5 Prologue, Burnout Paradise and several others games requiring more cpu usage than Spelunker HD.
In the video uploaded below show the Linux Ubuntu taskmanager HTOP with details about cpu usage. RPCS3 use less of 60 % and 14 % is used by OBS Studio that was used for video capture.
When the game start the music tempo is correct and the cpu usage is less of 60 %. After of some seconds the music is slow and strangely is the same cpu usage with the game running in 100 % speed without slowdown.

https://youtu.be/3HS1Gg4cF4w

Here has several others games with cpu 100 % usage with good gameplay speed not having sound music or fx slowdowns.
I have hope is possible an fix for that bug. Spelunker HD is an game with simple graphics and compared with others games the cell usage is low. That game not require high end cpu.
Perhaps analyzing that issue is an clue for an optimization.

If accessing the debugger the threads below are slow :

PPU[0x1000007] _cellsurMixerMain
PPU[0x1000008] sound thread
SPU[0x0000100] _synth2 Thread

I have uploaded 2 logs. The first RPCS3 was closed exactly few seconds when happen the bug. The second log is when happen the bug for several seconds.
Please help if possible an fix for that game. Need an intel or zen high end to run that game ?
Have an nice week for you.

Attach a log file

RPCS3-1.log
RPCS3-2.log

Attach capture files for visual issues

No response

System configuration

No response

Other details

No response

@FlexBy420
Copy link
Contributor

The audio is broken because your cpu is too weak to keep up, even if the game is running at 60 FPS. Audio thread is starved.

@AniLeo
Copy link
Member

AniLeo commented Jan 6, 2025

You're below our minimum requirements with that amount of RAM, we're not accept issues that don't meet the requirements

Please upgrade your RAM before submitting further issues with that system

@Augusto7743
Copy link
Author

Augusto7743 commented Jan 7, 2025

@FlexBy420
You have accessed the uploaded youtube link ? The cpu not are being used totally and has cores being used below of 80 %.
Is the same CPU usage when the music is normal and happening the bug. Not cpu usage changes in cores when happen the bug.
Here I have others games almost cpu usage 100 % and has good performance and not happen that music slowdown bug. Only happen that bug in Spelunker HD and even not using totally the CPU does it. That is strange. Perhaps is an optimization done in sound for high end cpu from 2018 doing it ?
I say again that CPU run Killzone 2 in speed 100 %. Run Little Big Planet, Burnout Paradise , Hokuto no Ken Ken's Rage 2 , Tekken 6 and much others too.

@FlexBy420
Copy link
Contributor

@Augusto7743
Copy link
Author

Augusto7743 commented Jan 7, 2025

@FlexBy420
Thanks for your reply with the link, but if task manager htop show correctly or wrong value for cpu usage that is another detail not totally relevant with RPCS3 changing cpu usage in sound thread. Perhaps an optimization code changing the spu loop and sound thread priority to an lowest value or otherthing.
The main point for that topic is some seconds the music tempo is slow pointing an possible problem in sound thread code using an much more high cpu usage even if the game not need to do it.


If the game start with correct music tempo without any issues and in some seconds not happen any ingame internal file load with the player character stopped in same screen area happen that music slowdown because sound thread usage was "changed" to use more cpu that is an strange behavior not noticed for users using modern cpus. If is exactly it has something wrong in sound thread code doing unneeded more work.
Why in some seconds sound thread need much more cpu if nothing was changed in gameplay and use the same music ?

Have others current topics about similar performance regression with others games ( MGS4, Resistance, Demon's Souls and others) using more modern cpus and are being analyzed.
Please RPCS3 coder not ignore that topic because the used cpu is an AMD FX.
AMD FX 6300 ( run 6 threads ) is in list of minimum requirement being possible run the games below in 100 % speed or above 50 FPS ( playable ) without bugs or performance slowdown :

Burnout Paradise
Gran Turismo 5 Prologue Spec 3
Hokuto no Ken Ken's Rage
Hokuto no Ken Ken's Rage 2
Killzone 2
LittleBigPlanet
Resident Evil 5
Ridge Racer 7
Soul Calibur 4
Teenage Mutant Ninja Turtles Out of the Shadows
Tekken 6
Ultimate Marvel VS Capcom 3
Uncharted 1

and much others games too.
The games above are much more cpu requirement than Spelunker HD.
Spelunker HD start with 100 % speed without music tempo slowdowns as if the AMD FX has enough cpu processing, but is as happen an error internally in RPCS3 changing the sound music tempo doing slowdown.
I remember doing an test trying run Uncharted 2 and Killzone 3 in AMD FX 6300. Extremely slow running below of 10 FPS. Unplayable. However even having maximum cpu usage the sound music and fx play in normal speed running at same time with low FPS performance not happening the same bug as in Spelunker HD changing the sound speed.
VBlank frequency change the sound music tempo ? An problem here ?
Here the Linux kernel has enabled TSC.
Perhaps are happening an problem in timing ? An bug in cpu TSC ? If yes need to be analyzed if that cpu need to be added in an black list as say in the topic link below
#16382 (comment)

My topic not is demand for performance to play Uncharted 3, TLOUS or other similar game with AMD FX. That CPU not has enough processing for it, but Spelunker HD is an game much simple compared with other games running in good speed in AMD FX.
Please you RPCS3 coder not ignore that topic because the cpu used is an AMD FX and OS host use RAM 4 GB. Lubuntu 24.04 + RPCS3 in several games the RAM usage is between 2.8 to 3.5 GB so here 4 GB RAM is enough.

IMO has something wrong internally in RPCS3 when happen that bug and perhaps not is cpu not having enough processing.

@Augusto7743
Copy link
Author

You're below our minimum requirements with that amount of RAM, we're not accept issues that don't meet the requirements

Please upgrade your RAM before submitting further issues with that system

@AniLeo
Thanks for your reply.
The label "need information" is for add more RAM ?
Seeing in https://rpcs3.net/quickstart#supported_devices_pcs
My cpu is in minimum requirement.
However has the information RAM minimum is 8 GB, but not say if is for Windows or Linux.
Really for Windows 10 that requirement make sense, but not is exactly the requirement for some Linux distros.
I use an Linux distro Lubuntu 24.04. That distro with nvidia driver installed use less of 500 MB RAM so has much RAM free.
Running RPCS3 in LLVM mode with Spelunker HD plus that distro the total RAM usage is only 2.8 GB having more than 1 GB free. Have others games with RAM usage between 2.8 to 3.5 GB and has 512 MB free for OS disk cache. I not see need to add more RAM for Spelunker HD if run in less of 3 GB and here I not has more RAM to add too.
The youtube video link above in first message show the task manager htop with details ram usage too.

Please analyze my reply text above if the label "need information" need to be removed for progress in that topic.
Thanks for reading my reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants