nukeykt / Nuked-OPLL

Cycle accurate Yamaha YM2413 and VRC7 emulator
GNU General Public License v2.0
73 stars 9 forks source link

Some multiplier values seem missing #2

Closed jotego closed 4 years ago

jotego commented 4 years ago

In your multiplier line I see some values missing, like 22, 26 and 28. Is that a typo? Are you possitive that the chip was missing those values because I have not seen any reference in Yamaha documentation stating that. I see the same for OPL3 in your other file.

If that is correct, is it because Yamaha only used a simplified multiplier instead of a full one?

Thank you for your attention

https://github.com/nukeykt/Nuked-OPLL/blob/3f25893fc0634f58e138967b403443e3c36a6658/opll.c#L219

jotego commented 4 years ago

Sorry, I have found it in the YM2413 App. notes and also in the Y8950. It is a documented behaviour indeed.

nukeykt commented 4 years ago

Yeah, OPLx family uses only one adder for multiplication and thus some values are missing. Here's code that does multiplying OPLL way: https://pastebin.com/KTTZmctS

jotego commented 4 years ago

I see. That makes a lot of sense, yes. I'm working on the verilog version of OPL1 at the moment (YM3526). I wonder if you'll tackle that one too eventually.

nukeykt commented 4 years ago

Cool, I'd like to make one when somebody decaps YM3526 or YM3812.