Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → [pokered] Separating data/evos_moves.asm from engine/evos_moves.asm

#1 2018-02-19 00:43:04

knuxyl
Member
Registered: 2018-02-14
Post 4/15

[pokered] Separating data/evos_moves.asm from engine/evos_moves.asm

I am trying to separate these two files [data/evos_moves.asm] and [engine/evos_moves.asm] but I can't seem to get anywhere. The include for data/evos_moves.asm is at the bottom of the engine file, therefore within the same rom bank.

I need data/evos_moves.asm in it's own bank due to the amount of data it could potentially use up. I ran into this problem with expand-dex repo from ShantyTown.

In the code I see it loads the address of EvosMovesPointerTable into hl and works from there. I'm not sure if I need to switch rom banks (which I don't know how to do yet) or if the code working with the address is arbitrary and not dynamic and needs to be changed.

My final goal is to have the ability to add gen 2-7 pokemon into the game without editing asm code excluding info about the pokemon. Main problem with expand-dex is constant space issues, which is why I'm trying to separate evos_moves data from the engine. I have not made pokemon id's or index 2 bytes yet, I want everything else worked out first. I'm working with pret/pokered official, no changes except some things I've done which isn't much.

I've separated baseStats just fine with some cp $98 to wD0B5 etc, but that type of routine with evos_moves does not seem to be working. The furthest I've got is Squirtle learned TM34 at level 8, which should've been bubble. I think all 8** pokemon evos_moves data will fit into one bank, so I don't need to split the generations, just split the data from the engine.

Last edited by knuxyl (2018-02-19 00:46:27)

Offline

#2 2018-02-21 17:19:24

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

Re: [pokered] Separating data/evos_moves.asm from engine/evos_moves.asm

There are only two files that read from EvosMovesPointerTable; engine/evos_moves.asm and engine/menu/party_menu.asm

engine/menu/party_menu.asm already loads the bank dynamically, so you don't have to change that code if you move data/evos_moves.asm to a new bank.

in engine/evos_moves.asm there are 3 routines that would need to be modified to look in the new bank for data/evos_moves.asm
Evolution_PartyMonLoop, LearnMoveFromLevelUp, and WriteMonMoves

My first thought would be to take advantage of FarCopyData to make these three routines dynamically read from the right bank.

Offline

#3 2018-02-22 16:28:50

knuxyl
Member
Registered: 2018-02-14
Post 5/15

Re: [pokered] Separating data/evos_moves.asm from engine/evos_moves.asm

Danny-E 33 wrote:

There are only two files that read from EvosMovesPointerTable; engine/evos_moves.asm and engine/menu/party_menu.asm

engine/menu/party_menu.asm already loads the bank dynamically, so you don't have to change that code if you move data/evos_moves.asm to a new bank.

in engine/evos_moves.asm there are 3 routines that would need to be modified to look in the new bank for data/evos_moves.asm
Evolution_PartyMonLoop, LearnMoveFromLevelUp, and WriteMonMoves

My first thought would be to take advantage of FarCopyData to make these three routines dynamically read from the right bank.

Ok I haven't looked at FarCopyData yet, I've seen it elsewhere but wasn't sure what it does. Thanks for the tip. Separating the pointer table data from the engine and editing the pokedex seems to be the last changes needed to be able to have 16,000 pkmn.

Offline

  • Index
  • → Help/Question
  • → [pokered] Separating data/evos_moves.asm from engine/evos_moves.asm

Board footer

Powered by FluxBB