snipped to other topics. - dlong
First I'm going to post remakes of the old codes that needed some work.
The all guns codes required you to collect a gun before activating the codes on pain of not being able to switch weapons. Well, that's not a problem anymore.
All guns for all characters in single player:
and in Multiplayer:
I spiffed up the infinite ammo codes so that they would put ammo into the kick ass beta weapon that apparently nobody knew about:
Now for the good stuff.
Shoot through walls:
and a code to make the autoaim not shoot at your teammates ("Teammates? What teammates?" Um, yeah, teammates...I'll keep that a surprise for now :3) or the cell switches in S.S. Anubis (unless the switch has yet to be shot):
Yes. 1080 degree auto aim, but it tends to have better luck locking onto things in front of you, after which you can turn and face the other direction and fire at things you can't see with dead on accuracy. Works great with a rapid fire sniper rifle. Of which I have.
Single player "Uber" Code:
This code does a lot of shit. Infinite Health, Infinite Jet Pack Fuel, Rapid Fire, Instant and full charged gun meter, and even a nifty pointer dumping sequence that places the pointer to your dynamically allocated data in a static location, after which my other codes can use that pointer for various nifty effects.
Keep in mind the original codes that did what this code does only worked in certain rooms, because they didn't use assembly editing to take care of the nasty dynamic allocation.
But wait, there's a MULTIPLAYER version of this code! YAY
"Why in the HELL is that so long?!"
Well, the actual invincibility/rapid fire/jet pack fuel (yes, jet pack fuel in multiplayer :3) business only takes up a small chunk of code. The rest is dedicated to using logical checks to systematically dump the pointers of to each player's data into static addresses that are ordered based on which player is which. VERY useful for things such as player specific codes.
Right, now, a code that makes use of those pointer dumps.
The SPEED code. Makes you run insanely fast.
Works for each individual player.
And now, an all purpose escape-the-map code for getting past ANY, and I mean ANY obstacle:
Press Left and Right C to escape the map (player 1's controller only)
And a quick code to make the machine gun shoot in a STRAIGHT LINE, which is just...sweet. Except the rapid fire sniper rifle with auto aim and shoot through walls makes it pointless.
And now for the best part of my JFG hacking. I was able to bring the start menu of single player into multiplayer, which allows you to access the MAP menu and select a single player level.
This effectively means 4 PLAYER CO-OP MODE, of which there are tons of pictures of on my photobucket. :3
This code could use some work, though.A much better version of this hack in the form of a ROM patch is mentioned later in the thread.
Where "?" is the number of players you will be playing with. Most of that code is just there to disable the split screen when in single player mode. In co-op mode, entering a single player level will turn off the split screen, so you have to force it to stay on or else the other players will be playing but unable to see what they're doing
Now, lots of co-op mode bugs and issues revolve around the odd spawn points for the unaccounted players. Players 2, 3, and 4 have no business being in story mode, so the game just kinda puts them places. Well, here's a code that will fix that by warping them to wherever player 1 is, and facing the same direction, once player 1 presses L and R:
No wait. I just remembered. This code was merged into the same hook as the multiplayer "Uber" Code, so scroll back up to that and you'll see that the code is so long because it dumps the pointers dynamically, makes the players brokenly powerful, AND warps them to wherever player 1 is when player 1 presses L and R.
But really, that code is only my second longest code. :3
Before I post my LONGEST and possible my best code, I'll post the layout for multiplayer and single player player data in case anyone else wants to hack this game too.
But first I'm gonna hit submit again and make sure this all processes X_x
Okay, cool. Now, the long code.
Why is it long? Because it's a completely custom save and load routine that allows you to save and load files in co-op mode! All of your files will be completely interchangeable between single player mode and co-op mode, but you may need to have at least two friends so that player 3 can load Lupus's data...Lupus tends to freeze co-op mode because his data structure is too weird (in fact, the infinite health part of my uber code doesn't work on him, but the rest of it does).
Yes. I know. Terrible. But it works, so whatever, you know?
Here's how you use it.
First, you go into the single player file load menu. You copy the file you want to load to the slot you want to save in; this selects the slot you'll be saving in and loads the data of the file into the RAM. If you want to start a new game, do this anyway, because starting a new game still requires this unless you don't care where you save. Now, press L to copy the save data that was loaded into the RAM to a new place in the expansion pak area. (Oh, by the way, all my assembly editing codes require the expansion pak. I'm just that lazy. Speaking in retrospect several years later, I'd like to comment that pretty much none of the RAM in the lower 4 megabytes seems to be safe to use...even unused memory will be used eventually due to dynamic allocation.
Press B and select multiplayer mode and get a game going with the co-op menu code active. Now, either press L to load your save file, or pause and press Z to save your game, effectively starting a new file and skipping that over long intro cut-scene. Because of the nature of the code, I advise resetting after saving a new game and then loading that new game file normally, because the L button will load the file you didn't want to load and overwrite your new game if you haven't pressed it while in multiplayer. It only stops overwriting after the first press, after which it starts copying multiplayer data back to save RAM. Because of this, until you load a co-op game normally you won't be able to save most things.
Because the code now fully loads and saves all save data and has allocated space in the save data for a fourth player, it can load and save everything now (at least, it should). As far as I can tell you can play through the whole game in co-op mode, except for the rooms that still seem to freeze the game (which is every single room if someone is playing as Lupus, apparently).
Certain levels like Water Ruin will spawn the extra players on top of the ship, finishing a level prematurely and preventing play. To avoid this, hold L and R with the multiplayer uber code on as the landing cut-scene ends. The game won't load the screen until you release the buttons, so while you're sitting in darkness waiting for the level to load, count to like 5 before releasing L and R and it should finally load the level with all four players in player one's spawn position.
"What if I want to play the Water Ruin by using the code to place all players in player one's position, but don't want to cheat by having the invincibility and rapid fire effects, etc.?"
I'll work on some guide on which codes to NOP to deactivate specific parts of the code. Sure, you can disassemble the code and see the writes and nop them yourself, but you'd have to know which write is which to NOP specific cheats.
Oh, I forgot to post that data structure, huh? Silly me.
Here it is:
[afb4:0024] 80058F08: SW s4,0024h(sp[800F8DD0])
[afb1:0018] 80058F0C: SW s1[801BD7DC],0018h(sp[800F8DD0])
Offsets F8A0C and F8DE8 may contain, but will not always contain, player data block base pointer (+0x0BC)
S1=Player data base pointer + 0x0BC; add the following to S1 to acquire the addresses represented by these offsets' labels
+0x03A Byte that is set to 1 when an S.S. Anubis cell switch is destroyed
+0x11C Angle facing halfword; usually equal to horizontal aim halfword
+0x130 Vector added X?
+0x1A4 Pointer to data of enemy that has been targeted
+0x1C6/*1CA*/1CE/1DE Aim offsets (halfwords) - 1CA is horizontal aim and 1CE is gun's facing angle player-relative
+0x250 Vector added X?
+0x538 Timer that counts to 0 before the next bullet can be fired; set to 0 for ceaseless rapid fire for all guns
+0x53F Gun fuel byte; set to 0xA0-0xFF for infinite
+0x542 Pistol fuel byte; set to 0 for ceaseless rapid fire
+0x58C Jet pack fuel halfword; set to 0xDD0 for infinite
+0x7FA True health value; set to 0x40 for infinite
+0x00C/0x014 Horizontal position floats
+0x010 Vertical Position float
+0x020 Falling Speed
+0x09B Green flash from lock on when this byte < 4
-0x7F0 Data Start
-0x618 Angle facing halfword
-0x1FC Timer that counts to 0 before the next bullet can be fired; set to 0 for ceaseless rapid fire for all guns
-0x1F5 Gun fuel byte; set to 0xA0-0xFF for infinite
-0x1F2 Pistol fuel byte; set to 0 for ceaseless rapid fire
-0x1A8 Jet pack fuel halfword; set to 0xDD0 for infinite
+0x006 Health byte
And last and possibly least, the first code I made for this game.
Have All Ship Parts:
Edit: Let it be noted that the bits for the ship parts are 1111 1111 ???? 1111. That is, bits 7-4 aren't related to the ship parts (there's only 12 ship parts, see). I don't know why there's a gap there or what those 4 bits are for but setting the halfword to 0xFFFF doesn't seem to hurt anything anyway.
That ought to cover my currently short and still sweet N64 hacking career. No wait, I'm not getting paid for this (I ought to be!), so I guess it's not a career. Blast.