Lord Nightmare wrote:neviksti: can you do some tests on the cart of what the result is of writes to those two registers nach mentioned are? I believe they might be important.
LN
I can run some tests if needed.
Can you be more specific though?
The only thing I saw about Nach asking what happens when you write to some registers is here:
Nach wrote:When writing to $4806 I need to verify some of what happens.
Is decompression done to $50:0000, $50:($4805,6), or $50:($4805,6)<<mode?
At this point is ($4805,6)<<mode written back to ($4805,6)?
What happens if the previous decompression wasn't fully processed and this is written to again?
I've had long discussions with Kammedo on this. Some keep referring to bank $50 as if the decompression results are stored there. I don't agree with that, and I have seen no reason to believe that bank $50 is anything more than just another access to reg $4800 (with the possible exception that it may need to be "enabled").
The notion of "decompression wasn't fully processed" goes along with that. The length of the decompression cannot be determined by the hardware ... it just responds byte by byte. It is not loaded somewhere which can be accessed randomly. (EDIT: Although I guess there could be issues while the hardware is trying to seek forward a fixed offset into the decomp data, and you go to start another decomp while it is in the middle of this. Since resetting should be an unconditional thing, I doubt it causes any problems... but I have not checked either though.)
Maybe someone has found something that I didn't, but that is how I understand it. Also, the cost of implementing the RAM for that feature, which doesn't have much use, would be wasteful so I really doubt there is anything more than something that lets you read out the decompressed stream byte by byte.
I think Nach already knows all this now, so maybe you are referring to something else?
This also refers to the results of writing some regs:
Nach wrote:How does $480C work? When is the bit there set and cleared?
Is the bit set when there is a write to $4806, and then cleared when there is a read, or perhaps a full read from $4800? Reading from $480C sets ($4809,A) immediately after a write to $4806 or only after the decompression is finished?
I believe this works exactly as the docs suggest. A new decompression is setup after writing to $4806. After the hardware FIFO or buffer or whatnot (the internal details don't matter here) has enough of the requested data that it is ready for the software to start pulling decomp data from it, it sets the bit in $480C. The bit is clear until then. This much I have tested.
My recollection is (don't consider this verified):
It is cleared after being read once while set. TheDumper and DarkForce mentioned similarly.
What I don't know is:
Is this bit cleared by anything else? (starting a new decomp, or reading from $4800)
Is that what you want? The doc already explains more than I've tested myself on that.
The quickest way for me to do tests, is give me a list of reg reads / writes you want me to do and I'll tell you the results. Otherwise I may misunderstand what you want.