malenko
Established Member
Preamble: This is *A* technique, and not the only one. This assumes a lot of things about the game you're working on specifically that the graphics are uncompressed and on VPD1. There is a chance this will work for the project you want to start but there is also a chance it will not. Consider this a solid starting block. This is not Malenko's tutorial. This is just an amalgamation of knowledge shared on the discords for Shiro! and SegaXtreme I just happen to be the one writing it up.
This will be showing you how to replace graphics, and while I will be demonstrating on converting tiles from Japanese to English, that is not the only use for this. I did something very similar with NBA Jam to replace Hugo Hornet with Sonic the Hedgehog. This does not mean I will be translating Bomberman Fight!! but I wanted to put up some kind of starter guide because of questions being asked on Discord and there not being any good resource showing how this is done other than my barebones Google Drive document.
software used:
Yaba Sanshiro 2 (I used v1.9.3 ) uoYabause
Crystal Tile 2 Crystal Tile 2
ByteSearch 1.2 ByteSearch
a graphics editing program ( I use Adobe CS2, but this is up to you GIMP is free)
CRAM2PAL https://url.is.pending.dont.click.here
Sega Saturn Patcher Sega Saturn Patcher
wxMEdit Hexeditor wxMEdit - A Cross-platform Text/Hex Editor
Things you need to know:
Basic computer use
basic hex math
basic graphics editing
this isn't as hard to do as you think
Ok, with all of that out of the way let's edit some tiles/sprites/graphics!
I will be demonstrating this on "Bomberman Fight!!"
Step one is to open the ISO in Sega Saturn Patcher and extract the files to a folder.
This the folder structure I currently use when working on games:
So I loaded the ISO and extracted it to "Vanilla Files" and left the freshly ripped game in the "Vanilla ISO" folder. I will be saving the changed files in the "Edited Files" folder, and when we patch the vanilla ISO with Sega Saturn Patcher, we'll save the edited ISO in "Edited ISO" for testing. Dumps are where I put memory dumps from the debugger and palette files.
To keep this as straightforward as possible, I'll focus on tiles that are easy to get to and easy to test. If you read my other guide, I have an affinity for getting the menus done first, and this won't be an exception to that. Fortunately, Bomberman Fight!! has menus that are mostly in English, so navigation won't be a problem.
From the start menu pick "OPTION" and you will land on this screen:
Lets start with one of the 2 tiles at the bottom, the "Dpad" icon. The text for is says "select" (えらぶ) and the text for the B button says go back (もどる)
So lets find the tile and redraw the Japanese into English.
We will use Yaba's debug to find the tile's location in memory. So choose Debug->VPD1 from the menu
Then scroll through the VPD1 command list until you see the tile we are looking for. Since this one was at the bottom I started from the bottom and scrolled up but this isn't always the case and you may have to look at every single one of them. Here we can see the tile in the texture window.
It is 64 pixels wide, 16 pixels tall, and is using a 4 BPP color mode and most importantly its texture address is 669A0.
You need to keep track of this data (spread sheet, notepad, pen and paper, doesn't matter)
Next we will go to Yaba's memory editor to get the data we need. Start by closing the VDP1 debugger and going into Yaba's memory Editor by selecting debug then memory editor:
First thing I do is dump the PAL (palette) data by highlighting VDP2CRAM and selecting save tab.
again, I save this in a folder called PAL under the Dumps folder as OptionsScreenCRAM.bin
Next step is just to drag the bin file on top of CRAM2PAL and it'll extract all the palettes from the memory dump. There are 1,024 typically but more often than not you'll find what you need in the first dozen.
Next we dump the actual tile data from memory so we can find it in the game data. Remember when I said you'd need all those file details from before? This is why.
The texture address in VDP1 debugger is an address relative to VDP1 VRAM start address which is 0x05C00000.
So the memory address of the texture is :
5C00000 + 669A0 = 5C669A0
We are going to stay in the memory editor and go to the address 05C669A0
Since the texture's size is 64x16 we will multiply 64*16 (which equals 1,024) then divide by 2 (which equals 512). Now I know you are wondering why you divide by 2, I know this because I wondered the same thing when I started. You divide by 2 because the image's format is 4 bits per pixel, and 1 byte equals 8 bits, so 2 pixels are described by just 1 byte. If the image were 15BPP you'd have to do the opposite and multiply by 2 because in that format it takes 2 bytes to describe a single pixel.
So we need to copy 512 bytes of data starting at 5C669A0 . Since we are copying in hex we need to add 200 (which is 512 in hex) to the starting value. This means we will need to highlight from 5C669A0 to 5C66BA0 and save the selected data. Start at 5C669A0 hold shift and arrow down till 5C66BA0 then hit save selected
save it as something obvious like "DpadSelect.bin" in the Dumps folder.
We are going to actually close Yaba and open up Crystal tile now. Once you have CrystalTIle open , open the "dpadselect.bin" file then hit F6 to put CrystalTile into graphics editing mode. Next on the properties tab set the width to 64, the height to 16 and the Tile format to N64/MD 4bpp and it should look something like this:
You can tell that's the right tile, albeit with the wrong colors. The colors don't matter much for identifying but will matter for editing. Now click the "Palette" tab (next to the "Properties" tab below the save icon) and then click the "Import" button. Use the Explorer window that pops up to navigate to the folder where you dumped all your palette files generated by the CRAM2PAL utility.
I don't know of a strictly scientific method of finding the correct file, but I hope to update this when one is found. Lucky for us, the second palette (OptionsScreenCRAM_1.pal) is the correct one, so double-click on that. Now we just have to choose the correct line of palette colors in the grid on the left. Keep in mind the first color in a palette is more often than not the transparent one.
As you can see, that's the correct tile with the correct colors. So we know the memory we dumped contains the correct data to edit and all we have to do is find it.
This will be showing you how to replace graphics, and while I will be demonstrating on converting tiles from Japanese to English, that is not the only use for this. I did something very similar with NBA Jam to replace Hugo Hornet with Sonic the Hedgehog. This does not mean I will be translating Bomberman Fight!! but I wanted to put up some kind of starter guide because of questions being asked on Discord and there not being any good resource showing how this is done other than my barebones Google Drive document.
software used:
Yaba Sanshiro 2 (I used v1.9.3 ) uoYabause
Crystal Tile 2 Crystal Tile 2
ByteSearch 1.2 ByteSearch
a graphics editing program ( I use Adobe CS2, but this is up to you GIMP is free)
CRAM2PAL https://url.is.pending.dont.click.here
Sega Saturn Patcher Sega Saturn Patcher
wxMEdit Hexeditor wxMEdit - A Cross-platform Text/Hex Editor
Things you need to know:
Basic computer use
basic hex math
basic graphics editing
this isn't as hard to do as you think
Ok, with all of that out of the way let's edit some tiles/sprites/graphics!
I will be demonstrating this on "Bomberman Fight!!"
Step one is to open the ISO in Sega Saturn Patcher and extract the files to a folder.
This the folder structure I currently use when working on games:
So I loaded the ISO and extracted it to "Vanilla Files" and left the freshly ripped game in the "Vanilla ISO" folder. I will be saving the changed files in the "Edited Files" folder, and when we patch the vanilla ISO with Sega Saturn Patcher, we'll save the edited ISO in "Edited ISO" for testing. Dumps are where I put memory dumps from the debugger and palette files.
To keep this as straightforward as possible, I'll focus on tiles that are easy to get to and easy to test. If you read my other guide, I have an affinity for getting the menus done first, and this won't be an exception to that. Fortunately, Bomberman Fight!! has menus that are mostly in English, so navigation won't be a problem.
From the start menu pick "OPTION" and you will land on this screen:
Lets start with one of the 2 tiles at the bottom, the "Dpad" icon. The text for is says "select" (えらぶ) and the text for the B button says go back (もどる)
So lets find the tile and redraw the Japanese into English.
We will use Yaba's debug to find the tile's location in memory. So choose Debug->VPD1 from the menu
Then scroll through the VPD1 command list until you see the tile we are looking for. Since this one was at the bottom I started from the bottom and scrolled up but this isn't always the case and you may have to look at every single one of them. Here we can see the tile in the texture window.
It is 64 pixels wide, 16 pixels tall, and is using a 4 BPP color mode and most importantly its texture address is 669A0.
You need to keep track of this data (spread sheet, notepad, pen and paper, doesn't matter)
Next we will go to Yaba's memory editor to get the data we need. Start by closing the VDP1 debugger and going into Yaba's memory Editor by selecting debug then memory editor:
First thing I do is dump the PAL (palette) data by highlighting VDP2CRAM and selecting save tab.
again, I save this in a folder called PAL under the Dumps folder as OptionsScreenCRAM.bin
Next step is just to drag the bin file on top of CRAM2PAL and it'll extract all the palettes from the memory dump. There are 1,024 typically but more often than not you'll find what you need in the first dozen.
Next we dump the actual tile data from memory so we can find it in the game data. Remember when I said you'd need all those file details from before? This is why.
The texture address in VDP1 debugger is an address relative to VDP1 VRAM start address which is 0x05C00000.
So the memory address of the texture is :
5C00000 + 669A0 = 5C669A0
We are going to stay in the memory editor and go to the address 05C669A0
Since the texture's size is 64x16 we will multiply 64*16 (which equals 1,024) then divide by 2 (which equals 512). Now I know you are wondering why you divide by 2, I know this because I wondered the same thing when I started. You divide by 2 because the image's format is 4 bits per pixel, and 1 byte equals 8 bits, so 2 pixels are described by just 1 byte. If the image were 15BPP you'd have to do the opposite and multiply by 2 because in that format it takes 2 bytes to describe a single pixel.
So we need to copy 512 bytes of data starting at 5C669A0 . Since we are copying in hex we need to add 200 (which is 512 in hex) to the starting value. This means we will need to highlight from 5C669A0 to 5C66BA0 and save the selected data. Start at 5C669A0 hold shift and arrow down till 5C66BA0 then hit save selected
save it as something obvious like "DpadSelect.bin" in the Dumps folder.
We are going to actually close Yaba and open up Crystal tile now. Once you have CrystalTIle open , open the "dpadselect.bin" file then hit F6 to put CrystalTile into graphics editing mode. Next on the properties tab set the width to 64, the height to 16 and the Tile format to N64/MD 4bpp and it should look something like this:
You can tell that's the right tile, albeit with the wrong colors. The colors don't matter much for identifying but will matter for editing. Now click the "Palette" tab (next to the "Properties" tab below the save icon) and then click the "Import" button. Use the Explorer window that pops up to navigate to the folder where you dumped all your palette files generated by the CRAM2PAL utility.
I don't know of a strictly scientific method of finding the correct file, but I hope to update this when one is found. Lucky for us, the second palette (OptionsScreenCRAM_1.pal) is the correct one, so double-click on that. Now we just have to choose the correct line of palette colors in the grid on the left. Keep in mind the first color in a palette is more often than not the transparent one.
As you can see, that's the correct tile with the correct colors. So we know the memory we dumped contains the correct data to edit and all we have to do is find it.
Last edited: