1
Mapping Tips/Guides / Guide to mapping PlayStation (PSX) 2D games with PSVrammed
« on: May 13, 2025, 11:36:08 am »
A few people have asked me how I did my Suikoden maps so I thought I would write a short guide for the method I use to rip graphics from PSX 2D games. It mainly depends on a program I wrote when mapping Suikoden 2. This program was also used for my Suikoden 1 update and Legend of Mana maps. In this guide I'll use LoM (Legend of Mana) and the BizHawk (PSX octoshock core) emulator in the examples.
The program is called PSVrammed (available on my github page) and it can extract and edit VRAM (video memory) in emulator savestates. It relies on the fact that PSX games don't often change VRAM. Edits in VRAM will usually remain until you trigger a loading screen. I started experimenting with VRAM hacking when mapping Suikoden 2 and it worked so well that I created PSVrammed. With it you can isolate different "layers" in an area and map them one by one. It's also useful for removing things (like sprites) you don't want in screenshots.
The PSX GPU (graphics processor) has 1MB VRAM which fits 1024*512 of 16-bit pixels. The major parts stored in VRAM are framebuffers, textures and palettes (also known as CLUTs, color lookup tables). Palettes are 16-bit and so are framebuffers usually too. Textures are usually 4- or 8-bit which means their pixels are indices to a palette with 16 or 256 colors (16-bit).
16-bit pixels have 3*5=15 bits for red, green and blue, and one alpha bit. The alpha bit is used for masking and blending (semi-transparency) effects. 5 bits give each color channel a decimal range of 0-31. A zero black color (RGB=0,0,0) is normally not drawn by the GPU and used for fully transparent pixels.
I recommend checking online for more info about the PSX's GPU and VRAM. It's good to have some basic knowledge about them when using PSVrammed and mapping PSX games.
Here's an example of VRAM from LoM (Legend of Mana):

LoM uses a very typical VRAM layout. PSX games don't have to use this layout, but it's very common. In the example I've also marked in yellow where LoM stores palettes and textures for backgrounds (BG). LoM uses a mix of both 4- and 8-bit for its backgrounds, but sprites are usually only 4-bit.
The program is called PSVrammed (available on my github page) and it can extract and edit VRAM (video memory) in emulator savestates. It relies on the fact that PSX games don't often change VRAM. Edits in VRAM will usually remain until you trigger a loading screen. I started experimenting with VRAM hacking when mapping Suikoden 2 and it worked so well that I created PSVrammed. With it you can isolate different "layers" in an area and map them one by one. It's also useful for removing things (like sprites) you don't want in screenshots.
The PSX GPU (graphics processor) has 1MB VRAM which fits 1024*512 of 16-bit pixels. The major parts stored in VRAM are framebuffers, textures and palettes (also known as CLUTs, color lookup tables). Palettes are 16-bit and so are framebuffers usually too. Textures are usually 4- or 8-bit which means their pixels are indices to a palette with 16 or 256 colors (16-bit).
16-bit pixels have 3*5=15 bits for red, green and blue, and one alpha bit. The alpha bit is used for masking and blending (semi-transparency) effects. 5 bits give each color channel a decimal range of 0-31. A zero black color (RGB=0,0,0) is normally not drawn by the GPU and used for fully transparent pixels.
I recommend checking online for more info about the PSX's GPU and VRAM. It's good to have some basic knowledge about them when using PSVrammed and mapping PSX games.
Here's an example of VRAM from LoM (Legend of Mana):

LoM uses a very typical VRAM layout. PSX games don't have to use this layout, but it's very common. In the example I've also marked in yellow where LoM stores palettes and textures for backgrounds (BG). LoM uses a mix of both 4- and 8-bit for its backgrounds, but sprites are usually only 4-bit.