It is currently Sun Oct 22, 2017 11:21 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: In Game Text Editing
PostPosted: Wed Aug 28, 2013 1:15 pm 
Offline

Joined: Wed Aug 28, 2013 12:58 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject: Re: In Game Text Editing
PostPosted: Wed Aug 28, 2013 2:22 pm 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 190
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.


Top
 Profile  
 
 Post subject: Re: In Game Text Editing
PostPosted: Wed Aug 28, 2013 3:08 pm 
Offline

Joined: Wed Aug 28, 2013 12:58 pm
Posts: 2
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.


I set breakpoints for Vram values 9000-9230 (bottom right tile memory), as seen here:

Image

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:

Image

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?


Top
 Profile  
 
 Post subject: Re: In Game Text Editing
PostPosted: Thu Sep 05, 2013 5:38 am 
Offline

Joined: Sat Aug 28, 2010 9:01 am
Posts: 190
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. ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group