Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 539
» Latest member: colinkrulz
» Forum threads: 1,662
» Forum posts: 11,893

Full Statistics

Online Users
There are currently 302 online users.
» 1 Member(s) | 299 Guest(s)
Bing, Google, _Ro

Latest Threads
Make it to 10,000
Forum: General Discussion
Last Post: Fifty
8 hours ago
» Replies: 5,633
» Views: 4,162,762
E-mails not working on th...
Forum: General Discussion
Last Post: Fifty
Yesterday, 04:56 AM
» Replies: 3
» Views: 83
More missing info from Br...
Forum: Coding & Hacking General Discussion
Last Post: Vega
04-15-2024, 10:04 PM
» Replies: 0
» Views: 135
Request: Custom music vol...
Forum: Code Support / Help / Requests
Last Post: lschlick
04-15-2024, 06:13 PM
» Replies: 0
» Views: 111
Request: Additional sound...
Forum: Code Support / Help / Requests
Last Post: _Ro
04-15-2024, 01:50 AM
» Replies: 6
» Views: 170
Mistake in the Broadway M...
Forum: Coding & Hacking General Discussion
Last Post: Vega
04-14-2024, 11:58 PM
» Replies: 0
» Views: 76
Camera Distance Modifier ...
Forum: Visual & Sound Effects
Last Post: vlonebozo
04-13-2024, 11:05 PM
» Replies: 1
» Views: 6,711
Pretty In Game Item Spy p...
Forum: Online; Item
Last Post: vlonebozo
04-13-2024, 03:52 PM
» Replies: 1
» Views: 524
"Double Dash!!" Speedomet...
Forum: Visual & Sound Effects
Last Post: vlonebozo
04-13-2024, 01:54 PM
» Replies: 2
» Views: 455
Item Rain (v1.5) [MrBean]
Forum: Online; Item
Last Post: Luigi Hack Fan
04-13-2024, 12:55 PM
» Replies: 4
» Views: 11,723

 
  Force BRSTM Volume Output [Sponge]
Posted by: Sponge - 03-07-2024, 11:36 PM - Forum: Visual & Sound Effects - No Replies

Force BRSTM Volume Output [Sponge]

Forces all BRSTM files to output at a specified value

XX = any value from 0 to 255 (0x0 to 0xFF)

PAL
C209E9F0 00000003
88030019 2C000002
380000XX 41820008
88030014 00000000

NTSC-U
C209E950 00000003
88030019 2C000002
380000XX 41820008
88030014 00000000

NTSC-J
C209E910 00000003
88030019 2C000002
380000XX 41820008
88030014 00000000

NTSC-K
C209EA50 00000003
88030019 2C000002
380000XX 41820008
88030014 00000000

Code:
.set volume, 0xFF

  lbz       r0, 0x19(r3)
  cmpwi     r0, 0x2 # Compare if audio type is BRSTM
  li        r0, volume
  beq       end # Load specified volume and exit if true, otherwise load value defined in BRSAR
  lbz       r0, 0x14(r3)

end:

Print this item

  Item Cycler [Bully, Ro]
Posted by: _Ro - 03-06-2024, 10:53 PM - Forum: Online; Item - No Replies

Item Cycler [Bully, Ro]

This code will allow cycling through items. You can cycle to the left (decrement) or to the right (increment). The items are infinite but you can make a deactivator to disable the code at will. It is coded from Bully's Always Have Item code.
Useful for debugging purposes. Only NTSC-U has been tested.

Updated as of March 6th of 2024: Added "Item Use Flash Fix for Item Hack" (https://mariokartwii.com/showthread.php?tid=2111) which makes item flash on the roulette if using an item, something that originally doesn't happen. if you don't like this flash, you can remove it (it's at the bottom of the code, look the post for the code to know what part to remove). Reposted code in correct section.

NTSC-U
C27E4B88 00000013
48000009 00000000
7CC802A6 3CE08034
89460000 A187XXXX
718BYYYY 41820040
8BE60001 2C1F0000
40820034 718BLLLL
41820014 2C0A0000
394AFFFF 40820020
39400013 718BRRRR
41820014 2C0A0012
394A0001 40810008
39400000 3BE00001
40820008 3BE00000
9BE60001 99460000
9144008C 38C00001
2C0A0005 4182000C
2C0A0010 41800008
38C00003 90C40090
60000000 00000000
C278894C 00000002
3BE00001 9BFD0238
83E3008C 00000000
047E4E00 60000000

PAL
C27EEE98 00000013
48000009 00000000
7CC802A6 3CE08034
89460000 A187XXXX
718BYYYY 41820040
8BE60001 2C1F0000
40820034 718BLLLL
41820014 2C0A0000
394AFFFF 40820020
39400013 718BRRRR
41820014 2C0A0012
394A0001 40810008
39400000 3BE00001
40820008 3BE00000
9BE60001 99460000
9144008C 38C00001
2C0A0005 4182000C
2C0A0010 41800008
38C00003 90C40090
60000000 00000000
C2791958 00000002
3BE00001 9BFD0238
83E3008C 00000000
047EF110 60000000
 
NTSC-J
C27EE504 00000013
48000009 00000000
7CC802A6 3CE08034
89460000 A187XXXX
718BYYYY 41820040
8BE60001 2C1F0000
40820034 718BLLLL
41820014 2C0A0000
394AFFFF 40820020
39400013 718BRRRR
41820014 2C0A0012
394A0001 40810008
39400000 3BE00001
40820008 3BE00000
9BE60001 99460000
9144008C 38C00001
2C0A0005 4182000C
2C0A0010 41800008
38C00003 90C40090
60000000 00000000
C2790FC4 00000002
3BE00001 9BFD0238
83E3008C 00000000
047EE77C 60000000

NTSC-K
C27DD258 00000013
48000009 00000000
7CC802A6 3CE08035
89460000 A187XXXX
718BYYYY 41820040
8BE60001 2C1F0000
40820034 718BLLLL
41820014 2C0A0000
394AFFFF 40820020
39400013 718BRRRR
41820014 2C0A0012
394A0001 40810008
39400000 3BE00001
40820008 3BE00000
9BE60001 99460000
9144008C 38C00001
2C0A0005 4182000C
2C0A0010 41800008
38C00003 90C40090
60000000 00000000
C277FD18 00000002
3BE00001 9BFD0238
83E3008C 00000000
047DD4D0 60000000

XXXX: Controller Address
YYYY: Both buttons values that will cycle items left and right, masked together (LLLL + RRRR = YYYY). E.g (Wiimote): D-Pad Left (0001) cycles item to the left < and D-Pad Right (0002) cycles item to the right >, therefore YYYY will be 0003 (0001 + 0002 = 0003)
LLLL: Button value that will cycle items to the left < (decrement) 
RRRR: Button value that will cycle items to the right > (increment)

Code:
Source:
bl start # bl trick so values of the code are stored to address below
.value 0 #this place will hold the stored item ID value and the pressed state value. Done this way to avoid loading and storing from EVA
start:
mflr r6 # r6 will hold the address where values of the code will be stored
lis r7, 0x803Q # Q is 5 for NTSC-K, 4 for all other regions
lbz r10, 0 (r6) # Load item value
lhz r12, 0xXXXX (r7) # Load halfword from controller address
andi. r11, r12, 0xYYYY # Change YYYY to both buttons that will cycle items left and right, masked together (LLLL + RRRR = YYYY). E.g (Wiimote): D-Pad Left (0001) cycles item to the left < and D-Pad Right (0002) cycles item to the right >, therefore YYYY will be 0003 (0001 + 0002 = 0003)
beq skip #Not pressed, skip all the code
lbz r31, 1 (r6) # Button pressed, now let's check the pressed state
cmpwi r31, 0 # Is button state not pressed
bne skip # If state is not not pressed (0), skip the code that cycles item
# Code here will only execute for a frame
andi. r11, r12, 0xLLLL # Change LLLL to button value that will cycle items to thee left < (decrement)
beq add
cmpwi r10, 0 # Check if item is Green Shell
subi r10, r10, 1 # Subtract item value (to cycle to the left)
bne skip # If item is not Green Shell, continue code as normal
li r10, 0x13 # Set item to Triple Bananas (last item of the list) if trying to subtract item ID if it's Green Shell - ID is off because of logic but it works as intended
add:
andi. r11, r12, 0xRRRR # Change RRRR to button value that will cycle items to the right > (increment)
beq skip # Button is not pressed, skip cycling to the right
cmpwi r10, 0x12 # Check if item is Triple Banana
addi r10, r10, 1 # Increment item value (to cycle to the left)
ble skip # If item ID is less than invalid ID (0x13, ID is off because of logic but it works as intended), skip resetting item back to Green Shell
reset:
li r10, 0 # Reset item to Green Shell
skip:
li r31, 1 # # Button is set to pressed by default, but depending if button to cycle item is pressed or if in pressed state (1), this might be replaced with not pressed (0) after the branch below
bne skip2 # If button to cycle item is pressed, skip setting not pressed (0) and if button state is pressed (1), skip setting not pressed (0)
li r31, 0 # If button to cycle item is not pressed, set state to not pressed (0)
skip2:
stb r31, 1 (r6) # Store button press state
stb r10, 0(r6) # Store item ID
stw r10, 0x8C (r4) # Store item ID to item pointer
li r6, 1 # Set item amount to one
cmpwi r10, 5 # Check if item is Triple Mushroom
beq triple # Jump to set amount to three
cmpwi r10, 0x10 # If item ID is less than Triple Green Shell (0x10 and above are all Triple Items)
blt storeamt # Skip setting amount to three
triple:
li r6, 3 # Set amount to three
storeamt:
stw r6, 0x90 (r4) #Store amount to item pointer

Base code (Always Have Item [Bully]): https://mariokartwii.com/showthread.php?tid=50

Code credits: Bully (Original Always Have Item code), Ro (Making an item cycler from Bully's code)

Print this item

  Item Use Flash Fix for Item Hack [Ro]
Posted by: _Ro - 03-06-2024, 07:48 PM - Forum: Visual & Sound Effects - No Replies

Item Use Flash Fix for Item Hack [Ro]

This code will force the item to flash on the item roulette when used if using an item hack that normally doesn't make the item flash when used, for e.g: Bully's Item Hack (https://mariokartwii.com/showthread.php?...+have+item). Made this code to include in my Item Cycler hack (https://mariokartwii.com/showthread.php?tid=2093) because I really like the item flash when using an item and it makes it look fancier and better.

NTSC-U
C278894C 00000002
3BE00001 9BFD0238
83E3008C 00000000
047E4E00 60000000

PAL
C2791958 00000002
3BE00001 9BFD0238
83E3008C 00000000
047EF110 60000000

NTSC-J
C2790FC4 00000002
3BE00001 9BFD0238
83E3008C 00000000
047EE77C 60000000

NTSC-K
C277FD18 00000002
3BE00001 9BFD0238
83E3008C 00000000
047DD4D0 60000000

Code creator: Ro

Print this item

  Logging game events to text file
Posted by: seanmcnally - 03-02-2024, 09:56 PM - Forum: Coding & Hacking General Discussion - Replies (26)

(UPDATE 3/21/2024: I figured all of this out, see here for my solution!)

Hey everyone,

New member here.  Want to first say thank you for all the incredibly detailed documentation on how this game works on the backend.  This site is a fantastic resource for those just getting into coding cheats for this game.

I'm working my way through the tutorial posts, learning how all of this works. I'm not going to take a shortcut and ask for a solution to my specific need, but instead, I want to know whether a specific aspect of my end goal is possible.  In the end, I want to be able to log game events to a text file in real time - specifically, item usage.  The most important parts of my project are logging when a star, thunderbolt, or blooper are used.

So my question is, if I'm able to isolate which parts of memory those events are stored in, is there a way to dump those parts of the memory to a text file?  It doesn't seem that Dolphin Memory Engine has this type of real-time export functionality.  Dolphin's logger can write to a file in real time, but I'm unsure whether I can get the memory to be output into the logger.  Has anyone ever done this before?  If all else fails, I suppose I could use an OCR on an open memory viewer window, but that solution isn't ideal.

For those curious, my project involves a tournament where the lights in the arena change in real time according to item usage  Smile

Print this item

  Allow looking backwards during the countdown [Gaberboo]
Posted by: Gaberboo - 03-01-2024, 06:22 AM - Forum: Offline Non-Item - No Replies

PAL
045A225C 38800001
NTSCU
04597224 38800001
NTSCJ
045A1BDC 38800001
NTSCK
045902B4 38800001

Code:
#replace at 805a225c PAL
#replace at 80597224 NTSC-U
#replace at 805a1bdc NTSC-J
#replace at 805902b4 NTSC-K

li r4, 0x1
Code credits: mkw-sp Ghidra

Print this item

  Allow pausing before the race starts [Gaberboo]
Posted by: Gaberboo - 03-01-2024, 05:55 AM - Forum: Offline Non-Item - Replies (1)

PAL
c2856a24 00000002
2c000003 4c400382
60000000 60000000
NTSCU
c2834f94 00000002
2c000003 4c400382
60000000 60000000
NTSCJ
c2856090 00000002
2c000003 4c400382
60000000 60000000
NTSCK
c2844de4 00000002
2c000003 4c400382
60000000 60000000

Code:
#inject at 80856a24 PAL
#inject at 80834f94 NTSC-U
#inject at 80856090 NTSC-J
#inject at 80844de4 NTSC-K

cmpwi r0, 0x3
cror eq, lt, lt
Code credits: mkw-sp Ghidra

Print this item

  Ghost Racer (Transparent) [acaruso, Ro]
Posted by: _Ro - 03-01-2024, 03:27 AM - Forum: Visual & Sound Effects - No Replies

Ghost Racer (Transparent) [acaruso, Ro]
This code makes the character and the vehicle transparent. This code requires course restart for it to be applied (same for deactivating). First line by acaruso.

NTSC-U
045A66A8 60000000
0458C150 38800001
047C38B4 38800001

PAL
045B15D0 60000000
04592974 38800001
047D2314 38800001

NTSC-J
045B0F50 60000000
045922F4 38800001
047D1980 38800001

NTSC-K
0459F628 60000000
045809CC 38800001
047C06D4 38800001

Code creator: acaruso (First line), Ro

Print this item

  No Fog [Ro]
Posted by: _Ro - 03-01-2024, 03:10 AM - Forum: Visual & Sound Effects - No Replies

No Fog [Ro]

Courses have no fog, similar to Dolphin's feature.

NTSC-U
045A30C8 4E800020

PAL
045ADFF0 4E800020

NTSC-J
045AD970 4E800020

NTSC-K
0459C048 4E800020

Code creator: Ro

Print this item

  Damage Objects on Command [Ro]
Posted by: _Ro - 03-01-2024, 03:06 AM - Forum: Offline Non-Item - No Replies

Damage Objects on Command [Ro]

This code will damage most objects (only ones that are affected by Lightning) with a press of a button.

NTSC-U
C2816E1C 00000008
3C80808A 3D808034
A18CXXXX 718CYYYY
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

PAL
C282A930 00000008
3C80808B 3D808034
A18CXXXX 718CYYYY
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

NTSC-J
C2829F9C 00000008
3C80808B 3D808034
A18C14C2 718C1000
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

NTSC-K
C2818CF0 00000008
3C80808A 3D808035
A18CXXXX 718CYYYY
41820028 9421FF80
BC610008 38800006
3D808081 618C7780
7D8903A6 4E800421
B8610008 38210080
60000000 00000000

Code:
Code:
lis r4, 0x808X     # A for NTSC-U and NTSC-K, B for PAL and NTSC-J
lis r12, 0x803X    # Controller address first halfword, 5 for NTSC-K (and PAL GCN iirc?), 4 for the other regions)
lhz r12, 0xYYYY (r12)      # Load controller address
andi. r12, r12, 0xXXXX     # Check button to damage objects
beq end             # If button not pressed, skip all the code
stwu r1,-128(r1)
stmw r3,8(r1)
li r4, 6
lis r12, 0x8081
ori r12, r12, 0x7780
mtctr r12
bctrl         # Call object shock damage
lmw r3,8(r1)
addi r1,r1,128
end:


XXXX: Controller Address (1462 for NTSC-U Wiimote for example)
YYYY: Button value (1000 for Wiimote Minus [-] for example)

Code creator: Ro
Code credits: 1superchip (Remote Object Freeze function which has the pointer for the call)

Print this item

  Anti Online Item Delimiters v1 [Ro]
Posted by: _Ro - 03-01-2024, 12:51 AM - Forum: Online; Item - Replies (1)

Anti Online Item Delimiters v1 [Ro]

This code will prevent you from seeing hacked delimited Lightning, POW and Bloopers. For explanation, during online play there's a timed delay for showing the items mentioned previously, for example, a Lightning can only be seen every ~26 seconds, even if a hacker is spamming it non-stop, however, there's a way to circumvent the delay by using delimiter codes which will show all of the items mentioned previously without any delay. Delimiters work in a way that three said items have a "throw" behavior rather than "use", by this, the item will be used normally, but will also be thrown (dropped), because of the throw, a dragged item event is sent as one of these three items and for some reason that causes the game to use the item on the recieved client. Curiously enough, when one of the three said items are used, they are called by a different function if used by an online player rather than the general one that is called when a player or CPU uses a shock, however, delimited items have the general one get called instead of the online player one. 
I compared the different from a normal shock and a delimited shock and noticed some registers had differences that would not happen if the lightning was fired by myself or a CPU, so I did a check for one of the differences (and made sure it was not a mistake) and if it is in the state that it is when delimited, the function for the item effects will return and never happen.

Unfortunately, this isn't a good approach and not what I planned for, but it's what I was able to do - for now. I wanted to find where the online opponent dragged items was loaded and if it was one of the three items above, return no item (0x14). I found several stuff about these but none of them worked at all. If anyone has it and wants to share, feel free, and thanks.

NTSC-U
C27A91C0 00000002
2C070001 4D820020
9421FFD0 00000000
C27D9580 00000002
2C070001 4D820020
9421FFF0 00000000
C27D4F74 00000002
2C070001 4D820020
9421FFB0 00000000

PAL
C27B7C20 00000002
2C070001 4D820020
9421FFD0 00000000
C27B1B2C 00000002
2C070001 4D820020
9421FFF0 00000000
C26D2908 00000002
2C070001 4D820020
9421FFB0 00000000

NTSC-J
C27B728C 00000002
2C070001 4D820020
9421FFD0 00000000
C27B1198 00000002
2C070001 4D820020
9421FFF0 00000000
C26D1F74 00000002
2C070001 4D820020
9421FFB0 00000000

NTSC-K
C27A5FE0 00000002
2C070001 4D820020
9421FFD0 00000000
C279FEEC 00000002
2C070001 4D820020
9421FFF0 00000000
C2796574 00000002
2C070001 4D820020
9421FFB0 00000000

Code creator: Ro
Code credits: 1superchip for Lightning function address (from Force Shock Damage code)

Print this item