View Single Post
Old 2016-11-07, 20:24
MrQuetch's Avatar
MrQuetch MrQuetch is offline
Quetching a Mr.
Join Date: Apr 2011
Location: United States
Posts: 713
Post N64 "Libdragon" Toolchain

Just a quick off-topic statement: For those who don't know, I'm preparing for a mission soon, and should be leaving in mid-January of next year. If things go through and I don't have a nervous breakdown or anxiety attack during my mission, I should be back around February of 2019. The worst case scenario is that I return home early.

Anyways, in the meantime, I've figured I better start getting some things done, i.e. make good use of my time. One of the things I've always wanted to do is to try programming for the Nintendo 64. At first, the entire idea just seemed so unreal. I've had experiences with several different languages in the past, and it's given me a good understanding of how a computer works. But let's face the reality - every single language is different. Of course, a lot of those languages use similar semantics, functions, variables, constants, etc. But, sometimes too much of one thing causes someone to lose or forget the other things necessary.

Although I don't know a lot of C, I've figured within the past couple of weeks to start learning it more in depth. For those who know about the AITD hexing that I posted, I started using C to try to write a program for editing AITD files. As I've looked into the code that Xesf has made for looking at AITD files, I've decided I just need to take a step back, and try to take things one step at a time. This way ( as well as in general ) I'll have a better understanding of how programs can be made to manipulate any computer file.

Anyways, using a toolchain written by Shaun Taylor called, "libdragon" on an Ubuntu OS, I've been able to compile C code making a rom file and run it in a MESS emulator via a N64 virtual cartridge slot. Just to show that I've gotten part of the toolchain working, I posted an image below.

So far, I've learned to draw text at different positions, different colors, as well as background color. I've also learned how to input images into the rom file, and many other things. I'll admit - it's a lot of work, and although I don't know everything related to computer programming, knowing some is better than none.

Isn't that just the coolest? If it weren't for this toolchain, it'd be much harder to start writing code for the system. I've learned a lot about not only programming, but the system as well, and am looking forward for my, "Everdrive64" cartridge coming mid-November. It could come on the 10th, but I don't know if that's the case or not. The latest date is the 30th. With this cart, I'll be able to run my code on actual hardware, and will be able to have no fear of emulation glitches.

Right now, I'm currently trying to get audio to work. For some reason, controls haven't been able to work, and after spending several hours on this situation, have just decided that it's better to try out the controls when the cart gets here. I may try other emulators to see if the controls actually start working. My PC recognizes my controller is plugged in, and the emulator seems to be using the controller, but pressing buttons in the actual rom file does nothing.

If you guys are interested in more of this stuff, you could check out marshallgs, savestate, and sanni on YouTube. Marshallgs definitely knows what he's doing, and he has some of the best N64 demos I've ever seen.
I am a Quetch. However, I am a Mr. Quetch.
Reply With Quote