• 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!

Code to use partial shoulder-button press?

D

Deleted member

Guest
haha, I kinda was lazy today and had to work the days before.
not gonna promise anything but I'll do my best to make it tomorrow
 

TK Wolf

Smash Ace
Joined
Sep 1, 2007
Messages
792
Location
Bellevue, WA
haha, I kinda was lazy today and had to work the days before.
not gonna promise anything but I'll do my best to make it tomorrow
No rush, take your time! I really, really appreciate your help.
(Also, if it works out, I'm thinking of showing this to some ppl in the Brawl+ team to see if they will add it as standard, unless you would prefer I don't do that.)
 

PizzaBoy

Smash Cadet
Joined
Jun 30, 2008
Messages
28
This is a test, let me know if it works out, then I'll make player 2-4 codes.

For RSBE01 (NTSC)
Instant Shoulder Presses Player 1 [PizzaBoy]
C2221EE4 00000006
7000DDFF 89DF0074
2C0E000A 41800008
38002000 89DF0075
2C0E000A 41800008
38000200 B01D002A
60000000 00000000


For any hackers wanting to look at it, here is the assembly:

branching from 80221EE4

andi. r0,r0,56831
lbz r14,116(r31)
cmpwi r14,10
blt _r
addi r0,r0,8192
_r:
lbz r14,117(r31)
cmpwi r14,10
blt _end
addi r0,r0,512
_end:
sth r0,42(r29)

Edit- have a small error, fixing it.
Edit- Fixed, was using ble instead of blt
 

PizzaBoy

Smash Cadet
Joined
Jun 30, 2008
Messages
28
I'll double check it right now.

Note that I do not have brawl+ etc enabled while making this.

Edit- Tested and working in NTSC version in training mode with no additional codes on.

Edit- you have to press the button down maybe 1/32th of the way? I had to leave a little slack because of worn out buttons not resetting all the way to 0.
 
D

Deleted member

Guest
well done pizzaboy, you took a slightly different approach than me, but still great job.

I should port and test this now.
 

PizzaBoy

Smash Cadet
Joined
Jun 30, 2008
Messages
28
well done pizzaboy, you took a slightly different approach than me, but still great job.

I should port and test this now.
Give me a moment and I'll post the breakpoint data for the address I hijack.

Edit, held down L and R and set an execute breakpoint:

Code:
CR  : 20000000  XER : 00000000  CTR : 00000000  DSIS: 00000000
DAR : 00000000  SRR0: 80221EE4  SRR1: 00001032  LR  : 80221C64
r0  : 00002200  r1  : 805296B8  r2  : 805A9320  r3  : 000000DD
r4  : 0000000B  r5  : 00000001  r6  : 00000000  r7  : 00000010
r8  : 00000078  r9  : 0000000F  r10 : 00000078  r11 : 000000C3
r12 : 000000B8  r13 : 805A4420  r14 : 00000000  r15 : 00000000
r16 : 00000000  r17 : 00000000  r18 : 00000000  r19 : 00000000
r20 : 00000000  r21 : 00000000  r22 : 00000000  r23 : 00000000
r24 : 00000000  r25 : 00000000  r26 : F672D03B  r27 : 00000000
r28 : 8050C361  r29 : 804F7940  r30 : 804F7940  r31 : 804F7840

f0  : FFC00000  f1  : 3F800000  f2  : 3D0C5E22  f3  : 394CC5B2
f4  : 3F000000  f5  : 3F800000  f6  : 2F1D4268  f7  : AB5B2675
f8  : 3D8C5E22  f9  : 3DBA2E6E  f10 : 3D886B35  f11 : 3D4BDA5C
f12 : 3247FF92  f13 : 353FE213  f14 : 00000000  f15 : 00000000
f16 : 00000000  f17 : 00000000  f18 : 00000000  f19 : 00000000
f20 : 00000000  f21 : 00000000  f22 : 00000000  f23 : 00000000
f24 : 00000000  f25 : 00000000  f26 : 00000000  f27 : 00000000
f28 : 00000000  f29 : 00000000  f30 : 00000000  f31 : 00000000

80221EE4:  B01D002A	sth	r0,42(r29)
80221EE8:  48000188	b	0x80222070
80221EEC:  881C0006	lbz	r0,6(r28)
80221EF0:  889F08C8	lbz	r4,2248(r31)
80221EF4:  5403103A	rlwinm	r3,r0,2,0,29
80221EF8:  881C000A	lbz	r0,10(r28)
80221EFC:  7C630734	extsh	r3,r3
80221F00:  5463003A	rlwinm	r3,r3,0,0,29
80221F04:  540007BE	rlwinm	r0,r0,0,30,31
80221F08:  1C840060	mulli	r4,r4,96
80221F0C:  7C630734	extsh	r3,r3
80221F10:  7C600378	or	r0,r3,r0
80221F14:  7C030734	extsh	r3,r0
80221F18:  7C9F2214	add	r4,r31,r4
80221F1C:  3803FE00	subi	r0,r3,512
80221F20:  B00400CC	sth	r0,204(r4)
 
D

Deleted member

Guest
I don't really need all that data but thanks anyway. I have an NTSC dump and that is plenty of data.
 

PizzaBoy

Smash Cadet
Joined
Jun 30, 2008
Messages
28
My is code is for the classic controller, not gamecube controller. OP didn't specify which controller. Would you like a gamecube controller version?
 

PizzaBoy

Smash Cadet
Joined
Jun 30, 2008
Messages
28
Yeah, I didn't read the whole thread. Oops. Should be easy to repeat the same process for the other controller.
 

Doval

Smash Lord
Joined
May 16, 2005
Messages
1,028
Location
Puerto Rico
I second that motion. This code for Gamecube controllers would be absolutely lovely, especially since GC shoulder buttons have soooo much more distance 'til the button clicks.
 

Roager

Smash Ace
Joined
Jun 14, 2008
Messages
704
Location
Idaho
I'm probably a bit late on this, but what's the deadzone? I.E. how far do you need to push for it to register as a press? I assume it can be changed with a couple digits of the ocarina code, but still.
 
D

Deleted member

Guest
roager, about 3 percent, according to pizzaboy a really low deadzone. I would personally prefer a 15-25% zone, but if you want I could find out how to.
 

Eldiran

Smash Lord
Joined
Jan 8, 2008
Messages
1,707
Location
Pennsylvania
Nice work! I haven't tested this but I'm impressed by the concept. Sounds like an incredibly useful code!
 

Sph34r

Smash Journeyman
Joined
Feb 15, 2009
Messages
251
Location
palo alto, middlefield road
This (since it'll develop into light shielding) and heads rather then stock balls (once you have <5 lives) are the two last seemingly awesome codes (feel free to prove me wrong hackers, you're awesome too).
 

timothyung

Smash Ace
Joined
Feb 3, 2008
Messages
948
Location
Hong Kong
Even if light shielding is made possible it will never be used in an official set because not all controllers have the ability to do it.
 

TK Wolf

Smash Ace
Joined
Sep 1, 2007
Messages
792
Location
Bellevue, WA
Lightshielding is almost definitely not going to happen. There is a HUGE difference between making the shield turn on with the shoulder pressed partway, and actually programming in functionality for a shield that works differently with different amounts of pressure.
 

Pahuljica

Smash Rookie
Joined
Jan 3, 2017
Messages
3
Location
Serbia
3DS FC
5430-1264-0682
i was playing ssbb and saw this thread since i was looking for software solution on same problem. i need lite touching on shoulder to register as a press instead going all the way to a click.

So is it possible? and how do i do it?
 
Top Bottom