Jump to content
  • 0

So I'm looking into getting into N64 ASM, would like some advice


The Tjalian
 Share

Question

Okay, so. My roots in game development stem from programming. Yes, while I enjoy a little bit of modelling work or map dev, my main roots are programming.

 

When I first "attempted" learning R4300i assembly I saw a bunch of scary looking opcodes and ran home crying like a scolded bitch. However, this was a good 4-5 years ago, my programming knowledge has significantly increased and feel comfortable finally learning how to get down and dirty with some proper low-level programming. My C++ knowledge is pretty good (although a little rusty because I haven't been doing it recently, but that's neither here nor there) and am comfortable with pointers. So, the basics and the intermediates of programming stuff I already know.

 

I took a gander at the original website which scared me from touching ASM this evening, and well, I felt reasonably comfortable with the very basic fundamentals of ASM within a reasonably short amount of time. Obviously, I only took a gander at the few opcodes there, such as LIU, ORI, ADDIU, and I would hardly say I could recite there exact parameters and what not right now (well, I could give it a crack!) but I was reading on how to hack enabler codes using ASM (the "how to crawl" of assembler tutorials...) and felt eerily at ease with it all within about 10 seconds.

 

So, I've decided I would love to look into this further and see how far I can go down the rabbit hole. Mainly for a few reasons.

 

1) I'd love a better understanding of lower level code, and having that understanding on an embedded device would be fantastic

2) While probably not a massive game changer, being able to say I know R4300i assembly on my CV might help me stand out a little better

3) I want to tackle this monster I wanted to tackle all those years ago, but never could, mainly because I was scared and the only people who really knew r4300i assembly in 2006 were a pain in the arse

4) If I get good enough, I'd love to be able to help out with the URA Project. I know this is a fair way off, but I'd love to be involved with the greatest Ocarina mod of all time and would love to help push the URA Project forward. As my map making skills aren't... satisfactory, for any mod (haha), I figured I'd play on my strengths and get really hands on with assembly hacking. This fourth one is more of a "if I can get good enough, this is what I'd like to do" more then a "this is a guaranteed entry into the team once I know enough" - because I know it isn't. The first 3 reasons are my main motivation, the fourth would just be a very tasty cherry on the top.

 

However, as I remember when I first started learning C++ all those years ago, it's all very well learning a language but if you don't have a battle plan of what to learn first, or rough projects to try and learn/hone those skills, you become a loose cannon and end up not really learning anything. As this forum seems to be the de-facto home for Ocarina lovers and assembly masters, I was wondering if you guys could help me get a rough idea of where I should start first, how I should progress, etc? I honestly don't really know where to start, outside of getting comfortable with the various "standard" opcodes (and even those I'd like a little hand with, or at least point me in the direction of a good (but friendly) resource).

 

So yeah, if anyone can help me, I'd be sincerely appreciative. Otherwise I'll have to go at it alone, and well, I don't always do too well like that :)

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

First, take a look at usage for all the different registers; floating point, temporaries, return address, stack pointer, etc. Then, I would look into how the N64 CPU handles all it's machine code (MIPS Architecture). Finally just read up on opcodes and how to use each one effectively and/or find examples on how they are used.

 

I'll probably be back to edit the post or reply with a couple of documents...

 

EDIT: Actually, scratch out what I said about the N64 CPU. I doubt you would need that knowledge. Also, here are a few links I've had book marked for quite awhile:

 

http://patater.com/gbaguy/n64asm.htm

http://doc.kodewerx.org/hacking_n64.html#hack_asm

http://viper.shadowflareindustries.com/files/hax0r/renegade64.html

http://www.orbitaldecay.com/N64/index.html

http://viper.shadowflareindustries.com/index.php?doc=n64asm

http://wareya.64.vg/etc/mips/

http://64.vg/dr/node/72

Link to comment
Share on other sites

  • 0

If you find yourself able to understand the opcodes, then you're well on your way. One of the things that'll really help you is understanding the MIPS 32 ABI (how function calls are done, the proper usage for registers, stuff like that). Once you get familiar with your debugging tools, try making a really simple code, like having your amount of ammo for a weapon increase rather than decrease when you use it. After that it's just doing enough hacking that you get familiar with MIPS and OoT's inner workings.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.