• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Coding Time

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
Okay I plan to borrow a laptop and do a little coding, probably on Sunday. I have a few things to get done but if anyone has some (simplistic) suggestions I'm game.

1) Fix Alternate File Loader
2) Check if 'simple' method of clone vs clone is possible
3) Write HAD segment for shanus
4) Check if soft L-pressing is read by the RAM (PK said it was a while ago)
 
D

Deleted member

Guest
for the soft press you need to ask pizza-something, he actualy made a code for it.
only thing I've seen it being read in like a dzon places in RAM.
 

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
Okay, so it is definitely read? I've never seen this code. I'm sure I'll be able to deduce it myself. The important part is copying it to a secure RAM location. Then, at the least, it can be used for certain custom-added features.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
Sweet.

I'm going to try and fine tune my HAD code to be so much more efficient in anticipation of your code.

I'm going to build it for your strategy of every time its read, a multiplier is applied since that seems to be the easiest method.
 

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
Can you create a pac which sets the initial value of the variable to something which does not occur naturally in Brawl's memory, then does not modify it any way? E.g. when someone starts an airdodge, set it to 0xCABBA4E5 (which probably doesn't appear). That would be an easier way for me to find it that trying to cause crashes (however fun that would be). Then just have the game move the distance of the variable every time it is read.

I need to know as much as possible about how character controller input is read by PSA. I know it has shortcut commands (e.g. a flag for if Shield is held). Can it read raw input (e.g. A, L, R)? Do you know which address you are reading from? Can you read from absolute/relative addresses? Does PSA know which player# is which? Can you check if a raw button is assigned to an action button (e.g. if L means Shield or Attack?). I can see implementing some form of soft detection L cancelling being -quite- simple if this RAM stuff is true. Does the current code mimic Melee perfectly in terms of timing window etc.?

Can you control the shield strength (damage ratio, degen rate, initial size etc.) for each character? Global constants exist but I presume some form of character specific thing must, unless it is part of the model. If it can be modified easily then I can see light shielding potentially being not that bad.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
The current L-canceling code mimics the timing well, but it doesn't have the 6 frame cap currently. I can look into writing that.

I'll make a pac which sets to that value for the two variables of interest. I'll make it activate those when you JAB as Ness.

Unsure on shield power individually.

In terms of button commands, there are codes for each button that the game refers to, however I have no idea where this links to the controller:

00 = normal attack button (A by default)
01 = special attack button (B by default)
02 = jump button (X, Y and Up by default)
03 = shield button (L, R and Z by default)
04 = R, L, Z
05 = Unknown (Couldn't trigger this one)
06 = Dpad UP
07 = Dpad DOWN
08 = Dpad RIGHT, Dpad LEFT
09 = Dpad LEFT
0A = Dpad RIGHT
0B = B, X, Dpad RIGHT, Dpad LEFT
0C = Y, X , Dpad UP, Dpad RIGHT
0D = B, Y, X , Dpad UP, Dpad RIGHT, Dpad LEFT
0E = A+B (Both pressed together)
0F = C-Stick (Any Direction)
10 = With a value of "10," the IF statement triggered everytime, regardless of inputting any button...or not pressing anything at all.
11 = Unknown (Couldn't trigger this one)
12 = Unknown (Couldn't trigger this one)

I imagine if you can trigger the Soft press to go to the same area as normal press, it'd work.
 
D

Deleted member

Guest
there are button activators, and they have been around for some time now. they are simple reads though (so not PSA)
 

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
They need to be in PSA for the purpose of these codes. It's the difference between building a bridge or a boat to cross a river.

Shanus, the variables need to be set as part of the air dodge. It is very specific; I need to intercept them when they are read. The game's "PSA code" is translated into the assembly code. So it's not enough for the variables to just be read, they need to be read by the ASM function which is going to use them for movement. So the more the "fake code" models the "final code" the better. Just use a HAD code which sets them as a constant then reads them as a constant without modifying and moving them this distance while airdodging or however you do it.

I'll look into character specific momentum multipliers, I figure they could be useful. Similarly, I would think you would benefit from having a multiplier for both air and ground movement, so that you can change WD length along the ground indepandantly of friction.

Triggering the soft press to the same as a normal press is sufficient for l-cancelling, but would cause issues to do with people shielding when they shouldn't etc. This is why I'd rather the PSA look at the RAM locations and work with them, which is why the combination of PSA knowing which player is which would be useful. If I know the right address for where the button input is read, though (the data is stored in several locations), it should be trivial to write a relative input from there.
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
oh alright, if you want it in just the normal HAD code; then:

Load this into the latest set's text file, but change the Yellow's to 0 (changing it from a variable to a value, and change the greens into any hex value you want to stand out fro mthe game.

Code:
HAD 1.3
07060C00 00000308
00000006 00000007
00000005 000003F5
00000000 00000000
00000005 00000C5C
00000006 00000007
00000005 000003FB
00000000 00000000
00000005 00000C5D
00000000 00000046
00000000 00000019
00000006 00000003
00000000 00000046
[COLOR="Red"]00000005 000003F3
0000000[COLOR="Yellow"]5[/COLOR] [COLOR="Lime"]21000050[/COLOR]
00000005 000003FA
0000000[COLOR="Yellow"]5[/COLOR] [COLOR="Lime"]21000053[/COLOR][/COLOR]
00000005 20000055
00000001 0002BF20
00000000 00000002
00000000 00000010
00000000 00000000
00000000 00000000
00000000 00000001
00000000 00000001
00000001 0000EA60
00000000 00000000
00000000 00000002
00000001 000AFC80
00000005 20000055
00000000 00000010
00000006 00000004
00000000 00000003
00000000 00000000
00000000 00000000
00000000 00000001
00000000 00000001
00000000 00000001
00000005 21000050
00000005 21000053
00000000 00000019
00000006 00000003
00000001 0000EA60
00000006 00000008
00000005 20000055
00000000 00000001
00000001 000249F0
00000001 000927C0
00000005 20000055
00000002 81060E78
00000002 80FB18FC
00000002 80FC1CA8
00000002 81060DA8
00000002 81060EC0
00070100 80FB18E4
000A0400 81060C00
000B0400 81060C20
04000100 81060C40
000E0000 00000000
02010200 81060C48
04000100 81060C58
12060200 81060C60
12060200 81060C70
120A0100 81060C80
00070100 81060D80
00020100 81060C88
06050100 81060C90
00070100 81060D80
00070100 81060D80
00040100 81060C98
0E080400 81060CA0
00010100 81060CC0
00050000 00000000
06050100 81060CC8
0E060100 81060CD0
00010100 81060CD8
120B0100 81060CE0
02010200 81060CE8
000F0000 00000000
00090100 81060D88
00040100 81060CF8
0E080400 81060D00
0E020100 81060D20
0E010200 81060D28
0E010200 81060D28
02010200 81060D38
00010100 81060D48
00050000 00000000
00080000 00000000
000A0200 81060D50
08000100 81060D60
04070100 81060D68
00010100 81060D70
64000000 00000000
000F0000 00000000
120B0100 81060D78
02010200 80FAF454
00090100 81060D90
06FB18F4 00000010
00090100 81060D98
00020000 00000000
06FC1CA0 00000008
00090100 81060DA0
The best part is that Ness, Lucas, and Yoshi have the correct PSA function installed directly into the pacs, so this code will make it so that all characters momentums will be messed up except them so you can find the values, and test directly on modifying the variables on them.
 

Yeroc

Theory Coder
BRoomer
Joined
Feb 28, 2004
Messages
3,273
Location
In a world of my own devising
Almas, the problem I'm running into with the new dash cancel code is one of transferred running momentum when crouching out of a run. Characters retain their full running velocity while crouching, so they don't slow down as fast as they should. The question I had for you was if the momentum transfer code could be expanded to include entering crouch, which is Action 0x11, and making it only transfer say 85% of that momentum.
 

Dantarion

Smash Champion
Joined
May 21, 2007
Messages
2,492
Location
Santa Barbara, CA
I know this is unrelated, but I just realized something that I wanted to accomplish.

I wanted to find where all the PSA variables are stored.
So, I guess I could set a variable, make the next line of PSA code crash the wii, and then search for it?

I could find where all the variables are stored that way!
 

Almas

Smash Lord
Joined
Jul 6, 2008
Messages
1,588
My updated idea was to set the initial value of the variable to something that does not occur naturally in Brawl's memory. It's pretty easy to find such a value - just search for arbitrary strings in a ram dump until one does not come up.

Make sure to check that variables do not move - I expect certain "random access" ones may at certain times. This is not an issue for ASM codes but may be for whatever you plan to do with them. Also ensure you have a condition that defines the random variable that you can pause soon after - usually it shouldn't be a problem but there is the risk that something else will overwrite it.

Can someone tell me more about controller inputs in PSA?
 

Shell

Flute-Fox Only
Joined
Feb 7, 2007
Messages
2,042
If anyone has time, I would really appreciate a code like such:

"For character X, if previous animation was Y, and current animation Z, adjust character location (TopN) up or down by U units." A wildcard for Previous Action, Y would be extremely useful.

This would be useful for correcting landing detection height in P:M and possibly Brawl+, and could be useful for custom character creation in general as well. I realize this is a rather complicated request but if anyone has time I can use it to dramatically improve the feel of P:M and possibly Brawl+.

Thanks!
 

shanus

Smash Hero
Joined
Nov 17, 2005
Messages
6,055
oh alright, if you want it in just the normal HAD code; then:

Load this into the latest set's text file, but change the Yellow's to 0 (changing it from a variable to a value, and change the greens into any hex value you want to stand out fro mthe game.

Code:
HAD 1.3
07060C00 00000308
00000006 00000007
00000005 000003F5
00000000 00000000
00000005 00000C5C
00000006 00000007
00000005 000003FB
00000000 00000000
00000005 00000C5D
00000000 00000046
00000000 00000019
00000006 00000003
00000000 00000046
[COLOR="Red"]0000000[COLOR="Yellow"]5[/COLOR] [COLOR="Lime"]000003F3[/COLOR]
00000005 21000050
0000000[COLOR="Yellow"]5[/COLOR] [COLOR="Lime"]000003FA[/COLOR]
00000005 21000053[/COLOR]
00000005 20000055
00000001 0002BF20
00000000 00000002
00000000 00000010
00000000 00000000
00000000 00000000
00000000 00000001
00000000 00000001
00000001 0000EA60
00000000 00000000
00000000 00000002
00000001 000AFC80
00000005 20000055
00000000 00000010
00000006 00000004
00000000 00000003
00000000 00000000
00000000 00000000
00000000 00000001
00000000 00000001
00000000 00000001
00000005 21000050
00000005 21000053
00000000 00000019
00000006 00000003
00000001 0000EA60
00000006 00000008
00000005 20000055
00000000 00000001
00000001 000249F0
00000001 000927C0
00000005 20000055
00000002 81060E78
00000002 80FB18FC
00000002 80FC1CA8
00000002 81060DA8
00000002 81060EC0
00070100 80FB18E4
000A0400 81060C00
000B0400 81060C20
04000100 81060C40
000E0000 00000000
02010200 81060C48
04000100 81060C58
12060200 81060C60
12060200 81060C70
120A0100 81060C80
00070100 81060D80
00020100 81060C88
06050100 81060C90
00070100 81060D80
00070100 81060D80
00040100 81060C98
0E080400 81060CA0
00010100 81060CC0
00050000 00000000
06050100 81060CC8
0E060100 81060CD0
00010100 81060CD8
120B0100 81060CE0
02010200 81060CE8
000F0000 00000000
00090100 81060D88
00040100 81060CF8
0E080400 81060D00
0E020100 81060D20
0E010200 81060D28
0E010200 81060D28
02010200 81060D38
00010100 81060D48
00050000 00000000
00080000 00000000
000A0200 81060D50
08000100 81060D60
04070100 81060D68
00010100 81060D70
64000000 00000000
000F0000 00000000
120B0100 81060D78
02010200 80FAF454
00090100 81060D90
06FB18F4 00000010
00090100 81060D98
00020000 00000000
06FC1CA0 00000008
00090100 81060DA0
The best part is that Ness, Lucas, and Yoshi have the correct PSA function installed directly into the pacs, so this code will make it so that all characters momentums will be messed up except them so you can find the values, and test directly on modifying the variables on them.
Oops, try this almas
 
Top Bottom