Poke_Transporter_GB/source
Philippe Symons 26fd1e2dd3 Add compression for the text data, output stack usage .su files and rework script_array
Add a binary table format and convert the text entries into this format in text_helper/main.py. It then gets compressed with zx0.

The new text_data_table and streamed_data_table classes exist to read the various entries from this binary table. streamed_data_table specifically
exists to use a decompression buffer that is smaller than the actual binary table. But it requires a decompression buffer that is
still larger than ZX0_DEFAULT_WINDOW_SIZE (default: 2048 bytes) and will only be able to decompress in
chunks of (<decompression_buffer_size> - <ZX0_DEFAULT_WINDOW_SIZE>) bytes

Try to keep the binary text tables sufficiently small though, because since zx0 doesn't actually support random access,
getting to the last entry is significantly more expensive than reading the first one. And unless you use streamed_data_table,
it also requires <uncompressed_size> bytes of stack space, therefore IWRAM to decompress them.

I also had to rework script_array because it can no longer reference the strings directly. Instead we now reference the DIA_* "enum" values.
We also no longer store an array of script_obj instances, because these were getting stored in IWRAM since they're non-const global variables
originally. Instead we now have const arrays of script_obj_params structs, which should end up in .rodata -> therefore EWRAM.

Right now, script_obj only supports the PTGB text table (originally the dialogue array). But if the need arises to support other tables as well,
I'd consider adding a separate enum to script_obj_params to indicate the specific table.

The compilation process will also output .su files in the build folder from now on. These files indicate the stack frame size for every function in
every compilation unit, so be sure to check them from time to time. Note that they will only show the stack consumption for that specific function.
So to get the worst case stack consumption, you need to manually add all the functions in a certain stack flow.
2025-05-21 12:21:06 +02:00
..
background_engine.cpp Modifying the remote multiboot loader 2025-04-06 17:09:52 -04:00
box_menu.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
button_handler.cpp Updating tons of graphics 2024-08-19 14:47:29 -04:00
button_menu.cpp Reduce binary size by eliminating libstdc++ 2025-04-09 20:04:08 +02:00
delays.cpp Organizing files 2024-03-19 13:52:23 -05:00
dex_handler.cpp Updating buttons and dialogue 2024-03-29 11:55:54 -05:00
flash_mem.cpp Implement zx0 compression 2025-04-24 21:14:48 +02:00
gameboy_colour.cpp Reduce binary size by eliminating libstdc++ 2025-04-09 20:04:08 +02:00
global_frame_controller.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
interrupt.cpp Fixing interrupts 2024-03-20 15:38:33 -05:00
interrupts_gba.c Fixing interrupts 2024-03-20 15:38:33 -05:00
irq_handler.s Fixing interrupts 2024-03-20 15:38:33 -05:00
japanese_small.s Updating Dream Dex 2025-04-06 11:57:37 -04:00
latin_short.s Updating Dream Dex 2025-04-06 11:57:37 -04:00
libstd_replacements.cpp Optimize the MOVESETS table for compression + eliminate 4 KB "handles" buffer from 2025-04-29 22:22:38 +02:00
linker_optimizations.cpp Optimize the MOVESETS table for compression + eliminate 4 KB "handles" buffer from 2025-04-29 22:22:38 +02:00
main.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
memory.c Restoring memory.c 2024-03-20 15:41:03 -05:00
multiboot_upload.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
mystery_gift_builder.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
mystery_gift_injector.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
payload_builder.cpp Reduce binary size by eliminating libstdc++ 2025-04-09 20:04:08 +02:00
pkmn_font.s Compress the graphics (mostly), fix potential vram memcpy issue 2025-01-17 19:32:48 -05:00
pokedex.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
pokemon_data.cpp Revert MOVESETS -> bring it back as uncompressed data in pokemon_data.cpp 2025-04-30 12:41:46 +02:00
pokemon_party.cpp Implement zx0 compression 2025-04-24 21:14:48 +02:00
pokemon.cpp Optimize the MOVESETS table for compression + eliminate 4 KB "handles" buffer from 2025-04-29 22:22:38 +02:00
random.cpp Adding in event stabilization 2024-04-17 09:17:15 -05:00
rom_data.cpp Reduce binary size by eliminating libstdc++ 2025-04-09 20:04:08 +02:00
save_data_manager.cpp Updating Dream Dex 2025-04-06 11:57:37 -04:00
save.cpp Organizing files 2024-03-19 13:52:23 -05:00
script_array.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
script_obj.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
script_var.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
select_menu.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
sprite_data.cpp Implement zx0 compression 2025-04-24 21:14:48 +02:00
text_data_table.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
text_engine.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00
translated_text.cpp Fixing some graphics tearing 2025-04-08 14:28:30 -04:00
z80_asm.cpp Reduce binary size by eliminating libstdc++ 2025-04-09 20:04:08 +02:00
zx0_decompressor.cpp Add compression for the text data, output stack usage .su files and rework script_array 2025-05-21 12:21:06 +02:00