News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Locating Tile Data - Dragon Warrior Monsters! [GBC]  (Read 849 times)

jonahstrix

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Locating Tile Data - Dragon Warrior Monsters! [GBC]
« on: June 21, 2018, 02:46:46 pm »
I have most of what I need to mod this game. I'm looking for any help or advice to try to locate the tile sprite data. Each npc, monster has it's own 16x16 sprite but I'm not sure where these are paired. I want to be able to change the assigned tile sprite of the hero, npc and event characters/bosses.

June 21, 2018, 05:09:02 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I found the location of the sprite data. All I need is to figure out where npcs and bosses are assigned this value.
« Last Edit: June 21, 2018, 05:09:02 pm by jonahstrix »

FAST6191

  • Hero Member
  • *****
  • Posts: 2504
    • View Profile
Re: Locating Tile Data - Dragon Warrior Monsters! [GBC]
« Reply #1 on: June 22, 2018, 05:05:37 am »
Two main options
1) Run it through with assembly.
Make a savestate before the boss is started (check any vram viewers just in case)
Set a break on read for the location in the ROM. You will then find the instruction that fetches that and the few before.
Work back through that and you will find out where it initially comes from in the game, depending upon the style of game it can vary (a simple platformer might be all in the code, a RPG with hundreds of enemies will likely be a table).
If it always lands in the same location in VRAM you can also do a break on write for that and work backwards.

2) Hope for a pointer.
The game itself will likely first copy it into VRAM and then do all its operations from there. If you know the location of the thing in ROM then you can look through the game for any references to that location, the GB/GBC's MBC addressing thing ( http://bgb.bircd.org/pandocs.htm#memorybankcontrollers ) can make this a tad more complicated than some other systems where all the game is visible in memory at all times but it should still be doable. More effective in the RPG with hundreds of enemies scenario but certainly not exclusive to it.

If it is a table approach then it will tend to follow a pattern of sorts (can be anything from one pointer after another to just another entry in the stats table). For something more embedded into the code there might still be an easy pattern.

jonahstrix

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Locating Tile Data - Dragon Warrior Monsters! [GBC]
« Reply #2 on: June 23, 2018, 10:15:32 pm »
Thanks for your input. I already have access to the monster stat tables. I have seen the boss go from the wrong sprite to the correct sprite after a story sequence so I know these values are saved in the story scripting. I just realized my hex editor has Find All so I'm going to cross my fingers and hope I can find the references.

Are there any tools for searching and editing string data?


jonahstrix

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
GBC Assembler
« Reply #3 on: July 08, 2018, 11:03:03 pm »
I am trying to figure out event rewards and treasure chest in DWM2 - Cobi's Adventure. I know all of the ids for the items I want to change and I am able to obtain them by changing VRAM values, but I want to change the value in the ROM. I'd like help finding a resource on GBC assembly and creating breakpoints. It should be very easy to change treasure chest contents if I can find the values in the ROM. How is this done using advanced tools?

How do you set a breakpoint on input, if I want to step through everything after pressing A
« Last Edit: July 09, 2018, 12:42:03 am by jonahstrix »

jonahstrix

  • Jr. Member
  • **
  • Posts: 23
    • View Profile
Re: Locating Tile Data - Dragon Warrior Monsters! [GBC]
« Reply #4 on: July 08, 2018, 11:05:22 pm »
What tool were you describing for stepping through the assembly?