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.
This is my first test to play wave sounds in the background for GBDK.
The function included in gbdk stops all other tasks untill it finishes, so I figured out a way to use it without stopping the program.
if (play == 1){ if (byte > 934) {byte = 0; play = 0;} play_sample((unsigned char *) &boing+(byte), 1); byte+=16; }
It will play a 16 byte chunk of the wave each loop, The (unsigned char *) & makes possible to advance in the array to play the next part.
Then you have to use it wothout any delay or wait_vbl_done();, so you'll have to add an VBL function to time the rest ot the program.
It would be easy to create an asm function to do this using gbdk source, But I'm not an ASM programmer.
Here is the GBDK sample rom and source: Sample Player for GBDK
Last edited by Mills (2016-12-02 16:28:59)
Offline
Really cool! Thanks for sharing!
Offline
Registered for this thread,
would absolutely love to mess with this but the link is dead. Do you still have a copy you can upload? Thank you!
Offline
rail5 wrote:
Registered for this thread,
would absolutely love to mess with this but the link is dead. Do you still have a copy you can upload? Thank you!
Here it is: https://github.com/mills32/GAMEBOY-DEMO … _Player.7z
There is a sample and a how to included.
Offline
Sounds interesting, I need to try this when I will have some time !
Thanks for sharing.
Offline
Volume is low and you can't do anything about it .
Last edited by Mills (2018-08-30 08:28:19)
Offline