loveemu / gaxtapper Goto Github PK
View Code? Open in Web Editor NEWAutomated GSF ripper for GAX Sound Engine (beta-testing)
License: GNU General Public License v3.0
Automated GSF ripper for GAX Sound Engine (beta-testing)
License: GNU General Public License v3.0
https://www.youtube.com/watch?v=A0f8yZ6K_cY
As an example, you can tell starting by 0:14 in gameending/credits that instruments are not playing.
FYI: I manually ripped the soundtrack to inspect the details of the issue.
This problem can be solved by setting a reference to a different sample set than the song data in the Gax2Params structure (offset 0x2c). The address of the sample set is 0x80E7F84. I had assumed that this sample set was only used for FX and did not affect the music playback, but apparently that was a false assumption.
Gaxtapper does not yet implement a scanner for this kind of data. Therefore, more coding is needed to solve the problem.
This is the current specification. One-shot jingles are supposed to be played through the gax2_jingle function, but GSF uses the gax2_init function without any special flags, so it loops.
This problem can be solved by calling the gax2_init function with flags, but there is no way to do that in the command line interface right now.
Gaxtapper writes small, non-relocatable code to the ROM file. I had assumed that the necessary code and data would not appear at the beginning of the ROM, but this was not always the case.
Gaxtapper breaks the Div syscall function at 0x80001EA, causing the Powerpuff Girls to not work.
Music does not play. Foobar2000 will skip the song when played (i.e. silence).
The Vicarious Visions game runs the division function implemented for ARM on IWRAM, but Gaxtapper skips the original memory transfer procedure and calls GAX, so the code reaches an uninitialized memory address and crashes. The function to be called is as follows.
j__udivdi3: @ 8000254
MOVS R3, #0
MOV R12, R3
LDR R2, =0x3000C98
BX R2
__udivdi3_arm: @ 87F9F80 -> 3000C98
RSBS R2, R1, R0,LSR#31
SBCCS R0, R0, R1,LSL#31
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#30
SBCCS R0, R0, R1,LSL#30
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#29
SBCCS R0, R0, R1,LSL#29
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#28
SBCCS R0, R0, R1,LSL#28
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#27
SBCCS R0, R0, R1,LSL#27
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#26
SBCCS R0, R0, R1,LSL#26
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#25
SBCCS R0, R0, R1,LSL#25
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#24
SBCCS R0, R0, R1,LSL#24
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#23
SBCCS R0, R0, R1,LSL#23
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#22
SBCCS R0, R0, R1,LSL#22
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#21
SBCCS R0, R0, R1,LSL#21
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#20
SBCCS R0, R0, R1,LSL#20
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#19
SBCCS R0, R0, R1,LSL#19
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#18
SBCCS R0, R0, R1,LSL#18
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#17
SBCCS R0, R0, R1,LSL#17
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#16
SBCCS R0, R0, R1,LSL#16
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#15
SBCCS R0, R0, R1,LSL#15
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#14
SBCCS R0, R0, R1,LSL#14
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#13
SBCCS R0, R0, R1,LSL#13
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#12
SBCCS R0, R0, R1,LSL#12
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#11
SBCCS R0, R0, R1,LSL#11
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#10
SBCCS R0, R0, R1,LSL#10
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#9
SBCCS R0, R0, R1,LSL#9
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#8
SBCCS R0, R0, R1,LSL#8
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#7
SBCCS R0, R0, R1,LSL#7
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#6
SBCCS R0, R0, R1,LSL#6
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#5
SBCCS R0, R0, R1,LSL#5
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#4
SBCCS R0, R0, R1,LSL#4
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#3
SBCCS R0, R0, R1,LSL#3
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#2
SBCCS R0, R0, R1,LSL#2
ADC R3, R3, R3
RSBS R2, R1, R0,LSR#1
SBCCS R0, R0, R1,LSL#1
ADC R3, R3, R3
RSBS R2, R1, R0
SBCCS R0, R0, R1
ADC R3, R3, R3
MOV R1, R0
MOV R0, R3
MOVS R12, R12,LSL#1
RSBCS R0, R0, #0
RSBMI R1, R1, #0
BX LR
The __udivdi3 function for THUMB, which is often used in other games, resides at 0x8041AE8. However, this function also calls 0x8000254, so changing the trampoline jump destination to 0x8041AE8 will not work.
Semi-manual ripping...? π€
Even if it is difficult to fix the problem automatically, it would be easier to diagnose the problem if it could be detected.
The song for the 1st basement is missing. (reported by LAC)
To be more precise, there are two songs named "010-MXBA", in two different locations.
Add an ability to set playback parameters such as mixing rate.
Pro Tip: They can be edited manually by altering minigsf.
All songs do not work because the driver freezes in gax_play.
The issue is caused by IWRAM conflict between the Gaxtapper driver and GAX. The GAX driver works with a RAM area given by the user, but uses a fixed area to store its address to a pointer. Maya's pointer address is 0x30003D0, and since Gaxtapper uses more than 0x400 bytes of memory from around 0x30000A4, these will conflict.
Note that the address of the pointer may also point to EWRAM sometimes. (The Powerpuff Girls: Him and Seek (USA) = 0x2003ADC)
Some of the CT Special Forces songs can be played, but some cannot. For example, maintheme.minigsf can be played, but Boss.minigsf will be silent.
Apparently, this is due to a bug in GAX itself. For example, in the case of Boss.minigsf, GAX responds that the size of the required memory block is 0x8B0 bytes, but in fact, the driver displays an out-of-memory message on the screen unless you pass more than 0x8DC bytes of memory.
I haven't looked into the details of this calculation error, but it looks like our driver is better off using a memory block slightly larger than the size returned by GAX.
Music does not play. Foobar2000 will skip the song when played (i.e. silence).
Write 0 to ROM offset 0xf2cc (the starting address of gax2_estimate of invalid GAX copy) before running Gaxtapper.
By skipping the copy of the invalid GAX and linking it to the valid GAX, GSF will work in this way.
It looks similar to #13, but the details are slightly different.
Oddly enough, this game contains two GAX binaries. And one of them does not work well because the address of EWRAM is set as the jump destination in the switch table. That jump table is specifically located behind 0x8011512, and is called in gax_play. I do not know why it is laid out that way. It may just be garbage.
The other GAX binary, located at 0x8317518, has no such problem and works fine. I see this one being used in the game as well.
gaxtapper extract
fails with the following error.
ios_base::failbit set: iostream stream error
The song name contains slash, that is considered as a directory separator, then, the file output fails because the directory specified does not exist.
https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
Symbols like \\/:*?"<>|
should be removed or replaced with dashes or wave-dashes.
I don't think it is necessary to deal with reserved words such as "NUL" in practical use.
Are there any plans to support Dynamic Main Menu Music in Iridion II?
https://www.youtube.com/watch?v=Kh2O3I7iLjo
Currently Gaxtapper is designed for GAX 3.05A, but GAX 3.03A has a different structure offset, so the GSF file created will not work.
I think patching the structure offset will solve the problem. However, it is not yet clear in which version the structure offset change was introduced.
Some notes get unnaturally choppy. However, this is not rip's fault; it is as it is in the game.
https://youtu.be/3TKCnHlpMfw?t=640
It would be great if there was an option to fix this.
A jingle is missing: https://youtu.be/X2IqytWtUyo?t=277
Gaxtapper can only extract "AGB-BHPE-USA-087a47c4.minigsf"
SSIA. More function signatures needed.
Yes, some games will dynamically change the volume and fade the music outside of GAX. Do you want this to happen?
There is one song in CT Special Forces that cannot be played: briefing.minigsf. (Although I haven't checked the expected playback result, so I can't rule out the possibility that it's actually a silent file.)
No GAX error messages are displayed on the GBA screen. Also, each GAX function returns normally and does not jump to an unknown address.
There is a layout change in the Gax2Params structure between GAX 2.1 and 2.2, so GAX 2.1 won't play correctly until at least that is fixed.
As issue #11 shows, some games include jingles as sound effects, and we hope that Gaxtapper will support ripping them.
No files will be extracted, since gaxtapper is unable to find gax2_new, gax2_init and gax_irq.
Probably ND stands for No Debug, and since the branch to print error messages has been removed from these functions, the function signature needs to be added or adjusted.
where is the windows executable I couldn't find it on appveyor
β
is 0x92Jingles (course_clear for example) play once and then only noise can be heard until default time is reached.
There is a missing song.
https://youtu.be/g4Kg40tDmKI at time 19:37
SNG_A_1.minigsf has regular clicks throughout the track (Reported by Anterag).
Why not? Support for GAX V2 is obviously welcome, but more research and bug fixing is needed to make it a success.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.