Register - Login
Views: 85677204
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
09-23-17 12:33:11 PM

Jul - SM64 Hacking - SM64 Gameshark/Hex Stuff New poll - New thread - Thread closed
Pages: 1 2 3 4 5 6Next newer thread | Next older thread
nexgen
Member
Level: 13


Posts: 15/29
EXP: 8233
For next: 2034

Since: 02-12-10


Since last post: 7.0 years
Last activity: 7.0 years

Posted on 02-14-10 03:13:50 PM Link
Hold on, never mind, i was right, I put the two codes for both inside and then outside together, and it worked. now i know that i can put together the set of star man cheats i have to make it more like star man with out turning on more then one cheat.... Heres the code I now put together.it has instant triple jump, and the star man cheat...im not sure what else.

Starman mario 'update'

802524CA 0001
802524CF 0082
80252F12 0001
80252F17 0082
8025303E 0001
80253043 0082
8025305A 0001
8025305F 0082
8025323A 0001
8025323F 0082
802643D2 0001
802643D7 0082
8026094A 0001
8026094F 0082
80262EFE 0001
80262F03 0082
80263082 0001
80263087 0082
802677A6 0001
802677AB 0082
80268086 0001
8026809B 0082
802682A2 0001
802682A7 0082
802682F2 0001
80268307 0082
8032DCEC 0001
8032DCEF 0082
810EE060 802B
810EE062 D680
81250430 2819
81250432 0001
8124F374 2400
8133B21E 08FF
8133B21E 08FF
8107EC43 FFFF
8107EC67 FFFF
8107EC65 FFFF
8107EC32 FFFF
8107EC38 000F
8107EC40 0300
8107EC40 0000
8107EC42 0000
8107EC38 FFFF
8107EC3A FF00
8107EC20 007F
8107EC22 0000
8107EC28 0000
8107EC2A 0000
8107EC40 7777
8107EC42 0000
8107EC38 7777
8107EC3A 0000
8107EC20 7777
8107EC22 0000
8107EC28 7777
8107EC2A 0000
8107EC50 7777
8107EC52 0000
8107EC58 7777
8107EC5A 0000
8107EC70 7777
8107EC72 0000
8107EC68 7777
8107EC6A 0000
8107EC80 7777
8107EC82 0000
8107EC88 7777
8107EC8A 0000
8107ECA0 7777
8107ECA2 0000
8107EC98 7777
8107EC9A 0000
802524CA 0001
802524CF 0082
80252F12 0001
80252F17 0082
8025303E 0001
80253043 0082
8025305A 0001
8025305F 0082
8025323A 0001
8025323F 0082
802643D2 0001
802643D7 0082
8026094A 0001
8026094F 0082
80262EFE 0001
80262F03 0082
80263082 0001
80263087 0082
802677A6 0001
802677AB 0082
80268086 0001
8026809B 0082
802682A2 0001
802682A7 0082
802682F2 0001
80268307 0082
8032DCEC 0001
8032DCEF 0082

so there it is...
nexgen
Member
Level: 13


Posts: 18/29
EXP: 8233
For next: 2034

Since: 02-12-10


Since last post: 7.0 years
Last activity: 7.0 years

Posted on 02-14-10 06:58:23 PM Link
Heres something else i found, wich im gonna add to the starman cheat. its a gold metal mario texture.

C:\Documents and Settings\Owner\My Documents\My Pictures\gold3.png

you can use it if you need it, and i posted it here since it relates to the cheat codes(sort of...)
nexgen
Member
Level: 13


Posts: 19/29
EXP: 8233
For next: 2034

Since: 02-12-10


Since last post: 7.0 years
Last activity: 7.0 years

Posted on 02-14-10 07:00:31 PM Link
oops i put it in wrong well heres how to get to it, go to you tube, search gold metal cap texture.
the link should be in the description of the first 3 to 4 videos.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 182


Posts: 4311/12211
EXP: 82468082
For next: 436553

Since: 07-03-07
From: 52-2-88-7

Since last post: 2.0 years
Last activity: 2.0 years

Posted on 02-14-10 08:22:12 PM Link
Learn to not double post, nexgen, or I'll just delete them all.
Torstein
Random nobody
Level: 5


Posts: 3/4
EXP: 419
For next: 110

Since: 03-14-10


Since last post: 7.0 years
Last activity: 7.0 years

Posted on 03-16-10 04:26:42 PM Link
Some of my first codes!
I use NTSC, so I doubt they work on PAL.
20 coins from Goombas
8130B04A 2028
803328C7 0020
You can edit the 20 at the very end into anything.
Cannibal Mario (Goombas that behaves like coins from goombas
802A1BA7 00C0
That's not all, but I really have to hurry now.
Hectamatatortron
Member
Level: 33


Posts: 202/232
EXP: 213692
For next: 15487

Since: 09-19-07


Since last post: 2.0 years
Last activity: 257 days

Posted on 03-27-10 06:39:45 AM (last edited by Hectamatatortron at 03-27-10 06:49 AM) Link
Bro, that's 32 coins. You typed 0x20, not 20.

But DAMN that is a crazy code. That's weird how the game sets an amount of coins to spawn instead of just calling the coin spawn function.

Probably reusing code from money bags that drop 5 or something?

Edit: Oh, that's not code that it's editing. It's an array of enemy data or something...
DarkSpacer
Member
Level: 28


Posts: 8/184
EXP: 130666
For next: 672

Since: 03-23-10


Since last post: 1.0 years
Last activity: 157 days

Posted on 03-27-10 07:51:57 PM Link
Originally posted by Hectamatatortron
Bro, that's 32 coins. You typed 0x20, not 20.

But DAMN that is a crazy code. That's weird how the game sets an amount of coins to spawn instead of just calling the coin spawn function.

Probably reusing code from money bags that drop 5 or something?

Edit: Oh, that's not code that it's editing. It's an array of enemy data or something...


That was confusing.

I think it does call a coin spawn function, but the code modifies a value in the function that determines the number of coins to spawn.
Hectamatatortron
Member
Level: 33


Posts: 203/232
EXP: 213692
For next: 15487

Since: 09-19-07


Since last post: 2.0 years
Last activity: 257 days

Posted on 03-28-10 05:13:12 PM (last edited by Hectamatatortron at 03-28-10 05:20 PM) Link
No way. That was definitely not code being edited. The disassembly made no sense and it was obviously a bunch of halfwords because just about every other byte was 0x00.

Edit: Not to mention the value the code changes is loaded into a register.

802FB1A8 - Checks if enemy drops more than 0 coins
802A1A94 - Loads number of coins left to drop
8029EDCC - Spawns a coin; A0 is some pointer, A1 is the object appearance, A2 is some integer

Changing register A1 from 0x74 to 0x76 after killing an enemy that drops a coin and reaching the PC 0x8029EDCC will make the resultant coin appear to be a blue coin, but it still only gives 1 coin. *shrug*
Torstein
Random nobody
Level: 5


Posts: 4/4
EXP: 419
For next: 110

Since: 03-14-10


Since last post: 7.0 years
Last activity: 7.0 years

Posted on 05-14-10 08:24:18 PM (last edited by Torstein at 05-14-10 08:24 PM) Link
Haha, I barely knew anything when I made that. It was simply editing together codes in a manner I found logical.
That was before I actually put enough effort to try to understand yoshielectron's video, despite that accent of his. I know it's easy, but that may not be the case for a norwegian person.
EDIT: Sorry if my grammar is just a giant word salad.
jhon

Level: 14


Posts: 1/37
EXP: 11640
For next: 1431

Since: 05-28-10


Since last post: 7.0 years
Last activity: 7.0 years

Posted on 05-28-10 03:49:55 PM Link
8107EC20 FFFF
8107EC22 FF00
8107EC24 FFFF
8107EC26 FF00
8107EC28 FFFF
8107EC2A FF00
8107EC2C FFFF
8107EC2E FF00


/|\
|
|

this gameshark code makes Mario's overalls white.
Rena

Star Mario
Fennel
Level: 127


Posts: 3288/5239
EXP: 23116069
For next: 610497

Since: 07-22-07
From: RSP Segment 6

Since last post: 35 days
Last activity: 22 days

Posted on 06-01-10 02:55:11 AM Link
Yep, enemy data in RAM has a "number of coins contained" value.
Originally posted by Hectamatatortron

8029EDCC - Spawns a coin; A0 is some pointer, A1 is the object appearance, A2 is some integer

Changing register A1 from 0x74 to 0x76 after killing an enemy that drops a coin and reaching the PC 0x8029EDCC will make the resultant coin appear to be a blue coin, but it still only gives 1 coin. *shrug*
Probably because that "some integer" is the object behaviour ID (or more precisely an RSP segment pointer). Something like 1300xxxx, fairly small number, multiple of 8?
MarIO0
Member
Level: 15


Posts: 8/43
EXP: 15294
For next: 1090

Since: 09-03-09


Since last post: 4.0 years
Last activity: 4.0 years

Posted on 06-23-10 09:37:19 AM (last edited by MarIO0 at 06-23-10 10:16 AM) Link
What's the best way to do a 32-bit comparison on GameShark?

Here's what I have now, but it requires a lot of codes and a temporal variable:



81001714 0000 // Clear 16-bit temporal variable
D133B1C4 0000 // If first part of speed is 0
80001714 0001 // Set the first byte of the temporal variable
D133B1C6 0000 // If the second part of the speed is 0
80001715 0001 // Set the second byte of the temporal variable
D1001714 0101 // Check if both conditions matched (speed = 0 as 32-bit)
8033B177 0000 // Remove cap from Mario
D3001714 0101 // Else
8033B177 0019 // Wing cap



EDIT: This can also be seen as "what's the best way to implement && and || in GameShark?". The example above can be seen as doing "if LOWORD(speed) == 0 && HIWORD(speed) == 0", just two 16-bit comparisons
messiaen
Catgirl
Level: 64


Posts: 896/1085
EXP: 2142833
For next: 71264

Since: 11-20-07


Since last post: 3.0 years
Last activity: 2.0 years

Posted on 06-23-10 10:33:41 AM Link
I don't know much about complex Gameshark codes (try reading the "EnHacklopedia" at kodewerx.org), but if your are comparing to 0 I think you could accomplish this with an optimized ASM hack (note register usage and delay slot exploit) such as:

LUI V0, 0x8034
BNEQ R0, AT, DontRemoveCap
LW AT, 0xB1C4 (V0) /* load speed */
SW R0, 0xB177 (V0) /* remove cap*/
DontRemoveCap:
//

Number of codes would be higher, but you can get more flexibility plus patch it more easily into a ROM.
MarIO0
Member
Level: 15


Posts: 9/43
EXP: 15294
For next: 1090

Since: 09-03-09


Since last post: 4.0 years
Last activity: 4.0 years

Posted on 06-23-10 01:46:26 PM (last edited by MarIO0 at 06-23-10 01:52 PM) Link
Originally posted by messiaen
I don't know much about complex Gameshark codes (try reading the "EnHacklopedia" at kodewerx.org), but if your are comparing to 0 I think you could accomplish this with an optimized ASM hack (note register usage and delay slot exploit) such as:

LUI V0, 0x8034
BNEQ R0, AT, DontRemoveCap
LW AT, 0xB1C4 (V0) /* load speed */
SW R0, 0xB177 (V0) /* remove cap*/
DontRemoveCap:
//

Number of codes would be higher, but you can get more flexibility plus patch it more easily into a ROM.


This is for an experiment I'm working on, to create a really simple programming-like language to create custom Mario 64 GameShark cheats. So I can't use optimized ASM code like this one.
I could generate ASM code, but it doesn't give any benefit to the user, the codes would be longer, and it would require restarting the emulator to get it to work.

This is the code above in the syntax for that language that I currently have in mind:


if speed == 0
cap = wing_cap
else
cap = none
end



This is the syntax I have tought of:
Conditional expressions:
If, like C, no brackets required: if ((A == B && C != D) || (E == F))
Else, no "else if" allowed: else
End: end

Assignement:: Simply A = B

Values can be either a value that is compatible with the type of the item (e.g. action = 0x12345678, allowed because "action" is of type uint) or a "named value" (e.g. action = flying) (the items, addresses, types and named values would be declared in an external and user-editable file).

Implementing everything other than "if" is straightforward. "if" is a bit more complicated because of the difficulty to parse it (everything else can be just parsed by regular expressions) and the difficulty to generate GS codes for it.

I don't know if it will be really useful, because it's very limited, but I think it may be useful to make cheats quickly without having to lookup every time an address list, convert the floating point number to bytes, etc.

For example, something like a moon jump cheat would be very easy to implement:


if buttons == L
action = single_jump
yspeed = 20
end



(BTW, something like this doesn't already exist... right?)
DarkSpacer
Member
Level: 28


Posts: 54/184
EXP: 130666
For next: 672

Since: 03-23-10


Since last post: 1.0 years
Last activity: 157 days

Posted on 06-23-10 03:16:34 PM Link
That...would be the awesomeist thing EVER.

I don't think there's anything like that already...
messiaen
Catgirl
Level: 64


Posts: 899/1085
EXP: 2142833
For next: 71264

Since: 11-20-07


Since last post: 3.0 years
Last activity: 2.0 years

Posted on 06-23-10 04:00:44 PM Link
Sounds interesting, but I'm not sure if the Gameshark can handle multiple compares, or even nesting the conditionals. Again, you should ask people at kodewerx.org, they know everything about the Gameshark.
MarIO0
Member
Level: 15


Posts: 10/43
EXP: 15294
For next: 1090

Since: 09-03-09


Since last post: 4.0 years
Last activity: 4.0 years

Posted on 06-23-10 04:16:52 PM (last edited by MarIO0 at 06-23-10 04:25 PM) Link
Originally posted by messiaen
Sounds interesting, but I'm not sure if the Gameshark can handle multiple compares, or even nesting the conditionals. Again, you should ask people at kodewerx.org, they know everything about the Gameshark.


You can do AND and OR operations using the same trick I did above. For example, this code:



81001714 0000 // action == single_jump -> 0x1714 = 0x0101
D133B17C 0300
80001714 0001
D133B17E 0880
80001715 0001

81001716 0101 // speed != 0 -> 0x1716 = 0x0101
D133B1C4 0000
80001716 0000
D133B1C6 0000
80001717 0000

81001718 0000 // action == single_jump && speed != 0 -> 0x1718 = 0x0101
D1001714 0101
80001718 0001
D1001716 0101
80001719 0001

D1001718 0101
8033B177 0019
D3001718 0101
8033B177 0000



Would be equivalent to:


if action == single_jump && speed != 0
cap = wing_cap
else
cap = none
end



I use the Enhacklopedia as a reference for the Gameshark code types, and it doesn't look like it's possible to do any of those operations directly.

One thing I've tought is that if I could create some code that jumps to a section of the RAM every frame, and make the code generator make codes for this RAM section (I haven't tested if it's possible to execute code from the RAM), this would allow implementing a few basic operations and simplify the conditionals code without having to restart the emulator every time.

(I don't want to make the language complex... since you can already do complex code using C. The aim is to make something really simple so anyone, even non-programmers, can use it).
messiaen
Catgirl
Level: 64


Posts: 901/1085
EXP: 2142833
For next: 71264

Since: 11-20-07


Since last post: 3.0 years
Last activity: 2.0 years

Posted on 06-23-10 05:49:21 PM (last edited by messiaen at 06-23-10 05:50 PM) Link
Originally posted by MarIO0
(I haven't tested if it's possible to execute code from the RAM).

On the N64, code is always executed from RAM.

But that approach may fail on emulators because they mostly can't handle self-modyfing code, especially on the recompiler mode (once it gets executed for the first fime, you can change the instructions at RAM but the older code will run instead).

Edit: Oh wait, sorry, I think I understood your post incorrectly. Still, the warning about self-modyfing code is useful.
MarIO0
Member
Level: 15


Posts: 11/43
EXP: 15294
For next: 1090

Since: 09-03-09


Since last post: 4.0 years
Last activity: 4.0 years

Posted on 06-23-10 08:49:49 PM Link
Originally posted by messiaen
Originally posted by MarIO0
(I haven't tested if it's possible to execute code from the RAM).

On the N64, code is always executed from RAM.

But that approach may fail on emulators because they mostly can't handle self-modyfing code, especially on the recompiler mode (once it gets executed for the first fime, you can change the instructions at RAM but the older code will run instead).

Edit: Oh wait, sorry, I think I understood your post incorrectly. Still, the warning about self-modyfing code is useful.


I didn't remember about self-modifying code (this always gave me problems in Nemu64 while making cheats), so it would be impossible to do this unless emulators don't JIT the code in RAM, or there's some trick to avoid them from JITing, or I use an interpreter (maybe that is a good idea, since it would reduce the size of the code).
Rena

Star Mario
Fennel
Level: 127


Posts: 3432/5239
EXP: 23116069
For next: 610497

Since: 07-22-07
From: RSP Segment 6

Since last post: 35 days
Last activity: 22 days

Posted on 06-25-10 12:04:56 PM Link
Maybe what you want to do is hack a simple bytecode interpreter into the game and have your program generate that. (Or hack Lua into the emulator. )
Pages: 1 2 3 4 5 6Next newer thread | Next older thread
Jul - SM64 Hacking - SM64 Gameshark/Hex Stuff New poll - New thread - Thread closed




Rusted Logic

Acmlmboard - commit 2f1bc75 [2017-08-27]
©2000-2017 Acmlm, Xkeeper, Inuyasha, et al.

32 database queries, 11 query cache hits.
Query execution time: 0.158086 seconds
Script execution time: 0.017660 seconds
Total render time: 0.175746 seconds