Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Sat Jan 25, 2020 4:54 pm

All times are UTC - 8 hours [ DST ]


Forum rules





Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon May 18, 2009 11:30 am 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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 :D (at the end of the game though).


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2009 3:57 pm 
Offline
Kommunist
Kommunist
User avatar

Joined: Mon Oct 02, 2006 7:47 am
Posts: 336
Location: Amish Redneck Country, PA
Title: Crazy Snake
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?"

_________________
Be a real programmer. Program without the .SHIT Framework.
Check out my movie collection
Quote:
<ThePhantom> What, would you prefer I keep track of it with fucking binary shifting, like you probably did? Hell no.
<ThePhantom> A hedgehog's asshole could understand my code, N-O-B-O-D-Y B-U-T Y-O-U C-A-N U-N-D-E-R-S-T-A-N-D Y-O-U-R-S
<Parasyte> Nobody has to understand it
<Parasyte> Plus, bitwise shifting owns
<Parasyte> A lot
<ThePhantom> Nobody has to understand it?
<Parasyte> Correct...
<ThePhantom> Write code like it's for your job, ass. :P
<Parasyte> No way.
<ThePhantom> Either provide fucking documentation or don't write it like a deranged circus chimp on crack.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2009 4:04 pm 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 18, 2009 4:41 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:26 pm
Posts: 3765
Title: All in a day's work.
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" ...

_________________
I have to return some video tapes.

Feed me a stray cat.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 07, 2009 5:35 pm 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 20, 2009 11:22 am 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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 :P.
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


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 23, 2009 10:39 am 
Offline
Komrade
Komrade
User avatar

Joined: Tue Mar 27, 2007 6:23 pm
Posts: 1354
Location: Mario Raceway, 1509.831, 217.198, -564.429
Title: Mario Kart 64 Hacker
That really is nuts. :D

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).

_________________
Image 143
HyperNova Software is now live (but may take a few tries to load) currently down; check out my PSP/DS/Game Boy/Windows/Linux homebrew, ROM hacks, and Gameshark codes!


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 24, 2009 8:47 am 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 24, 2009 8:02 pm 
Offline
Komrade
Komrade
User avatar

Joined: Tue Mar 27, 2007 6:23 pm
Posts: 1354
Location: Mario Raceway, 1509.831, 217.198, -564.429
Title: Mario Kart 64 Hacker
Nice, thanks. :D

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.

_________________
Image 143
HyperNova Software is now live (but may take a few tries to load) currently down; check out my PSP/DS/Game Boy/Windows/Linux homebrew, ROM hacks, and Gameshark codes!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Aug 24, 2009 8:05 pm 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
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?

_________________
Image


Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 25, 2009 7:52 am 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 26, 2009 10:48 pm 
Offline
Komrade
Komrade
User avatar

Joined: Tue Mar 27, 2007 6:23 pm
Posts: 1354
Location: Mario Raceway, 1509.831, 217.198, -564.429
Title: Mario Kart 64 Hacker
Radians, of course >_> I assume "2I" means 2*pi?

Sweet hack btw.

_________________
Image 143
HyperNova Software is now live (but may take a few tries to load) currently down; check out my PSP/DS/Game Boy/Windows/Linux homebrew, ROM hacks, and Gameshark codes!


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 29, 2009 3:16 pm 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Aug 30, 2009 8:36 pm 
Offline
Kommunist
Kommunist
User avatar

Joined: Wed Oct 11, 2006 9:49 pm
Posts: 344
Location: Cybertron
Title: Click Here <------
nice red shell hack for SM64

_________________
Image
Image


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 05, 2009 11:50 pm 
Offline
Krew (Moderator)
Krew (Moderator)
User avatar

Joined: Tue Apr 01, 2008 5:51 pm
Posts: 382
Title: "Hacker"
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 04, 2010 8:57 am 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
Been while since I last made a Gameshark code. It's so much easier to write stuff in C and inject into the ROM :P.

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 04, 2010 11:59 am 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:26 pm
Posts: 3765
Title: All in a day's work.
Does it affect enemies and other items, as well?

_________________
I have to return some video tapes.

Feed me a stray cat.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 04, 2010 12:12 pm 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 04, 2010 6:24 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:26 pm
Posts: 3765
Title: All in a day's work.
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. ;)

_________________
I have to return some video tapes.

Feed me a stray cat.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 04, 2010 10:25 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:46 pm
Posts: 2331
Location: *poof*
Title: The Mad Hacker
I used that Driver 2 code every time I played that game with codes! :D

_________________
Image


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 05, 2010 6:59 am 
Offline
Kommunist
Kommunist

Joined: Thu Jul 03, 2008 8:27 pm
Posts: 19
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;
           
}


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group