Code Monkey home page Code Monkey logo

gaxtapper's People

Contributors

loveemu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

angrysonics

gaxtapper's Issues

Unable to extract songs with name that contain reserved characters (iostream error will happen)

  • Game: Spiderman 3
  • Song: City Bombing Run/Rescue, etc.

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.

GAX stops working because of Out of Memory (GAX V2)

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.

IWRAM conflict between Gaxtapper and GAX (Maya the Bee: Sweet Gold)

  • Game title: Maya the Bee: Sweet Gold
  • Commit hash: ae7ba1e

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)

GAX Sound Engine V2 support

Why not? Support for GAX V2 is obviously welcome, but more research and bug fixing is needed to make it a success.

Games older than GAX 3.05 (<= 3.03) does not work

  • Game title: Maya the Bee: Sweet Gold, and many others
  • Commit hash: 7c7439a

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.

I can't find it

where is the windows executable I couldn't find it on appveyor

Prevent the one-shot jingle from looping

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.

Vicarious Visions: Music does not play (some routines need to be loaded into RAM)

  • Game: Spider-Man 3 etc. (see below, all games are developed by Vicarious Visions)

Music does not play. Foobar2000 will skip the song when played (i.e. silence).

Technical Background

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.

Any Solution?

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.

Games that have this problem

  • Finding Nemo
  • Shark Tale
  • Madagascar
  • Spider-Man 3
  • Shrek The Third
  • Over the Hedge
  • Tony Hawk's American Sk8land
  • Ultimate Spider-Man
  • X-Men 2 - Wolverines Revenge
  • Jet Grind Radio
  • Disney's Extreme Skate Adventure
  • Disney's Lion King
  • Tony Hawk's Underground
  • Spongebob Squarepants: Battle for Bikini Bottom
  • Disney's Brother Bear
  • Crash Nitro Kart
  • Shrek 2
  • Crash Bandicoot Purple: Ripto's Rampage and Spyro Orange - The Cortex Conspiracy
  • Tony Hawk's Underground 2
  • That's So Raven
  • Shrek 2 Beg for Mercy
  • Codename - Kids Next Door - Operation S.O.D.A.
  • Batman Begins
  • Madagascar: Operation Penguin

CT Special Forces: briefing.minigsf has no sound (GAX V2)

  • Game title: CT Special Forces (GAX Sound Engine 2.3B)
  • Song: briefing.minigsf
  • Commit hash: 66c9f16

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.

Cabbage Patch Kids: The Patch Puppy Rescue - Not extracted (GAX 3.05A-ND)

  • Game: Cabbage Patch Kids - The Patch Puppy Rescue

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.

Jazz Jackrabbit: Music does not play (cause: invalid duplicate of GAX library detected)

  • Game: Jazz Jackrabbit

Music does not play. Foobar2000 will skip the song when played (i.e. silence).

Workaround

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.

Technical Background

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.

Instruments are missing (GAX V2)

  • Game title: Disney's Treasure Planet
  • Song: MontressorPlatform.minigsf (and others as well?)
  • Commit hash: 66c9f16

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.

Cause and solution

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.