Memory manufacturers and AAA game studios hate her!
With some clever rearranging, PTGB now uses only 36 KiB of the 64 KiB
BG VRAM. This means the remaining 28 KiB is free to use in the future.
Caveats: The flex tileset must not use more that 6 KiB. There is a check
for it added.
VRAM Map
06000000 - 06000800 ( 2K): Eternal backdrop and textbox tileset
06000800 - 06002000 ( 6K): Flex BG tileset
06002000 - 06002400 ( 2K): BG0: Backdrop tilemap
06002800 - 06003000 ( 2K): BG1: Flex BG tilemap
06003000 - 06003800 ( 2K): BG2: Textbox tilemap
06003800 - 06004000 ( 2K): BG3: Text tilemap
06004000 -~06009000 (20K): Text rendering bitmap
06009000 - 06010000 (28K): Free work RAM
06010000 - 06018000 (32K): Sprite tileset
Additionally:
- Explicitly clear VRAM on boot
- Dirty workaround to fix box drawing buffer overflow.
- Flex backgrounds use a table instead of a huge switch statement
- Textbox tile IDs are now const u16[] instead of int[]
This adds a lot of the debug_mode.h options as an option you can modify at runtime.
I also moved both the text debug screen and the regular debug info screen in there.
And I added an option to start song playback.
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>