Banner
Views: 934,396,199
Time:
25 users online: 7 up,  Ayami, BennyWhatever, chickaDEE Magazine, cyber47509,  Deeke, deporteed,  DeppySlide, Friday_D0nat, Hooded Edge, Infinity, Jazzman287, Julintendo, katun24, KiloMinimo, ledi, LeedleLee337,  MarioFanGamer, Matt, OrangeBronzeDaisy, Phyll, semiblind, shaoshao, StayAtHomeStegosaurus, yogui - Guests: 102 - Bots: 124 Users: 52,124 (2,119 active)
Latest: AmnesiaSilence
Tip: Make sure your overworld's aesthetic, and the levels within, are coherent.
Not logged in.
Super Mario 64 - How to code in C for SM64 Tutorial
Forum Index - Non-SMW Hacking - Super Mario 64 Hacking - ASM & Data Repository - Super Mario 64 - How to code in C for SM64 Tutorial
Pages: « 1 » Link
Hello, I wasn't here now for over a month and what the hell! A new forum about SM64 Hacking! I never expected that and thought this forum is way more active than the SM64 Hacking Forum in Jul.rustedlogic.net

The point of this thread is following:
Some people, which just started with SM64 Hacking wanted to directly begin with complicated stuff like MIPS ASM coding. When a rumor was around, that I were "the father of SM64 Hacking" (Which isn't true, the real father is VL-Tone) a lot of people asked me where they can learn ASM. About some people I didn't thought about any longer and gaved them some PDF's, but at others I watched their videos and just saw, they just started with SM64 Hacking! I then wrote to some guy I forgot about, that he should first start with basic stuff like knowing what a hex address is, etc. Then he should start with basic Hex editing. But people wanted so badly to do this stuff, like giving mario more speed, when he hits a ! Box. (Yes, that must be because of Skelux's video) All this is very complicated in ASM hacking and is even harder than learning 658C16 ASM, which SNES has used. Then I remembered, that Messiaen released on the Jul forums a pair of header files, which are including all main functions, which SM64 use. The functions inside of the headers are then getting linked inside of the mario64.x. The linker does link the (yet not functional) functions to the addresses where the actual functions are really stored! This allows C coding in SM64. When I posted a link on how to do it, people were confused. Because of this, I made a long video where I explain how to code stuff in C for Mario 64. It starts with explaining all tools we need and then we're downloading all that stuff we need. Later we're setting it up. At the end, I showed some example codes, I compiled and used in Nemu64.

Where can I watch the video?
http://www.youtube.com/watch?v=QhzJl9iNOf8

The Download links
TDM-GCC:

http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/tdm-gcc-4.6.1.exe/download

(Short thing about this) - This is the MinGW compiler you will need. When starting, press "Create" and follow the steps. Also, disable the "check for updated files", since I never got any problems with this older version. Optional: You can try if newer versions also work, if they work without errors, then I correct this here. (But only for those, which had a successful compile in MSYS)

MSYS:
http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.10/MSYS-1.0.10.exe/download?use_mirror=switch&modtime=1079444447&big_mirror=1

N64Toolchain:
http://gzrt.googlecode.com/files/n64tree-win32-v1.0.7z

SM64 Header files:
http://sites.google.com/site/cajetan64/home/coding-in-n64-with-c/HeaderFiles.rar?attredirects=0&d=1
(Credit for gbi.h goes to Silicon Graphics, explode.h to messiaen, animations.h to messiaen and levels.h also to messiaen.)

If you have problems with compiling, then post it here. And please use pictures or video tapes. I have a better view of this, when I actually see what's happening.

The stuff provided here are mostly taken out of messiaen's website:
https://sites.google.com/site/messiaen64/

Same goes to Jul. Without that great forum, I never would be able to write this tutorial, even if it has some mistakes at the end:
http://jul.rustedlogic.net/forum.php?id=41


--------------------
Tarek701 is dead.
I see you still haven't included a fixed makefile. I guess you can download my fixed Makefile, otherwise msys will try to read the compilers with no directory. Just make sure to change the project name to whatever your C file is called.
Originally posted by cpuHacka101
I see you still haven't included a fixed makefile. I guess you can download my fixed Makefile, otherwise msys will try to read the compilers with no directory. Just make sure to change the project name to whatever your C file is called.


Oh, I forgot about that directories.
Thank you, I included it.

EDIT:
UPDATES:
- Included mips.h header file, allows a kind of inline MIPS ASM in C. (Not all opcodes included. I'm going to include them myself. Credit goes to messiaen)
- Included gbi.h header file, allows you to use GBI commands inside of your C file. Read the instructions inside of gbi.h to find out how to impletent it correctly. To see an example of using gbi, look at messiaen's test gbi.c file in folder tests. (Cpuhacka, important thingy here... I'm not safe about if this is in direct connection with Fast3D Vertices. If so, then please tell me. I'm not very familar, but as far as I know, Fast3D is being commanded by GBI. Is this right or wrong?)

-> Upcoming things:
Add more functions in explode.h (and to linker(mario64.x) of course). For example a little tiny function, which does the same like ExplodeObject(); but just without giving a coin. Also a function to blockDMA copies. (Function will be called: BlockDmaCopy(); )

Just a question, do you have some other documents, which explains the Fast3D display lists more detailled? Could be useful.

--------------------
Tarek701 is dead.
I only know how to manage compiled Fast3D scripts, such as 0x04 (Load verts up to 16), 0xBF (Draw triangle by multiple of 0A), 0xFD(Load texture tile), 0xF2(Texture clamping option), 0x03(88=Dark RGB for normals, 86=Light RGB), and some others... Although I think this may help... PM me if you want to know more about compiled F3D scripts.
Originally posted by cpuHacka101
I only know how to manage compiled Fast3D scripts, such as 0x04 (Load verts up to 16), 0xBF (Draw triangle by multiple of 0A), 0xFD(Load texture tile), 0xF2(Texture clamping option), 0x03(88=Dark RGB for normals, 86=Light RGB), and some others... Although I think this may help... PM me if you want to know more about compiled F3D scripts.


Looks like the function manual of the officiall N64DevKit?
Well, I had it also, but lost it long ago. Thank you for giving me the page!

--------------------
Tarek701 is dead.
Another Update!
This time I updated nemucheat.exe
-> From now on you can directly copy the new "Cheats.ini" file and paste it to your Nemu64 folder.

I included the nemucheat.exe inside of the HeaderFiles.rar
Take the new nemucheat.exe and put it in n64tree-win32/root/bin

Replace the old with the new one. Voilá!

Also, replace the old makefile in your codes folder with the new one to ensure that your output is a .ini file.

--------------------
Tarek701 is dead.
Update 2:
- Added another header file; ABI.h (Audio Binary Interface). To those who understand it, will like this.

http://sites.google.com/site/cajetan64/home/coding-in-n64-with-c/HeaderFiles.rar?attredirects=0&d=1

--------------------
Tarek701 is dead.
The video is not working :(
--------------------
IS THAT YOUR FINAL ANSWER?
Pages: « 1 » Link
Forum Index - Non-SMW Hacking - Super Mario 64 Hacking - ASM & Data Repository - Super Mario 64 - How to code in C for SM64 Tutorial

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks