Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blaze Union- Reverse Engineering Text Drawing
12-12-2015, 02:02 PM (This post was last modified: 12-12-2015 05:48 PM by flame1234.)
Post: #1
Blaze Union- Reverse Engineering Text Drawing
   

The goal is to find the spot where horizontal text spacing is being set to allow for VWF. I already adjusted the font texture such that each letter is left-aligned to its texture tile.

Now, considering the above image.
Okay, so we have to draw 32 rectangles.
Where are the target coordinates being read from (for each rectangle)?
If I knew that, I could set a write breakpoint there to see where it's being written.

I tried searching for the answer but didn't find anything useful. Even if you can only suggest search terms to help me find the answer, that would be helpful.

I counted 18 pixels between each letter.
In the font map, it is 20x20 tiles so they overlap slightly.
------------------------
Wow I'm an idiot. It's the VADDR thing, that's where the rectangle coords are located.
Alright, I've got to work more on this before needing more help.
------------------
Is there documentation of how the rectangle drawing program works?
   
For the texture:
Starting address (x) for the "a" tile (first letter) is 0x14, ending address (x) is 0x28.
Starting address (y) is 0x3C, ending address 0x50.
For the image:
Starting address (x) is 0x1C from the left of the image.
Starting address (y) is 0x6C from the top of the image.

For the first row, the first 0x4 says the x and y coordinate for the top-left corner in the texture. And 0xC:0x10 says the x and y coordinate for the top-left in the frame.
For the second row, the first 0x4 says the xy for the bottom-right corner in the texture. And 0xC:0x10 says the xy for the bottom-right corner in the frame.
Two rows make a whole box.
Why does the display list say there are 32 rectangles when there are only 16?
Find all posts by this user
Quote this message in a reply
12-12-2015, 08:02 PM
Post: #2
RE: Blaze Union- Reverse Engineering Text Drawing
Basically, the vertex format specifies how that data is read. It's on the settings tab.

It says there are 32 vertices, and it's drawing rectangles using them. Each rectangle is represented by a pair of vertices (top left, bottom right.)

I would open up the Disassembly, and set a breakpoint on the vaddr value. This can be tricky as it may change by frame. What you can do is set a breakpoint somewhere in the code (like right after the sceDisplaySetFramebuf call), and then use the GE debugger to find the text draw. Then add the memory breakpoint for the vaddr value, and load the savestate. This way it'll find the code that writes to that memory, which is the code you want to modify.

-[Unknown]
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: