Kodewerx https://www.kodewerx.org/forum/ |
|
[N64] Super Mario 64 [U] [GS] https://www.kodewerx.org/forum/viewtopic.php?f=18&t=2821 |
Page 2 of 2 |
Author: | messiaen [ Mon May 18, 2009 11:30 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Some new codes by me: Disable All Act selectors (you can also enable for levels that don't use them, but it will crash the game) 8124BF3A 0000 Upside Down Mario (messing with negative camera distance) 8133c5a4 c1f0 3x Faster enemy movement (affects almost all enemies and moving platforms, lincluding Koopa-the-Quick and bowser): Code: 812A07F8 3C01 812A07FA 8036 812A07FC 8C21 812A07FE 1160 812A0800 C424 812A0802 00AC 812A0804 C426 812A0806 00A0 812A0808 4606 812A080A 2200 812A080C 4604 812A080E 4200 812A0810 4604 812A0812 4200 812A0814 E7A8 812A0816 0030 812A0818 C42A 812A081A 00B4 812A081C C430 812A081E 00A8 812A0820 4610 812A0822 5480 812A0824 460A 812A0826 9480 812A0828 460A 812A082A 9480 812A082C E7B2 812A082E 002C 812A0830 C7AC 812A0832 0030 812A0834 8FA6 812A0836 002C 812A0838 27A7 812A083A 0034 812A083C 0C0E 812A083E 0640 812A0840 C42E 812A0842 00A4 By the way, for those (still) interested in Mario 64, check out my complete hack of it: http://sites.google.com/site/messiaen64/themissingstars Tons of cool stuff, including a fire-mario powerup (at the end of the game though). |
Author: | Viper [ Mon May 18, 2009 3:57 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
messiaen wrote: Some new codes by me: Disable All Act selectors (you can also enable for levels that don't use them, but it will crash the game) 8124BF3A 0000 Cool codes. Refresh my memory though. What's an "Act selector?" |
Author: | messiaen [ Mon May 18, 2009 4:04 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Ops, I guess "Course Selector" is clearer than act selector. Anyway, what I mean is the white screen where you choose which star you'll play on. When that screen doesn't happen, the current course will be the last one selected. |
Author: | Parasyte [ Mon May 18, 2009 4:41 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
I discovered a code that made the camera completely upside down, but I can't find any record of it now. I thought it was on my old hard drive with some other stuff that I released around the same time... "Mario's clothes look like Luigi's" "Play as Yoshi" ... |
Author: | messiaen [ Tue Jul 07, 2009 5:35 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Just did a quick code which overwrites the current collision triangle type Mario is stepping on. Here its using value 0x15, which is used in the climbable hills in Bowser's last level, so the result is pretty much like Parasyte's walk on hills. Other cool stuff you can do is set everything to be slippery, get some wind in the level or make the floor quicksand. List of collision types: http://sites.google.com/site/messiaen64/commands Code: 81253728 3C02 8125372A 8033 8125372C 3442 8125372E B170 81253730 8C42 81253732 0068 81253734 2403 81253736 0015 ; replace with collision type you want. 81253738 A443 8125373A 0000 8125373C 03E0 8125373E 0008 81253740 27BD 81253742 0030 I was lazy and just overwrote part of one of the functions that print Debug stuff, later I may do a cleaner version. Code: org 0x80253728
LUI V0, 0x8033 ORI V0, V0, 0xB170 ; mario struct LW V0, 0x0068 (V0) ; Mario->_0x68 = pointer to current collision triangle Mario is stepping on ADDIU V1, R0, 0x0015 SH V1, 0x0000 (V0) ; collision type JR RA ADDIU SP,SP,0x0030 |
Author: | messiaen [ Thu Aug 20, 2009 11:22 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Not that this qualifies as an actual Gameshark code (I should have released it as a ROM Hack), but a few weeks ago I did a complete "pong" game using Mario64's print (and sound) functions. The AI has a few progressive levels of difficulty, plus each level you beat will give Mario some small prizes. If anybody feels like trying it, here's the 2500+ lines "Gameshark" code for Nemu . http://sites.google.com/site/messiaen64 ... edirects=0 It was written in C, (crappy) source code is available at my site. A video of it can be found here: http://www.youtube.com/watch?v=FBjUml6xPQo |
Author: | HyperHacker [ Sun Aug 23, 2009 10:39 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
That really is nuts. I don't suppose you've tracked down sin() and cos()? I've never found them in a game (nor really put any effort into trying). |
Author: | messiaen [ Mon Aug 24, 2009 8:47 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
From Nagra's Mario Resource master.cod file: 0x80325310,cosf 0x80325480,sinf By the way, I did a quick search now and here is the sqrtf function: 80323A50: JR RA 80323A54: SQRT.S F0, F12 |
Author: | HyperHacker [ Mon Aug 24, 2009 8:02 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Nice, thanks. I think I stumbled across sqrtf() in another game a while ago... just chuckled and moved on. Would be written down somewhere in my notes though. Amusing that they take at least two instructions to jump to two instructions. |
Author: | Hextator [ Mon Aug 24, 2009 8:05 pm ] |
Post subject: | |
How the heck did you find those? Also, what are the parameters? How do they work? It looks like they accept an angle with degrees from 0-511 (representing the 0-359 range more accurately than straight integer values) and then use a Taylor series to output a ratio...is that right? |
Author: | messiaen [ Tue Aug 25, 2009 7:52 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Nagra found those sinf and cosf functions. Since they are part of UltraLib, he probably just ran IDA PRO or another tool with the UltraLib signature files. Reference is on the N64 Functions Manual: Code: sinf Format #include "gu.h" float sinf(float angle); Arguments * angle is in radians for sinf and for sins it is in 0-0xffff format (representing 0-2I) What This Function Does It computes the sine in floating point. It returns an angle in radians and uses polynomial approximation. By the way, speaking of Gameshark codes which should actually be ROM Hacks hehe, I've tried recently to give another shot at the Fire Mario code. It's still buggy as hell, but at least it sort of works. Here's a video of it: http://www.youtube.com/watch?v=CxoayhKYRpM |
Author: | HyperHacker [ Wed Aug 26, 2009 10:48 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Radians, of course >_> I assume "2I" means 2*pi? Sweet hack btw. |
Author: | messiaen [ Sat Aug 29, 2009 3:16 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Dunno, I suck bad at math. But talking about sweet hacks, after a lot of work I got a Mario Kart red shell effect in Mario 64: http://www.youtube.com/watch?v=pHa7bwV6-As The red shells are beta models left in the ROM. |
Author: | Radical Hacker [ Sun Aug 30, 2009 8:36 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
nice red shell hack for SM64 |
Author: | lemmayoshi [ Sat Sep 05, 2009 11:50 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
messiaen wrote: Dunno, I suck bad at math. But talking about sweet hacks, after a lot of work I got a Mario Kart red shell effect in Mario 64: http://www.youtube.com/watch?v=pHa7bwV6-As The red shells are beta models left in the ROM. That is awesome. Very nice job. |
Author: | messiaen [ Sun Jul 04, 2010 8:57 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Been while since I last made a Gameshark code. It's so much easier to write stuff in C and inject into the ROM . This one decreases the "gravity" for a moon-like effect. Most gravity codes I have seen simply set the Y speed variable to a fixed value, but this one changes the minimum Y-speed value, so the effect is better. All those floats are part of LUI opcodes, default value is -75 (0xC2960000). 81256526 C116 812566A2 C116 812566BE C116 81256726 C116 81256742 C116 812567FE C116 8125681A C116 812569B6 C116 812569D2 C116 812E451A C116 812E4902 C116 |
Author: | Parasyte [ Sun Jul 04, 2010 11:59 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Does it affect enemies and other items, as well? |
Author: | messiaen [ Sun Jul 04, 2010 12:12 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Parasyte wrote: Does it affect enemies and other items, as well? No, it only affects Mario. I have tracked down one gravity function used by bob-ombs which may be also used by other ground enemies, but then most of the time they stick to the ground so changing the Y pull perhaps wouldn't change much. For a more general hack, I could try going through the entire list of objects, checking Y speed and restricting it (long code!), in fact, I'll try this now . Edit: Did a prototype in C, it works nicely! Still in optimized ASM it would take at least 60 lines I guess. |
Author: | Parasyte [ Sun Jul 04, 2010 6:24 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
messiaen wrote: For a more general hack, I could try going through the entire list of objects, checking Y speed and restricting it (long code!), in fact, I'll try this now . That's what CMX's Driver 2 "levitate all cars" code does. Well, kind of... That code actually just adds a constant to the Y-speed every frame. The effect is that all cars jump, but gravity still effects them. (If you continue holding the button long enough, the cars will all eventually land anyway, because their Y-speed creep will eventually be "bigger" than the constant.) Anyway, it sounds like a fun code to play around with. |
Author: | James0x57 [ Sun Jul 04, 2010 10:25 pm ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
I used that Driver 2 code every time I played that game with codes! |
Author: | messiaen [ Mon Jul 05, 2010 6:59 am ] |
Post subject: | Re: [N64] Super Mario 64 [U] [GS] |
Here's a video: http://www.youtube.com/watch?v=0ntso2XPgJI Note that only affects "fall speeds", more changes are needed for a better low gravity effect: Here's the code in C. Will try an optimized MIPS version when it gets better: Code: #include <n64.h>
#include "mario64.h" MarioStruct *Mario = (void*)M64_MARIO_STRUCT; /* Mario struct */ Object **Obj = (void*)M64_CURR_OBJ_PTR; /* General object struct */ u32 *CurrentObject = (void*)M64_CURR_OBJ_PTR; void _start ( void ) { asm volatile("la $gp, _gp"); int backup = (void*)*CurrentObject; int i = 0; *CurrentObject = (void*)M64_FIRST_OBJ_STRUCT; /* (Head of objects linked list)*/ for (i = 0; i < 240; i++) { if ( (*Obj)->y_speed < -10 ) { (*Obj)->y_speed = -10; } *CurrentObject = (*Obj)->next; } if (Mario->y_speed < -10) Mario->y_speed = - 10; *CurrentObject = (void*)backup; } |
Page 2 of 2 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |