Short version
I'm making a gameboy assembly development environment for my TI-84+CE. I won't bore you with all of the stuff about the way data will be stored, other than that I need to read and write individual bytes at a time from large variable of some sort. Preferably such a variable would be of variable size from 0 bytes to more than 16KiB (upper limit preferably more than 22KiB, just in case). 16KiB is the size of gameboy ROM banks, but I will need more than this because of markers bloating the data.
The question is how or where do I store that much data? I have no idea and would really appreciate some ideas from you guys. Also, in the longer version I go into more detail about the way it all works, if you're interested in hearing what I intend to do with this project.
Long version (please read it's really not that long)
I've had the idea in my head for a while to write a gameboy assembly development suite for my '84 CE. I know this is an ambitious and just plain silly project, but I think it will be a lot of fun.
Anyways, how to store the code? Well, the program would just write the bytes for each instruction to a variable of some sort, and read and interpret the instruction opcodes on the fly, basically acting as a live disassembler/assembler. This would cut down the size of the project files, at the cost of giving the program a LOT more to do.
Things such as labels, section definitions and chunks of raw data (such as graphics data) could just be inserted into the data directly, as there's 11 unused instruction opcodes in the gbz80 instruction set that could just be interpreted as markers instead of as instructions.
And to export the project files? I could just upload them to my laptop and do whatever I want with them from there. I could easily write a custom disassembler in python to interpret the unused opcodes and produce a .asm file to be compiled with RGBDS or whatever. Or I could write a simple program to remove the extra markers, and do other things to make the ROM image execution ready.
There's just one problem: How the heck do you store that much mutable bulk data efficiently? I mean storing LOTS of individual bytes in a single variable. Preferably such a variable would be of variable size from 0 bytes to more than 16KiB (upper limit preferably more than 22KiB, just in case). 16KiB is the size of gameboy ROM banks, but I will need more than this because of markers bloating the data.
Using lists is not an option, and this post was too long for all of the details. To summarize: With cramming four bytes into each number in the list (which is the limit of the integer resolution) only 44% of the RAM taken up by the list is the actual bytes of data being stored, and lists have a limit of 999 items which means only about 4K per list can be stored. It's unworkable every way to sunday.
Summary: The calculator has more than enough space to handle at least four 16KiB+ banks of data at a time, and enough archive space to store a fairly large gameboy game's worth of ROM banks. But where/how the heck do you store it? I've got no idea, and ny help I get will be much appreciated.