Page 1 of 1

Trying to locate graphics decompression routine

Posted: August 25th, 2016, 3:02 pm
by john83
I'm trying to find rockman x3's graphics decompression routine and
I could use a little help on how to locate it. I do have experience
finding decompression routines in snes games. I find them by tracing
backwards from where the graphics get stored in vram. Im not really
sure how graphics get stored to vram on the PlayStation because I'm
just now starting to learn playstation asm. Any help from someone
with experience tracing backwards from vram to find graphics
decompression routine would be much appreciated.

Re: Trying to locate graphics decompression routine

Posted: August 27th, 2016, 12:35 am
by LameGuy64
PlayStation homebrew developer here, the way how graphics data is transferred between RAM and VRAM on the PSX is via DMA memory transfers. Also, the way how graphics data is interpreted on the PSX works like a large 1024x512 16-bit image, display/render buffers and textures are stored as rectangular images and textures of lower color depths (4/8 bit) taking up half or a quarter of its actual width as all pixels in the framebuffer are treated as 16-bit unsigned words.

For what you wanted to do, you could try placing a breakpoint into the function that performs the DMA memory transfer of graphics data (usually LoadImage) from RAM to VRAM. Then, you can study the pointers passed to the function by checking the argument registers (a0 should be the address to a structure of VRAM coordinates while a1 should be the address where the source graphics data is located.