(03-09-2014, 08:19 AM)Shonumi Wrote: @neobrain - That's pretty interesting. Just glancing over it, I think I can see where there's a pattern starting (seems to repeat for the rest of the indices after a certain point). Though what exactly it is (or rather why it is what it is) requires more poking. I'll take a look at it later tonight if you want, can't say I'll be useful though.Yeah, the pattern as far as I could see was that with each row, the value increases by 4 - apart from columns 0x21, 0x61, 0xA0 and 0xE0 (each of these plus or minus 1 because I'd have to look it up again to be sure), where the value increases merely by 3 compared to the previous row. That said, making a reasonable algorithm other than "if(row==0x21)..." out of this has proven hard to me. It probably looks dead-easy once we find the algorithm, though :/
For what it's worth, if you really want to give it a shot (which I'd greatly appreciate btw!), you can download a more complete log of test results at https://dl.dolphin-emu.org/nbx/log1.tar.gz . Format of that table is basically:
a b c: hw tfn
"a", "b" and "c" are the unsigned 8 bit input variables used in the lerp, "hw" is the returned result on hardware, "tfn" is the (incorrect) behavior of my current tev-fixes-new branch (which uses (a*(255-c) + b*c) / 255) * 4 to implement the lerp-scaling). The table includes all configurations for a=0..0x10 and any values for b and c.
That said, I would probably be happy enough to find a reasonable algorithm for the a=0, b=255, c=variable case, the results of which I had posted before :|