Blaze Union VWF Development

This is a place to post tech details and informative documents about romhacking PSP games.
Post Reply
Posts: 997
Joined: Mon Mar 09, 2015 3:03 pm

Blaze Union VWF Development

Post by flamethrower » Tue Jul 02, 2019 4:30 am

So you see under RAM map that:
1) Loading the text at 0x088A2A6C
2) Loading something about the spacing at 0x088A3858

Setting breakpoints at those two locations:
#1 gets called only once for each letter. It is converting the letter into some sort of drawing data.
#2 gets called once for each letter that's currently on the screen. But only when the screen contents change.

I noticed that character names and descriptions are in a larger font than the main text. 24 pixels for this versus 20 pixels for text in the box. The font itself is 24 pixel squares. Can I change the font size? Each type has a 2-pixel overlap.

It's going to take a lot of work to convert this to VWF. Normally in games, it reads letters the same number of times as it draws letters. But this game doesn't. It reads letters a lot less than it draws them. Also unusual is that this game has letters on multiple pages (there's more than one font page).

Here we go.
The branch at 0x88A3844 seems to be taken most of the time.
In case it wasn't clear, mflo is reading the result of the previous multiplication.
Pay careful attention to the multiplies. This is a fixed with algorithm. You would never multiply anything regarding the x-direction for a variable width font!

The first order of business is to change it to avoid the multiplication in the x-direction. The y multiplication can be kept because it's not hurting anything. What to put instead of multiplication? Let's try the following subroutine, written in human language. Later I'll try converting it to assembly.

If the character x position is zero, the answer is the x position offset. It's getting read at 0x88A3874 above.
If the character position is not zero, the answer is the position at the right of the previous character box minus 2. Minus 2 just to preserve the way it currently looks.
When finished drawing the current character, record in memory the position at the right of the current character.

The vwf part goes in the ... in the above pseudo code. Basically we need to try to detect what character it is and then adjust the "minus" in the above pseudocode based on the character, or just use -2 if none of our characters are detected.

User avatar
Posts: 84
Joined: Fri Apr 17, 2015 10:32 am
Location: Chicago, IL, USA

Re: Blaze Union VWF Development

Post by NightWolve » Sun Jul 21, 2019 9:00 pm

PSP Assembly code, yikes! Looking like you're having fun there!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest