Commit Graph

395 Commits

Author SHA1 Message Date
The Gears of Progress
63b6931845 Enabling Japanese 2025-12-21 17:14:18 -05:00
The Gears of Progress
37be3036ff Temporarilly disabling language text parsing 2025-12-21 17:11:33 -05:00
The Gears of Progress
d9314eb60f
Merge pull request #79 from GearsProgress/latest-release
Update release-candidate to match latest-release
2025-12-20 11:43:34 -05:00
The Gears of Progress
8347f63286
Merge pull request #78 from risingPhil:use-pccs-as-a-proper-static-lib
Use pccs as a proper static lib
2025-12-17 10:44:30 -05:00
The Gears of Progress
80a4d835c1 Updating PCCS version 2025-12-17 10:43:55 -05:00
The Gears of Progress
e792cc47b1 Fixing file path 2025-12-17 10:41:41 -05:00
Philippe Symons
a7d1bc76e1 Merge remote-tracking branch 'upstream/latest-release' into use-pccs-as-a-proper-static-lib 2025-12-16 19:15:36 +01:00
Philippe Symons
4f1d961b2d Update PCCS submodule 2025-12-16 19:14:14 +01:00
Philippe Symons
5c1ff16623 Revert docker-compose file. The latest change broke it for Linux 2025-12-16 11:23:40 +01:00
RisingPhil
8fda76db5c Do the same fix for payload-generator on MinGW64 as we did for PCCS 2025-12-16 10:16:36 +01:00
Philippe Symons
bb9f4ae0f1 Update PCCS submodule 2025-12-16 10:52:17 +01: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
8266448b36
Merge pull request #75 from risingPhil/move-pccs-into-git-submodule
Replace the PCCS code with a git submodule
2025-11-27 17:19:08 -05:00
Philippe Symons
a7b2703bf8 Replace the PCCS code with a git submodule
This eliminates duplicate code. - Only maintain the code in one place!

To make sure the submodule is getting cloned too after cloning Poke_Transporter_GB, execute:
git submodule update --init --recursive

To update the submodule to a newer commit/different branch:

cd PCCS
git pull
git checkout <commit_or_branchname>
cd ..
git add PCCS
git commit
git push

The way it works is that a specific commit is tied to your Poke_Transporter_GB repository's PCCS folder.
2025-11-27 23:14:29 +01:00
The Gears of Progress
2b682b185f
Merge pull request #73 from risingPhil/fix-latest-release-compile-errors
Fix a couple of compile errors on latest-release branch
2025-11-27 14:41:51 -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
37bbc0c2d2
Merge pull request #69 from GearsProgress/latest-release
Update READMEs
2025-11-10 16:47:38 -05:00
The Gears of Progress
719f03af5a
Update README.md 2025-10-12 17:54:44 -04:00
The Gears of Progress
b4ac3fd597
Update README.md 2025-10-12 17:54:00 -04:00
The Gears of Progress
f29b906243
Merge pull request #67 from GearsProgress/release-candidate
Release candidate
2025-10-12 17:47:25 -04:00
The Gears of Progress
b6be0aedeb Enabling release build 2025-10-12 17:46:59 -04:00
The Gears of Progress
12f1d1b7df
Merge pull request #66 from GearsProgress/text-and-box-rewrite
Text and box rewrite
2025-10-12 17:44:41 -04:00
The Gears of Progress
5647467d14
Merge pull request #63 from GearsProgress/adding-cpcs
Disabling debug mode
2025-10-12 17:00:41 -04:00
The Gears of Progress
940b7547c4 Disabling debug mode 2025-10-12 16:59:17 -04:00
The Gears of Progress
6a9cb32ee9
Merge pull request #61 from GearsProgress/adding-cpcs
Adding cpcs
2025-10-12 16:47:44 -04:00
The Gears of Progress
a98a58eb4e Final finishing touches 2025-10-12 16:41:48 -04:00
The Gears of Progress
ba1a075701 Adding PCCS 2025-10-12 15:08:33 -04:00
The Gears of Progress
ccaf1e28ae Implementing PCCS 2025-10-12 15:08:14 -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
The Gears of Progress
ed6ee974f8 Fixing connection textbox 2025-08-06 23:08:00 -04:00
The Gears of Progress
ba9e30e8d0 Fixing a few bugs before merge 2025-07-28 16:18:51 -04:00
The Gears of Progress
1f325657ec
Merge pull request #55 from risingPhil/feature/use-lz10-instead-of-zx0 2025-07-18 14:18:57 -05:00
The Gears of Progress
788a0909b3
Merge pull request #53 from easyaspi314/text-and-box-rewrite 2025-07-18 13:23:38 -05:00
The Gears of Progress
c9d44ec9d8
Merge pull request #54 from risingPhil/feature/optimize-gbc-payloads 2025-07-18 13:22:47 -05:00
Philippe Symons
79b6cc64a2 Remove benchmark code again 2025-07-18 16:24:59 +02: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
6b89ff8367 Remove test_decompress again 2025-07-18 13:15:56 +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
easyaspi314
750641c78f Prepare for trouble... and make it.... fixed point?
To protect the world from the soft float library...
To unite all arithmetic within our binary...
To denounce the evils of floating point precision...
To save more kilobytes - that's our vision....

(god this is cringe)

All floating point math has been eliminated, and replaced with
equivalent or near-equivalent fixed-point math.

sprite_data.cpp uses Q16, and get_rand_range uses a full Q32 to
ensure that the exact same results are generated as before, at
the cost of some inline assembly to do a umull (__aeabi_lmul is a
little excessive when the lower 32 bits are discarded)

This eliminates all of the expensive double precision float library,
saving a few kilobytes.

Additionally, the unneccessary parts of nanoprintf have been
disabled. There is no need for precision specifiers, long longs, or
floats.
2025-06-30 13:05:32 -04:00
The Gears of Progress
16345eff59
Merge pull request #50 from risingPhil/optimizations/eliminate-verdana-and-sys8font 2025-06-27 12:11:43 -04:00
Philippe Symons
4833a3344e Avoid pulling in the verdana9 and sys8Font fonts from libtonc
I eliminated these fonts by redefining code from tte_init_chr4c.c and tte_main.c files in libtonc.

Both the original tte_init_chr4c and tte_init_base functions had some code to use either verdana9 or sys8Font as default if the user
did not specify a font instance.

But we don't need it.

To eliminate this code, we not only had to define a custom version that omits this code, but also had to redefine other functions from those .c files
in order to make the linker not try to pull in those .o files from libtonc and use our versions instead.
2025-06-27 18:00:23 +02:00
The Gears of Progress
1db19c4841
Merge pull request #49 from risingPhil/feature/compress-rom-data-tables 2025-06-27 10:15:25 -04: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
d0a95b7e96 Update gitignore 2025-06-24 16:36:15 -04:00
The Gears of Progress
9e488ae2af Fixing Windows Environment 2025-06-24 16:35:32 -04:00
The Gears of Progress
86b2861a7f
Merge pull request #48 from risingPhil/optimizations/implement-custom-malloc 2025-06-20 17:21:38 -04:00
Philippe Symons
32db0d690d Implement custom malloc -> rom space: -3 KB, IWRAM: -1 KB
I found another way to optimize the rom space by implementing a custom malloc, free, realloc and calloc
function.

This reduces rom size by 3 KB and IWRAM usage by 1 KB. (elimination of __malloc_av). The original
implementation is much more complex and larger than it needs to be.

The custom malloc is implemented as a bitmap allocator. It keeps a bitmap to track which pages of the
heap are allocated. Like the original allocator, it uses the free space in EWRAM after the multiboot gba
rom. But unlike the original allocator, we control the size with CUSTOM_MALLOC_POOL_SIZE.

The custom malloc can be disabled with USE_CUSTOM_MALLOC.
2025-06-20 22:39:42 +02:00