Hi.
For about a month now, I've been messing around with a GBC program in the BGB debugger. I've been trying to locate what portion of the ROM calls the game's font tileset so I can figure how how and where the game stores text info. A few areas of the ROM seem to write to the buffer and then to the screen in VRAM, but I still can't figure out what is actually calling the tileset.
Another approach I've made is finding the addresses for the font tileset in Windhex, but sadly I don't know how to locate the same address in BGB debugger because the two programs don't display addresses in the same way. My intent was to take the Hex data for the tilesets and do a relative search for text strings. I've tried searches for ASCII strings, but those came up nothing, so I think the text may be compressed in some way, but I can't be sure.
I'm probably lacking some integral knowledge, and I know that many games store text in different ways, but I was hoping to pick up some advice here.
Btw, the game is "Dragon Ball Z: Legendary Super Warriors".
Thanks for your time.
In Game Text Editing
Re: In Game Text Editing
Access breakpoints are your friends.
General procedure: Use a write type access breakpoint for a position or range in VRAM. This could be in tile or map memory depending on the routine. Figure out where that gets its data from and what it does. Sometimes you might need to do this in two steps, if the print routine is divided into two pieces, one that prepares the data and then one that writes it to VRAM.
General procedure: Use a write type access breakpoint for a position or range in VRAM. This could be in tile or map memory depending on the routine. Figure out where that gets its data from and what it does. Sometimes you might need to do this in two steps, if the print routine is divided into two pieces, one that prepares the data and then one that writes it to VRAM.
Re: In Game Text Editing
I set breakpoints for Vram values 9000-9230 (bottom right tile memory), as seen here:nitro2k01 wrote:General procedure: Use a write type access breakpoint for a position or range in VRAM. This could be in tile or map memory depending on the routine.
However, breakpoints here don't halt emulation or show how Vram is getting the tiles. However, another portion of the Vram that seems to determine what tiles that are loaded into the vram buffer appear onscreen:
The underlined potions are what control what Vram tiles are being drawn. In this case, Vram tiles 00-03 are active, making a four-character word, and the rest are blank. Sadly, the latter doesn't tell me from where Vram is getting tile info, just what is going to be put onscreen.
Any thoughts?
Re: In Game Text Editing
Ah! On GBC, there's a VRAM DMA function for copying data into VRAM. There's a bug/missing feature a in BGB where an access breakpoint doesn't trigger when the access is made by the DMA, and not by the CPU. Track writes to FF55 to see when the transfer starts. The other registers will tell you the memory source and destination. You can see this information in the right side of the BGB IO window. (Press F10 when you're in the debugger window to open it, or open it using the window menu.)
You can read about the DMA function here:
http://nocash.emubase.de/pandocs.htm#lc ... erscgbonly
And knowing this, you can remove the X and J, and perhaps the R, flags from the access breakpoint.
You can read about the DMA function here:
http://nocash.emubase.de/pandocs.htm#lc ... erscgbonly
And knowing this, you can remove the X and J, and perhaps the R, flags from the access breakpoint.