Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-09-02 16:03:15

Gallego13
Member
Registered: 2011-12-11
Post 49/94

Help repointing Weakness/Strength type table

Well, I decided to add two new types (Order and Chaos) and in order to do so I have to repoint the Type table.
I know that there are two ASM routines that call the table; the pointers to the table are located at 0x34890 and 0x34935. I have already copied my extended table to 0x993B0 (in Bank 26).

I have already found and read this tread over and over again; changed both pointers from 21 01 4D to 21 A0 7F (to make them point to 0x37FA1, where there is some free space at the end of the bank) and wrote a bankswitch code like this:

ld a,26     ; 3E 26
ld hl,$53B0 ; 21 B0 53
rst $08     ; CF

But it did nothing at all...

I think the three next bytes (2A FE FF) have also something to do with the table because if I change any of them, the game crashes when it's calculating the damage, but after the FF it's another code that doesn't affect the table (as far as I know).

¿Does anyone know what could I do? Koolboyman repointed succesfully the Type table in Prism so I know it can be done :P

Offline

#2 2012-09-02 18:05:34

Miksy91
Member
Registered: 2010-10-16
Post 1,074/2,306

Re: Help repointing Weakness/Strength type table

What you're trying to do here won't work, not without transfering the assembly whole type table loading to another rom bank. You see, the "pointer" 01 4D there is actually what is loaded in register pair hl with command 21. hl is loaded afterwards when more code is accessed but the program doesn't start "checking" how type table works when ld hl,$table is hit.

I'd find a way to transfer the data following the type table elsewhere if I was to add more types to my hack. I could check this out later if no one else does.

Offline

#3 2012-09-04 13:45:55

Gallego13
Member
Registered: 2011-12-11
Post 50/94

Re: Help repointing Weakness/Strength type table

After trying a lot of things, I've arrived to the conclusion that the routine after the table doesn't seem to have any pointers, which means I'd have to modify much more ASM.

The only solution I see is to look where is that routine called from and change the pointer to move the whole routine to Bank 26 and then change the 2-byte pointers to point the expanded table at 993B0.
Now... ¿Where is the routine called from? That could do it :3

Offline

#4 2012-09-21 21:47:36

Gallego13
Member
Registered: 2011-12-11
Post 57/94

Re: Help repointing Weakness/Strength type table

I'm still stuck ¿Anyone has an idea of how can I do it?
All the data after the table can't be repointed...

Offline

Board footer

Powered by FluxBB