DhrBaksteen / ArduinoOPL2

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

Added delays between register and data writes #2

Closed JudgeBeeb closed 7 years ago

JudgeBeeb commented 7 years ago

I have tried your library and I get somewhat inconsistent results.

According to the Ad Lib Programming Guide after writing to the register port you must wait 3.3us before sending the data; after writing the data, 23us must elapse before any other YM3812 operation may be performed.

I have added those delays to OPL2.cpp and it seems to work consistently now.

Kind regards

Robert

DhrBaksteen commented 7 years ago

Thanks! I wasn't aware of this