DhrBaksteen / ArduinoOPL2

Arduino library for use with the OPL2 board (YM3812) and OPL3Duo (YMF262)
MIT License
198 stars 39 forks source link

Fixed bug in calculating register offset #3

Closed JudgeBeeb closed 7 years ago

JudgeBeeb commented 7 years ago

Hi,

There seems to be a bug in the getRegisterOffset function as it was not returning the right values for anything above register 3. I have replaced it with a simple constant array which is not a particularly elegant solution, but is the way it was done in the official Ad Lib drivers.

Robert

DhrBaksteen commented 7 years ago

Thanks again. I think it also looks more readable this way.