Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2013-04-14 12:30:39

80C
Banned
Registered: 2013-03-16
Post 136/1,257

Pokemon Trading Card Game (GBC) Hacking Topic

Since this game is a kind of "spin-off" in the main series, I posted it in this section.

I searched in this site something about, I've found something that it's linked with, but I haven't found a very own topic that contains a detailed explaination of the Trading Card Game for GBC hacking, so I decided to post it here and, if someone is interested with, someone can post everything he knows about it, so every user could learn from this topic.
It's ok with it?

The only hack I've found is a hack that has Red as a Player, exept that I've found nothing else.


I left this forum.

Offline

#2 2013-04-21 20:22:44

Luigi-San
Member
Registered: 2010-10-16
Post 114/129

Re: Pokemon Trading Card Game (GBC) Hacking Topic

There's also a hack that has Mint (the female player character in TCG2) as the player character: http://www.romhacking.net/hacks/700/

Offline

#3 2013-04-21 20:47:42

80C
Banned
Registered: 2013-03-16
Post 214/1,257

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Hahaha, thanks bro!
I didn't know that!

(Maybe I'll feature Mint in one of my hacks, stay tuned!)

Anyway, as far as I observed, the TCG hacking didn't gone so far as Player changing or translation (the most famous: Pokemon TCG2 in english, it should be nice, I got it today, I should prove it).

I was searchin around and I discovered everyone, from Bulbapedia to Data Crystal, that TCG should be a bit more investigated about hacking, so I thought: why don't let Skeetendo Forums know about this?
Skeetendo Forums may have the honour of have the first complete hacking experience of TCG (not only player but also Region, Cards, asm etc.).

That game is nice, a hack of it would be amazing.


I left this forum.

Offline

#4 2013-04-21 22:17:10

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,437/3,580

Re: Pokemon Trading Card Game (GBC) Hacking Topic

I tried to look into hacking it back in the day, but never figured much out. I had the hex values for the different cards from experimenting with the gameshark and cheating to get certain cards in booster packs, so I spent some time trying to figure out the format of the decks people used in the game to see if I could edit them. (Since that was the main part of gameplay, it seemed more important than editing the maps). But I never figured it out (and didn't super know what I was doing back then, either).

Offline

#5 2013-04-22 08:48:26

80C
Banned
Registered: 2013-03-16
Post 221/1,257

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Do you still have some of these hex values?
We could continue that search and maybe one day we'll find something...
About TCG hacking...

I think the first step is expand the ROM (I'll try it soon), set the checksum correctly and see what happens, with more space left some changes could be made, but I don't have absolutely any knowledge about TCG's data...

I've got 1 question about the "running shoes":
Did someone tried to use the same routine of TCG in Gold or Red? (by comparing).
It should work a bit differently, because I haven't seen any bike in TCG, so the routine may be a bit different.


I left this forum.

Offline

#6 2013-04-22 11:15:51

Miksy91
Member
Registered: 2010-10-16
Post 1,625/2,339

Re: Pokemon Trading Card Game (GBC) Hacking Topic

80C wrote:

I've got 1 question about the "running shoes":
Did someone tried to use the same routine of TCG in Gold or Red? (by comparing).
It should work a bit differently, because I haven't seen any bike in TCG, so the routine may be a bit different.

The routine actually has to be totally different.

The reason, why you may be able to use a simply modified version of the routine KBM made for Gold in R/B/Y, is that it's possible that "how fast the player can take a step" may be programmed in a similar way - depending on the sprite number of the main player.

In G/S/C, it should check whether player's sprite is its walking sprite and if it is, make you move in "normal speed".
And instead if player's sprite is its bicycle sprite, make you move at quicker pace.

KBM's running shoes routine simply writes [player is using bicycle sprite] to a certain ram location each time you try to take a step and B button is pressed down. Afterwards, the game will check whether the value in this ram location is [player is using walking sprite] or [player is using bicycle sprite].

Last edited by Miksy91 (2013-04-22 11:18:01)

Offline

#7 2013-04-22 14:44:34

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,438/3,580

Re: Pokemon Trading Card Game (GBC) Hacking Topic

80C wrote:

Do you still have some of these hex values?

I think I do, I'll have to look. Might take a bit, since they aren't stored in a text file but written on sheets of paper. Why can't real life have CTRL + F? Haha.

Last edited by Mateo (2013-04-22 14:45:25)

Offline

#8 2013-04-23 20:08:39

80C
Banned
Registered: 2013-03-16
Post 223/1,257

Re: Pokemon Trading Card Game (GBC) Hacking Topic

I believe the same thing, exept I think life hasn't also F1 most of the times.


I left this forum.

Offline

#9 2013-05-22 22:04:42

Drenn
Member
Registered: 2013-05-22
Post 1/61

Re: Pokemon Trading Card Game (GBC) Hacking Topic

I did a bit of hacking for this game a while back, but moreso its sequel (I made an rhdn thread for that). I made a c++ program to edit some card data, it's not very good, but I have some notes on it too. I could post a link to it if you like.

Last edited by Drenn (2013-05-22 22:06:29)

Offline

#10 2013-05-22 22:12:53

80C
Banned
Registered: 2013-03-16
Post 596/1,257

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Wow, it would be great.
In fact, this is the first time I've heard (not only myself but probabilly many other) or read of TCG more-deep hacking.

The Notes (as well as the program) may be useful...
ok, you could post that link!


I left this forum.

Offline

#11 2013-05-22 22:43:28

Drenn
Member
Registered: 2013-05-22
Post 2/61

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Eh, I can't get it to compile anymore. It was using wxWidgets which I don't remember how to use, and I think I messed with it earlier trying to make it compile (and failing)... anyway, here's my notes, with the gibberish I couldn't even understand cut out.

Charmander video starts at 0xccf28
Charmander's palette at 0xcd229, video immediately before
Card images start at 0xc4000, each 0x308 bytes
CE23->: palette data loaded to RAM

Text pointers start at 0x34000
3 bytes each: LOW, HIGH, BANK
where BANK is multiplied by 4, then added with 0xD and the upper 2 bits of HIGH.
HIGH is of course ANDed by 0x3F and set to point to switchable bank.
ALL strings start with 0x06 and end with 0x00. Most need manual line breaks.


Every card appears to take exactly 0x41 bytes.

0x30e28 = start of bulbasaur card data

-- CARD DATA START
0   - Pokemon type (see type table)
1   - tile index
3   - name index
5   - rarity
6   - set
7   - ???
8   - HP (Measured in ones, but should be a multiple of 10)
9   - Evolution: 00-02 = basic - evolved, 03 = trainer card?? (probably meant to be under 3)
10  - POINTER to the NAME of the pokemon it's evolved from. Appears to have the actual effect of permitting evolution as well.

-- An attack is 19 bytes long
12  - Attack 1 energies : each nibble is how many of a type, follows type table ID order.
16  - Attack 1 name
18  - Attack 1 description
20  - Attack 1 damage (in ones)
More stuff...
-- Repeat for attack 2

50  - retreat cost
51  - weakness (type table bits)
52  - resistance (type table bits)
53  - kind (eg. "Seed Pokemon")
55  - Number
56  - ???
57  - Level
58  - Length (feet, inches)
60  - Weight in tenths of a pound
62  - Pokemon description
64  - ???
-- END

IVYSAUR
0x30e6d - name
0x30a79 - attack 1 name


Card data is copied to ram at CEDA onwards... probably...
description string pointer ends up at 0xcc2e.
Image index at cc25-26, later multiplied by 8. Bank is H>>3 before multiplication.

TYPE TABLE

        None    Fire    Grass   Lightning   Water   Fighting    Psychic Normal
ID              00      01      02          03      04          05      06
BIT     0       7       6       5           4       3           2       1

You might also be interested in my tcg2 notes. I hacked in a missingno. card so I understand it much better. Some of the unknowns above can probably be deduced by cross-checking with tcg2's card format.

=== Card data ===
    Loaded to 0xcc32 (sometimes 0xcc74).
    Pokemon cards are 0x42 bytes long. Energies and trainer cards are 0x10 long.
    Table of cards is at 17:4000 (ignore first "card"). Limit is 0x200 cards.
--- Pokemon Card Data: ---
00:        Type (if less than 8, consider the card a pokemon; otherwise, it's a trainer/energy card with a different format)
01+:    gfx data (pointer with special format)
03+:    name (text index)
05:        Rarity
06:        Set
07:        Booster Pack
08+:    Card Index (rarely used, but it should match with the card's actual index)
0A:        HP
0B:        Evolution state
0C+:    Pokemon it evolves from (text index)
--- Attack (0x13 bytes) ---
0E-11:    Attack Energies
12+:    Attack name (text index)
14+:    Attack description 1 (text index)
16+:    Attack description 2 (text index)
18:        Attack damage
19:        "Kind" of attack (good values: 0 = normal; 1 = plus sign; 2/3 = minus sign; 4 = pokemon power; etc)
1A+:    Codetable
1C-1F:    AI flags
20:        Animation
--- Repeat for attack 2 ---
34:        Retreat cost
35:        Weakness (not the same format as "type"; each bit = one type, so there can be multiple weaknesses)
36:        Resistance (same format as weakness)
37+:    Kind (ex. "Seed Pokemon") (text index)
39:        Pokedex Number
3A:        Dark/Not Dark
3B:        Level
3C:        Length (tenths of a metre)
3D+:    Weight (tenths of a kilogram)
3F+:    Pokemon description (text pointer)
41:        Bit 4 = can/can't evolve; but in effect, it doesn't seem to influence evolution. I don't know what the other bits are.

Last edited by Drenn (2013-05-22 22:58:01)

Offline

#12 2013-06-09 21:48:19

80C
Banned
Registered: 2013-03-16
Post 676/1,257

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Lots of thanks!
These are the first information about internal data of TCG I ever saw!

Sorry, I forgot to answer, I would say this is very nice!


I left this forum.

Offline

#13 2016-05-29 18:22:29

Fotomac
Member
Registered: 2015-10-25
Post 214/332

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Sorry for the necro, I'm not sure how stuff like this works around here, and I too am looking into hacking poketcg and was directed here, so... here I am.

Anyway... I just did some snooping around based on the info I saw here, and I discovered that there are six labeled PROMOTIONAL | GB, including the cards I wish to make available without Card Pop!. Could the set type have anything to do with how a card is available in-game? Also... I'm wondering how to include the option to choose between genders, a la Card GB2.

Offline

#14 2016-05-30 02:19:09

Danny-E 33
Administrator
Registered: 2012-06-09
Post 953/1,119

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Unfortunately, to be honest, both of these things would be way easier to accomplish if more of the asm was disassembled. But most the progress has been on data, like music, graphics, text, card and deck structures.
There's a ton of code that isn't disassembled, and even a lot of what is disassembled isn't really commented. I still want to work more on poketcg, but I have too many hobbies right now.
Any contributions are welcome, if you want to help it along.

Offline

#15 2016-05-30 09:43:20

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 381/450
Website

Re: Pokemon Trading Card Game (GBC) Hacking Topic

Danny-E 33 wrote:

I still want to work more on poketcg, but I have too many hobbies right now.

Me irl

I did some of the duel engine disassembly; it was fun, but also absorbing and time consuming. I don't know if I'm going to get back to it in the near future but it would be nice if we had more contributors regardless.

Last edited by Crystal_ (2016-05-30 09:43:41)

Offline

Board footer

Powered by FluxBB