Commit Graph

308 Commits

Author SHA1 Message Date
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
652f781454 More optimization: move code to IWRAM.
We can now decompress a 512 byte charset in 1 ms. (well, 1.370 ms to be exact)
2025-04-28 12:34:19 +02:00
Philippe Symons
75f8e5a26a More optimization:
Remove the RingBuffer entirely.

We can now decompress 512 bytes in 3 ms.
2025-04-27 23:32:02 +02:00
Philippe Symons
0b5bd11680 More speed optimization
Although the fact that I'm now using -O2 for zx0_decompressor will probably make the binary size larger
2025-04-27 01:03:25 +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
Philippe Symons
ba8738fc4b Remove useless reinterpret_cast 2025-04-10 08:06:15 +02:00
Philippe Symons
c755615d65 Merge branch 'master' into optimizations/reduce-binarysize-remove-libstdc++ 2025-04-09 20:19:39 +02:00
Philippe Symons
9268cbd42e Reduce binary size by eliminating libstdc++
This commit removes all references to things in the libstdc++ library to remove a decent chunk of bloat.

This means every std::to_string() call, std::string and std::vector. (as well as iostream related stuff).

I replaced those with my own versions ptgb::to_string() and ptgb::vector. Especially the latter is not exactly the same,
but close enough.

I also replaced operator new and delete with my own implementation to avoid pulling in everything related to exceptions
from libstdc++

Another problem was the fact that libtonc uses siscanf, which pulls in everything related to the scanf family of functions
and locale support. The worst part of that was that it included a 13KB "categories" symbol from libc_a-categories.o,
which was pulled in because of the locale support integrated into newlibc's siscanf() function. To fix that, I created a
custom, extremely restricted implementation of siscanf. libtonc only used this function to parse at most 2 integers from a
string anyway.
2025-04-09 20:04:08 +02:00
The Gears of Progress
08f6838c91 Fixing some graphics tearing 2025-04-08 14:28:30 -04:00
The Gears of Progress
7338828331 Removing graphics from loader 2025-04-06 17:29:22 -04:00
The Gears of Progress
1a68b30c8b
Merge pull request #36 from risingPhil/feature/load-without-multiboot
Proof Of Concept: Load PokeTransporterGB WITHOUT multiboot
2025-04-06 17:10:41 -04:00
The Gears of Progress
c7aa7b3dca Modifying the remote multiboot loader 2025-04-06 17:09:52 -04:00
The Gears of Progress
680459489e
Merge pull request #38 from risingPhil/feature/upload-rom-as-multiboot-to-other-gba
Add functionality to upload Poke Transporter GB to another gba after it has started on the current one [EZ Flash Omega]
2025-04-06 12:43:20 -04:00
The Gears of Progress
a369e08093
Merge branch 'master' into feature/upload-rom-as-multiboot-to-other-gba 2025-04-06 12:37:47 -04:00
The Gears of Progress
a278bfb355 Updating Dream Dex 2025-04-06 11:57:37 -04:00
Philippe Symons
93a6c0f3fe Add functionality to upload Poke Transporter GB to another gba after it has started on the current one [EZ Flash Omega]
The reason for this functionality is that some flashcarts *cough* EZ Flash Omega (DE) *cough* can't be hotswapped IN. When you try this, they will trigger a reset of the gba.
This is only relevant for the use case in which you first launch the rom from a flashcart in the first place.

I suppose this can only be relevant for flashcarts which offer "single cart mode". (mode B for EZ Flash Omega).

So, I added an option to upload the rom to another GBA from the "game_load_error" screen if you press the SELECT button.

So, with this change, you could

- launch Poke Transporter GB on GBA 1 from a flashcart.
- eject the flashcart on GBA 1
- make sure the EZ Flash Omega or other "single cart mode/mode B" capable flashcart is set to this mode.
- insert this flashcart into GBA 2
- connect GBA link cable (narrow plug on GBA 1, wide plug on GBA 2)
- Power on GBA 2 and press both SELECT and START while the gameboy logo is still shown
- On GBA 1, in the "game_load_error" screen, press SELECT
- On GBA 1, now press A -> The multiboot upload will now start
- Once finished, GBA 2 will now be running Poke Transporter GB as well
- GBA 2 will recognize the gen III save!
- You can now disconnect the GBA link cable and turn off GBA 1. (you may use it later for the GBC game alongside a GBC link cable to start the actual PKMN transfer)
2025-04-03 23:31:24 +02:00
The Gears of Progress
1ee46e1719 Resolving build warnings 2025-03-30 11:56:32 -04:00
The Gears of Progress
b267912687 Continuing box updating 2025-03-27 14:37:47 -04:00
Philippe Symons
9663c13f24 Make it work on my Supercard SD 2025-03-25 21:04:10 +01:00
Philippe Symons
7c1fed707e Don't forget to mkdir loader/data 2025-03-24 15:27:19 +01:00
Philippe Symons
75a19539ae Update the main README in this branch to make the added support more explicit.
I mean, this branch is still only a proof of concept. Not intended for merging directly. But adding it to the main README also makes
this addition show up in the branches' github page.
2025-03-24 14:24:55 +01:00
Philippe Symons
65b0e10b48 Fix bug with previous changes to execute_multiboot() 2025-03-24 14:17:01 +01:00
Philippe Symons
3d02b1aea7 Add some comments and a README 2025-03-24 14:06:38 +01:00
Philippe Symons
e10058c7d9 Proof of concept: add a loader that embeds the multiboot rom and allows to load it from a flashcart 2025-03-24 13:49:37 +01: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
af21da42b5 continuing work on updated text engine 2025-03-04 11:33:02 -05:00
The Gears of Progress
9f2dc4f653 Add a separate file for dialogue 2025-01-26 17:46:26 -05:00
The Gears of Progress
f4f64d0e07 Fixing button palette and modifying credits 2025-01-26 14:43:55 -05:00
The Gears of Progress
37ed599bc3
Merge pull request #30 from easyaspi314/master
Compress the graphics (mostly), fix potential vram memcpy issue
2025-01-26 14:09:11 -05:00
easyaspi314
1baeeab809 Regenerate symbol table
Signed-off-by: easyaspi314 <6258309+easyaspi314@users.noreply.github.com>
2025-01-17 19:51:12 -05:00
easyaspi314
e4ef25e20e Compress the graphics (mostly), fix potential vram memcpy issue
This greatly decreases the ROM size, from 245 KB to 198 KB with no visual
changes (that I am aware of)

Changes:
- Enable compression on every graphic but the Pokemon sprites (which are
  too large for the GBA to decompress).
- Change grit from emitting .s files to .c files so GCC can strip unused
  palettes and maps
- Fix the empty tiles
- Trim down the font to skip 00-1F and 80-FF which were all zeroes
  - needs a slight workaround because the Pokemon name display was printing
    an invisible FF byte
- Switch memcpy to tonccpy which is vram safe
- Limit palette sizes.

Signed-off-by: easyaspi314 <6258309+easyaspi314@users.noreply.github.com>
2025-01-17 19:32:48 -05:00
The Gears of Progress
a805bbad0a Releasing wood gecko 2025-01-11 17:23:09 -05:00
The Gears of Progress
1662ed37e3 Fixing weird split changes 2024-12-19 18:39:37 -05:00
The Gears of Progress
422641c62b Merge branch 'master' of https://github.com/GearsProgress/Poke_Transporter_GB 2024-12-19 18:27:44 -05:00
The Gears of Progress
41f7fcb1aa *Finally* fixing the EXP bug 2024-12-19 18:15:04 -05:00
The Gears of Progress
a5e4e9401c Partial rewrite 2024-12-19 16:30:08 -05:00
The Gears of Progress
b382aec0dc pre Pokemon and Party rewrite 2024-12-19 13:29:47 -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
fa56964f34 Adding in Yellow to new data transfer 2024-12-13 10:58:11 -05:00
The Gears of Progress
626a5b6666 Merge branch 'master' of https://github.com/GearsProgress/Poke_Transporter_GB 2024-12-11 18:10:44 -05:00
The Gears of Progress
6a8184d2e7 Updating Red/Blue FE/FD code 2024-12-11 18:10:43 -05:00
The Gears of Progress
a68efa20c6
Merge pull request #27 from Pyrochrome/master 2024-12-03 20:23:10 -05:00
Pyrochrome
fcf5371cea modified: source/sprite_data.cpp 2024-12-03 20:19:59 -05:00
The Gears of Progress
3b945ecf3e v1.1.0 2024-11-01 22:54:05 -04:00
The Gears of Progress
884ebc9216 Adding data packets to GSC 2024-10-31 10:59:36 -04:00
The Gears of Progress
cd2a9971a5 Adding data packets to Red/Blue 2024-10-30 14:56:44 -04:00
The Gears of Progress
9d3221ae8d Adding more debug features 2024-09-25 20:49:10 -04:00