Golden Sun Hacking Community

General Hacking => Non-GS Hacking => Topic started by: Charon on 04, March, 2009, 06:56:00 PM

Title: One-off Question Topic
Post by: Charon on 04, March, 2009, 06:56:00 PM
Well, we need one of these anyhow, and I didn't want to make a new topic for every problem I come across. (pin?)

BAH.

Atrius, one-off question. What kind of file do I have to save my .wav as (like, which Hz frequency, 8 or 16 bit, mono/stereo) to import sounds with, and how many bytes at the begining should I cut off from the wav file to make it work?

I know how to add the bytes at the begining of the .wav in the rom to make it play the right frequencies and length ect., but I really want to know how to import these. If I know, I could import the drum set/synth instruments from TLA from trimmed recordings.

EDIT: Please note that this is for hacking, nothing else. You can ask other kinds of questions in the Feedback section.
Title: One-off Question Topic
Post by: Atrius on 04, March, 2009, 07:50:00 PM
Well... The GBA uses signed 8 bit mono audio, but you can only save WAV files as unsigned 8 bit, so they don't quite sound right after importing them unless you can convert it first.  As for frequency, theoretically any should work as long as you set the right value in the header for the data after you copy it over, but practically I don't think I'd go above 22050 Hz.  (The GBA's direct sound channels can generate sound at about 16780 Hz max, having your audio sample's frequency higher than that can still help for lower notes though)

The location of the actual sound data in a WAV file typically starts at the 44th byte, but it can vary depending on if your audio program adds extra data to the header or not.  If you were to view it as text, you could find it by looking for the word "data", and skipping the 4 bytes after it (Although they're useful too, they specify the amount of data in bytes, which you'll need also)


You should be able to just copy the data for the drum sets over.  If you look at it, it's just like another set of instruments.
Title: One-off Question Topic
Post by: Charon on 04, March, 2009, 08:06:00 PM
Wha wha wha??

I spent all day yesterday and today looking for the snare! I couldn't find it! Do you know the offsets to the begining of the drum set data and the end of the drum set data? I could probably find it via trial error methods.

And a converter is where?...
Title: One-off Question Topic
Post by: Atrius on 04, March, 2009, 08:38:00 PM
In the instrument table, the entry for the drum kit would have a pointer to it's instrument set in the same place a regular instrument would have a pointer to it's WAV sample.

The drum kit instrument set starts at 0x081C3B70.


I had to program my own converter...
Title: One-off Question Topic
Post by: Charon on 04, March, 2009, 09:55:00 PM
I was going through the individual wav files to see if I could find anything...

Atrius, it's still not working. Some of those pointers lead to the system created instruments, and I really don't want to rewire anything. I tried to use your download link from my Jupiter topic on GSR, but I keep on getting an error. Do you have a fixed link by any chance? Or is it just my computer being stupid again?
Title: One-off Question Topic
Post by: Atrius on 05, March, 2009, 08:33:00 AM
I haven't released the converter yet.  If you're talking about my audio data ripping tool it's here now (http://www.mitxela.com/atrius/GBA_AudioRipper.zip).  I'll try to polish up the converter so I can release it sometime soon.

EDIT:

Here you go (http://www.mitxela.com/atrius/GBA_WAVConverter.zip), it'll automatically convert WAV files to 8-bit mono too if they aren't already, but It doesn't touch the sample rate.  It also automatically creates the bare essentials of the 16 extra bytes of data before the actual audio data that the GBA needs too.

If you're gonna record the instrument samples from the game playing it, it's good to know that a note with the value of 0x3C is played at the exact frequency the audio data is stored as.  This doesn't apply to drum kits where each note is actually a different instrument, and will be played at it's actual frequency regardless.

This post has been edited by Atrius on Mar 5 2009, 09:02 PM
Title: One-off Question Topic
Post by: Charon on 07, March, 2009, 09:36:00 PM
Thanks, Atrius, that will be extremely useful. I was getting worried that I'd have to transfer Song.gba's instruments *shudder*

Now that I've got that over with, I'm just gonna say that this topic is for anyone, not just the wonderful Charon, with one-off questions. SO ASK AWAY FIENDS!!

This topic was pinned for all members to use as a one question help thread. - Charon
Title: One-off Question Topic
Post by: Nicktallica on 12, May, 2009, 09:35:00 PM
I feel extremely stupid asking this, but how do I go about finding some free space in Golden Sun:TLA?  :MercurySet:  
Title: One-off Question Topic
Post by: Charon on 17, May, 2009, 12:57:00 PM
Quote from: Nicktallica on 12, May, 2009, 09:35:00 PMI feel extremely stupid asking this, but how do I go about finding some free space in Golden Sun:TLA?  :MercurySet:
There are some programs, known as "Free Space Finders", that can help you do that. Golden Sun's free space is filled with 0x00 bytes, so you could also go into a hex editor or tile viewer to search. Some pockets of free space are before 0x1C0000, and they're relatively small (ranging from about 6-40 KB) and the two big pockets are around 0x6322B4 (around 320 KB or so) and 0xF7964C (end-of-rom free space; about 550 KB).

Atrius said that Golden Sun: The Lost Age has a sufficient amount of free space (if I remember correctly, somewhere around 1-2 MB), but as I pointed out, it's scattered all over the place.
Title: One-off Question Topic
Post by: Rolina on 17, May, 2009, 01:35:00 PM
That's a good question, I'd like to know this too.  It'd be nice to have an option to let us max out the GBA capable space for the file, and perhaps a little gauge to let us know how full it is with content.  I don't think such a thing exists in the editor at the moment (if it does, SWEET!), but it'd be nice to have in v0.3
Title: One-off Question Topic
Post by: Nicktallica on 28, May, 2009, 08:23:00 PM
Thank you so much Charon. Now I can insert music easily without overwriting the game's memory!

Title: One-off Question Topic
Post by: Atrius on 28, May, 2009, 09:04:00 PM
Once I get my hard drives hooked up I can give you an exact list of all the free space in the ROM.

Charon, if I remember correctly, at 0x08680000 there's a list of pointers.  There are blocks of space before the majority of the first several locations.
Title: One-off Question Topic
Post by: Charon on 03, July, 2009, 03:46:00 PM
Hey, Atrius.

NEW QUESTION.

How do you do simple 16 colour palatte rotation via ASM? I can load an ASM code via scripting, but I want to make a palatte rotation occur similar to that in the animation of certain Pokemon attacks like Magical Leaf or Psychic, or like Golden Sun's Mind Read background.
Title: One-off Question Topic
Post by: Salanewt on 03, July, 2009, 05:40:00 PM
Oh yeah, I forgot about the colour rotating for Mind Read. I would also like to know how to do this, please?

Also, I was wondering. This is just a question, based out of curiosity, but is there any other way to raise the defense of a monster? The defense editor does not currently work, so this is why I ask this now.

Have a nice day.
:MercurySet:  
Title: One-off Question Topic
Post by: Aile~♥ on 03, July, 2009, 08:54:00 PM
Can VisualBoy Advance cope with ROMs bigger than can fit in a GBA cartridge? Is there room in Golden Sun 2 for extra characters, Psynergies, musics, sprites, enemies, etc.?
Title: One-off Question Topic
Post by: Salanewt on 04, July, 2009, 12:03:00 AM
Oh... Is there any way that we can compress/decompress graphics into/out of Golden Sun without the editor (which is not quite at this stage yet)?

Have a nice day.
:MercurySet:  
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 09:44:00 AM
Quote from: JamietheFlameUser on 03, July, 2009, 08:54:00 PMCan VisualBoy Advance cope with ROMs bigger than can fit in a GBA cartridge? Is there room in Golden Sun 2 for extra characters, Psynergies, musics, sprites, enemies, etc.?
A rom can be expanded to 32 MB. Luckily, Golden Sun is 8 MB, and the Lost Age is 16 MB, so there's plenty of new space for all that fun stuff.
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 10:09:00 AM
That is a good thing. From what you say, there is enough room in the Lost age to be able to duplicate the data and put it in the game. This would be pointless, but that means that much more can be added (as well as the places from the first game). I wonder how developed Golden Sun hacking will be by Christmas...

Oh yeah, I was wondering... If I want to insert a midi file, then do I have to use Anvil Studios?

Have a nice day.
:MercurySet:  
Title: One-off Question Topic
Post by: Atrius on 07, July, 2009, 05:21:00 PM
You can't really expand the amount of party member characters to be higher than 8 though, not without a lot of work.
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 05:24:00 PM
Whoever does do it though better release a patch >=D

@Salanewt - You can use any midi editing software, I just prefer Anvil.
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 05:37:00 PM
Oh, thanks Charon, but I was talking about inserting a midi that has already been extracted from a game (like those on a website).

Have a nice day.
:MercurySet:  :MercuryDjinni:

Oh yeah, I am prepared to do a lot of work so I can add more characters (at least until Yoshi is in). In fact, I might forget about adding characters and just replace Piers (but there goes another (almost redundant) character).
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 05:41:00 PM
Like... complicated ASM routines and the such?...
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 05:45:00 PM
Well, I one of my goals this summer is to learn as much as I can about ASM, so yeah. If I can, then I will use ASM to get more characters. Also, if and when it is possible, then I am going to add more graphics for Jenna, and make it so you can choose which gender you are. Who knows, I might make it so Kraden follows Felix (or Jenna if previous idea was successful) around everywhere they go, even on the world map.

So, I was wondering... Other than that one link that I posted, are there any other websites that I can go to that explain ASM hacking (preferable GBA, but SNES or N64 will be fine as well)?

Have a nice day.
:MercurySet:  :MercuryDjinni:  
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 05:48:00 PM
I'm thinking about doing some transformations with ASM, and using it to apply it to all of my Pokemon Sprites. Any good resources?
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 05:49:00 PM
Are you talking about adding to your Jupiter hack, or to add to Golden Sun?

Also, are you talking about graphics or no?

Have a nice day.
:MercurySet:  
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 05:51:00 PM
Yes, I am refering to my hack and I am also refering to graphics. The main issue is figuring how to replace the old data.
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 05:58:00 PM
Oh yeah. I can not currently think of any other sources right now, sorry. I am still a novice hacker (not amateur), and I am still reading this tutorial website. However, I will try to help in the future (or with other things).

Have a nice day.
:MercurySet:  :MercuryDjinni:  
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 06:03:00 PM
If I can make it work, I might even add an argument for individual Pokemon, but that's a LOT of work. o.o
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 06:05:00 PM
I would imagine so.

Oh yes, how do I apply the ASM patches to ROM files?

Please and thank you.

Have a nice day.
:MercurySet:  :MercuryDjinni:  
Title: One-off Question Topic
Post by: Charon on 07, July, 2009, 06:13:00 PM
Finally, an ASM question I can answer o.o

There are ASM compilers. You write the routine in a text document, then you load it in the compiler, and it will make a .bin file with the ASM code. Copy and paste.

Remember, ARM and THUMB codes are WORD based, and THUMB code pointers must end in either 1, 5, 9, or D.

If you're replacing an old routine, find the old routine's pointer, then repoint the pointer to the new routine.
Title: One-off Question Topic
Post by: Salanewt on 07, July, 2009, 06:22:00 PM
Thank you. By the way, a pointer is a set of numbers that determine what something is (or where it is), right?

Have a nice day.
:MercurySet:  
Title: One-off Question Topic
Post by: Charon on 08, July, 2009, 04:43:00 PM
Salanewt - please stop posting random questions here. This is in the General Hacking section, thus the questions here apply only to hacking. If you have a question about anything else, ask that question in the forum that closest applies to the subject of the question. If you continue, I'll have to raise your warn level.

Please do not apologize here either, you may PM me if you continue to have problems.
Title: One-off Question Topic
Post by: Drick9 on 17, July, 2009, 03:14:00 PM
I don't know if this question belongs in this thread or not, but anyway.

Does anyone know a way to extract or to obtain sound effects (not music) from a gba game? Specifically golden sun.
Title: One-off Question Topic
Post by: Charon on 17, July, 2009, 03:26:00 PM
You could extract them by setting songs to the same voicegroup and instruments as a long Middle C, or there are a variety of programs to extract them for you. Unfortunately, I do not have any such programs to distribute.

Are you looking to transfer the wavs to another rom, because that I can help you with.
Title: One-off Question Topic
Post by: Drick9 on 17, July, 2009, 03:34:00 PM
I'm looking to extract the sound effects somehow for personal use. They are rather good sounds. I geuss i'll try looking for a program. However most of the best programs are designed for specific games.
Title: Re: One-off Question Topic
Post by: pablitox on 05, October, 2013, 12:19:17 AM
Hey guys! im new here, nice to meet you!

i have a question, its about summon night 3 hajimari no ishi, you see, is there any way to override the word limit of each line? we are translating it, but trimming lines is a hard task to do


thanks!
Title: Re: One-off Question Topic
Post by: Daddy Poi's Oily Gorillas on 05, October, 2013, 12:26:45 AM
I haven't checked how that game's text stuff works yet. Is it uncompressed? (By your description, it sounds like it.) If so, are you able to repoint the text strings to free space? By "word-limit", do you mean the next string gets in the way, or does the game code really set the word-limit? (I would check sooner if you had chosen to edit an English ROM, since locating Japanese text takes an extra step or two, I think. (Which starts with a breakpoint in VRAM.))
Title: Re: One-off Question Topic
Post by: pablitox on 05, October, 2013, 12:18:34 PM
Quote from: Teawater on 05, October, 2013, 12:26:45 AM
I haven't checked how that game's text stuff works yet. Is it uncompressed? (By your description, it sounds like it.) If so, are you able to repoint the text strings to free space? By "word-limit", do you mean the next string gets in the way, or does the game code really set the word-limit? (I would check sooner if you had chosen to edit an English ROM, since locating Japanese text takes an extra step or two, I think. (Which starts with a breakpoint in VRAM.))


by word limit i mean the limit of the bubble containing the text, for example

あわなきゃなんないんだよ!?   it's length is 28, so the translation must fit there (it happens with all the game's lines)

i don't really know much about hacking, but the project's lead had a hard time overriding it so i thought i could ask
Title: Re: One-off Question Topic
Post by: pablitox on 18, February, 2014, 08:22:09 AM
He guys! how is it going? sorry the double post here. I wanted to update on our little project. to be honest it hasn't been very good so far, what with our leader leaving and having to rip the script.. Anyway we have it and we are getting the tools to insert it from another user called ritchburn, though our main person in gba hacking is busy, so i wanted to know if someone could help him crack this and insert the translated script. the tools are mostly complete if i recall correctly, here they are

https://github.com/wangds/sncsm3

they are made only by ritchburn.

many thanks!
Title: Re: One-off Question Topic
Post by: Do7 on 12, July, 2015, 08:22:48 PM
Does anyone know where I can down load sound effects used for some of the Psynergy in this game? Particular that of Move, Mind Read, and Catch?
Title: Re: One-off Question Topic
Post by: Salanewt on 14, July, 2015, 02:40:18 AM
Not sure about a download source, but I could give you a couple steps for ripping them yourself if you'd like. Basically involves changing sound effects so the music mutes, and then changing them back for the pure effects without background audio.
Title: Re: One-off Question Topic
Post by: Do7 on 15, July, 2015, 01:12:23 AM
Please and Thank you! It is most important that I receive these sounds effects. Particular that of Move, and Catch. I'm currently working on a huge project regarding GS and I need those sound effects!
Title: Re: One-off Question Topic
Post by: Salanewt on 19, July, 2015, 12:53:57 PM
Cool. Sorry for the late reply, been super busy lately.

The positive side is that this is really easy to do. Point-form should suffice.

You will need:
- Your audio recording tool of choice.
- VBA or comparable emulator.

Steps:
- Load GS2, preferably with a savestate that gives you access to the moves you want to rip.
- Open a memory viewing/editing tool.
- View in 16-bit, box near top of the window.
- Go to #080DD674 (type the address without the "#").
- Change the last two digits to "00". You should do what it takes to remember the old value.
- Use Move wherever you feel like; doesn't have to move anything.
  - This should mute the background music.
- Change the "00" back to what it was before. Although in this case I don't think it matters if you have Lift, since it shares this section of code and sound effect with Move.
- Use and record utilities as desired.

The nice thing about memory viewer is that none of the changes are permanent, meaning they will revert back to their usual values the next time you reload the game.

Hope this helps!