Users browsing this thread: 2 Guest(s)
Some final code requests (and screenshots)

Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Basically it's done by going into the Level Editor to locate either the NPC or event trigger of the boss (depends on how the battle is triggered, such as Atma Weapon on the Floating Continent map where you must talk to him to initiate the battle) and finding what the offset is for the event code associated with it, it'll show this offset when you select it, among other info. It helps to remove the header before going into the Level Editor to get the exact offset without having to factor in the +200 for offsets. Then once you know the address you can use the event dump and navigate right to that, as well as see the breakdown of the whole event code dealing with the battle.

You'd then do the jump to free space technique and add the play song command of F0 XX, making sure it's right before the battle to make it as seamless as possible. Depending on the boss battle, you may wind up needing to relocate the whole thing if it starts right off with the 'Invoke battle', it depends.

I think I'll work on a small guide, with some pics and elaboration on what I'm about to go into, but for now here is a brief breakdown of Atma Weapon to give you an idea.

Step 1) Go into the Level Editor (headerless ROM) and go to the map with Atma Weapon on it:
[$18A] Floating Continent, Outside

Step 2) Enable at the top the NPCs to be shown (View>NPCs). Then, under the map name you'll see 'NPCS', so click on that tab. Then locate the NPC that is Atma Weapon on the map. Atma is NPC #0 here, which is actually going to be NPC $10 in the event/hex... Anyways, select Atma, NPC #0, and you'll see there in the little window labeled 'Event' the event address associated with this battle. It is DA30. That is going to be address CA/DA30. If it was 1DA30 it'd be CB/DA30. And if it was 2B/DA30 it'd be CC/DA30. These are the three event code banks. So, since this is DA30, it is CA/DA30.

Step 3) Make ready your hex editor with event dump document in hand and go to CA/DA30. You will see the event code there for the Atma Weapon battle...okay I need to stop here, because looking at your ROM/Gen. Leo Edition I see that fedorajoe made an edit to this exact event already, my guess to deal with something Shadow-related. You can see at CA/DA2F that he does a B2 jump: B2 A4 0D 02, which is address CC/0DA4 (the 02 is bank CC and first and last bytes are reversed, so a jump to CC0DA4 in hex would be B2 A4 0D 02...confusing shit, I know.) so going there he has the relocated code for the battle, and a bunch of free space afterwords. So he already did the work for us in this case lol, you'd just need to put the play song command there before the 4D 50 3F (Invoke battle, enemy set $50, background $3F) and move his code 2 bytes further ahead.

All this is pretty damn challenging to explain and depict over typing... please ask questions about anything and I or others can try to elaborate. There's things I did not explain like how to 'display offset as SNES HiROM' if your using WindHex that is, in order to see the bank of the offset, which can help when first starting to understand the correlation between bank and address/offset. And I'm beginning to ramble so I should stop for now lol.


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • Lightning (10-26-2018)



Messages In This Thread
RE: Some final code requests (and screenshots) - by Gi Nattak - 10-26-2018, 04:18 PM

Forum Jump:

Users browsing this thread: 2 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite