Thread: Development: The Ruins of Alph Puzzles
View Single Post
Old January 31st, 2013 (2:29 PM).
Diegoisawesome's Avatar
Diegoisawesome Diegoisawesome is offline
Oh god the bees
  • Silver Tier
Join Date: Dec 2007
Location: :noitacoL
Age: 20
Gender: Male
Nature: Naive
Posts: 1,039
Originally Posted by shiny quagsire View Post
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:
#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.
Well, to start with, this isn't the only problem. Being designed for a standalone ROM, it doesn't fade in and out nor play a jingle. Besides this, the routine needs to be rewritten to use the in-game methods of storing data, such as the LZ data and palette data. Basically, the source is amazing to finally have so these issues can be fixed.

My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote