Project64 Forums

Project64 Forums (http://forum.pj64-emu.com/index.php)
-   Open Discussion (http://forum.pj64-emu.com/forumdisplay.php?f=9)
-   -   Sound Plugin Development (http://forum.pj64-emu.com/showthread.php?t=4522)

the_randomizer 29th July 2014 04:29 PM

Quote:

Originally Posted by Azimer (Post 55896)
Sync to Audio is a killer for FPS. Speed limiter needs to lock on ~60 fps for NTSC/PAL60. The other audio setting in PJ64 kills accuracy by faking audio timing but it still gets it wrong. Zil gave me an open invite to fix it and I think I will take him up on it.

I like that, and wish you luck in your endeavors as it would be awesome to see that issue fixed; I wish I knew more about the N64 and programming, which I don't, much to my chagrin :confused:

Azimer 29th July 2014 04:45 PM

Quote:

Originally Posted by the_randomizer (Post 55910)
I like that, and wish you luck in your endeavors as it would be awesome to see that issue fixed; I wish I knew more about the N64 and programming, which I don't, much to my chagrin :confused:

I fixed it in my zilmar spec plugin for the 90% of games and also with PJ64 1.4 Audio Fix edition. I wouldn't be shocked if MESS and Mupen64plus had the best audio at this point because from everything I've seen, they are doing it right. :cool:

RPGMaster 29th July 2014 07:14 PM

Apollo is gold! I tried out that version with the rom browser, since it has the FPS limiter and AQZ netplay worked well! For testing netplay, I usually just run 2 exes and connect to myself xD. One interesting fact is that if I enable "Force old audio sync", I'm able to not desync with emulators like 1964 which don't normally work properly with AQZ netplay. The only flaw with that is FPS dipping below 60.

One of my goals is to be able to play irl friends without desynching. 1964 with Kaillera does the job well so far, my only complaint is that the audio is worse, probably due to some hack(s) intended to make netplay more stable.

Quote:

Originally Posted by Azimer (Post 55911)
I wouldn't be shocked if MESS and Mupen64plus had the best audio at this point because from everything I've seen, they are doing it right. :cool:

Did Mupen64plus even change any code related to audio? I do like how Mupen64plus got factor 5 games to work. It's a shame no one has fixed up any zilmar spec emulators.

Maybe I should start looking at these cycle accurate emulators to see what I can learn from it. I'd like to fix up some zilmar spec emulators.

HatCat 29th July 2014 07:55 PM

yeah azi, the very first time I loaded pj64 1.6 exe and set to use your plugin, I selected it (awesome we have a proper XAudio2 alternative now!), I get the generic crash message under Windows as well on loading a ROM for the first time (with exception code C0000005 memory access violation). However if I already had your plugin selected in pj config, prior to launching the EXE (that is, don't need to change audio plugins first to use it), then it never seems to crash on loading a ROM.

So it crashes on load ROM after switching to the plugin, doesn't crash on load ROM after starting the exe with your plugin already having been chosen prior.

It could be a different event handle pj64 uses when calling InitiateAudio upon changing audio plugins, versus when loading rom. Actually switching to your plugin and then loading a rom, implies InitiateAudio got called twice, so that might explain the crash. There may be some attempt to destroy a DirectX object not yet created, or create over one already existent.

Azimer 29th July 2014 08:18 PM

Admittingly, I've only tested with PJ 2.1.0.1. I will play around on PJ 1.6. I am curious about some of the issues I've seen with 2.1.0.1 if they exist on 1.6.

HatCat 29th July 2014 08:42 PM

Unsurprisingly, I cannot seem to get the plugin to crash on Project64 2.1. I don't usually test pj64 2.1 much since 1.6 suits me fine and is more prone to plugin system bugs, which is helpful for stabilizing my plugins.

zilmar totally redid the plugin spec logic since pj 1.6...2.1 doesn't even call RomClosed anymore until you end emulation AND load a new ROM (under his claim of logic that, powering off the N64 doesn't remove or "close" the rom from the n64 control deck :confused: ), and for some reason pj64 2.1 is the only emulator that my OpenGL fork of angrylion's plugin, has never given weird issues on RPGMaster's drivers.

My CPU lagged to hell when I loaded Namco Museum on the DS8 plugin. Further review shows that your DirectSound build can use both of my CPU cores, while the XAudio2 is limited to a single core. In some cases (seems to be usually when the window is just in the bg), my system is unresponsive for tens of seconds.

Also, anytime I end emulation *from* using the DS8 dll you provided, then go Options :: Settings... in pj64 2.1.0.1, I always get this exact message twice [edit this happens when RomOpen and during emulation actively with the XAudio2 plugin as well it seems]:

http://ft.trillian.im/785abe041074fd...A1m71w8yUm.jpg
Simply initializing the plugin by switching to it/changing plugin settings is not enough to get the message to appear, have to end emulation. But that's fair enough because DirectSound has pretty much been reduced to a software, faster waveOut by Microsoft or something anyway. They'd probably rather support waveOut or OpenSL ES these days.

RPGMaster 29th July 2014 08:44 PM

Quote:

Originally Posted by Azimer (Post 55917)
Admittingly, I've only tested with PJ 2.1.0.1. I will play around on PJ 1.6. I am curious about some of the issues I've seen with 2.1.0.1 if they exist on 1.6.

PJ64 2.1 is often times more stable than 1.6 and most other zilmar spec emulators, when it comes to certain issues. I have the least amount of problems with OpenGL plugins on PJ64 2.1. For instance, I can reset a game and not have a frozen screen with Glide64 final.

Imo, it's probably better to test for bugs on buggier emulators :D .

1964 1.1 is also pretty stable, ironically. This is after making minor changes to the source though, to get rid of those random GUI freezes/crashes.

Rofl I get that messagebox sometimes too. Usually when opening plugin menu.

Also I'm not able to even run PJ64 Audio Fix edition with the XAudio2 version.

HatCat 29th July 2014 08:55 PM

So much time always needs to be spent to immutability of the plugin spec functions now.

Even something like CloseDLL seems to need rewriting for 100% skepticism in some corner cases of how different emulators respond, like a full dynamic tree of checking for state machine.

Kind of makes you sometimes wish the plugin spec had only 1 single function for each plugin type. :3

With all these different emulators having different call orders for the spec functions, nothing seems to be safe for assumption, especially when using OpenGL on Windows. Just re-attaching the GL context to HDC in ViWidthChanged and/or UpdateScreen was enough to fix rpg's driver issues, but only for some emulators...others need it to be created in the thread that called RomOpen, or even InitiateGFX. May as well repeatedly call wglMakeCurrent constantly in every other function EVERY DAY :) ! EVERY :) DAY :) ! :)

RPGMaster 29th July 2014 09:24 PM

For OpenGL, I think I'll just resort to some hax :D . I really need to test stuff on other computers ;/ .

Man I thought I was the only one with the XAudio2 problems. I haven't tested the DS8 one too much, but I haven't run into any problems with the DS8 version yet. I still prefer the XAudio version :D . Since it's only a problem on certain emulators :D .

It seems like the problems I have are somewhat different than HatCat's. I mostly tested on 1964 1.1 and PJ64 1.6.

I'm curious though. Iirc, Azimer said he didn't implement musyx yet. So I'm wondering how Gauntlet Legends and TWINE work in HLE, although I noticed the cpu usage is pretty high. Not sure if the issue is the compiler (like it was for 1964 Audio) or what.

Azimer 29th July 2014 11:21 PM

RSP fake "HLE". I use it as a fallback for when HLE doesn't support the uCode.

All these emulator issues gives me a headache when PJ 2.1 works fine. Can we just get together and make a new emulator with consolidated plugins? Sheesh... I will get PJ 1.6 and see what I can make happen. Thanks for the notes!


All times are GMT. The time now is 12:12 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.