Format request - gba
BotB Academy Bug Reports and Feature Requests
 
 
188164
Level 22 Chipist
Opilion
 
 
 
post #188164 :: 2024.04.20 5:08pm :: edit 2024.04.20 5:21pm
  
  arceus413, lasersphaser, Raiku, Chepaki, blockblockblock, sean, Lincent, kilowatt64 and nitrofurano liēkd this
This would be something like:
- Nintendo Game Boy Advance
- Point type: chipist
- File types: .gba .bin .gb .gbc
- Max filesize: 8Mb
- Description: music for the Nintendo Game Boy Advance, any submission must run on hardware or on an emulator


Audio capabilities of the GBA
It contains a Sharp SM83 CPU (Game Boy CPU) for backward compatibility and adds two Direct Sound sample channels. In other words, it's like a Game Boy but it can play samples!

When compared to older chips (like the SPC700 from the SNES), the samples on the GBA sounds much more closer to what you would hear on a modern computer. However, there is some perceivable hissing, especially when playing high pitch sounds.

There is plenty of memory space to load samples, if think the limit will be imposed by the max file size we'll choose for the submissions (pretty much like the mixist formats).


MUSIC MAKING TOOLS...

...the chipist way
These programs run on the GBA (or on emulator)

Furious Advance Tracker (FAT)
A tracker inspired by LSDJ, it's available as a gba rom:
https://github.com/cbrouillard/furiousadvancetracker
(I can upload the compiled files on Google Drive if needed!)

It uses both the capabilities of the Sharp SM83 chip and the Direct Sound channels, the later can play either:
- samples at two volume levels -> 50%, 100%
- sines, triangle, sawtooth and 50% square waves

Nanoloop 2
Also a gba rom:
https://www.nanoloop.com/two/

I only started the rom on emulator, but I don't know how to use it yet :p


...the mixist way
You will use an external program for software mixing. The idea is to make a module file (with as many channels as you want), then the program will manage to play it on the Direct Sound channels of the GBA!

It's a bit tricky to set up but once it done, you can convert very easily your s3xmodit modules into GBA ROMs. I tried two of these programs, I think I'll make dedicated lyceum articles on how to use it.

Maxmod
Convert your .s3x, .mod, .it and .xm modules into .gba roms. The development is still active and it comes bundled with libgba, a C library to make homebrew GBA games.
https://maxmod.org/

Krawall
Convert .s3x and .xm modules into .bin executables. It was used on actual commercial games like The Lord of the Rings or the Sims, someone made a list of these here:
https://gist.github.com/loveemu/8082f19734aee7724ace11b2768b699f

It has been ported to work on modern computers (but 11 years ago) and uses libgba. It's more complicated to set up than Maxmod but it sounds differently so it can be nice to have both and choose the one you think is better for your song.

More information related to Krawall: https://tcrf.net/Format:Krawall
The source code: https://github.com/sebknzl/krawall/
A very cool program to rip module files from gba roms that used Krawall: https://github.com/MCJack123/UnkrawerterGBA


What about Furnace?
It can emulate the GBA but unfortunately it can only export your songs to wav.

Use the systems Game Boy + Game Boy Advance DMA Sound to have a setup similar to Furious Advance Tracker.
Use the Game Boy Advance MinMod for software mixing.


A few things we'll need to discuss:

1/The file limit
I wrote 8MB a little arbitrary, it seems to be more than enough when using software mixing but the Furious Advance Tracker roms are bigger (probably because they contains both the song and the tracker itself). There is a demo rom bundled with FAT that contains quite a lot of samples and it's a 5.2MB file.

2/Game Boy submissions
As the Game Boy Advance can play Game Boy games, I added .gb (Game Boy roms) and .gbc (Game Boy Color roms) as valid file types. This seems fair to me but we can also decide to keep these two for the Gameboy format.

3/Music players for the GBA
I didn't dig too much in this but I've read stuff about players running on the GBA that can play mp3 and VGM files (so you can use the GBA as a walkman). Do we allow it for Game Boy Advance entries?


EDIT
Here is a nice article about the GBA specs: https://www.copetti.org/writings/consoles/game-boy-advance/
 
 
188166
Level 31 Chipist
kleeder
 
 
 
post #188166 :: 2024.04.20 6:49pm
  
  nitrofurano, SRB2er, Opilion and Lincent liēkd this
I've seen this request come up a few times by now and wldnt mind the format
 
 
188169
Level 22 Chipist
Opilion
 
 
 
post #188169 :: 2024.04.20 8:59pm
I made a mistake in my remark 1/, in FAT your song is not saved in the .gba rom but in a save file with the extension .sav alongside the .gba rom.

This file is very small, but we can't upload it by itself as the samples are stored in the .gba rom. So it doesn't change anything regarding the max file size but we will need to add .zip to the file types that can be submitted, so that we can upload an archive containing a FAT rom with its save file.
 
 
188201
Level 22 Chipist
Opilion
 
 
 
post #188201 :: 2024.04.21 10:36pm
  
  Chepaki and sean liēkd this
I learned more about making music on the GBA, actually it's not really a matter of choosing between the original Game Boy sounds and rich samples. The GBA is capable to do both and it was actually used quite often! As all the mixing for the DMA channels is done in software, using samples is really intensive on the CPU. So games that were already going hard on the CPU for their graphics and other stuff had to rely on the Sharp SM83 chip for their music, reducing the CPU usage.

There is a tool called gbt-player that lets you compose a song using both the Sharp SM83 chip and the DMA channels on a single .s3x module file. Then it's able to convert it to a GBA rom using Maxmod.
https://github.com/AntonioND/gbt-player/tree/master/gba/examples/combined_maxmod
 
 
188243
Level 29 Chipist
nitrofurano
 
 
 
post #188243 :: 2024.04.23 11:49am
"(I can upload the compiled files on Google Drive if needed!)"
for which operating systems and cpu architectures?
 
 
188244
Level 22 Chipist
Opilion
 
 
 
post #188244 :: 2024.04.23 12:54pm :: edit 2024.04.23 1:34pm
  
  sean and nitrofurano liēkd this
The tracker is on a Game Boy Advance rom (a .gba file) so it should be compatible with any OS/architecture as long as you have a Game Boy Advance emulator.

I said this because the FAT developer wrote this at the beginning of the build instructions:
"These instructions are only available for a Linux machine : but I assume you use windows because you are expert with it. You should be able to translate all the informations below :)"

I'm a fortunate Linux user so here is the build:
https://drive.google.com/drive/folders/1CwMJ0kPw5mLlwo1lE9Q4ZmgiI7KR-Xkt?usp=sharing

You can use the rom FAT_v1.4.0.gba, which already contains a lot of samples. The manual provides instructions on how to import your own samples. However, it uses Unix shell commands (involving files manipulations with the > operator)... so I really don't know how to adapt it to Windows. Maybe the easier solution would be to setup a Linux environment in Windows (for instance with MSYS2
), so you can use the shell commands of the manual.
 
 
188299
Level 30 Chipist
OminPigeonMaster
 
 
 
post #188299 :: 2024.04.25 3:30am
  
  sean, Opilion and nitrofurano liēkd this
Id love to see this format added to our ranks.
Admittedly I'm one of the less tech competent botbrs, so I reckon I'd need some concise tutorials on setting things up, especially the s3x method.
 
 

LOGIN or REGISTER to add your own comments!