N64 homebrew toolchain

Discuss miscellaneous N64-related matter here.
Post Reply
User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

N64 homebrew toolchain

Post by MarathonMan » Wed Dec 17, 2014 5:19 pm

I kicked around the former cen64-toolchain and rebadged it as n64tool: an N64 toolchain.
http://git.cen64.com/?p=n64tool.git;a=summary

It now features/is capable of building ROMs with:
  • gcc-4.9.2, binutils-2.24
  • Full link-time, interprocedural optimization applied
  • A custom ABI to prevent excessive register spilling
  • 64-bit variants of bzero, memcpy, and memset routines
  • ... more to come
Not sure if anyone's into the homebrew scene, but this is the package that I've been using to build ROMs to validate implementation and whatnot.

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: N64 homebrew toolchain

Post by MarathonMan » Wed Dec 17, 2014 10:27 pm

Prebuilt toolchains for both Windows and Linux (both x86_64), in case you just wanted the compiler/linker (or want to do some dev'in!)

Windows (IA-32): http://downloads.cen64.com/n64tool-win32-latest.zip
Windows (x86_64) : http://downloads.cen64.com/n64tool-win64-latest.zip
Linux (x86_64): http://downloads.cen64.com/n64tool-linux64-latest.tgz

User avatar
OldGnashburg
Posts: 91
Joined: Tue Nov 19, 2013 3:00 pm
Location: Sherwood Park, Alberta, Canada: A place with free universal healthcare, and lots and lots of oil.

Re: N64 homebrew toolchain

Post by OldGnashburg » Thu Dec 18, 2014 11:34 am

This may be off topic but I have to ask (since nobody answered my question on my topic of homebrew), are there ANY good homebrew/hacks/emulators/ROM Hacks out there, as I am getting a 64Drive soon and would like to know what I can do with it. I've hacked my PSP full out and want to know what is out there for the N64. I already know of Neon64, but that is pretty much it. Also, good job MarathonMan, does this allow you to hack and modify commercial games (like SM64) as well?
Gnash, Gnash, Gnash...

User avatar
ARM9
Posts: 1
Joined: Fri Nov 07, 2014 2:58 pm

Re: N64 homebrew toolchain

Post by ARM9 » Wed Apr 01, 2015 8:09 am

I've been messing around quite a bit with this now and I've come to a point where I want to test some rsp code. I converted kroms psyq macros to gas, problem is linking since each program needs to be relocated to the same address. Overlays seem to be the way to go but then you'd have to add a linker script entry for each rsp program. I wonder if there are any other approaches?

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: N64 homebrew toolchain

Post by MarathonMan » Wed Apr 01, 2015 11:59 am

I was going to integrate my RSP assembler into it at some point: https://github.com/tj90241/rspasm

If you want to use GAS, I think what you want to do is assemble the RSP "microcodes" separately, all having a addresses that fall within 0x0-0x1000. Then you'd link/objcopy each one into a flat binary image, and place the binaries in some pseudo-filesystem or container that you ultimately concatenate to the ROM image proper. At runtime, you'd just DMA the offset of the binaries into RDRAM and ship them off to the RSP as needed.

User avatar
Jedi
Posts: 1
Joined: Wed Jul 08, 2015 5:37 pm

Re: N64 homebrew toolchain

Post by Jedi » Wed Jul 08, 2015 7:00 pm

Thank you so much for putting this together! :D

I've been working on a new level editor for Super Mario 64. It uses n64split, and I've been using n64tool for n64split's build system with much success!

Do you mind if I bundle n64tool with my level editor? It would make things a lot easier for me and my users!

If it's OK, please let me know how you want to be credited and if there's a license file you want me to include, etc.

Thanks again!

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: N64 homebrew toolchain

Post by MarathonMan » Thu Jul 09, 2015 10:41 am

Jedi wrote:Do you mind if I bundle n64tool with my level editor? It would make things a lot easier for me and my users!
Thanks for the positive feedback, I'm glad you found it useful!

By all means, go ahead and redistribute it. It's free software! n64tool is licensed under the GPLv3, since it's existence is essentially due to GNU binutils and gcc.

User avatar
Snowstorm64
Posts: 303
Joined: Sun Oct 20, 2013 8:22 pm

Re: N64 homebrew toolchain

Post by Snowstorm64 » Thu Jul 09, 2015 1:07 pm

MarathonMan wrote:
Jedi wrote:Do you mind if I bundle n64tool with my level editor? It would make things a lot easier for me and my users!
Thanks for the positive feedback, I'm glad you found it useful!

By all means, go ahead and redistribute it. It's free software! n64tool is licensed under the GPLv3, since it's existence is essentially due to GNU binutils and gcc.
But the LICENSE file states otherwise (BSD 3-clause): http://git.cen64.com/?p=n64tool.git;a=blob;f=LICENSE
OS: Debian GNU/Linux Jessie (8.0)
CPU: Intel i7 4770K @ 3.5 GHz
Build: AVX (compiled from git)

User avatar
MarathonMan
Site Admin
Posts: 692
Joined: Fri Oct 04, 2013 4:49 pm

Re: N64 homebrew toolchain

Post by MarathonMan » Sat Jul 11, 2015 11:52 am

Snowstorm64 wrote:But the LICENSE file states otherwise (BSD 3-clause)
Oops... fixed.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests