I suspect rather than some register-specific processing time, it has an access slots mechanism similar to the VDP where it waits for a slot before it can write the value. Kind of makes sense if you think about the inner working of the OP*, where a single operator is used again and again, if registers can only be written between cycles.
Coincidentally, the YM2413 omits an output sample every 72 cycles. 72 + 12 = 84. Coicidence?
Up to 72 cycles to wait for the next access slot, then 12 cycles to process the write.
According to wouterv (who is reverse engineering the YM2413), that matches his findings:
I saw your post on MRC where you connect the YM2413 IO timing to the 72-clock cycle period for the 9 channels. That’s indeed correct. I’ve described it (a bit hidden) in this text on lines 185-232.
Short summary: the registers are implemented as shift registers. Only the top element of such a register can be read / written to. So in the worst case you indeed have to wait 72 cycles. This also explains the strange modulo-9 behaviour of the unused registers. For example, writing to register 0x1D is the same as writing to 0x1D-9=0x14, but (probably) with longer IO timing
I hope he doesn’t mind me quoting a bit of his e-mail :).
After the value write I wait 37 bus cycles, where I’m assuming the processing of the next VGM command will take enough time to fill up the remainder of the 84 cycles. I did the math on this at some point, but I could’ve miscalculated something there.
Well, I completely removed this wait, and for the life of me can’t get it to glitch on my turboR GT -_-;;. Must be the other wait then.
Been working on VGMPlay a bit again recently… a sweet new feature appeared!
VGMPlay for MSX, YM2203 OPN emulation on SFG + PSG
Follow-up on my previous video; OPN emulation on YM2151 OPM and the AY-3-8910 PSG is now complete! It works really well, so I’m very happy! :D
On a side note, as awesome as the song is, that PC-88 version of Ys II - To Make The End Of Battle sure keeps on going! Guess the intro takes a bit longer than it does on MSX and X1 Turbo… :'D
You’ll have to wait a bit longer for a release, but the source code is updated. Please enjoy!
VGMPlay for MSX, more OPN music on SFG + PSG
As an encore, some more music for the YM2203 OPN, playing on Yamaha’s SFG sound module for MSX and the internal PSG!
This time some music from Ancient Ys Vanished Omen for the PC-88, songs not used in the game which I had never heard before! Theme of Adol (the third one) sounds like it inspired the field song from Ys III… :o And finishing off with the classic intro of Dragon Slayer: Legend of Heroes.
Nice! Now I wish I had a real SFG unit. But listening to it on YT is cool too.
Theme of Adol (the third one) sounds like it inspired the field song from Ys III…
Must have, absolutely.
Very nice, amazing stuff.
Do I hear plagiarism in the track from Ys 2, To Make The End of Battle?! That's Firebird alright in there!
Nice, sounding good, congrats Grauw! These are openMSX recordings?
Do I hear plagiarism in the track from Ys 2, To Make The End of Battle?! That's Firebird alright in there!
Where?
Yeah, real MSX is a bit more hassle to record .
Since I have a SFG-05 I will test such amazing new feature very soon.
Not to say that I use vgmplay on regular basis already.
Thank You Grauw!
Wow, so the openMSX YM2151 emulation is any good? It was never properly tested because there's not much software for it (or if there's software, there's no data for it...)
Why does it say PSG (emu)?
Is OPN fully and losslessly mappable to OPM+PSG?