Bleh, I'll be tired tomorrow, but I was too curious to sleep anyway. I ran some tests with the FIFO setup.
Andreas Naive wrote:I took a look at the QM probability estimation tables. In a IBM's document, with registers of 16 bits and a table of 113 values, the first values looks like this:
0x5a1d
0x2568
0x1114
0x080b
0x03d8
0x01da
....
So if we were to make a small 8-bits version... {0x5a, 0x25, 0x11, 0x08, 0x03, 0x01} would be a reasonable option?

Yep, that is now verified. The probabilities are $5A, $25, $11, $08, $03, $01.
I had a program keep lowering the input data to find new cutoffs for one more MPS. I saw one bitplane evolve all the way to a prob of $01.
I'll clean up the code a bit (hopefully tomorrow) and share it as example "skeleton code" for those considering writing their own tests. I'll also post the raw data from my test if people want, but it is not very interesting now that the probability table is known.
Andreas Naive wrote:Could you suggest some reasonable cross-assemblers/emulators for me to make tests in a PC?
Hmm... I didn't think ahead very well on that. It will be very hard to debug everything this way. Maybe this isn't such a good idea.
But there really only seems to be two programs we need:
One to decompress custom data supplied in a file (which shouldn't be difficult to do now and if we decide on formats I could have done fairly quickly).
And a second one to find the prob and mps values for a particular sequence.
As long as that's all we go for, it shouldn't be too bad. If we don't focus our efforts and everyone tries to make their own personal version, unless everyone is a perfect coder without need to debug on the real thing, it will get out of hand.
Andreas, maybe it would be best if you wrote a C program to do what you want (and don't use any local stack variables or heavy "pass by value" function calls) and I can quickly translate it to asm. This way I'll understand exactly what you want and better understand the details of the program in case we need to debug. Also you won't have to waste time on a side project of learning the SNES memory layout, instructions, etc. I think this may be the most time efficient method.
Keep in mind the following things:
- Each run I can only save 32kBytes of data.
- In my code library I have something similar to a printf command, so have the code give some status updates of how it is doing every once in awhile so I can see that the code doesn't get "stuck" on the real hardware.
- I still haven't figured out for sure what memory locations trigger a U2 ROM access (what is complicating things is that it is somehow not entirely consistent... maybe it depends on initialization of the chip somehow?). What this means for your program is that it would be really nice to keep the compressed -> uncompressed data buffers to be no more than 2kB total so I can fit everything in a region I know is safe.