public static final int TEXT_HEAP_SIZE = 0x00001000;
This seems to be wrong. While a naive look at the function that sets up text decompression would give the impression that it's decompressing into a buffer
0x1000 bytes long - since the buffer is at
0x0202a5b4 and it also reads a "does the buffer already contain this text item" cached value at
0x0202b5b4 - there are actually other parts of the code that reference other addresses in that range. Since there's no reason for the code to just randomly look at offset locations in the buffer, I conclude that they're outside the buffer. The smallest code constant found in this range is
0x0202a9b4, indicating an actual buffer size of
0x400 bytes (1kb).
However. I went into my project folder for text recompression/optimization, and whipped up a little hax script to indicate the maximum length in bytes of text items actually used in the FE7 ROM.
The plot thickens. I'm going to be examining the routines that use these other constants more carefully.
Edit: Okay, the situation actually turns out to be kinda complicated. I'll be doing a new thread. tl;dr the code sux.