• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Brawl Game Script (REL) Editor (development)

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Hm, I'd being willing to help you out if I had a USBGecko. If I could figure it out, I could actually just run Brawl through Dolphin and attach a remote debugger to the process, but that hasn't really been working for me :/

Oh hey look, I got a remote debugger attached to Dolphin. Now I just need to understand the disassembly :/
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
Hm, I'd being willing to help you out if I had a USBGecko. If I could figure it out, I could actually just run Brawl through Dolphin and attach a remote debugger to the process, but that hasn't really been working for me :/

Oh hey look, I got a remote debugger attached to Dolphin. Now I just need to understand the disassembly :/
actually...
I'm looking at it differantly

hex and asm work in practically the same way.
but I like relying on hex offsets rather than asm functions... :/

any good at that by chance??

I could do it myself, but help would be nice...

I'm over at the mdl0 end right now though,
but I'm tapping at the rel stuff once in a while...
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
actually...
I'm looking at it differantly

hex and asm work in practically the same way.
but I like relying on hex offsets rather than asm functions... :/

any good at that by chance??

I could do it myself, but help would be nice...

I'm over at the mdl0 end right now though,
but I'm tapping at the rel stuff once in a while...
I'm not really that good at this stuff, but I'm trying to learn it as I go along, as I always have.

And after going through all the trouble of getting a debugger set up, I just NOW find that Dolphin has a built in debug mode for this kind of stuff >_>
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Is it possible for you to check with the debugger what is loaded when a character is loaded in VS mode?
Like offsets or whatever.
I don't know for offsets (well, I know I can, but I don't know how), but I can find out what orders the files are loaded in and what files are loaded, in fact, I can do that without debug mode, as I had done it before to find out if there were any other files loaded while loading SSE stages.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Yeah, I can check that. I think I've found a way to check the offset it gets loaded to, so this would be a simple test to see if I was right.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Odd, running through Dolphin gives no freezes with the instructions you provided. Everything works perfectly fine, with the exception of a few moves T-Stancing.

EDIT: Nevermind, now it freezes. Only works while Pikachu is also in the match (first player was random, chose Pikachu the first time, DDD the second time, when it froze). And the module was replaced, I made sure twice XD

But hey cool, it tells me what went wrong.
"BackPatch - no support for operand size 1

Error encountered accessing emulated address 52534245.
Culprit exception:
movzx eax, byte ptr ds:[rbx+rcx]
at 0000000014ed873a"
 

ds22

Smash Lord
Joined
Aug 30, 2009
Messages
1,662
Location
Rotterdam, The Netherlands
Did you put the pikmin.rel in the module folder?
And did you select Pikachu as your first character?

Try this set-up:
Mario VS Pikachu files over Olimar in VS mode.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Did you put the pikmin.rel in the module folder?
And did you select Pikachu as your first character?

Try this set-up:
Mario VS Pikachu files over Olimar in VS mode.
Yeah, just edited my previous post, check it out to see what I did. But Dolphin told me exactly what went wrong:
Code:
"BackPatch - no support for operand size 1

Error encountered accessing emulated address 52534245.
Culprit exception:
movzx eax, byte ptr ds:[rbx+rcx]
at 0000000014ed873a"
EDIT: Now it tells me another error as well:
Code:
Redundant MOV @ 0000000014460020
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Hm, it also spit out another two errors, exactly the same as the last two but with different addresses. I'm gonna poke around and see what I can do.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
I'll do the test again with him against every character (well, it's actually not every character because I don't have every character unlocked on my computer, but eh, whatever) and screenshot each error and compare them all.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Send it to me and I'll test that as well.

Right now I've got a couple different theories as to why Pikachu over Olimar doesn't work, so I'm gonna try a few things and see if I can get anything to change.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Hm, so the files loaded before the crash, even before the stage is loaded (they're loaded when the character is selected), with Pikachu over Olimar are:
module/ft_pikmin.rel
fighter/pikmin/FitPikmin.pac
fighter/pikmin/FitPikminMotionEtc.pac
fighter/pikmin/FitPikmin00.pcs

Then it loads the other player's character's files, then you select the stage, it loads the stage file, then it loads P1's portrite/InfFace###.brres, then some item files, and then when it should load Olimar's portrite/InfFace###.brres it crashes unless playing against Pikachu, in which case everything runs fine. Now I'm off to test the new patched rel file you sent me.
 

ds22

Smash Lord
Joined
Aug 30, 2009
Messages
1,662
Location
Rotterdam, The Netherlands
You think its crashing because of the portrait?
That doesn't explain why Marth works fine though.
I don't think that is the problem.
It's something that is loaded when the character is first loaded onto the stage (article(s), entry specific settings etc...).
The question is, what is it (I really suspect articles though)?
Why else should also Jiggz work fine?
 

Dantarion

Smash Champion
Joined
May 21, 2007
Messages
2,492
Location
Santa Barbara, CA
Its definetly articles.

Somehow the game ends up trying to load an offset and ends up loading "RSBE". That is what is causing the problem.
What I need to do is cause the crash, and backtrace it until i figure out where its loading that
 

ds22

Smash Lord
Joined
Aug 30, 2009
Messages
1,662
Location
Rotterdam, The Netherlands
Well, causing the crash is easy (hence why I was able to do it).
One note, it also crashes when an article is loaded directly in the entry (Olimar's Pikmin and Wolf's Star Wolf).
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
But it will be worth it (Mewtwo, Pichu, ???, ???, ??? and ??? in my Brawlz).
to be specific:
Mewtwo
Pichu
Dr Mario
Roy
and Young Link

sry I've not been replying lately...
I'll be getting to work on this soon though JSYK :/

right now I'm just trying understand how the code works with brawl
like what numbers do what :/
I'll figure it out...

yes it's there, but there's no guides on it...

that's where I come in

hey Dant, would you know how the hex relates to the objects in brawl??
or like what hex indexes what

it'd be nice to have a guide to go by...
 

ds22

Smash Lord
Joined
Aug 30, 2009
Messages
1,662
Location
Rotterdam, The Netherlands
I tried before and failzored.

Ill try again...whenever im back in cali...which could be...a while.
Atleast now you know it tries to load RSBE when it fails (*convinces himself there is hope*).
But why/how did it fail last time?

@Tcll
Actually, my wishlist is:
Roy (done), Mewtwo, Pichu, Naruto, Cloud, Geno and Gray Fox/Saki.

A Mario module is patchable, but still has to deal with a entry article crash.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
@ds22:
hey yur a Pichu player too !:D
that's really the only char I want in brawl ^_^

@anyone:
if I were to change the locations of say char modules,
and change the directory their folders...

could I put those module files in the char folder without it affecting brawl??
 

Dantarion

Smash Champion
Joined
May 21, 2007
Messages
2,492
Location
Santa Barbara, CA
you can change where it loads the files easy. I actually want to use "../" style paths so that an added characters files can all be in one folder. i.e. put the module in /fighter/character/ instead of /modules/
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
you can change where it loads the files easy. I actually want to use "../" style paths so that an added characters files can all be in one folder. i.e. put the module in /fighter/character/ instead of /modules/
exactly :D
that's what I wanna do to make Brawl-Mugen...

but there's just one main prob that has to be delt with =.=
sora_melee.rel only references data for those chars...

if this is gonna work correctly, we're gonna have to seperate that data...

how is the Q I'm looking for the answer to :|

that's what got me into this...
and I will find the answer too...
blah blah...
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Well, trying to do some sort of traceback through Dolphin didn't work well, but I did find the register at which RSBE is loaded instead of whatever is supposed to be loaded at the time (I guess we've confirmed it's articles). It loads RSBE into r5 (well, whenever you do it with the patched Pikachu rel. Haven't looked for anything specific in the other rel file). I'll try and see if I can find anything else out.

EDIT: The address in memory in which Dolphin last reads is 807393c8, which is a pointer to r5. So we just need to find out why the game loads RSBE to r5 instead of whatever is supposed to be loaded there.
 

ds22

Smash Lord
Joined
Aug 30, 2009
Messages
1,662
Location
Rotterdam, The Netherlands
Well, trying to do some sort of traceback through Dolphin didn't work well, but I did find the register at which RSBE is loaded instead of whatever is supposed to be loaded at the time (I guess we've confirmed it's articles). It loads RSBE into r5 (well, whenever you do it with the patched Pikachu rel. Haven't looked for anything specific in the other rel file). I'll try and see if I can find anything else out.

EDIT: The address in memory in which Dolphin last reads is 807393c8, which is a pointer to r5. So we just need to find out why the game loads RSBE to r5 instead of whatever is supposed to be loaded there.
Now that is probably a valid address in the memory.
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
Actually, doing the test again and setting a breakpoint right before it, it either reads a few lines before it and crashes, or there's a pointer to it that causes it to crash. I'm going to assume there's a pointer to it, so I'll set a breakpoint directly on that line and then try and find a pointer to it and set a breakpoint there, and then poke around and see what I can do.
 

ds22

Smash Lord
Joined
Aug 30, 2009
Messages
1,662
Location
Rotterdam, The Netherlands
Actually, doing the test again and setting a breakpoint right before it, it either reads a few lines before it and crashes, or there's a pointer to it that causes it to crash. I'm going to assume there's a pointer to it, so I'll set a breakpoint directly on that line and then try and find a pointer to it and set a breakpoint there, and then poke around and see what I can do.
Hope you'll figure it out.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
I've just had an idea...

what if I could modify the scripts, and make brawl read a much simpler model format...

I mean think about it...
less stress on the cpu,
smaller filesize (less data to have to read)
and a few more advantages that arn't coming to mind at the moment =_=+

plus it's kind of a new filetype I'm developing (.hxo)
it works similar to an obj file, but completely in hex...

I'll clue you in a bit:
verts: (v 16bit(X Y Z))
'76 0000 0000 0000'

faces: (f int(type) 16bit(int(index)) )
(the type is 1: point, 2: line, 3: tri, 4: quad)
'66 04 0000 0000 0000 0000'

but yea...
I think I may be able to do it with a few mods...

if anyone's willing to help, I'll PM them the format ;)

but this won't be anytime soon sadly...
the format is on my cpu wich is now net-less...
I'll have net in about a month though so keep in touch ;)
 

pokelover980

Smash Ace
Joined
Oct 4, 2007
Messages
905
what if I could modify the scripts, and make brawl read a much simpler model format...
I'm going to personally guarantee you that you cannot do that. It'd require extremely heavy modifications to the game's engine, as you'd have to re-write the rendering scheme to match the specification for the format, and it'd take a while to just find where that engine is, and it's likely compiled, so it'd be difficult to even edit it.
 
Top Bottom