gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Some good menu functions?

#168606 - hal - Sat May 09, 2009 4:45 pm

Hi everyone.

I'm working on an application, and need some menus. While I believe that I have learned enough in the tutorials to implement this, I'd rather not reinvent the wheel. I figured tht it would be easy to find some code to adapt, but it hasn't been.

I'm looking for something fairly simple that would be simple to implement - preferably well coded and well commented (as in, I would prefer simple and commented to flashy if I have options), so I can understand it - I'm somewhat of a beginner programmer, and totally new to GBA. It doesn't have to be a standalone menu demo - I could pull it out of some other code, I'd just rather not spend more time trying to figure out what they are doing than it would take to write it myself.

As of now I'm using HAM/HEL.

Any ideas?

Thanks!

#168607 - Ruben - Sat May 09, 2009 5:31 pm

Hi hal.

First of all, while you can keep using HAM, I personally wouldn't recommend it as it is fairly out of date; try using devKitARM or GNUARM, but that's just a minor thing.

Now onto your question...

You can find excelent code in Tonc, which I believe just about every AGB enthusiast has read. It is well optimized, fast, and very well commented, IMHO. It also comes with tonclib which you can use to do many things.

#168608 - hal - Sat May 09, 2009 10:26 pm

Sounds good - thanks for the hints. I started working through tonc, but then I wired up the GPS data display from: http://www.pixelproc.net/ And It uses HAM/HEL, so that is why I am currently using that. I was looking to modify that program, both to learn some, and also to try to make it work for geocaching. But it might be more satisfying to just write something mostly from scratch...(perhaps using their code to parse the TSIP data packets).

I'm not really that focused on game programming - eventually I want to use the GBA as a front end for other embedded systems projects. These things are now amazingly cheap for what they are (I paid $11 shipped for a GBA + $8 for a flash cart), and have really nice displays, some buttons, lots of storage (relative to a microcontroller), UART, etc....but you already know all that.

Anyway, I looked through the TONC tutorials some more, and I see the section on text systems, but it still doesn't really look like what I'm looking for - I was hoping to find something like a pokemon style game that I can just borrow the menu code out of (legitimately, of course - something open source). Any guesses?

#168609 - Ruben - Sun May 10, 2009 7:05 am

Tonc has source code for a "big map", and that shows you how to do menus. You can also look at m7ex, that uses demos too. Alternatively, you can look at OpenPoke and possibly ask Kawa for the source for the menu.