Notices
For all updates, view the main page.

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
Research & Development programs in this forum are subject to moderator approval before they are displayed.

Reply
 
Thread Tools
  #1    
Old October 8th, 2010 (9:12 AM).
Spiky-Eared Pichu's Avatar
Spiky-Eared Pichu Spiky-Eared Pichu is offline
NDS Hacker/Researcher
 
Join Date: Apr 2010
Location: Barcelona, Spain
Age: 21
Gender: Male
Nature: Calm
Posts: 257
Send a message via Windows Live Messenger to Spiky-Eared Pichu Send a message via Skype™ to Spiky-Eared Pichu
The other day I found a webpage describing how NDS .sbnk files work, but only a bit of information of them. So I will write it here and if someone knows more we can make a fully-fledged hacking tutorial.

What we know currently:

  • .SBNK files are like SoundFonts, but they only have pointers to other files that contain the instrument waveforms.
  • .SBNK files define how an instrument is played (ex: pitch, notes, pan, etc)
  • Each instrument is composed of 20 bytes:
  1. 8 bytes of "Region". I don't know what does this do, but we know that some soundbanks have it while others no.
  2. 4 bytes of unknnown information. Its value is 0100 by default.
  3. 4 bytes that define which .swav to use. The bytes are the position of the file in numerical/alphabetical order.
  4. 4 bytes that define which .swar to use. The first 2 bytes are which .swar files are used and the other 2 are the position of the file in numerical/alphabetical order.
  5. 6 bytes that define the instrument's settings. The 6 bytes are: Note number, Attack rate, Decay rate, Sustain rate, Release rate and Pan.
This is the known information for now. I still need to figure WHERE is this data found inside the .SBNK and discover what the unknown bytes are.

Information source: jul.rustedlogic.net

If you find new information, please post it here and help!
__________________
"Hacking has no limits. Don't try anything, DO IT!"

Jump into DS hacking with SDSME!


Beta 2 available!!


Reply With Quote

Relevant Advertising!

  #2    
Old October 21st, 2010 (5:57 PM).
Team Fail's Avatar
Team Fail Team Fail is online now
burning passion
ModeratorCS
 
Join Date: May 2009
Location: yes
Age: 21
Gender: Male
Nature: Brave
Posts: 12,746
Well, I know that VGMTrans can export them as .dls files. This tutorial can explain how to extract them, and this webpage explains what they are. If we can extract them as downloadable sounds, edit them and convert them back to .sbnk files and insert them, we could hack them. Just a thought.
__________________
CONTENTS
001
  THE LAB
002
  VISITOR MESSAGE
003
  PRIVATE MESSAGE
004
  PUSHING BUTTONS
005
  PUSHING BUTTONS BLOG
006
  ALT
007
  PHO
008
  PAIR 1
009
  PAIR 2
010
  TWITTER
011
  TF'S MUSIC STUDIO
012
  PC DISCORD - #GENERAL
SEEN
151

OWN
151
DATA
CRY
AREA
QUIT
Reply With Quote
  #3    
Old October 23rd, 2010 (7:22 AM).
Spiky-Eared Pichu's Avatar
Spiky-Eared Pichu Spiky-Eared Pichu is offline
NDS Hacker/Researcher
 
Join Date: Apr 2010
Location: Barcelona, Spain
Age: 21
Gender: Male
Nature: Calm
Posts: 257
Send a message via Windows Live Messenger to Spiky-Eared Pichu Send a message via Skype™ to Spiky-Eared Pichu
Quote:
Originally Posted by Team Fail View Post
Well, I know that VGMTrans can export them as .dls files. This tutorial can explain how to extract them, and this webpage explains what they are. If we can extract them as downloadable sounds, edit them and convert them back to .sbnk files and insert them, we could hack them. Just a thought.
Yes, I used the .dls files to remix Pokémon music. I tried to recompile it with hex, but I have the real trouble with the offsets. If we could have them, would be able to edit the instrument data.
__________________
"Hacking has no limits. Don't try anything, DO IT!"

Jump into DS hacking with SDSME!


Beta 2 available!!


Reply With Quote
  #4    
Old October 23rd, 2010 (7:54 AM).
Team Fail's Avatar
Team Fail Team Fail is online now
burning passion
ModeratorCS
 
Join Date: May 2009
Location: yes
Age: 21
Gender: Male
Nature: Brave
Posts: 12,746
Quote:
Originally Posted by Spiky-Eared Pichu View Post
Yes, I used the .dls files to remix Pokémon music. I tried to recompile it with hex, but I have the real trouble with the offsets. If we could have them, would be able to edit the instrument data.
Ha. I see someone thinks like I do. FL Studio, no? Anyways, what offsets are you after? And what are they supposed to be for? Everything you may be looking for could be in the .sdat file.
__________________
CONTENTS
001
  THE LAB
002
  VISITOR MESSAGE
003
  PRIVATE MESSAGE
004
  PUSHING BUTTONS
005
  PUSHING BUTTONS BLOG
006
  ALT
007
  PHO
008
  PAIR 1
009
  PAIR 2
010
  TWITTER
011
  TF'S MUSIC STUDIO
012
  PC DISCORD - #GENERAL
SEEN
151

OWN
151
DATA
CRY
AREA
QUIT
Reply With Quote
  #5    
Old October 23rd, 2010 (12:24 PM).
Spiky-Eared Pichu's Avatar
Spiky-Eared Pichu Spiky-Eared Pichu is offline
NDS Hacker/Researcher
 
Join Date: Apr 2010
Location: Barcelona, Spain
Age: 21
Gender: Male
Nature: Calm
Posts: 257
Send a message via Windows Live Messenger to Spiky-Eared Pichu Send a message via Skype™ to Spiky-Eared Pichu
The data in a SBNK is organized in two parts:

1. A list of every instrument with the offset to its data.
2. The data of the instruments. This is where it's determined which wave to use, the volume, etc.

What we don't know is WHERE is the 1st part.
__________________
"Hacking has no limits. Don't try anything, DO IT!"

Jump into DS hacking with SDSME!


Beta 2 available!!


Reply With Quote
  #6    
Old October 30th, 2010 (9:35 PM).
Team Fail's Avatar
Team Fail Team Fail is online now
burning passion
ModeratorCS
 
Join Date: May 2009
Location: yes
Age: 21
Gender: Male
Nature: Brave
Posts: 12,746
Well... I looked in my hard drive and found an old download.

*Nintendo Nitro SDK*

It MAY HELP, but I need to figure out how to use it.
__________________
CONTENTS
001
  THE LAB
002
  VISITOR MESSAGE
003
  PRIVATE MESSAGE
004
  PUSHING BUTTONS
005
  PUSHING BUTTONS BLOG
006
  ALT
007
  PHO
008
  PAIR 1
009
  PAIR 2
010
  TWITTER
011
  TF'S MUSIC STUDIO
012
  PC DISCORD - #GENERAL
SEEN
151

OWN
151
DATA
CRY
AREA
QUIT
Reply With Quote
  #7    
Old November 2nd, 2010 (8:17 AM).
Spiky-Eared Pichu's Avatar
Spiky-Eared Pichu Spiky-Eared Pichu is offline
NDS Hacker/Researcher
 
Join Date: Apr 2010
Location: Barcelona, Spain
Age: 21
Gender: Male
Nature: Calm
Posts: 257
Send a message via Windows Live Messenger to Spiky-Eared Pichu Send a message via Skype™ to Spiky-Eared Pichu
Thank you, now we know more things. I'm trying to edit a .sbnk from Pokémon Diamond, but I'm facing two problems:

1. NDS Editor doesn't work for me. When I open a file it says "Could not open file". To get the file dumps, I had to ask help to a friend (Sphark) who dumped and sent me the .sbnk dumps.

2. I am trying to replace a .sbnk with a bigger one, and you know what happens. I and Sphark have researched for the way an .sdat is read and we have made some progress: VGMTrans, Crystal Tile 2, etc read the new data, but the game does not.
__________________
"Hacking has no limits. Don't try anything, DO IT!"

Jump into DS hacking with SDSME!


Beta 2 available!!


Reply With Quote
  #8    
Old November 28th, 2010 (10:07 PM).
Team Fail's Avatar
Team Fail Team Fail is online now
burning passion
ModeratorCS
 
Join Date: May 2009
Location: yes
Age: 21
Gender: Male
Nature: Brave
Posts: 12,746
Well, why don't we look at VGMTrans' sourcecode? If it has the code to convert SBNK -> DLS, why don't we make it reverse the operation and make it into a separate running program?
__________________
CONTENTS
001
  THE LAB
002
  VISITOR MESSAGE
003
  PRIVATE MESSAGE
004
  PUSHING BUTTONS
005
  PUSHING BUTTONS BLOG
006
  ALT
007
  PHO
008
  PAIR 1
009
  PAIR 2
010
  TWITTER
011
  TF'S MUSIC STUDIO
012
  PC DISCORD - #GENERAL
SEEN
151

OWN
151
DATA
CRY
AREA
QUIT
Reply With Quote
  #9    
Old November 29th, 2010 (4:32 AM).
Spiky-Eared Pichu's Avatar
Spiky-Eared Pichu Spiky-Eared Pichu is offline
NDS Hacker/Researcher
 
Join Date: Apr 2010
Location: Barcelona, Spain
Age: 21
Gender: Male
Nature: Calm
Posts: 257
Send a message via Windows Live Messenger to Spiky-Eared Pichu Send a message via Skype™ to Spiky-Eared Pichu
...

I didn't know that VGMTrans was open-source. Yes, we can try to "mod" it so it does the reverse operation, but I'm not a computer programmer. I can try to do it, but I don't know what will happen...
__________________
"Hacking has no limits. Don't try anything, DO IT!"

Jump into DS hacking with SDSME!


Beta 2 available!!


Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:11 PM.