News:

The forum has been updated to SMF (2.1.3)!
Please be patient as we work to polish up the place and update features as we can.

Main Menu

More then 16 attack???

Started by zman9000, 17, December, 2010, 11:45:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Atrius (He/Him)

I wouldn't doubt if they were given in the map code where the stone appears.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Daddy Poi's Oily Gorillas

#21
Um? About the starting psys... Would it work any better if you decided to make a database for them and change the code so that it loops for each psy? Instead of them being done individually.


For example (UNTESTED code)

08FF0000
0002 0000 0000 0003 1111 1111 1111 0000
0000 0003 3333 3333 3333 0001 4444 0000

Simple, it starts with Isaac, and the bold would be how much psynergy he has, after it gets to the end... Garet comes next... etc.

080ADF02:   4A10          ldr r2, [$080ADF44] ($08FF0000)
080ADF04:   2000          mov r0, #0x0
nextchar:     8813          ldrh r3, [r2, #0x0]
080ADF08:   3202          add r2, #0x2
080ADF0A:   2B00          cmp r3, #0x0
080ADF0C:   D006          beq $prechar
nextpsy:      8811          ldrh r1, [r2, #0x0]
080ADF10:   F001 FBF0   bl $080AF674 ( PUSH/POP R0, R2, R3 B5ED and BDED)
080ADF14:   3202          add r2, #0x02
080ADF16:   3B01          sub r3 #0x1
080ADF18:   2B00          cmp r3, #0x0
080ADF1A:   D1F8          bne $nextpsy
prechar:      3001           add r0, #0x1
080ADF1E:   2807           cmp r0, #0x7
080ADF20:   DDF1          ble $nextchar
080ADF22:   E012          b $Jump over pointers
                 (Hex: $08FF0000)


Again, this has not been tested, but I like the idea of doing this.. I think there might be enough room as well? Hmm...



EDIT: I have just tested it and it seems to work quite well.. (I'm looking specifically at the data in RAM.)

Now to put in the data...

0002 0095 008C 0001 008C 0002 008D 0090
0000 0002 0095 0084 0000 0001 008D 0001
0021



----- Attempting to simplify Assembly code

080ADF02:   4A10         ldr r2, [$080ADF44] ($08FF0000)
080ADF04:   2000         mov r0, #0x0
next1:      8811         ldrh r1, [r2, #0x0]
080ADF08:   3202         add r2, #0x2
080ADF0A:   2900         cmp r1, #0x0
080ADF0C:   D002         beq $prechar
080ADF0E:   F001 FBF1    bl $080AF6F4 ( PUSH/POP R0, R2 = B5E5 and BDE5 )
080ADF12:   E7F8         b $next1
prechar:    3001         add r0, #0x1
080ADF16:   2807         cmp r0, #0x7
080ADF18:   DDF5         ble $next1
080ADF1A:   E016         b $Jump over pointers (080ADF4A)
            (Hex: $08FF0000)


The new format goes like this, So we won't be needing R3...

0095 008C 0000 008C 0000 008D 0090 0000
0000 0095 0084 0000 0000 008D 0000 0021
0000


As you can see, each character ends in 0000, this indicates that they have no more psynergy to be added.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Atrius (He/Him)

Oh, that's what you were saying in the Cbox.

Yeah, I was thinking of doing something like that too.  That's basically what I ended up doing for the party member battle sprites.  They were hard coded but the editor automatically patches the code to make it load a value for them instead.  It worked out pretty well in that case because I could fit all the patched code, and values in the same space it took to store all of the old code for handling them.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Rolina

Aye, that's something I'd really like to have in the editor - just something to change what the innates happen to be.  Let's say I don't want douse and parch, but instead Lift and that new Cryo idea I had from before.  It'd be nice if I had a way to select it in the editor, rather than risk catastrophic failure via messing in assembly - since I really know nothing about how to edit assembly, I'd rather not annihilate my game.

Daddy Poi's Oily Gorillas

QuoteI wouldn't doubt if they were given in the map code where the stone appears.

You are 100% correct.

Here's an example.

MAP: 169 | ACA_010 (This is the map where you learn Parch.

Now in the map disassembler go to 02009B54.

The arguments are the same like before

R1 = Psynergy
R0 = Character

You may notice the BL is different.. well yeah, if you keep following them you will eventually see a BL to the same code that the "starting psys" used...  Ofcourse, you may find some other interesting stuff as well.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Atrius (He/Him)

The BL's in map code are always different, they go through a list of break commands toward the end of the map code that point to the actual functions.

Heh, and here I've already got the groundwork laid for pinpointing function calls exactly like that one.  Unfortunately thus far it only makes editing the data the arguments refer to easier, not changing the value of the actual arguments themselves.  Basically, you could edit the stats and data for the ability it gives, but not change which ability it gives.  Making it able to edit the assembly code that sets the argument will be tricky because there are many different ways the code could be written to set the value, and it needs to be able to take all of them into account without causing corruption in any case.

Thanks for doing the research, it'll definitely be a big help.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Daddy Poi's Oily Gorillas

A big help... Yeah... You are welcome...  How about when I locate the item data's unknown assembly stuff...


I think it is right here? 080AE586? You know what any of the data near here is related to?
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Atrius (He/Him)

The function called at the command at 080AE586 returns the location of the data for the item index in r0.  It seems to be loading that first "???" flag from the item, and if it's set it does something in the same data area used when you have multiple of a single item (Ones you can have in stacks of up to 30)

I don't really see what it's doing special with it though...
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Daddy Poi's Oily Gorillas

#28
Well, it seems they check all items of all characters at the same time. (For the purpose of only checking that flag and doing something.)

This bit has to do with the gold password... You enter that in... then Isaac's name.. you see the four characters... after that.. I got a breakpoint at 080AE410.

Edit: Probably items you cannot transfer with the password...

Isaac still has the Mars Star at the end of GS1.. you use password.. Mars Star is not added to the inventory... During the story... Felix takes it and puts it in his bag... so data-wise.. Isaac never has the Mars star in his inventory on GS2. (Except for the very second before this code removes them.)

Edit again: I have also simplified my assembly code in one of my previous posts... Now itstead of defining the number of psynergies.. 0000 will determine the end of a list for each character.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Atrius (He/Him)

Quote from: charleysdrpepper on 07, May, 2011, 04:45:26 PMProbably items you cannot transfer with the password...

Hmm...  Strange that so many items with indexes higher than what even exists in the original GS would have it set then...


As far as the ASM goes I wrote my own version of it while I was away from the internet the past week.  Unsurprisingly it looks exactly like yours now with a couple minor differences.  I'm using 0xFFFF to represent the end of a list for each character just because it's more inline with other data formats in GS, and therefore gives me a warm fuzzy feeling.  Also I'm using r5 & r6 in place of r0 & r1 in your code so I don't have to PUSH/POP them (I do have to move r5 to r0 before the BL $080AF6F4 command, but that's takes slightly less processor time than PUSH/POPing r0 for whatever little bit it's not really worth)  Additionally I use r7 to store 0xFFFF in for doing the comparison for the list end value, and PUSH/POP it at the beginning/end of my code since some code later on does use its value unlike r5/r6 which do not need to be PUSH/POPed at all.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Daddy Poi's Oily Gorillas

#30
QuoteHmm...  Strange that so many items with indexes higher than what even exists in the original GS would have it set then...

Yeah, quite strange... I wonder if both games were in development at the same time? (Ignoring the fact of the 2 year delay between them.) Afterall in GS1 Felix and Sheba are in that character list... maybe they just did some organizing with the items and made it that way... hmm...

QuoteAs far as the ASM goes I wrote my own version of it while I was away from the internet the past week.
What an awesome week it has been, what do you think?  I had thought about how likely you would get a chance to work on Golden Sun related projects without the distraction of the internet.

QuoteUnsurprisingly it looks exactly like yours now with a couple minor differences.  I'm using 0xFFFF to represent the end of a list for each character just because it's more inline with other data formats in GS, and therefore gives me a warm fuzzy feeling.  Also I'm using r5 & r6 in place of r0 & r1 in your code so I don't have to PUSH/POP them (I do have to move r5 to r0 before the BL $080AF6F4 command, but that's takes slightly less processor time than PUSH/POPing r0 for whatever little bit it's not really worth)  Additionally I use r7 to store 0xFFFF in for doing the comparison for the list end value, and PUSH/POP it at the beginning/end of my code since some code later on does use its value unlike r5/r6 which do not need to be PUSH/POPed at all.

R5 and R6 are free? Oh, then I could have simply put both my R0 and R2 into those and move R5 into R0 accordingly.... Without having to worry about a single push/pop addition.

As for using 0000 instead of FFFF... I knew that 0000, even if it was added into the psynergy list, it would still be a "Nothing" Psynergy... similar to as if you never added it. (Not to mention how easy it is to compare with 0.) FFFF is like -1, when no items in your listbox are selected at all. 0, is the first item.. When it comes to building the editor, I would have also imagined that to make it easier, as well.

As for the GS format of using FFFF... interesting... I also want to say that M&L:SS uses FF for item/equipment/etc. RAM data..
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

zman9000

I have no clue what the topic is here any more.
Check my youtube channel out for lots of cool gaming related videos at http://www.youtube.com/user/xXzman9000Xx

Salanewt

It started with the newly found ability to change the spells that you start with (like Move and Retreat), and then it moved on to spells that you learn at the Rocks, and then we managed to get into items. The majority of what they are exchanging now includes information about registers used by certain ASM commands.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Atrius (He/Him)

Quote from: zman9000 on 16, May, 2011, 02:56:58 PM
I have no clue what the topic is here any more.

Well the reason certainly isn't for you to make pointless posts in it.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]