Commit Graph

61 Commits

Author SHA1 Message Date
Philippe Symons
13d4b3f7d5 Fix ptgb_write_debug() after merge 2025-05-27 22:39:16 +02:00
Philippe Symons
ce4c807bab Merge branch 'optimizations/reduce-binarysize-remove-libstdc++' into optimizations/implement-zx0-compression 2025-05-25 22:45:47 +02:00
The Gears of Progress
e5375b9155 Fixing post-transfer text box 2025-05-25 15:41:09 -04:00
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
Philippe Symons
532a095d77 Implement zx0 compression
Compress data tables with the ZX0 compression algorithm
2025-04-24 21:14:48 +02:00
The Gears of Progress
8160bcd276 updating box menu, pre sprite grabbing 2025-03-22 15:57:22 -04:00
The Gears of Progress
91b2534b70 Updating text rendering 2025-03-19 20:55:09 -04:00
The Gears of Progress
9f2dc4f653 Add a separate file for dialogue 2025-01-26 17:46:26 -05:00
The Gears of Progress
5eb4321513 Final edits for v1.1.1 2024-12-13 12:08:09 -05:00
The Gears of Progress
3b945ecf3e v1.1.0 2024-11-01 22:54:05 -04:00
The Gears of Progress
73fd2342e9 Last push before release (probably not actually though lol) 2024-08-20 23:31:07 -04:00
The Gears of Progress
1ec09842ad Updating tons of graphics 2024-08-19 14:47:29 -04:00
The Gears of Progress
22f7aaac26 Pre-saving space 2024-08-13 15:49:04 -04:00
The Gears of Progress
b7f056ce79 Updating Dex Graphics 2024-08-08 16:07:43 -04:00
The Gears of Progress
aa4d2573b8 Fixing bugs 2024-07-11 11:18:38 -04:00
The Gears of Progress
7aa6933dd6 Fixing crash 2024-07-05 19:20:05 -04:00
The Gears of Progress
e5ad1e25cf Changing background and fixing bugs 2024-07-02 16:55:47 -04:00
The Gears of Progress
290fdf22a4 Updating DreamDex 2024-06-28 16:24:01 -04:00
The Gears of Progress
444878de04 Finalizing new event 2024-06-26 13:38:34 -04:00
The Gears of Progress
7e82dd7b65 Adding support for gen 2 2024-06-11 16:34:58 -04:00
The Gears of Progress
2cfec76b3c Adding support for Yellow and fixing other bugs 2024-06-07 13:55:01 -04:00
The Gears of Progress
e0f78a3195 Finalizing beta v2 2024-05-29 13:11:44 -05:00
The Gears of Progress
bf7f7f401c Continuing Payload Work 2024-05-02 12:18:24 -05:00
Remnants of Forgotten Disney
a4bda4c673 Adding in event stabilization 2024-04-17 09:17:15 -05:00
Remnants of Forgotten Disney
301ccf602b Finalizing Red/Blue Payload 2024-04-07 16:46:39 -05:00
Remnants of Forgotten Disney
a27f1c2c37 Continuing transfer menu implementation 2024-04-02 12:19:06 -05:00
Remnants of Forgotten Disney
13450924c2 Implementing new payload system 2024-03-29 23:39:58 -05:00
Remnants of Forgotten Disney
0a27d23ba5 Updating buttons and implementing offset rows 2024-03-29 19:33:10 -05:00
Remnants of Forgotten Disney
0b041caf75 Implementing new sprites and temp sprite loading 2024-03-29 13:20:10 -05:00
Remnants of Forgotten Disney
de40daa51e Updating buttons and dialogue 2024-03-29 11:55:54 -05:00
Remnants of Forgotten Disney
d7d8648eb4 Finalizing the RB transfer rewrite 2024-03-27 11:20:54 -05:00
Remnants of Forgotten Disney
c825203e70 Modifying save data flags 2024-03-04 16:56:14 -06:00
Remnants of Forgotten Disney
020d27433d Preparing for ASM rewrite 2024-02-24 14:53:12 -06:00
Remnants of Forgotten Disney
1b5f30087a Modifying Pokemon Injection 2024-02-19 08:29:37 -06:00
Remnants of Forgotten Disney
584c7862c3 Updating Link Cable Implementation 2024-02-12 13:28:06 -06:00
Remnants of Forgotten Disney
de3be068d7 Final commit before release 2023-12-04 21:03:14 -06:00
Remnants of Forgotten Disney
3784db8344 Finishing touches 2023-12-04 15:36:47 -06:00
Remnants of Forgotten Disney
1ee5b57036 Fixed save data 2023-12-03 16:00:03 -06:00
Remnants of Forgotten Disney
8b3771b0d7 Pre-Save issue fixing 2023-12-02 21:10:51 -06:00
Remnants of Forgotten Disney
8bb76ca58c Double checking formatting 2023-11-29 08:28:55 -06:00
Remnants of Forgotten Disney
0a45b08524 Fixed memory bug 2023-11-20 13:50:37 -06:00
Remnants of Forgotten Disney
f7120e97bb Finalized graphics 2023-11-18 19:35:30 -06:00
Remnants of Forgotten Disney
7b0eb43d87 Adding check for valid Pokemon 2023-11-18 14:23:24 -06:00
Remnants of Forgotten Disney
fde2cfe68f Adding check for other events 2023-11-18 12:58:48 -06:00
Remnants of Forgotten Disney
29f4baaf3b Created rom data class 2023-11-15 13:08:17 -06:00
Remnants of Forgotten Disney
e2ac4c41b0 Shrinking the save data array size 2023-11-15 09:48:57 -06:00
Remnants of Forgotten Disney
5d5fe71100 Connection Dialogue 2023-11-11 18:19:25 -06:00
Remnants of Forgotten Disney
e01a782929 Pre-text engine rewrite 2023-11-10 21:19:19 -06:00
Remnants of Forgotten Disney
5874fb2b92 Working in RS, as well as correct text 2023-11-08 15:06:23 -06:00
Remnants of Forgotten Disney
fbb3dccb0f THE POKEDEX ADDITONS WORK 2023-11-01 12:02:52 -05:00