You are not logged in.
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
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.
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