News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Yakibomb

Pages: 1 [2]
Programming / Help with Overworld Menu ASM (SMRPG:LotSS)
« on: April 10, 2016, 04:31:55 pm »
Hello! I'm new to this community, and I'm looking for some help with ASM hacking. I have some questions, but first let me explain what I'm doing.

I'm trying to understand how the menus are assembled in Super Mario RPG: Legend of the Seven Stars. However, while one of my goals is to document how the menus are assembled, my main goal is to change a certain menu.

This is the menu I want to change:

I want to increase the size of display box for the spells on the right to include 7 spells instead of 6. And if possible, shift the whole menu to increase it further to list 8 spells. However, I've run into some problems.

According to the documentation left by giangurgolo, the author of the main SMRPG editor Lazy Shell, he found where the data is stored for these menus, but not where the pointers are or how it's assembled. I don't know what is what. Here is what his documentation said:
Code: [Select]
030000 - 033FFF | ASM  | Windowing Assembly
034165 - 0341AA | TXT  | Alphanumeric Text
035000 - 037FFF | ASM  | Windowing Assembly

Here is what I found:
- The game uses its own unique code format for menus (like battle animation scripts do).
- Text and counters are called to be displayed independently of each other, meaning they're both in separate lists. I have yet to find how counters are displayed.
- I found how the text is displayed, though. I think the text is enclosed in a code bracket. It display text in a list, with four bytes designating Xposition, Yposition, Palette, and Text Index. Giangurgolo built in a text editing tool for menu text, making it easy to locate what each text item's index is.
- And one step toward my main goal: I found the byte that controls how many spells are listed! However...

Here is my problem (and why I'm here):
- I don't know how to clear the WRAM to remove the seventh spell's display on the menu. What happens is the seventh spell will stay in the WRAM after it's loaded, which means it stays on the list, forever being displayed on that menu. I don't know what communicates to the WRAM.

What opcodes or instructions should I be looking for? What loads the menus into the RAM? Is there a special code that is the same for all SNES games, or does SMRPG have its own way of clearing/storing it?

Can someone give me some advice, or point me in the right direction? I'll try to provide as much info as I can. I've used Geiger's SNES9x debugger to find what loads when, and where those instructions lead to. Could I post them?

I thought getting help here would be better than trying to do this alone, oh and sorry if this is in the wrong section.

EDIT: I've made some progress, but I still don't know what clears the WRAM. (Or how to move the FP)

Pages: 1 [2]