Hey! I'd recommend to persevere with devkitARM as it's widely used and has up-to-date compilers with the latest fixes / optimisations / features.
After running arm-none-eabi-objcopy
you need to run gbafix
(which you should have under dkp/tools/bin/
) on the .gba file. This will insert the Nintendo logo into the game's header and calculate the header checksum, allowing it to pass the logo check that a real GBA (and many emulators) will perform on boot.
We have now added a library of music jingles to the repo (thanks to Totsnuk for making so many)! Each jingle lasts for a number of beats (usually 16), and the tempo increases as the player completes more stages.
How to use the jingles:
To play a song and ensure your microgame last for the correct amount of time:
_total_frames = play_jingle(mj::game_jingle_type::SONG_NAME_HERE, completed_games, data);
There are plenty to choose from, we might add more later (and can take requests if you have something specific in mind for your game).
I would recommend to start with METRONOME_16BEAT
so that you don't get sick of hearing the same song over and over during development :P
You can bring your own music too if you want! See below.
How to use your own music:
const int base_seconds = 8; // 16 beats at 120bpm
const int base_frames = base_seconds * 60;
_total_frames = recommended_total_frames(base_frames, completed_games, data);
Have fun!
Update! The repo has had some bugfixes & improvements (and will continue to do so) so make sure to update your project to the latest version every now and then!
Besides that, we've been planning how the music in the game will work. What we'll probably do is:
play_music()
method which you can call in your constructor, passing a song to (either a premade one, or one of your own)More details to be confirmed soon, but this is just to say: if you want your game to fit in time with the music, you might want to think about making sure it can adapt to varying numbers of _total_frames
!
(but if you want your game to have silence / ambience, or not follow the tempo, that's OK too, this is just a recommendation)
Update:
The jam is now over with 28 entries! You can play the final game containing them all here: https://gbadev.itch.io/gba-microjam-23
Hi everyone! We just launched the GBA Microjam '23!
For this jam, we're trying something different: everyone makes tiny 5-second games and then we combine them into one big WarioWare-like game at the end.
Submissions are open until the 29th October. Games should have a halloween theme and be made from the jam template (which uses C++ / Butano).
Check the jam page for more info: https://itch.io/jam/gba-microjam-23
Updates will be posted both here and on discord / irc, feel free to use these places to share your progress, ask questions, etc.
Hope you all have fun and I can't wait to see what everyone comes up with!!
Yep, I started redoing the chapter, a bit busy with other things now but should be able to get it done in the next week or so ^^
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!