GBS audio importing #925
Replies: 2 comments
-
How would you even do that? The music data, its encoding, and the code are heavily tied to the sound driver. |
Beta Was this translation helpful? Give feedback.
-
I've never really touched GBS, but this is what I think you'd need to do: You'd need to disassemble the GBS file and replace all addresses in it with "shiftable" labels so that no variables or subroutine addresses would clash with those used in your project. Unless you don't use any of the same RST vectors as the GBS does, they need to be moved, and To actually play the music, you need to look at what's in the file's header. Here's a specification of the file format: https://ocremix.org/info/GBS_Format_Specification Call the "INIT" function (pointer at $0008 of the GBS file) with the desired song number in the accumulator to start a song, and the "PLAY" function (pointer at $000A of the GBS file) at the regular interval established in the timer values in the header, whether it be VBlank or the Timer. This is not guaranteed to work! The code in the GBS file can do whatever it wants, and you might have to remove or change some parts of it. |
Beta Was this translation helpful? Give feedback.
-
I'm wondering how I could import/convert music in the GBS container to use in my project. Kick Assembler (a C64 assembler) has a feature for importing SID files, so I'm wondering if it's possible to do something similar with RGBDS. Converting the music data to ASM would also be fine.
Beta Was this translation helpful? Give feedback.
All reactions