nukeykt wrote: figured out exact rhythm mode algorithm(appearantly noise generator updates every internal cycle, which equals to Master clock/8. Noise polynomial is simpler than was in MAME: x^23+x^14+1), checked KSL calculation. YMF262 has 16 LSI test bits. Some of them enable test data output through TEST pin(I think it serially outputs first operator's envelope or phase generator value depending on LSI register values). I'll possibly release my noted shot with the next Nuked OPL version release.
Wow, that's some pretty deep stuff you've been working on.
So how come the MAME polynomial matches the output of real chip then? Is it just that the operator that was under examination used every N:th bit of the noise generator, so MAME polynomial matches every N:th bit of the original noisegen? I mean, so each operator uses different noise output when it is the operator's turn to be processed, instead of all operators using the same noisebit during one cycle of sample accumulation of all operators? Could be, as MCLK/8 == 36 * sampling rate, so it also takes 8 MCLKs per operator.
Only 16 LSI test bits? There are two registers on bank0 and two registers on bank1 according to the datasheet, but are these the same? I did notice that some of them have no audible effect, but some of them do, like one might stop perhaps envelope generators and another bit might stop phase generators (I haven't closely examined what they really do, just noticed they distort the audio and these are the best guesses based on how it sounds). I've always wanted to reverse engineer the test bits as they could reveal internal operations better if it is analyzed as a black box, but the test output could further help with this.
I recall I might have one sound card where I also wired the test pin to a pin header, so I could analyze it. But on that board I used a logic buffer for extra safety and it seems the buffer is too fast or inputs change too slowly so there are glitches on the logic analyzer.
Can you see what are the initial (reset) state of noisegen, envelope clockgen, vibrato clockgen or tremolo clockgen?
Also, I'm all ears how the envelope rate generator works!