GBS files

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
GBS files
by on (#1759)
Is anyone even ripping these anymore? o_O Zophar hasn't updated the GBS archive in ages.

Well, anyway, the reason I ask is because there are a lot of gameboy games that haven't had GBS rips yet, and I think deserve them. So, I decided I'd try to rip some myself, instead of waiting. I know assembly, but only 6502 assembly. However, the GB's z80 shouldn't be hard to learn. I've looked at the GBS spec, but I still don't fully understand it. Is there a tutorial, or a faq or something that can help me?

Yeah, I know this is an NES hacking board, but come on, you can't tell me that NO ONE here knows anything about the gb as well... :P

by on (#1760)
I know the GBA, but I've never been able to comprehend its music rip format (GSF) either.

by on (#1761)
Well, I found a rip of TMNT, by Blargg, so I know there's still an occasional rip.

In case your interested, I have a list of games I'm looking into, which includes:

Gameboy Camera, all Game and Watch Galleries, Bugs Bunny Crazy Castle series, Motocross Maniacs 1 (simple tunes, but still catchy), and maybe more.

The only kind of ripping I've done, relating to gameboy audio, is ripping the waveforms various games use for channel 3. :)

Edit:
Right now, my primary focus is on gameboy camera. I don't care about those other games right now, I mainly want gameboy camera. I think I've tracked down where the music routine is, because if I NOP out a jp at 7FF0, the music'll freeze, but the rest of the game works alright. I've having problems with NO$GMB though, because I have no idea how to switch which ROM bank is displayed in the debugger.

Edit 2:
Ok, so I went to the address of the JP, and found 4 calls. If I NOP out the first 3 calls, the sound effects stop working, and if I NOP out the 4th, the music stops working, so I think I found the play address. The problem is, the GBS spec is confusing... I looked at tetris and balloon kid's GBS header, and the addresses specified in the header are beyond the end of the file. Yet, somehow the gbs player still is able to play the file. Am I missing something?

by on (#1762)
Drag wrote:
I looked at tetris and balloon kid's GBS header, and the addresses specified in the header are beyond the end of the file. Yet, somehow the gbs player still is able to play the file. Am I missing something?

Perhaps the play address is in CPU-space, which is only 16 bits wide. Did you try ANDing the play address with 0x0000FFFF?

by on (#1763)
Oh duh, I didn't think of that. I'll try that in a bit.

I found something else...
Right before those 4 calls is a conditional JP. If I NOP that out, the music does not change, whatsoever. I think I just found load... or init. Whichever one selects/loads a song.

It seems as though everything music related is contained in a single bank... as there is not a single bank changing write in that entire bank. I may be wrong though, but it'd make sense if the music engine + music data was contained in a single bank.

by on (#1764)
Drag wrote:
It seems as though everything music related is contained in a single bank... as there is not a single bank changing write in that entire bank. I may be wrong though, but it'd make sense if the music engine + music data was contained in a single bank.

Especially if it lets the music coder work more independently.

by on (#1766)
I ripped it! And it's WORKING! :)
I feel the rush! :D

edit: I've uploaded it now. You can get it here: http://drag.wootest.net/music/gbs/gbcam.zip

by on (#1799)
I've ripped another gbs, just in case anyone's interested:

Bugs Bunny Crazy Castle II

http://drag.wootest.net/music/gbs/bbcc2.zip

Edit: and another!
Garfield

http://drag.wootest.net/music/gbs/garfield.zip

This one was easy, it uses the same music engine as bbcc2 did. :) (so I knew exactly what to modify)

by on (#1840)
Ohh, try out Project S-11, it includes some nice tracks by Purple Motion.

by on (#1867)
Cool, nice to have a few new GBS albums. The GB Camera one sure has lots of tracks.

BBC 2 and Garfield both jump to $FFFF after sound effects complete, which requires that my GB CPU core handle PC wrap-around. No other GBS files cause wrap-around, so it would be nice to continue to flag this with an assertion rather than have to emulate it. In one (I forget which) it looks like it's popping HL off the stack, then doing PCHL to jump to $FFFF. A solution might be as simple as putting the address of an infinite loop at that point on the stack in the init routine. I'll probably pull out the debugger and fix it if I get bored.

by on (#1868)
Really? I didn't notice that. o_O
I did notice how the echo on the sound effects hangs after the sound effects end. I'll see what I can do. If I fix one, I can fix the other, because bbcc2 and garfield use the same engine.

I don't really know how to look for something like that, so that's why I didn't catch it.

Edit: Thank you for telling me this, I see that I accidently killed some code when I ripped the gbs, I forgot to rip a section. I'm going to duplicate the subroutine (very small subroutine) in the free space at the end of the bank.

Edit 2: The hanging note was because I was using Meridian and that seems to just be a quirk. In an actual emulator, I saw what was happening: the sound effect would end, and the title screen music would start up again. I was able to locate the code I accidently cut out, and I readded it, and now the sound effect mutes when it's finished. All is well! :) Now I just have to do this for Garfield...

Edit 3: Fixed and uploaded! The links are the same. Let me know if the problem's still there, although now the music won't restart after a sound effect.

by on (#1958)
Whee, another one!

Donkey Kong

http://drag.wootest.net/music/gbs/dk.zip

Should I keep posting these here when I rip new gbses?

by on (#1961)
Fine with me. This and the fixes to the previous to GBS files play fine in my game music player. Heh, maybe you can get them to put up tmnt.gbs that I ripped a while back (I did submit it then) along with any more that you rip.

by on (#3225)
It's been a while!
Here's another one:

Mickey's Dangerous Chase

http://drag.wootest.net/music/gbs/mickeychase.zip

Usual stuff, let me know if something is wrong. :)

by on (#3569)
Here's another new one

http://drag.wootest.net/music/gbs/ballistic.zip

Ballistic / Puzz Loop

Neato!

I still cannot believe I'm able to rip GBS files. o_O

by on (#3574)
I'm assuming you use a Game Boy emulator initially, make the GBS rip, then clean it up using a GBS-to-GB ROM utility so you can use a Game Boy debugger.

To help with GBS rips, I am working on a simple command-line GBS checker/debugger using my GBS playback library. I was thinking of cleaning it up and working with someone on the PC side to release an executable. The idea is that you use this as a final check of a GBS file. It checks the header for extra bits set (people often set the timer bytes wrong, for example), reports unmapped memory accesses, bad bank selection, etc. You can do basic stepping, disassembly, and breakpoints, which are enough to debug those last problems that you don't catch with the GBS-to-ROM testing.

Would this be useful? It's been on the back burner for a while and it'd be nice to make something of it. It could have a basic GUI, depending on whoever does the PC shell for it.

by on (#3775)
And here we have another! I wonder how many people have been waiting for this one:

Pocket Bomberman!

http://drag.wootest.net/music/gbs/pocketbm.zip

What I do is I use No$Gmb to find the proper banks and addresses that I need, then I use a hex editor to extract the banks I need, then I add a bootstrap before $4000, then it usually works, but when it doesn't, I look over the code in the rom, and then see if I need to modify something. I don't actually debug the gbs itself. Mostly because I don't have anything to turn it into a rom.

That usually is enough to get a working gbs, but I kinda break the rule of "clean it up!". :(

Edit (because I don't like replying to my own posts):
Now, Krusty's Fun House

http://drag.wootest.net/music/gbs/krusty.zip

Yeah, I know this has an NSF counterpart which sounds almost the same, but there are still some differences, and besides, the world needs more GBS files!

edit 2:
World Bowling

http://drag.wootest.net/music/gbs/wbowling.zip

Not a whole lot of songs though... then again, it's a bowling game.

edit 3:
Been a while, just want to say that you can now find all of my gbs rips (including new ones I rip) at:

http://drag.wootest.net/gbs/