Using Riivolution to reverse engineer by jurassicPieter at 9:43 AM EDT on May 22, 2010
Hey, has been a time i visited the forum. Fulltime job makes time rare. I recently was using the Riivolution homebrew that allows you to patch files on the game disc. The latest version even has the ability to stream files from your computer(albeit slow). Accidentally i figured it out you can use it to reverse engineer the brsar file beause the Riivolution server is very verbose.
what i noticed for Big Brain Academy(uses Brsar 1.2)
Loading BRSTM: 1. get filename from INFO chunk inside BRSAR 2. read 64 bytes header 3. seek back to the start and read header again+next chunk 4. stream audio
Loading BRSAR: 1. Read first 64 bytes for header 2. Jump to INFO chunk and read it entirely with help of the offset and size mentioned in the header. 3. Jump to SYMB chunk and read it entirely(weird, since they could have avoided jumping by first reading SYMB and then INFO)
Loading RWSD: 1. jump to offset mentioned in INFO chunk somewhere 2. read header+DATA chunk + WAVE chunk(coeff section of all subsounds), don't know how he knows the size to load. 3. for every subsound read the raw audio data, don't know where he get the size to read. It could also be chunks of 128kb but i saw him load a chunk bigger than 128 kb once.
Loading RSEQ: 1. jump to offset mentioned in INFO chunk somewhere 2. read entire RSEQ data and the RBNK that follows in one read. I also saw a few times that it was also loading a RWSD. 3. read blocks of 128kb of audio data?
I don't know if you checked the dolphin source code, but it's programmed in a very bad way. For example it creates a 1 gig memory pool when loading a rom. If you make a wii PSF format it will load 1 gig memory every time you play a song.
Anyway patching files can't be used for reverse engineering. Some games actually load the entire FILE chunk too (Wii Play for example). But using it to alter the brsar so it doesn't play sound fx works perfectly.
I used it on several games and also altered the brsar to see if i could make the game play only the music.
big brain academy for wii: it seems to use the symbol entries to play the select the sound. So I modified the brsar by changing the names of all the sounds i didn't want to hear and it worked. Though it freezes if it tries to play a sound on the wii mote, so wii mote sounds needs to be ignored changing.
wii play: changed the entire DATA chunk of the RSEQ files containing (sequenced) sound effects similar to SSAR to 0xFF (end of track) and it works perfectly. Expect a sound effect free soundtrack soon.