DiddyKong's BRSTM copier *NEW UPDATE 2015-3-09* SOURCE CODE RELEASED

Started by Diddy Kong, March 19, 2012, 12:09:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

the code I wrote you simply reads and writes a 4byte (32bit) value from and to a file you give it.

numbers larger than 255


as for the file input...

the thing outputs a renamed brstm from an input brstm right??

if so, then take the input brstm and use my function to read the 32bit (or 4 byte) structures in the brstm,
modify the value as needed,
and write the modified value to the output brstm.

simple as that

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

March 22, 2013, 11:29:07 PM #31 Last Edit: March 22, 2013, 11:31:03 PM by Diddy Kong
Quote from: DarkPika on March 22, 2013, 11:15:53 PM
the code I wrote you simply reads and writes a 4byte (32bit) value from and to a file you give it.

numbers larger than 255


as for the file input...

the thing outputs a renamed brstm from an input brstm right??

if so, then take the input brstm and use my function to read the 32bit (or 4 byte) structures in the brstm,
modify the value as needed,
and write the modified value to the output brstm.

simple as that
the way this thing works, is it uses the from variable (set by the user's file selection)
makes a copy of it to the app directory named "Final_Lap" and then it fidgets with that one so the original isnt damaged or lost

the final lap brstm is then copied to the sd

this file handling feature only runs in MKW mode, not brawl mode

March 22, 2013, 11:47:21 PM #32 Last Edit: March 23, 2013, 12:10:15 AM by DarkPika
ok...
now modify the file before writing it :)


you know how to encode the brstm format right??
(I assume you didn't know how to use GML to do it)


EDIT:
UUGH!
I hate the IEEE754 format >_<

I'm trying to figure out how to get from "1.0" to "3F800000",
and it's not going well >_<

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: DarkPika on March 22, 2013, 11:47:21 PM
ok...
now modify the file before writing it :)


you know how to encode the brstm format right??
(I assume you didn't know how to use GML to do it)


EDIT:
UUGH!
I hate the IEEE754 format >_<

I'm trying to figure out how to get from "1.0" to "3F800000",
and it's not going well >_<
i didnt use GML, i didnt write external scripts..

the brstm compiler frmo brawlbox was used (an exe)
that accepts CMD line params which the copier issues it does the rest on its own, the only thing given to it, is the file name to output, wav name to use, and the loop points spit out by vgmstream  none of the encode writing was done by me

dang... you had me believing you knew the byte structures of the brstm audio format... >.<
(back from the chat)


well...
if you want to step up and start on this with Python, I could help...

but if you're comfortable with GML, that's fine too :)

I'm actually noticing how GML is alot like Python :/

it's if statements are like Javascript
it's for loops are like C-types

does it's 'return' allow you to return multiple values??

eg: (Python)
def func(): return 1,2
var1,var2=func()


syntax highlighting FTW! XDD


anyways...
I can help you advance this thing if you want :)

-internal file handling
-audio editing and re-looping


of course though I'm a noob at audio XD
but hey... I have to learn if I'm gonna use OpenAL in my programs :/

UMC UGC,
Dynamic Audio,
Pika-speech simulator, :P
2 others I don't have a name for XD

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

idk if i installed the script right
https://www.dropbox.com/s/dfa237vvd2p7jrs/test.exe

but 1 and 2 will pull up boxes to set variables 
the file argument is now set to what global.from contains (which is the input file)

shift to run the script of yours.... i probably fked it up though D:

again i put the triggers to be manually set off by the debug object i mentioned earlier   i do not want to BREAK the code i already have

you're not supposed to shift to run it...

you're supposed to use the script (or function) like you would use file_bin_read_byte()

the script reads/writes 4 bytes instead of 1 byte

when reading, it returns the full int value of the 4 byte cluster
(not 4 1-byte values)

when writing, it returns nothing

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

March 23, 2013, 03:31:57 AM #37 Last Edit: March 23, 2013, 03:39:38 AM by Diddy Kong
Quote from: DarkPika on March 23, 2013, 03:28:01 AM
you're not supposed to shift to run it...

you're supposed to use the script (or function) like you would use file_bin_read_byte()

the script reads/writes 4 bytes instead of 1 byte

when reading, it returns the full int value of the 4 byte cluster
(not 4 1-byte values)

when writing, it returns nothing
where do you want this run then, and when?
im not going to cram it into the rest of the operations until we know for sure its going to do something useful and not break the normal intended operation of it


by shift , i meant the script runs when the SHIFT KEY on the keyboard is pressed i put this code on the debugger object that runs seperate from the rest of the wall of text

Post Merge: March 23, 2013, 03:39:38 AM

this'd be  easier if we BOTH could run test compiles of my src with your code (the GM installer i tried to give you installs the purchased version for free

run it when you want to perform file operations that require data from the file.

such as apparently increasing the volume of a brstm

you'll need to be able to read/write 32bit values for that


and yea... I figured it was the shift key...
(it's a pain to type everything... even on wii)

anyways... if you're going to send my function through the shift key, then why not send file_bin_read_byte() as well... just sayin... :P


again...
run it when you need yo read 4-byte structures as an int or write an int as a 4-byte structure.

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

the shift key runs the whole thing at once, the file variables 
is set by the load file object (this setting is nearly isolated from your script, i only simply added another variable for it to set)
1 and 2 were to set the other two variables i dont kow what to do with so i let those be settable by you during runtime

as stated before...

value_read = bu32( file_object, data_offset, "" )

an empty string tells the function to read from the supplied file at the given data offset.

in the code I renamed the variables to f,o,v as well as explained what argument(0-2) was used for...
I think you overlooked that :P



lol I feel like Revel8n when he was explaining Melee DAT structures to me back when I started developing MAV XDD
you can still find that on emutalk :D

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

March 23, 2013, 02:40:15 PM #41 Last Edit: March 23, 2013, 02:41:37 PM by jdaster64
Hmm, I might be able to help convert floating-points (decimal) to their integer encodings and vice versa if you still need that; I'll experiment with it later today.

March 23, 2013, 03:48:27 PM #42 Last Edit: March 23, 2013, 03:50:21 PM by DarkPika
Quote from: jdaster64 on March 23, 2013, 02:40:15 PM
Hmm, I might be able to help convert floating-points (decimal) to their integer encodings and vice versa if you still need that; I'll experiment with it later today.
PLEASE =3

google searching through VTunnel on Wii connected to a phone's hotspot that only provides https access is more than a hastle. D=
and slow =/

I can read IEEE floats of literally any size. (even 5-byte encoded floats)

but I can't write them.

I'll explain more on my UMC thread in this board...
(don't want to clutter up Diddy's thread any more than it already is)

sry bout that Diddy =(
I can delete some of my posts if you want?? :)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.

Quote from: DarkPika on March 23, 2013, 03:48:27 PM
PLEASE =3

google searching through VTunnel on Wii connected to a phone's hotspot that only provides https access is more than a hastle. D=
and slow =/

I can read IEEE floats of literally any size. (even 5-byte encoded floats)

but I can't write them.

I'll explain more on my UMC thread in this board...
(don't want to clutter up Diddy's thread any more than it already is)

sry bout that Diddy =(
I can delete some of my posts if you want?? :)
it's contributing info wise, or other, to the program in topic, is it not?
leave them there its because of that, its attracting programming attention

Quote from: Diddy Kong on March 23, 2013, 05:50:07 PM
it's contributing info wise, or other, to the program in topic, is it not?
leave them there its because of that, its attracting programming attention
your point has been made :)
and I fully agree with it XDD

though that programming attention is for UMC...
(not trying to gain by using your thread, that line just slipped) :P

I still need to finish my post :P


for some tips on your program, I'd reccomend leaning how to do this stuff yourself instead of using other programs to do it for you ;)

for example, internal file handling using an 8bit interger with each value being a byte of the file :)
(UMC currently does that)

I'm actually working on archive handling with file extraction...
(a smart file system for UMC)

anyways...
for you, another expert thing would be your own basic audio editor ;)

bacically, something that's able to pitch-shift, re-loop, etc...

you could help out BJ by writing that :)



in a way, I'm helping BJ out by learning GL and figuring out nintendo's GX formatting.
(GX is GL with a few modifications)

[spoiler]Quote: Friedslick6
you have been through a lot of hassle. I've watched every topic you posted on this, and most of them seemed to disintegrate gradually.
But the coolest part was that you didn't stop working on it despite that.

Quote: Internet Explorer
you're doing more with your life right now than probably most other people around you. You're a valuable asset to the Smash community. So yeah, you should be proud.

quote: Greg
You do have a gift which I've seen many developers use to their advantage. You can become a great coder, and with all of those ideas I think you can really build something great.