Work on removing the event system

View previous topic View next topic Go down

Work on removing the event system

Post by wat on Wed Mar 18, 2009 3:01 pm

Phazar, uNsane, and I are working on removing this event system.

Ram map

All progress goes here.

Back to top Go down

Re: Work on removing the event system

Post by uNsane on Wed Mar 18, 2009 4:36 pm

I had a clever idea to fix Core-Xs to give you their item, rather than go by the event system. Each Core-X has a different palette, and the first color in each palette is transparent, so it would be very simple to just change that color (which is 2 bytes) to actual data, which we can usurp to manipulate the equipment. For example, the Ridley Core-X's palette is:
4492 7FFF 1097 ...
If we want to manipulate that into modifying equipment to still give Screw Attack, then we would simply simply change it to
0802 -> 02 08
If we wanted to have that same Core-X give Super Missiles, we would simply change its first color to:
0201 -> 01 02
The first byte would be read to r1, the second byte to r0, and 300131Ah to r4 (all the registers are arbitrary). Then, we simply use a quick process to OR it and store it to the correct value. The whole routine in NO$ would be something like:
ldr r4,=5000300h
ldrb r1,[r4]
ldrb r0,[r4,1]
ldr r4,=300131Ah
ldrb r2,[r4,r1]
orr r2,r0
strb r2,[r4,r1]

I still have to figure out how to use Data Rooms; I was thinking the area number could be used for a logical shift, but I don't know what could be used as a type identifier.

Edit: So, I looked through all the Core-X palettes, and unfortunately, not all of them are loaded when you enter the room. Luckily enough, bosses already go by what equipment you have to decide whether or not to appear, but this still means finding the appropriate addresses.

Moar edit: I think I found the location for the routine: 08074b52. This appears to be a universal routine to change your equipment. I still need to find a way to make getting there not being based upon the event counter, though; 08025c52 is a check for enemy ID which I should be able to take control of.

GBA Moderator

Location : A couple parsecs south of sanity.
Job/Hobbies : hacking, studenting
Game Modding Alignment : MZM, MF, real life, Hell, urmom, etc.
Other : I only have 5 senses, so obviously I don't have a sense of humor.

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum