Golden Sun Hacking Community
February 25, 2018, 05:37:32 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: [1] 2 3   Go Down
  Print  
Author Topic: One-off Question Topic  (Read 26065 times)
0 Members and 1 Guest are viewing this topic.
Charon
On Probation
Veteran Member
*

Coins: 11
Offline Offline

Emblems: GBA Music Expert
Clan Position: Trickster Goddess of Luna
Posts: 1758

« on: March 04, 2009, 11: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.
Logged
View Profile
Atrius
Programmer Extraordinaire
Web Host

Fear my blades

Veteran Member
*

Coins: 1
Offline Offline

Gender: Male
Emblems: Website Founder
Clan Position: Creation God of Sol
Posts: 1757

« Reply #1 on: March 05, 2009, 12:50:00 AM »

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.
Logged

I'm shaking my head in general disapproval of everything
View Profile WWW
Charon
On Probation
Veteran Member
*

Coins: 11
Offline Offline

Emblems: GBA Music Expert
Clan Position: Trickster Goddess of Luna
Posts: 1758

« Reply #2 on: March 05, 2009, 01:06:00 AM »

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?...
Logged
View Profile
Atrius
Programmer Extraordinaire
Web Host

Fear my blades

Veteran Member
*

Coins: 1
Offline Offline

Gender: Male
Emblems: Website Founder
Clan Position: Creation God of Sol
Posts: 1757

« Reply #3 on: March 05, 2009, 01:38:00 AM »

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...
Logged

I'm shaking my head in general disapproval of everything
View Profile WWW
Charon
On Probation
Veteran Member
*

Coins: 11
Offline Offline

Emblems: GBA Music Expert
Clan Position: Trickster Goddess of Luna
Posts: 1758

« Reply #4 on: March 05, 2009, 02:55:00 AM »

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?
Logged
View Profile
Atrius
Programmer Extraordinaire
Web Host

Fear my blades

Veteran Member
*

Coins: 1
Offline Offline

Gender: Male
Emblems: Website Founder
Clan Position: Creation God of Sol
Posts: 1757

« Reply #5 on: March 05, 2009, 01:33:00 PM »

I haven't released the converter yet.  If you're talking about my audio data ripping tool it's here now.  I'll try to polish up the converter so I can release it sometime soon.

EDIT:

Here you go, 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
Logged

I'm shaking my head in general disapproval of everything
View Profile WWW
Charon
On Probation
Veteran Member
*

Coins: 11
Offline Offline

Emblems: GBA Music Expert
Clan Position: Trickster Goddess of Luna
Posts: 1758

« Reply #6 on: March 08, 2009, 02:36:00 AM »

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
Logged
View Profile
Nicktallica
Guest
« Reply #7 on: May 13, 2009, 01:35:00 AM »

I feel extremely stupid asking this, but how do I go about finding some free space in Golden Sun:TLA?  Mercury Djinni Set  
Logged
Charon
On Probation
Veteran Member
*

Coins: 11
Offline Offline

Emblems: GBA Music Expert
Clan Position: Trickster Goddess of Luna
Posts: 1758

« Reply #8 on: May 17, 2009, 04:57:00 PM »

I feel extremely stupid asking this, but how do I go about finding some free space in Golden Sun:TLA?  Mercury Djinni Set
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.
Logged
View Profile
Rolina
The Fulminous Witch
Jupiter Clan

Template maker turned lurker

Alchemist
*

Coins: 10
Offline Offline

Gender: Female
I am: wondering if we can get our clan position changed...
Clan Position: Grand Overlady of Jupiter
Posts: 6051

« Reply #9 on: May 17, 2009, 05: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
Logged

View Profile WWW
Nicktallica
Guest
« Reply #10 on: May 29, 2009, 12:23:00 AM »

Thank you so much Charon. Now I can insert music easily without overwriting the game's memory!

 
Logged
Atrius
Programmer Extraordinaire
Web Host

Fear my blades

Veteran Member
*

Coins: 1
Offline Offline

Gender: Male
Emblems: Website Founder
Clan Position: Creation God of Sol
Posts: 1757

« Reply #11 on: May 29, 2009, 01:04:00 AM »

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.
Logged

I'm shaking my head in general disapproval of everything
View Profile WWW
Charon
On Probation
Veteran Member
*

Coins: 11
Offline Offline

Emblems: GBA Music Expert
Clan Position: Trickster Goddess of Luna
Posts: 1758

« Reply #12 on: July 03, 2009, 07: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.
Logged
View Profile
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4565

« Reply #13 on: July 03, 2009, 09: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.
 Mercury Djinni Set  
Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
JamietheFlameUser
Diamond Pokémon
Mars Clan

Does this look like the face of mercy?

Prodigy
*

Coins: 0
Offline Offline

Gender: Male
I am: Poke poke poke poke... I can't stop it...
Posts: 2633

« Reply #14 on: July 04, 2009, 12:54:00 AM »

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.?
Logged

:P

Lloyd: Easy as pie.
Genis: Sweet!
Presea: ...Sweetie pie...
Zelos: Let's not start on this again...

Spoiler for epic mindscrew:
View Profile
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

Cbox
February 19, 2018, 09:50:20 PM
KyleRunner: "difficult thing about the army": I'm very good at taking orders, so I don't have issues with autority or discipline. The most difficult thing is to be away from my family sometimes. I lived an entire year away from my son, so I'd say that was the most hard part by far. Now it's great!
February 19, 2018, 05:51:35 AM
Fox: I'm happy to see we have plenty of people serving the country here. :)
February 19, 2018, 05:47:15 AM
Fox: Civilian here.
February 19, 2018, 03:05:38 AM
Majora: Good for you, something to be proud of. Air Force, here
February 19, 2018, 02:11:31 AM
Fox: That's good to hear... just checking if there were any possibility of doubt. What would you say was your most difficult thing about the army?
February 18, 2018, 12:39:38 PM
KyleRunner: Well, it was a destiny kinda thing, but I was very happy when I decided to join. It was just like I thought it would be (not in the beginning, though). I'm very pleased with my decision.
February 17, 2018, 11:32:41 PM
Fox: That's awesome!  Trying to figure what question I want to ask Something about how you felt when you made the decision to do the army, and whether it was different than your expectations/etc.
February 17, 2018, 01:53:41 PM
KyleRunner: Wow... My english got rusty. Anyway... I'm in the army now. My life turned 180. But I think it was for the best.
February 16, 2018, 12:45:45 AM
Fox: Hm? So where does that make you today?
February 16, 2018, 12:06:38 AM
KyleRunner: Five years ago I could not even imagine where I am today. I hope it works well for you too!
February 12, 2018, 07:22:50 PM
Fox: 2018 - The year that I will probably be working a manufacturing job. xP What would I have thought, if I told myself this five years ago. Eh?
January 28, 2018, 08:35:28 PM
Fox: You referring to changing the PC/leader sprite to someone else? - I forgot to mention that you can do this using VBA's memory viewer. (Found under Tools.)
January 28, 2018, 03:46:22 PM
shenlong: Hi, Im following up on @Raijinken's question about the sprite change... How do I access that to change it? and can you tell me what the values are for the characters? newbie here
January 26, 2018, 10:12:00 PM
roger: h a p p y  b i r t h d a y  z m a n
January 26, 2018, 01:38:04 AM
Fox: (Assuming you're going for "E")
January 26, 2018, 01:37:06 AM
Fox: So like... https://i.imgur.com/cI4Bgoy.png = Does not explain how it works, but follows this type of thinking.
January 25, 2018, 09:57:44 PM
Fox: Hm... Actually, this gives me an idea! What if the lighthouse becons on each lighthouse were actually portals?
January 25, 2018, 09:56:19 PM
Fox: Hard to explain without a diagram or something... but I could decide on that later. Right now, it turned out I dreamed of something! Something to do with going into the dark dimension... and to go between light and dark, required some energy (energy sphere/warp portal?) to be on... I forget most of the details of the dream now, but it's like you could get trapped in the dark world. Er...
January 25, 2018, 04:56:04 PM
KyleRunner: Can't understand... but... nice!
January 24, 2018, 06:20:33 AM
Fox: Third approach idea = Scan char tables and set up an array that helps to quickly jump over bits that are scanned in the char tables.... to kind of mimic an actual tree a bit better/ and reduce unnecessary scans.).... (untested, but what to know what it's speed is like.)

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.087 seconds with 22 queries.