gbadev
Game Boy Advance homebrew development forum
exelotlprofile picture

exelotl

Administrator
Last seen 5 hours ago
Joined:
Posts:
46
Topics:
10

Hmm, I imagine your Makefile is fine and there's something wrong with the code itself.

Oh god, yeah, this tutorial was part of a course which expected students to use 'devkitAdvance', a toolchain which hasn't been updated since 2003.

It's possible that the code was never correct, but happened to work because the compiler optimisations weren't very good back then.

This hasn't been properly announced yet but we've started a repo for community version of Tonc here: https://github.com/gbadev-org/tonc (viewable at https://gbadev.net/tonc/toc.html)

If you have any suggestions or contributions, please send them to us!

I'm pretty sure it was coined by Cearn in Tonc, but the term 'character' on Nintendo consoles to mean graphical data for a tile goes at least as far back as the NES, where it was called CHR memory. Makes sense given actual character glyphs would often be stored there, but also I guess it would've been inherited from the computers of the time, themselves rendering text using tile grids with predefined character sets.

One reason Tonc uses 'charblock' and 'screenblock' is because they provide a clear distinction between 'tile pixel data' and 'tile map data' where informally both of those might be called 'tiles' which would get confusing.

Charblocks are 16KB because that's the level of granularity with which you can choose a base tile to start rendering from in the BG control registers. In that sense, a charblock is a real unit that the GBA hardware uses. Likewise, screenblocks (2KB chunks of map data) are also a unit used by the hardware. See the CBB and SBB fields of the BG Control Registers to make sense of this.

I'm not sure about this one, but looks like those register names are for GB/GBC dev.

On the GBA, the sound registers are named differently (and even worse heh) - see The Audio Advance

Each channel is controlled by multiple 16-bit registers, and the convention is like so:

SOUND<n>CNT_L = sound channel <n> control (Low register)
SOUND<n>CNT_H = sound channel <n> control (High register)
SOUND<n>CNT_X = sound channel <n> control (eXtra register) (doesn't exist for every channel)

Unfortunately these tell you nothing about what the register does... you just have to know that SOUND2CNT_L does the same thing as SOUND1CNT_H, because SOUND1CNT_L is taken by the sweep feature that only exists for channel 1 (and consequently channel 2 has no _X register).

This has prompted many people to try coming up with better names, which of course nobody can agree on, so it looks like we're stuck with these :')

Yessss huge congrats! I played about half way through it this weekend, I don't think I've seen a 'metroidvania sokoban' kind of game before. I loved the moment when I got the sword and was able to cut through all the old puzzles to go back and find things I'd missed. The whole thing is brilliantly designed!

Oh yeah, the setup part of Tonc is quite outdated. Here's what's changed since it was written:

  • Programmer's Notepad is not really used by anyone, I'd recommend to use a different editor such as Notepad++ or VS Code, and then compile in the MSYS2 terminal by running make. (If that's unfamiliar to you, I wrote a bit about it here which might help?)

  • devkitARM now uses MSYS2 as the recommended terminal on Windows, and uses pacman to manage updates.

  • libtonc is now included in devkitARM's package repository, so you don't need to manually install the version from tonc-code.zip (in fact that version is outdated)

  • the examples in tonc-code.zip won't compile anymore, but you can find updated versions at which work with the latest devkitARM here: https://github.com/gbadev-org/libtonc-examples

Note that devkitARM doesn't include any templates for working with libtonc, but you can use one of these as a starting point:

That's about it!

And yeah, an updated / community-maintained version of Tonc is something we'd like to do at some point, it's just taking a while to get it off the ground.

TONC is what you get when you take "GBAP" (Game Boy Advance Programming) and apply ROT13 to it.

The only reason I know this is cause it's hinted in the title on cearn's blog.

According to Gericom (who isn't on here yet)

The AD bus is the gba rom bus.
[it stands for] Address and Data
I happened to know this because the word AD bus was also used in is-nitro related stuff to refer to the gba bus and memory mapped there for debug purposes
But I think it's mentioned in some other places as well

The old forums broke due to a PHP version upgrade. For a while they were basically read-only, then at some point last year they died for good.

We were in contact with one of the admins and nudged them to fix it several times, also offering to help if possible, but they assured us it's something only they can do. They are just very busy and haven't found the time to do it yet, and after 2+ years we got tired of waiting 😅︎

Hey welcome! There's a plugin which adds likes, unfortunately it's very old and won't work with the current version of the forum.

I'm personally not too fussed about this feature (too many metrics in our lives these days!), but ofc I do use it on sites where it's available, so I see how it can be good & useful. I may try fixing the plugin some day if enough people want it.