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

no sound with installed ngdevkit-gngeo.exe #9

Open
khelkun opened this issue Sep 12, 2021 · 10 comments
Open

no sound with installed ngdevkit-gngeo.exe #9

khelkun opened this issue Sep 12, 2021 · 10 comments

Comments

@khelkun
Copy link

khelkun commented Sep 12, 2021

I tried to install the nightly release https://github.com/dciabrin/gngeo/releases/tag/nightly-202105061001
Then I copied the puzzledp.zip and neogeo.zip generated from my Ubuntu Linux VM inside the ngdevkit-examples/06-sound/sample.

I can launch ngdevkit-gngeo.exe then load the game rom from the menu and it runs fine but there is no sound.

I also tried to launch ngdevkit-gngeo.exe --sound because I saw there is a --sound option in gngeo whihch is supposed to enable sound. But there's still no sound.

Since using ngdevkit on windows requires MSYS2 according to the readme. Then I tired to install MSYS2 and launch ngdevkit-gngeo.exe from it but I still have the same result.

Do you have any idea why I do not have sound?

@khelkun
Copy link
Author

khelkun commented Sep 13, 2021

Please consider I launched the ngdevkit-gngeo.exe with the following options to be able to press keys:

--scale 3 --no-resize --p1control=A=K117,B=K105,C=K111,D=K112,START=K119,COIN=K120,UP=K122,DOWN=K115,LEFT=K113,RIGHT=K100,MENU=K27

I also tried --sound or --sound=true option but no sound plays when I press keys.

@dciabrin
Copy link
Owner

I think this is not a gngeo issue...
I broke input parsing some weeks ago in dciabrin/ngdevkit@1b1e838, and the button checks got impacted. The only example that actively used it in ngdevkit-examples was the sound example that you're trying to run.

Could you maybe install nightly packages which are more recent than this commit and try again to verify that it works for you?
I have the example working with the most recent commit.

@khelkun
Copy link
Author

khelkun commented Sep 14, 2021

@dciabrin sorry but where are the more recent nightly packages? I only see 1 installer here which was built the 08-05-2021 (this is the one I tested).

@dciabrin
Copy link
Owner

It should have been rebuilt automatically by https://github.com/dciabrin/msys2-ngdevkit/actions/runs/1159906582 and published accordingly. I'll check what is going on with the msys2 repository.

@khelkun
Copy link
Author

khelkun commented Sep 14, 2021

I tried to figure out what could have gone wrong in the msys2-ngdevkit github CI, but I'm not used to github CI enough yet.

Still, the breaking of the input parsing was after the build of the installer which I used (08-05-2021). And the buttons are actually working in the 06-sound-sample (I can see 0 to 1 text change when I hit the buttons), but I don't hear the sounds.

@khelkun
Copy link
Author

khelkun commented Sep 15, 2021

After a second look to your CI pipeline accross repositories, and although I'm far to understand all of it, I assume:

  • A commit push on ngdevkit repository triggers a CI build, which triggers a build on msys2-ngdevkit repository to build the MSYS2 Windows package of ngdevkit.
  • The same is true for the 3 others repositories: ngdevkit-toolchain gngeo emudbg.
  • But I don't see anything in the CI pipeline configuration of those repositories that would trigger a build of the gngeo repository when the ngdevkit MSYS2 package is published. And the Windows ngdevkit-gngeo installer is generated by the gngeo repository build.
  • Or may be the build-and-publish.yaml was really meant to run nightly, but I don't see what's supposed to run it nightly.

Am I wrong?

Could you manually trigger the gngeo "Build And Publish nightly" for me to test it please?

@dciabrin
Copy link
Owner

After a second look to your CI pipeline accross repositories, and although I'm far to understand all of it, I assume:

* A commit push on `ngdevkit` repository triggers a CI build, which triggers a build on `msys2-ngdevkit` repository to build the MSYS2 Windows package of ngdevkit.

Correct

* The same is true for the 3 others repositories: `ngdevkit-toolchain` `gngeo` `emudbg`.

That's correct as well

* But I don't see anything in the CI pipeline configuration of those repositories that would trigger a build of the `gngeo` repository when the `ngdevkit` MSYS2 package is published. And the Windows ngdevkit-gngeo installer is generated by the gngeo repository build.

The idea is that another workflow https://github.com/dciabrin/msys2-ngdevkit/blob/main/.github/workflows/rebuild-repository.yaml rebuilds the msys2 repo files as soon as a CI run rebuilds a package in msys2-ngdevkit.

* Or may be the [build-and-publish.yaml](.github/workflows/build-and-publish.yaml) was really meant to run nightly, but I don't see what's supposed to run it nightly.

No it's only triggered on commit pushes.

Am I wrong?

Could you manually trigger the gngeo "Build And Publish nightly" for me to test it please?

I'm gonna check why the msys2 repo doesn't seem to rebuild the most recent packages.
I have limited availability right now, so please bear with me for a couple of days.

@khelkun
Copy link
Author

khelkun commented Sep 16, 2021

I have limited availability right now, so please bear with me for a couple of days.

No worries, it's already awesome that you're still working on the project and you maintain it on 3 distinct platforms! And actually thanks for being so reactive on issues.

I forked the gngeo repo and manually built the installer, but I'm still having no sound on 06-sound-sample (although the buttons are working).

So I built ngdevkit sources on MSYS2 by following the README-msys2.md. Everything builds fine, but I had to run pacman -S binutils because of this error during emudbg compilation: ranlib: command not found.
Anyway, running the 06-sound-sample from msys2-ngdevkit compiled sources has the same result: can't hear any sound.

But the sample is working in my Ubuntu VM with the same ngdevkit version. So I searched if could be something about the gngeo configuration but I found nothing.
Then I suspected something about mingw-w64-x86_64-SDL2 because I found this (old) issue and this (old) stackoverflow.
And that's it: if I run export SDL_AUDIODRIVER=DirectSound and then make gngeo, then I can hear the sounds in 06-sound-sample!

N.B: it also works with the gngeo-ngdevkit installed with the installer if ngdevkit-gngeo.exe --rompath=roms is run from the msys2 shell where SDL_AUDIODRIVER=DirectSound is set.

@dciabrin
Copy link
Owner

Then I suspected something about mingw-w64-x86_64-SDL2 because I found this (old) issue and this (old) stackoverflow.
And that's it: if I run export SDL_AUDIODRIVER=DirectSound and then make gngeo, then I can hear the sounds in 06-sound-sample!

oohhhh... Serious sleuthing here, very nice finding, thanks!
I don't currently have access to a win environment, but I could swear I didn't need to change anything default when I installed those packages on a stock win10 + msys2 env. Anyway this probably needs some README or output in the makefile somewhere in case someone else hits the issue.

N.B: it also works with the gngeo-ngdevkit installed with the installer if ngdevkit-gngeo.exe --rompath=roms is run from the msys2 shell where SDL_AUDIODRIVER=DirectSound is set.

Note that this one was merely needed back when you needed to run the devkit under WSL and gngeo from a native Win environment. This dichotomy is no longer needed with the MSY2 packages, so those packages are no longer rebuilt nightly and should get deprecated over time.

@khelkun
Copy link
Author

khelkun commented Sep 16, 2021

Note that this one was merely needed back when you needed to run the devkit under WSL and gngeo from a native Win environment.

I understand but I find the NSIS installer quite useful for a lambda user (tester) to run the homebrew game rom. But it's ok I can just run it from my fork if I need it.

thanks for the time spent on this issue.

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

2 participants