View Single Post
  #7    
Old January 30th, 2013, 10:08 PM
Shiny Quagsire's Avatar
Shiny Quagsire
どないやねん, ヤドン
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
I found your little problem with the palette. In Fire Red, the palette is copied via DMA to 0x05000000, which means that manually writing to that location will have it automagically rewritten over by the DMA (I personally discovered this with some of my own ASM). However, there is a palette buffer (two actually, one is for fading) in the Pokemon Games where the DMA copies from. In Fire Red, this buffer is at 0x020371f8. However, in Emerald, it's 0x02037B14. so a simple pointer search should fix that. M_X may or may not have used this buffer, so if searching the FR pointer comes up with nothing, find the main palette memory (0x05000000) and the obj pallet memory, which is 0x200 more than the background palette and replace those accordingly (adding 0x200 to the offset for the OBJ palette)

As for the menu, it may have something to do with how he preserves the palettes and tiles. What he does is he copies a big portion (or all) of the OBJ memory and the tile memory, and stores them using these #defines in his main.h file:
Code:
#define lzData2         ((u16*)0x203C000)
#define lzData          ((u16*)0x203D000)
#define save1           ((u16*)0x203E000)
#define save2           ((u16*)0x203F000)
So perhaps repoint those RAM locations to fix the menu.