Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2009-04-16 03:28:49

Unkwar
New member
Registered: 2009-04-16
Posts: 1

Sound problem with GBDK

Hi,

first of all sorry for my bad english.

There is few month than I made homebrew on NDS and for fun I want to made some little game for my old gameboy pocket.

So I use GBDK and I´ve no problem with background and sprites. ( I use GBTD and GBMB)

But my problem is to put some music on my game.

First i will see a GBDK exemple and the function play_sample(); but i don´t know how to convert a music file in .c usable for GBDK and if i use this function my program stop to play music...

So i will search another solution and i´ve find the ¨lemon player¨ (http://www.gamera.org/) with a little soft to convert and play .mod (8 channel max). It work great alone but with my game i´e an error on compilation :
ERROR; address overfow (addr bf48 >= 8000)   

If someone can explain me how to put music and sfx on my game it will  be very nice.

thanks

Offline

 

#2 2014-09-23 10:38:02

Crona
Member
From: Wisconsin
Registered: 2014-09-23
Posts: 58
Website

Re: Sound problem with GBDK

Very sorry that its been like 5 years since your question, but on the off chance that you would still like to finish that project I know how to fix that problem. Im guessing you put your music data as an array in a variable, because sometimes if you have to large of variables gbdk does give the address overflow error. A very easy fix for that is to write "const" before your variable declaration. so if it was:
UBYTE sound[] = {
lots of numbers here
};

it would be:
const UBYTE sound[] = {
lots of numbers here
};

again I am very sorry that it took you 5 years to have your question answered, I only started gameboy development last week, and only joined gbdev forums today because of the complete lack of information on the internet about gameboy development.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson