Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#51 2011-11-22 06:09:12

zhengwei
Member
Registered: 2011-08-18
Post 118/140

Re: how to add new pokemon?

Tauwasser wrote:

Well, you found the current table addresses and where these tables are copied. Just edit the ASM a little so it calls 00:0DCD with the attributes mentioned above to successfully copy the table. Make sure you don't confuse rom banks.

cYa,

Tauwasser

I give up to repoint the evolution/move table to another bank. Maybe many codes will call it, so the code repoints to another bank is wrong.
Instead that I repoint the ABC order and NEW order to another bank. it's successful.
Thanks.
Next problem is how to add the pokepic?

Offline

#52 2011-11-22 06:55:12

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 198/649

Re: how to add new pokemon?

zhengwei wrote:
Tauwasser wrote:

Well, you found the current table addresses and where these tables are copied. Just edit the ASM a little so it calls 00:0DCD with the attributes mentioned above to successfully copy the table. Make sure you don't confuse rom banks.

cYa,

Tauwasser

I give up to repoint the evolution/move table to another bank. Maybe many codes will call it, so the code repoints to another bank is wrong.
Instead that I repoint the ABC order and NEW order to another bank. it's successful.
Thanks.
Next problem is how to add the pokepic?

By using AgiXP. If for new slots, than you have a lot of repointing to do. Or use the offset of that new pokemon and type it into AgiXP when inserting.

Although I'm just assuming here.


Pokemon Blue DX is reborn!

Offline

#53 2011-11-22 18:33:46

Tauwasser
Member
Registered: 2010-10-16
Post 232/448

Re: how to add new pokemon?

zhengwei wrote:

Maybe many codes will call it, so the code repoints to another bank is wrong.

This is the actual problem. You cannot repoint one routine and edit just one pointer. That won't work.

However, what you want to do is much simpler. For instance, the current code at 10: is:

ld de, $4D60 ;; source
ld hl, $C5D0 ;; destination
ld c, $FB    ;; length
@4BFE:       ;; copy loop
ld a, [de]
inc de
ldi [hl], a
dec c
jr nz, @4BFE
call $4C18   ;; determine highest index of seen Pokémon
ret

Now I told you to use a call 0x0DCD. Its arguments are source= a:hl; destination = de; length = bc;

So, assuming you wrote your new table at 56:4321, you just shuffle the stuff around a bit:


ld de, $C5D0 ;; destination
ld hl, $4321 ;; source pointer
ld a, $56    ;; source rom bank
ld bc, $00FC ;; (new) source length
call $0DCD   ;; copy bc bytes from a:hl to de
call $4C18   ;; determine highest index of seen Pokémon
ret

You actually also manage to keep the code the same size this way :) It's very simple :D Hope this helps.

cYa,

Tauwasser

Offline

#54 2011-11-23 02:44:04

zhengwei
Member
Registered: 2011-08-18
Post 119/140

Re: how to add new pokemon?

tysonrss wrote:
zhengwei wrote:
Tauwasser wrote:

Well, you found the current table addresses and where these tables are copied. Just edit the ASM a little so it calls 00:0DCD with the attributes mentioned above to successfully copy the table. Make sure you don't confuse rom banks.

cYa,

Tauwasser

I give up to repoint the evolution/move table to another bank. Maybe many codes will call it, so the code repoints to another bank is wrong.
Instead that I repoint the ABC order and NEW order to another bank. it's successful.
Thanks.
Next problem is how to add the pokepic?

By using AgiXP. If for new slots, than you have a lot of repointing to do. Or use the offset of that new pokemon and type it into AgiXP when inserting.

Although I'm just assuming here.

48000-485DF Pointers to Pokepics
485E0-4BFFF Pokemon Graphics
54000-83FFF Pokemon Pics
I have used the AgiXP for No.252 pokemon.
the pointer table is 3 bytes pointer for each, one is for frontpic other is for backpic ,so threr are 251 pointers. I just add the 252 pointer after the 251th pointer. But it can't work. Maybe some codes will edit?
pokepic in battle ,in pokedex, in menu. Where are these routines?

Offline

#55 2011-11-24 07:28:41

zhengwei
Member
Registered: 2011-08-18
Post 120/140

Re: how to add new pokemon?

The 12:4000 is pointer table that points to pokepic, so I think many routines will call it for pokepic.
I search:
ld a,$12
rst $10
or
ld a,$12
ld hl,$4000
rst $8
one hex is 3e12d7, the other is 3e12210040cf.
Why can't I find them?

Offline

#56 2011-11-24 17:34:00

Tauwasser
Member
Registered: 2010-10-16
Post 234/448

Re: how to add new pokemon?

Because they are not read by switching banks like this. You should find it when looking for

ld a, $12
call $00AB

Use of rst $10 and call $00AB is not used in all routines.
cYa,

Tauwasser

Offline

#57 2011-11-25 04:32:35

zhengwei
Member
Registered: 2011-08-18
Post 121/140

Re: how to add new pokemon?

Tauwasser wrote:

Because they are not read by switching banks like this. You should find it when looking for

ld a, $12
call $00AB

Use of rst $10 and call $00AB is not used in all routines.
cYa,

Tauwasser

Why are there a huge of nop instructions at 0x00ab.
using it is right?

Offline

#58 2011-11-25 07:39:18

zhengwei
Member
Registered: 2011-08-18
Post 122/140

Re: how to add new pokemon?

Tauwasser wrote:

Because they are not read by switching banks like this. You should find it when looking for

ld a, $12
call $00AB

Use of rst $10 and call $00AB is not used in all routines.
cYa,

Tauwasser

I find something when looking for

ld a,$12
call $xxyy

the hex is 3e12cd.
the routine at 14:5878 sounds like call 12 bank pointer table that points to pokepic. I think it will be called when opening the menu. But I still don't know functions of some other routines in it.
the instrucion at 14:587d:

ld l,$ff

I don't know its meaning, because instruction at 14:5881:

ld hl,$4000

this instruction will assign the L regsiter to another value, so I think the instruction at 14:587d will do nothing, but when I remove this instruction the game will crash, I don't konw what happened.

Last edited by zhengwei (2011-11-25 08:15:28)

Offline

#59 2011-11-25 17:21:23

zhengwei
Member
Registered: 2011-08-18
Post 123/140

Re: how to add new pokemon?

Tauwasser wrote:

Because they are not read by switching banks like this. You should find it when looking for

ld a, $12
call $00AB

Use of rst $10 and call $00AB is not used in all routines.
cYa,

Tauwasser

I found the problem that confuses me. Adding the new pokepic for No.252 is solved.

Offline

#60 2011-11-25 18:12:50

Tauwasser
Member
Registered: 2010-10-16
Post 235/448

Re: how to add new pokemon?

Ah, sorry, wrong call for the wrong game :D

Yep, you got it right. It's loading the data byte-wise from another rom bank.

cYa,

Tauwasser

Offline

#61 2011-11-25 18:43:07

zhengwei
Member
Registered: 2011-08-18
Post 124/140

Re: how to add new pokemon?

Tauwasser wrote:

Ah, sorry, wrong call for the wrong game :D

Yep, you got it right. It's loading the data byte-wise from another rom bank.

cYa,

Tauwasser

Last problem is how to chang the footprint? Any other problems have been solved.
The footprint of No.252 is very strange. There are 252 in it.

Offline

#62 2011-11-26 08:14:26

zhengwei
Member
Registered: 2011-08-18
Post 125/140

Re: how to add new pokemon?

Tauwasser wrote:

Ah, sorry, wrong call for the wrong game :D

Yep, you got it right. It's loading the data byte-wise from another rom bank.

cYa,

Tauwasser

I tested my hack ROM, now there are two problems.
first: how to change the footprint.
second:I assgined the 0xff to No.252, so it's no gender,but acutally it always is male.

Offline

#63 2011-11-26 12:56:16

Tauwasser
Member
Registered: 2010-10-16
Post 236/448

Re: how to add new pokemon?

The footprints are uncompressed in the ROM, just look for them.
The gender should always work... Make sure you put the 0xFF at the right spot and not into the item slot.

cYa,

Tauwasser

Offline

#64 2011-11-26 15:57:38

zhengwei
Member
Registered: 2011-08-18
Post 126/140

Re: how to add new pokemon?

Tauwasser wrote:

The footprints are uncompressed in the ROM, just look for them.
The gender should always work... Make sure you put the 0xFF at the right spot and not into the item slot.

cYa,

Tauwasser

Something wrong with my code, I just repoint the gender code to another place, the no gender is right. final problem is footprint, do you tell me how to change it?

Offline

#65 2011-11-28 06:13:03

zhengwei
Member
Registered: 2011-08-18
Post 127/140

Re: how to add new pokemon?

Tauwasser wrote:

The footprints are uncompressed in the ROM, just look for them.
The gender should always work... Make sure you put the 0xFF at the right spot and not into the item slot.

cYa,

Tauwasser

The problem of footprint has been solved, so all problems have been solved. Adding new pokemon to generation II is successful.
Thank you again.

Offline

#66 2011-12-01 08:49:05

zhengwei
Member
Registered: 2011-08-18
Post 133/140

Re: how to add new pokemon?

Offline

#67 2014-02-22 08:24:57

Chamber_
Member
Registered: 2013-12-31
Post 19/119

Re: how to add new pokemon?

zhengwei wrote:
Tauwasser wrote:

Because they are not read by switching banks like this. You should find it when looking for

ld a, $12
call $00AB

Use of rst $10 and call $00AB is not used in all routines.
cYa,

Tauwasser

I found the problem that confuses me. Adding the new pokepic for No.252 is solved.

I don't understand how the problem was resolved.

Someone could help me?

I need add the 252 and 254 pokepic.

Last edited by Chamber_ (2014-02-22 08:25:47)

Offline

Board footer

Powered by FluxBB