Commit Graph

47 Commits

Author SHA1 Message Date
Philippe Symons
b84939b49a Add debug menu UI when you press L+R in the main menu.
It's only the UI yet. It only shows a couple of dummy options right now.
2026-03-09 19:56:32 +01:00
GearsProgress
12f710dafc Reapply "Release candidate"
This reverts commit 67aa927108.
2026-03-09 12:09:57 -04:00
GearsProgress
a8edfc3094 Updating local/remote setup 2026-03-06 09:55:11 -05:00
GearsProgress
d17371ed1c Updating pt-br implementation 2026-03-05 18:11:16 -05:00
GearsProgress
3128f8bcd7 Updating make process to include Korean, Traditional and Simplified Chinese, and Brazilian Portuguese 2026-03-05 16:42:31 -05:00
GearsProgress
b7ada79f40 Updating main.py 2026-03-03 12:09:41 -05:00
GearsProgress
0d9b10d12c Fixing multiline centering 2026-02-28 16:32:33 -05:00
GearsProgress
c5d252e3b5 Updating PCCS and adding debug detection in the py scripts 2026-02-28 15:57:37 -05:00
The Gears of Progress
67aa927108
Revert "Release candidate" 2026-02-24 00:04:47 -05:00
The Gears of Progress
0f003f0120
Merge branch 'text-debug-screen' into release-candidate 2026-02-24 00:02:10 -05:00
Philippe Symons
d0cfed6018 Fix some build issues
Problem 1: syntax error in text_helper
Fix 1: single quotes instead of double quotes

Problem 2: the ground shifted beneath our feet with the devkitpro/devkitARM base image again.
The --break-system-packages option no longer exists on pip install.
Fix 2: Use a specific tag of the devkitpro/devkitARM docker image to ensure this won't happen again.
2026-02-19 21:49:43 +01:00
The Gears of Progress
335e1dfe7f Updating Makefile and Dockerfile 2026-02-17 17:40:35 -05:00
The Gears of Progress
2cb89fcadb Merge branch 'text-debug-screen' of https://github.com/GearsProgress/Poke_Transporter_GB into text-debug-screen 2026-02-15 22:43:03 -05:00
The Gears of Progress
38454168fd Adding space escape character 2026-02-15 22:43:00 -05:00
The Gears of Progress
8bf0822c24
Merge pull request #100 from petrosjd:text-debug-screen
Updating some glyphs in Japanese font
2026-02-13 22:23:03 -05:00
The Gears of Progress
e583853ea9 Adding check for bin file sizes 2026-02-13 22:16:27 -05:00
The Gears of Progress
a0d242a44f Compressing underscores with escape characters 2026-02-13 21:25:31 -05:00
Peter Dubois
3526a96831 Updating some glyphs in Japanese font 2026-02-13 13:38:53 +09:00
The Gears of Progress
2887252866 Updating character sheets and adding centering 2026-02-12 22:42:07 -05:00
The Gears of Progress
8d869927da Adding in {LVL} escape sequence 2026-02-11 21:00:42 -05:00
The Gears of Progress
a4af5e3b42 Adding _ escape character 2026-02-11 20:28:27 -05:00
The Gears of Progress
f390c3692a Fixing sheet download issues 2026-02-11 10:05:25 -05:00
The Gears of Progress
37aa2a8674 Adding a release file xlsx to the text builder 2026-02-09 23:35:51 -05:00
The Gears of Progress
7625d796ab Organizing makefile 2026-02-08 12:11:33 -05:00
The Gears of Progress
e1c3d1a4c2 Updating make files to use debug mode 2026-02-05 23:37:20 -05:00
The Gears of Progress
2b7aeebe6b Merging pull request 2026-01-08 17:17:05 -05:00
The Gears of Progress
3b3a675f80 Merge remote-tracking branch 'origin/invalid-pkmn-fix' into release-candidate 2026-01-03 17:20:36 -05:00
The Gears of Progress
e792cc47b1 Fixing file path 2025-12-17 10:41:41 -05:00
Philippe Symons
9997f3b61d Use libPCCS as a proper static lib
Split up data-generator into payload-generator (PTGB) and table-generator (PCCS)

The reason for this is because we don't want the dependencies to the payload stuff in PCCS.
And the tables are embedded inside libPCCS now.

Because we want to use libPCCS as a proper static lib, we now use its new Makefile to build it
before we build Poke_Transporter_GB.
2025-12-13 21:01:34 +01:00
The Gears of Progress
a5ff585596
Merge pull request #76 from GearsProgress/latest-release
Refactoring to latest "latest release" branch
2025-12-06 15:50:56 -05:00
The Gears of Progress
9ca5c650d0 Working on debugging 2025-12-03 22:08:35 -05:00
Philippe Symons
0f8236575a Fix a couple of compile errors on latest-release branch
- Fix make clean by adding -f flag when removing output.json

- Fix broken compress_lz10.sh script: it had a check to avoid compressing when the
  input bin file hasn't changed. But the -nt operator also returns false if the output
  file doesn't exist.

- Fix compilation error on conflicting u32 typedef: libtonc defines one and so does data-generator.
  We shouldn't redefine it if the one from libtonc exists. The one in data-generator exists for compiling
  the tool for pc.

- Fix Dockerfile. For some reason the Dockerfile was now failing because Ubuntu manages the python pip
  packages. I fixed it with the --break-system-packages shortcut. It should be fine.
2025-11-27 20:27:35 +01:00
The Gears of Progress
ba1a075701 Adding PCCS 2025-10-12 15:08:33 -04:00
The Gears of Progress
a0793c72c0 Fixing issues before implementing the CPCS 2025-09-20 17:17:20 -04:00
The Gears of Progress
4a612713ee Modifying build process to ignore unmodified files 2025-08-06 23:08:14 -04:00
Philippe Symons
47cd143de6 Replace ZX0 by the builtin LZ10 compression.
LZ10 decompression is builtin to the GBA's bios, so we don't need ZX0. It's also significantly faster
(618 usec instead of 2311 usec in my personal benchmark code for decompression of the same data)

And it seems like by doing so, we saved 1 KB as well!

So, seems like replacing ZX0 is the right move.

The reason I didn't initially is because I misunderstood the documentation. I assumed LZ77UnCompWram could only uncompress into EWRAM, not IWRAM.
But it turns out it can do both.

And using standardized tools is usually better than using a custom implementation.

The only downside of this right now, is that we can no longer stream text tables through a smaller buffer than the entire decompressed size.

Anyway, things seem to work fine, so bye bye ZX0. It's been fun.
2025-07-18 16:19:34 +02:00
Philippe Symons
31c72b5390 Add class comment to payload_file_reader 2025-07-18 13:38:38 +02:00
Philippe Symons
0fb305f97a Disable a couple of printf's in data-generator 2025-07-18 13:33:38 +02:00
Philippe Symons
2689ffd3cf Optimize Gameboy payloads for size by generating the payloads at runtime and generate binary patches
This commit moves payload_builder and the z80_asm code to the data-generator subproject in order to generate the gameboy payloads
at compile time instead of at runtime.

In addition, we select a couple of base payloads (more than 1 for compressibility's sake) and generate binary patches to transform them into
other payloads. We then generate a binary file with both the base payload and binary patches and compress these files with zx0.

This reduces the rom size by about 8 KB.
2025-07-18 12:48:50 +02:00
Philippe Symons
5e7118c0c7 Compress the gb_rom_values and gba_rom_values tables with ZX0. 2025-06-27 16:04:04 +02:00
The Gears of Progress
9e488ae2af Fixing Windows Environment 2025-06-24 16:35:32 -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
12d1d10fc7 Revert MOVESETS -> bring it back as uncompressed data in pokemon_data.cpp
... and add a comment why.
2025-04-30 12:41:46 +02:00
Philippe Symons
4c93ff869c Optimize the MOVESETS table for compression + eliminate 4 KB "handles" buffer from
libsysbase_libsysbase_a-handle_manager.o

So, I optimized the MOVESETS table to only store the "overriding" bits in the movesets of the evolutions
in relation to their base forms. That only improved compression slightly (about 300 bytes)

I also eliminated 4 KB of IWRAM usage by libsysbase_libsysbase_a-handle_manager.o because of the "handles"
buffer. We're not using it and we REALLY need our IWRAM. (and it also reduces the rom size with 4KB too!)
2025-04-29 22:22:38 +02:00
Philippe Symons
8e55a2bd52 Bundle charsets per gen for slightly better compression and move some tables back as uncompressed
The ones I moved back as uncompressed tables (EVOLUTIONS and gen_1_index_array) simply didn't compress well
at all. It wasn't worth the runtime decompression cost.
2025-04-28 20:47:55 +02:00
Philippe Symons
08454cd1fa Optimize zx0 decompression for speed instead of code size:
- Read more than 1 byte at a time: read by uint32_ts
- Make use of the native uint32_t type for the whole algorithm instead of uint16_t
2025-04-26 23:15:54 +02:00
Philippe Symons
532a095d77 Implement zx0 compression
Compress data tables with the ZX0 compression algorithm
2025-04-24 21:14:48 +02:00