• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other] Poketcg: How to expand rom size to allow for more cards?

EDIT: I have expanded the card size pool to 254 using the ducklett patch and some tinkering. This expansion problem is solved, but I would oike to leave it open in case someone finds a method to increase the card pool even further.


I believe I have a non noob question for once. I am trying to expand the number of pokemon cards in poketcg to at least the FF byte in constants-> card constants, as well as of course the pokemon data following that. The problem I ran into is that I can only make 2 new pokemon before this happens:

rgbasm -h -i src/ -L -Weverything -o src/main.o src/main.asm
rgbasm -h -i src/ -L -Weverything -o src/gfx.o src/gfx.asm
rgbasm -h -i src/ -L -Weverything -o src/text.o src/text.asm
rgbasm -h -i src/ -L -Weverything -o src/audio.o src/audio.asm
rgbasm -h -i src/ -L -Weverything -o src/wram.o src/wram.asm
rgblink -p 0xff -m poketcg.map -n poketcg.sym -l src/layout.link -o poketcg.gbc src/main.o src/gfx.o src/text.o src/audio.o src/wram.o src/hram.o
error: src/layout.link(83): Sections would extend past the end of ROMX ($801f > $7fff)
make: *** [Makefile:87: poketcg.gbc] Error 1

... it appears as though going up to FF in all of the aforementioned card data goes past the ROMX limitations.

I did try to use Otato's Rom back expansion, (found here for reference https://github.com/ButteredPotato/poketcg) and that appeared to work, until I tried to edit virtually anything, it goes

rgbasm -hL -I src/ -Weverything -o src/main.o src/main.asm
warning: src/main.asm(17) -> src/engine/menus/deck_configuration.asm(3495): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(150) -> src/engine/booster_packs.asm(111): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(161) -> src/data/decks.asm(501) -> src/macros/asserts.asm::card_item(27): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(161) -> src/data/decks.asm(502) -> src/macros/asserts.asm::card_item(27): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(161) -> src/data/decks.asm(717) -> src/macros/asserts.asm::card_item(27): [-Wtruncation]
Expression must be 8-bit
rgblink -p 0xff -m poketcg.map -n poketcg.sym -l src/layout.link -o poketcg.gbc src/main.o src/home.o src/gfx.o src/text.o src/audio.o src/wram.o src/hram.o
rgbfix -cjsv -k 01 -l 0x33 -m 0x1b -p 0xff -r 03 -t POKECARD -i AXQE poketcg.gbc
poketcg.gbc: FAILED
sha1sum: WARNING: 1 computed checksum did NOT match
make: *** [Makefile:55: compare] Error 1

I have no idea what "Expression must be 8-bit" is, all I know is that if I try to edit graphics with it, it doesn't process correctly and the card comes out with a random wrong palette, and the card data never saves.

And so, I turn to everyone smarter than me. Do any of you know how to either increase card count to FF, or to fix Otato's pret? Please let me know.

EDIT 11.2.23- Tried copying Otato's code exactly into a fresh rom, it just gave me more errors that I don't understand. The latest one is that it says "error: src/layout.link(3): Unknown section "rst00" " when that section is the same as the base. Also apparently the custom GFX section isn't pointed right, since I kept pasting it there but cygwin kept telling me to post it in normal gfx. This is with the old makefile.

When copying Otato's makefile, it gives me " scan_includes: unknown option -- I
Makefile:85: *** multiple target patterns. Stop.", and I have no idea what any of that is either.
 
Last edited:
I believe I have a non noob question for once. I am trying to expand the number of pokemon cards in poketcg to at least the FF byte in constants-> card constants, as well as of course the pokemon data following that. The problem I ran into is that I can only make 2 new pokemon before this happens:

rgbasm -h -i src/ -L -Weverything -o src/main.o src/main.asm
rgbasm -h -i src/ -L -Weverything -o src/gfx.o src/gfx.asm
rgbasm -h -i src/ -L -Weverything -o src/text.o src/text.asm
rgbasm -h -i src/ -L -Weverything -o src/audio.o src/audio.asm
rgbasm -h -i src/ -L -Weverything -o src/wram.o src/wram.asm
rgblink -p 0xff -m poketcg.map -n poketcg.sym -l src/layout.link -o poketcg.gbc src/main.o src/gfx.o src/text.o src/audio.o src/wram.o src/hram.o
error: src/layout.link(83): Sections would extend past the end of ROMX ($801f > $7fff)
make: *** [Makefile:87: poketcg.gbc] Error 1

... it appears as though going up to FF in all of the aforementioned card data goes past the ROMX limitations.

The error is telling you that the bank on line 83 of layout.link has too much data in it. Otato fixed this by moving the cards to their own bank (and he also renamed the section for some reason).

I did try to use Otato's Rom back expansion, (found here for reference https://github.com/ButteredPotato/poketcg) and that appeared to work, until I tried to edit virtually anything, it goes

rgbasm -hL -I src/ -Weverything -o src/main.o src/main.asm
warning: src/main.asm(17) -> src/engine/menus/deck_configuration.asm(3495): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(150) -> src/engine/booster_packs.asm(111): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(161) -> src/data/decks.asm(501) -> src/macros/asserts.asm::card_item(27): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(161) -> src/data/decks.asm(502) -> src/macros/asserts.asm::card_item(27): [-Wtruncation]
Expression must be 8-bit
warning: src/main.asm(161) -> src/data/decks.asm(717) -> src/macros/asserts.asm::card_item(27): [-Wtruncation]
Expression must be 8-bit
rgblink -p 0xff -m poketcg.map -n poketcg.sym -l src/layout.link -o poketcg.gbc src/main.o src/home.o src/gfx.o src/text.o src/audio.o src/wram.o src/hram.o
rgbfix -cjsv -k 01 -l 0x33 -m 0x1b -p 0xff -r 03 -t POKECARD -i AXQE poketcg.gbc
poketcg.gbc: FAILED
sha1sum: WARNING: 1 computed checksum did NOT match
make: *** [Makefile:55: compare] Error 1

I have no idea what "Expression must be 8-bit" is, all I know is that if I try to edit graphics with it, it doesn't process correctly and the card comes out with a random wrong palette, and the card data never saves.
I tried cloning the repo and even without any changes it produced errors.
You can see why if you look at the lines mentioned in the errors. For example this line has the expression (NUM_CARDS+1), which has a value greater than 255 and thus doesn't fit in 8 bits. If you wanted to use that branch, you would either have to delete some of the added cards or modify the game to properly work with larger than 8-bit card IDs.
 
Last edited:
The error is telling you that the bank on line 83 of layout.link has too much data in it. Otato fixed this by moving the cards to their own bank (and he also renamed the section for some reason).


I tried cloning the repo and even without any changes it produced errors.
You can see why if you look at the lines mentioned in the errors. For example this line has the expression (NUM_CARDS+1), which has a value greater than 255 and thus doesn't fit in 8 bits. If you wanted to use that branch, you would either have to delete some of the added cards or modify the game to properly work with larger than 8-bit card IDs.

I think I understand. So basically the first option of expanding the rom back as Otato is the only viable one? I don't think I'd have the skills required to modify code into greater than 8 bits.

If so, should I just copy Otato's code as you explained above, or do I need to perform extra steps to increase the card card to 255?

EDIT: Tried copying the code exactly, produced errors anyway. See OP for more info.
 
Last edited:
Back
Top