ipatix / agbplay

Music player for the most common GBA sound format
GNU Lesser General Public License v3.0
119 stars 20 forks source link

Search for multiple sound tables #42

Closed dogtopus closed 4 months ago

dogtopus commented 2 years ago

In Mother 1+2, there are 2 separate sound tables present in the ROM, one for each game. Currently agbplay only detects the first table (Mother 2) and ignores the second one (Mother 1). By patching the SongTable::locateSongTable() to always return 0xf71c34 and it seems to play fine.

It also seems like that if I just let the original SongTable::locateSongTable() to search everything until the end it will eventually find the second table as well. So maybe just change it to return an array and have the song list use 2 indices (i.e. table index and song index) to represent a song would fix this.

This might also work with other multicart titles (given that more of them exist).

ipatix commented 2 years ago

Interesting, so far I have never seen games that do this. I'll think a bit about it and how it's best to get implemented. Feel free to remind me in case this get's delayed.

dogtopus commented 1 year ago

Ping.

ipatix commented 8 months ago

Will be done with agbplay 2.0 #68

ipatix commented 4 months ago

I'll close this for now. It is merged and the next agbplay version in the works already has support for it.