Writing to YM2413 - I dont want to wait more than needed

By Bengalack

Champion (331)

Bengalack's picture

02-03-2021, 16:06

Oh those precious cycles Smile

According to this, and many other sources, https://www.msx.org/wiki/MSX-Music_programming#Direct_usage_... I get the info about 7C:12 and 7D:84 cycles.

But can someone explain whether the wait is "global" - so no writing to the chip at all for x cycles after a write.

OR

Is the wait pr port? So that, I can make sure I always wait 84 cycles between writes to 7D and 12 cycles between writes to 7C? My inner loop would like to know :)

Login or register to post comments

By Grauw

Ascended (9686)

Grauw's picture

02-03-2021, 16:26

Iirc it’s global.

Something you need to be aware of for testing is that the actual count varies depending on the current processing state of the chip, so if you wait e.g. 70 cycles it will often work but miss a write occasionally.

By Bengalack

Champion (331)

Bengalack's picture

02-03-2021, 18:04

Ok. I was afraid of that Smile But thanks!