bbbradsmith / nsfplay

Nintendo NES sound file NSF music player
https://bbbradsmith.github.io/nsfplay/
279 stars 43 forks source link

Update emu2413 #16

Closed okaxaki closed 4 years ago

okaxaki commented 4 years ago

This request updates emu2413 to the latest 1.2.7 and improves emulation accuracy very much.

Since this request is not enough tested for NSFe files (with custom patch section) and further I saw that an another (may be cycle-accurate) core is under development in the roadmap, so I do not mind if this request will not be accepted. Please consider easily this request as just a FYI of emu2413 update:-)

p.s. I am a.k.a Brezza, the original author of NSFplug. I apologies that I stopped the NSFplug development earlier at 2004. Thank you very much for continuing the development and a ton of improvements!!

bbbradsmith commented 4 years ago

Ah, thank you! It is good to hear from you, and I am glad that you do not disapprove of my continuation of this project.

Yes I do have plans to rewrite the VRC7 emulation entirely eventually, but I might take this pull for now just to improve the automatic build in the short term. So, thank you for this!

Aside from testing it, I will need to restore the patch set options before I can merge it. There were a number of historical patch sets offered by the program, not just the accurate ones, which are important for people who were making VRC7 music with emulators at various points in time. I'll do that myself before merging it, though.

I'm curious, has a hardware complete YM2413 patch set been dumped at this point, like NukeYKT was able to do with the VRC7 recently?

bbbradsmith commented 4 years ago

I've done the merge. Lagrange Point definitely sounds a lot closer to the hardware now!

I will have to take a closer look later, but I may reconsider whether VRC7 actually needs a rewrite in the future. Thanks very much for this update!

okaxaki commented 4 years ago

Thank you for your kind reply and merging this!!

As for the YM2413 patch set, the latest emu2413 still uses my guessed patch set.

As you may already know, a REing attempt of YM2413 from both observation and a die shot can be found here but it seems that the patch set have not been obtained yet. The new Nuked OPLL seems to be based on VRC7 and YM2413 die shots, but I'm not sure whether it's YM2413 patch set is complete or not.

nyanpasu64 commented 4 years ago

https://wiki.nesdev.com/w/index.php/VRC7_audio#Internal_patch_set claims to have the internal patch set of the VRC7:

Exact values for the fixed patch were dumped using the VRC7 rewired into a debug mode[3]:

bbbradsmith commented 4 years ago

That [3] hides a link to the source of that, with a lot of information about where it came from.

https://siliconpr0n.org/archive/doku.php?id=vendor:yamaha:opl2

The VRC7 had a debug mode that let NuekYKT dump them directly. The die shot of its instrument ROM was not optically readable, as the 0/1 bits looked the same. (Would have required some chemical staining process that was never attempted.)

The debug mode access was specific to the VRC7 though. The YM2413 seemed to have it internally but was never given access to it with a needed extra pin on the chip package. I'm not sure whether it was able to be read optically from the die shot? I was only following the VRC7 effort.