zm:locations:gen_bg
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | zm:locations:gen_bg [2025/03/06 23:17] (current) – created felixwright | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ^Address^Decimal^Width^Height^Description^ | ||
+ | |0x2007000|xxxxxxx|xx|x|Hatch Transition Tilemap RAM, uncompressed[1]| | ||
+ | |0x8364F80|3559296|xx|x|Hatch Transition Tilemap (ROM, RLE compressed)[1]| | ||
+ | |0x83655A0|3560864|32|? | ||
+ | |0x85D940C|6132748|32|4|Generic BG GFX (Zebes)| | ||
+ | |0x85DA40C|6136844|32|4|Generic BG GFX (Mothership)| | ||
+ | |0x85D980C|6133772|17|1|Zebes Hatch Open Animation| | ||
+ | |0x85DA80C|6137868|17|1|Mothership Hatch Open Animation| | ||
+ | |0x85DFE20|6159904|Palette|1 Row|Generic BG Tiles Palette| | ||
+ | |0x85DFE40|6159936|Palette|1 Row|Generic BG Hatch Palette| | ||
+ | |0x85E0420|6161440|Palette|6 Rows|Zebes Hatch Unlock Palette| | ||
+ | |0x85E0220|6160928|Palette|6 Rows|Mothership Hatch Unlock Palette| | ||
+ | {{zero_mission: | ||
+ | ===== 1: To Edit RLE Graphics ===== | ||
+ | |||
+ | To edit: | ||
+ | 1) Open ROM in nocash and load a save file. set a breakpoint for '' | ||
+ | 2) Resume the game until it breaks right before the DMA at 0x8003248. This should happen the third time it breaks.\\ | ||
+ | 3) Go to 0x2007000 in the data window and dump 4096 (0x1000 bytes) using '' | ||
+ | 4) Export generic BG GFX as raw. (use the default .gfx filetype)\\ | ||
+ | 5) Pad the beginning of exported generic BG with 2048 (0x800) bytes of 00.\\ | ||
+ | 6) '' | ||
+ | 7) Append both files to the end of ROM using a hex editor. Take note of the offset before you paste in the bytes of the first and second file.\\ | ||
+ | 8) Reload rom in MAGE, then open '' | ||
+ | 9) Make desired edits, then export raw. rename file to " | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | using namespace std; | ||
+ | |||
+ | int main() { | ||
+ | char * buffin = (char*)malloc(1024*4+4);// | ||
+ | char * buffout = (char*)malloc(1024*4); | ||
+ | char * bufftmp = (char*)malloc(1024*4); | ||
+ | | ||
+ | std:: | ||
+ | file.open ("/ | ||
+ | file.read(buffin, | ||
+ | file.close(); | ||
+ | buffin[1024*4+0]=buffin[1024*4-2]+1; | ||
+ | buffin[1024*4+2]=buffin[1024*4-2]-1; | ||
+ | file.open ("/ | ||
+ | | ||
+ | char cur; | ||
+ | int i=0;int o=0; | ||
+ | buffout[o++]=0x01;// | ||
+ | buffout[o++]=0x01;// | ||
+ | int t; | ||
+ | while (i< | ||
+ | if (buffin[i]!=buffin[i+2]){ //start of nonrepeating | ||
+ | t=0; | ||
+ | while ((i< | ||
+ | bufftmp[t++]=buffin[i]; | ||
+ | buffout[o++]=t; | ||
+ | } else { //start of repeating | ||
+ | t=1; | ||
+ | while ((i< | ||
+ | buffout[o++]=0x80|t; | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | buffout[o++]=0x00; | ||
+ | buffout[o++]=0x02; | ||
+ | |||
+ | i=1; | ||
+ | while (i< | ||
+ | if (buffin[i]!=buffin[i+2]){ //start of nonrepeating | ||
+ | t=0; | ||
+ | while ((i< | ||
+ | bufftmp[t++]=buffin[i]; | ||
+ | buffout[o++]=t>> | ||
+ | } else { //start of repeating | ||
+ | t=1; | ||
+ | while ((i< | ||
+ | buffout[o++]=(t>> | ||
+ | |||
+ | } | ||
+ | |||
+ | } | ||
+ | buffout[o++]=0x00; | ||
+ | buffout[o++]=0x00; | ||
+ | |||
+ | file.write(buffout, | ||
+ | file.close(); | ||
+ | free(buffin); | ||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
+ | 10) Go to [[https:// | ||
+ | 11) Upload tt.bin, then run the code. you should get tt.rle.\\ | ||
+ | 12) Open tt.rle in a hex editor and copy all the bytes. (Ctrl A, then Ctrl C)\\ | ||
+ | 13) Open your rom in a hex editor, go to 0x8364F80, and replace the bytes with the ones you just copied in step 12. You can do this with Ctrl+B in HxD. Do not use Ctrl V unless you have the correct number of bytes to replace highlighted, | ||
+ | |||
+ | ===== 2: To View Hatch Animation Tilemap ===== | ||
+ | |||
+ | To view in MAGE, add tileset (blank), open tileset editor, substract two from offset (0x836559E) and write it to new tileset' |
zm/locations/gen_bg.txt · Last modified: 2025/03/06 23:17 by felixwright