notaz / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
290 stars 162 forks source link

Audio sync and graphical issues with some 32X games (Picodrive core in RetroArch Win10) #112

Open Galdelico opened 3 years ago

Galdelico commented 3 years ago

Hello, while I'm actually very pleased to report vast improvements in the current Picodrive core for RetroArch - still the one and only way to play SEGA 32X games on RA - compared to the last revision I tried months ago, I noticed that some audio and graphical inaccuracies still persist.

Examples:

None of the aforementioned issues show up in KEGA Fusion. It used to be my to-go choice for 32X, but the audio emulation isn't nearly as good as Picodrive's, on top of the fact that Fusion can't use RA advanced CRT shaders, and feels quite outdated in general. I'd like to know if such issues can possibly get fixed in Picodrive, or if it's beyond its original purposes to be 100% accurate.

Thanks in advance!

notaz commented 3 years ago

I guess what you are seeing is because RetroArch switched to a fork, I don't know if @irixxxx is interested in such issues. The first one sounds like a timing issue, which may be coming from missing cache emulation, for example. If so implementing it would be a huge effort for a tiny benefit.

Galdelico commented 3 years ago

I guess what you are seeing is because RetroArch switched to a fork, I don't know if @irixxxx is interested in such issues. The first one sounds like a timing issue, which may be coming from missing cache emulation, for example. If so implementing it would be a huge effort for a tiny benefit.

Fair enough, I can totally get behind that kind of reasoning. Nonetheless, knowing the core is this far to be pretty much perfect, yet probably it's never gonna make the final step, is still a bit of a bummer. :-) Since Ekeeke recently fixed similar timing issues on the Genesis Plus GX core (even though for some odd reason, neither the 32 or 64bit dll can be downloaded via RetroArch yet, but can only be found here) I thought to ask anyway.

Thank you for taking the time to reply. Much appreciated!

irixxxx commented 3 years ago

ATM I think the effect noticeable in Tempo may be a syncronisation issue between the 2 SH2s. The sound is PWM via DMA... it shouldn't be subject to caching no, it's via IRQ. I haven't done any in-depth analysis, though, just a guess. AFAIK the intro graphics in Toughman are all done by the 68K, so there may be a bug in the VDP shadow/highlight handling. Again, no analysis done. Do you have more indications in other (non-32X) games that something is off in that area?

Galdelico commented 3 years ago

ATM I think the effect noticeable in Tempo may be a syncronisation issue between the 2 SH2s. The sound is PWM via ~DMA... it shouldn't be subject to caching~ no, it's via IRQ. I haven't done any in-depth analysis, though, just a guess. AFAIK the intro graphics in Toughman are all done by the 68K, so there may be a bug in the VDP shadow/highlight handling. Again, no analysis done. Do you have more indications in other (non-32X) games that something is off in that area?

Thanks so much for replying! I'll check more games and report back to you on here as soon as possible.

Just one thing about the 'timing' issue: I can't really notice it on ALL games - I tried Virtua Racing and it seems to sound just fine, as well as Cosmic Carnage, Metal Head, BC Racers...) - but in Tempo is very apparent. Not sure if that could be a game-specific glitch... That said, I noticed it because it reminded me of a very similar (if not identical) problem I found out in the Genesis Plus GX core with Mega CD/SEGA CD games, a while ago, that eke eke took the time to fix: the audio of some titles seemed to start playing a second or so after the animation, resulting in glaring cuts. Guess what? The same thing happens in Picodrive. Examples:

I'll get back to you about the other bug too (I want to try the Mega Drive versione of Toughman Contest and see if it features the same effect, and - in case - how Picodrive renders it).

In the mean time, thanks again!

irixxxx commented 3 years ago

@Galdelico I may have fixed the "highlighting a shadowed tile" issue you've observed in Toughman 32X in my irixxxx repo. If you have some time to spare please give it a go and check with more games using shadow/highlight stuff. This thread has a list of stuff known to use it (I'm however convinced there's much more out there).

Galdelico commented 3 years ago

@irixxxx Hey, thanks for that! I'll check it out tomorrow for sure and report back.

Galdelico commented 3 years ago

Sorry for coming back to you with another question, @irixxxx, but I'm having troubles locating your Libretro updated dll for Picodrive, in your repo. Would you mind pointing me in the right direction? Thanks! ^_-

irixxxx commented 3 years ago

Ah ok... I normally don't provide windows builds. I'll see if I can dust of that mingw VM to produce one.

irixxxx commented 3 years ago

@Galdelico I've imported a GenesisPlusGX bugfix to fix audio issues in Bari Arm and Annet Futatabi. My mingw VM is dead though, ATM I can't do Windows builds. @notaz would you possibly be able to make a libretro Windows build for me?

Galdelico commented 3 years ago

@Galdelico I've imported a GenesisPlusGX bugfix to fix audio issues in Bari Arm and Annet Futatabi. My mingw VM is dead though, ATM I can't do Windows builds. @notaz would you possibly be able to make a libretro Windows build for me?

Thank you SO MUCH, @irixxxx. Sounds like you brought Picodrive up to perfection. Hopefully, @notaz will be able to jump in too. Thanks again guys!

Galdelico commented 3 years ago

Hi @irixxxx, how are you? I recently got back to RetroArch, and noticed the Picodrive Libretro core still retains all the bugs we were talking about back in September. I guess in the end it wasn't possible to implement all your fixes to that version?

irixxxx commented 3 years ago

The latest stable release is from august. They've cherry-picked some of my commits in October, so they're only in the nightlies. Have you tried one of the newer nightlies of the last weeks?

Galdelico commented 3 years ago

I guess you're talking about RetroArch, am I right? In case, nope, I'm on stable 1.90.

irixxxx commented 3 years ago

You should at least use the cores from here: http://buildbot.libretro.com/nightly/windows/x86_64/latest/, just copy those cores to your retroarch core directory. If you have problems loading them, also install a current retroarch nightly, from the same site. That nightly picodrive compile should contain most of my fixes. They imported a lot of them from my repo.

Galdelico commented 3 years ago

Hi @irixxxx, apologies for the late reply! Thanks for the link, I downloaded the latest Picodrive core from that list and I can definitely see improvements! Games that were buggy with the latest stable I tried - such as BC Racers - seem to run perfectly, now, with no graphical glitches. Also, that transparency effect in Toughman Contest is now rendered correctly, which I believe it will be the same with any other game where it's implemented.

I'll take some more time to test the sound latency... At a first listen, it seems to me that the delay on Tempo's intro is the same as before, but then again that was the only instance I could notice it. I'll try again some Mega CD/SEGA-CD game and I'll report back, as for right now my to go choice for the system, in RetroArch, is Genesis Plus GX core, which is pretty much polished, as far as I can tell.

Thanks again!

irixxxx commented 3 years ago

Tempo splash delay in intro should be fixed by bd07808 in my repo.