Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #51    
Old May 12th, 2014 (06:47 AM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Quote originally posted by psy_commando:
Alright then. I'll post what I find over there ! Though, at this point I don't have much. I can't find any documentation about Crystal Tile2's method of displaying pixels which would help a little figuring out the whole thing. It also seems that some of the sprites get misaligned in that program..
Though, I still managed to find a few interesting tidbits by looking at the raw data.

I guess you mean that m_ground.bin file ? Its really an odd file. It seems to contain "SIR0" files/chunks.
I guess its some form of container, with a "table of content" at the beginning. But it has a strange and long header.. There should be some form of identification for the every subfiles in there.
Yes, I mean that file. I already "unpacked it" using Tinke. the sir0 files in particular are what I'm actually decoding at the moment. I know a looooooooot about it now. animations, initial locations, you name it. everything for that sprite is stored in the SIR0 file, which is within the .bin file, and I can give you the format of both.

Come to think of it, you should read through both of my threads. I explain how the .bin files work as well as a bit of the sir0 for images in this post of the other thread. Though at that point I didn't know everything that I know now.
Quote originally posted by psy_commando:
What did you have trouble understanding ? Maybe I could help ?
In terms of DeSmuMe, I'd have to look at them again. But in terms of the SIR0 format, there's one main section. It's near the beginning, with all those FFs and F9, FC, etc. it's really weird and i cannot for the life of me logically infer what it signifies. I do know however, that the length of the section is exactly 10 * the length of the pointers to the images section (at least in the file for female Pikachu, the 26th packed file), which means there may be a connection there. I'm unsure at this point. I'm looking deeper into it myself.

Quote originally posted by psy_commando:
About that, I thought you were only editing the game's script ?
Because, you can still use DeSmuMe's Disassembler to see the assembly code directly, if you really want to.
But, if you're looking only for the part that runs the scripts for the dialogue and game logic, then its easier to just look for the data used by the software to run those scripts. At least IMO.
I am indeed currently only working on editing the games script, but there are a few commands that I have no idea what do, and I figure if I understand the scripting engine then I'll understand what every command does. It's all to understand parameters that I don't know what they modify, like jumps and why they don't work for everything everywhere.
Quote originally posted by psy_commando:
But, if you have a good IDE and grab the source code for DeSmuMe and compile it yourself, and run it in debug, that would be optimal, even though it would require some work. There is also a couple of tutorials on how to setup visual studio and a windows port of the GNU GBD debugger to debug the actual ARM code, thanks to some piece of code in DeSmuMe that allows to do that.
I will look into doing it this way. It may be the only way, after all, I was just hoping for an easy solution. Oh well. That's what I get for being the pioneer for hacking PMD EoT/D/S xD
Quote originally posted by psy_commando:
Honored ? What do you mean ?
Its kinda sad PMD isn't more popular.. Its such a charming game, and it would have been reversed years ago if it had been more popular.. Seeing as most other pokemon game got reversed really quickly !
Actually the whole reason I got into this, is to encourage people to add in the missing faces and sprites for the non official starter pokemon! But, if I can help others along the way, why not !

I'll try to dump some of my notes so far in the thread you've pointed out. They're not 100% sure things, but I guess it can help to try figuring those things out as a group !
By honored, I mean I nerver really expected people were going to be helping me with any of this. I'm not a super-genius or anything, I'm just a programmer and even then, just a mediocre one that cares more about efficiency and short code than anything else.

Naturally, this means I'm really surprised and excited that i get the ability to work with someone that could very well be better than I am. I just started this, after all. =P

As for why I started? It alllll started because I wanted to find a way to allow people to actually battle...
Spoiler:
Team Skull
(spoiler'd because it gives plot points away). and the first commamnd i learned was 0x77 from Explorers of Time.

PS: The palette for each pokémon is stored in the SIR0 file, just after the image data. and the scheme is indeed basically the same, but there are a few differences.

PPS: I'll prolly update my other thread with SIR0 stuff in the future.

PPPS: i might actually remember where i saw those portraits. I'll do some searching later and find out if I was right.
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #52    
Old May 12th, 2014 (04:38 PM).
psy_commando's Avatar
psy_commando
 
Join Date: Mar 2014
Location: Quebec, Canada
Gender: Male
Nature: Modest
Quote originally posted by Nerketur:

Yes, I mean that file. I already "unpacked it" using Tinke. the sir0 files in particular are what I'm actually decoding at the moment. I know a looooooooot about it now. animations, initial locations, you name it. everything for that sprite is stored in the SIR0 file, which is within the .bin file, and I can give you the format of both.

Come to think of it, you should read through both of my threads. I explain how the .bin files work as well as a bit of the sir0 for images in this post of the other thread. Though at that point I didn't know everything that I know now.

Yikes. I kinda feel a little irrelevant with my notes now XD

I looked over that thread before, but somehow I missed that part :/
And you probably figured whether it is or not by now, but the Z param might just be the alpha channel.

I didn't attempt unpacking the Bin files using tinke though. I didn't even think they could be compressed, given the file was mostly readable.. That could explain a lot of things XD
But, why does it outputs only 149 files ? I'm probably doing something wrong.. :/
I opened them as a "pack" in Tinke and extracted the content..

Quote originally posted by Nerketur:

In terms of DeSmuMe, I'd have to look at them again. But in terms of the SIR0 format, there's one main section. It's near the beginning, with all those FFs and F9, FC, etc. it's really weird and i cannot for the life of me logically infer what it signifies. I do know however, that the length of the section is exactly 10 * the length of the pointers to the images section (at least in the file for female Pikachu, the 26th packed file), which means there may be a connection there. I'm unsure at this point. I'm looking deeper into it myself.
I was speaking about DeSmuMe. I don't know much about SIR0, given I found very little on the web for some reasons..

And those might be padding bytes maybe ? However, I never really found much evidences that the files were byte aligned at all. Or any reasons for them to be, given they're on a flash catridge, not on a physical disc :/

Quote originally posted by Nerketur:

I am indeed currently only working on editing the games script, but there are a few commands that I have no idea what do, and I figure if I understand the scripting engine then I'll understand what every command does. It's all to understand parameters that I don't know what they modify, like jumps and why they don't work for everything everywhere.

Oh, well, its just that at one point I wasn't sure what you were after, when you started mentioning OP codes and the ARM architecture. I thought you meant literally cpu op codes, but scripts are much higher level than that. I just wanted to clarify that.

Quote originally posted by Nerketur:

I will look into doing it this way. It may be the only way, after all, I was just hoping for an easy solution. Oh well. That's what I get for being the pioneer for hacking PMD EoT/D/S xD

There no such things as easy in the reversing world as far as I know XD
I have posted the link, but I can't until I hit 15 posts, and I don't know if mods are picky enough to take offense if I bypass that..

But honestly, you'd have to have a good knowledge of ARM assembly, and look through pages and pages of opcode to really have a lot to gain from that. I was mostly only saying that, as far as debugger goes, this is probably one of the best way to do it.

Quote originally posted by Nerketur:

By honored, I mean I nerver really expected people were going to be helping me with any of this. I'm not a super-genius or anything, I'm just a programmer and even then, just a mediocre one that cares more about efficiency and short code than anything else.

Naturally, this means I'm really surprised and excited that i get the ability to work with someone that could very well be better than I am. I just started this, after all. =P

Oh, well, for one you're probably the only person I stumbled on still working on something for PMD:EoS ! That shows you've got motivation! And in the end, skills can be developed and improved, but motivation is another story..

I wouldn't hold my breath about me being much better ! XD Now that we discussed a little, I guess were pretty close in terms of knowledge. Though, you seem to be much farther ahead than I though in term of reversing the actual game files.

Quote originally posted by Nerketur:

As for why I started? It alllll started because I wanted to find a way to allow people to actually battle...
Spoiler:
Team Skull
(spoiler'd because it gives plot points away). and the first commamnd i learned was 0x77 from Explorers of Time.

That's something I wish we could have done in the game ! Battling these guys ! But the plot just didn't want to
Spoiler:

Though, later on I kinda changed my mind a little about them.. A little..


Quote originally posted by Nerketur:

PS: The palette for each pokémon is stored in the SIR0 file, just after the image data. and the scheme is indeed basically the same, but there are a few differences.

PPS: I'll prolly update my other thread with SIR0 stuff in the future.

PPPS: i might actually remember where i saw those portraits. I'll do some searching later and find out if I was right.
Yeah, I saw those palettes, but they seemed incomplete for each pokemon oddly. They just had some of the most preeminent color on the pokemon. Or at least, from what I saw they did. While the palette extracted from red rescue team using VBALink had the entire correct lines for most pokemon. And the palette looked the same as the one DeSmuMe would read from the EoS game.(I'm not even sure why it won't let me build a palette from the current scene and export it, instead of just displaying it..)

And that sounds good! If you can get the specs written down, I might be able to write a little program to display them!
Btw, I was wondering, what language are you using to code this in ? Because, I could probably write that in the same language ? I'm more partial to C++ for working with bytes and such, but it might be easier for cooperation to use the same thing ?
Reply With Quote
  #53    
Old May 12th, 2014 (07:09 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Quote originally posted by psy_commando:
And you probably figured whether it is or not by now, but the Z param might just be the alpha channel.
Not sure what Z-param you mean here.
Quote originally posted by psy_commando:
I didn't attempt unpacking the Bin files using tinke though. I didn't even think they could be compressed, given the file was mostly readable.. That could explain a lot of things XD
But, why does it outputs only 149 files ? I'm probably doing something wrong.. :/
I opened them as a "pack" in Tinke and extracted the content..
They aren't compressed. Unpacking is like taking items from a box they were packed in, like when you move from an old house to a new one. Decompressing is something completely different in Computer Science terms. If you look at the format, the number of files parameter is at offset 4, and that is why the files is wrong. Change the num files offset to 4, then change the "start offset" to 8 (because again, that's in the pack format). That way you'll get all the files. However, make sure you select "Start offset/length" as the kind. if you get all SIR0 files, then you unpacked it properly and should hit "apply". =) I explain this indirectly in the post I linked to at the bottom.
Quote originally posted by psy_commando:
And those might be padding bytes maybe ? However, I never really found much evidences that the files were byte aligned at all. Or any reasons for them to be, given they're on a flash catridge, not on a physical disc :/
I sincerely doubt it. If it was padding there would be no reason to have an offset to it!
Quote originally posted by psy_commando:
Oh, well, its just that at one point I wasn't sure what you were after, when you started mentioning OP codes and the ARM architecture. I thought you meant literally cpu op codes, but scripts are much higher level than that. I just wanted to clarify that.
I do realize this. I'm a Computer Science masters student. =)

I say op codes because the scripting is very similar to assembler where the first byte is the op code and the remaining ones are parameters. It's scripting only because it isn't ARM assembler. Granted, my terminology is a bit wonky, but eh. I'm using basically the same terminology Hackmew used, I believe.
Quote originally posted by psy_commando:
But honestly, you'd have to have a good knowledge of ARM assembly, and look through pages and pages of opcode to really have a lot to gain from that. I was mostly only saying that, as far as debugger goes, this is probably one of the best way to do it.
All part of my plan. Honestly, there's not much else I can gain from guessing. I know almost everything I can (scriptwise) from guessing already. It's quite a lot, but it's not enough to really make a good hack. Given what I know, you can do almost anything cutscene related, except ruin other scripts. I don't know the details on doing that, sadly, even if I do know the commands used. That is why I need the debugger. So I can figure out why it just... doesn't work for certain things.
Quote originally posted by psy_commando:
Oh, well, for one you're probably the only person I stumbled on still working on something for PMD:EoS ! That shows you've got motivation! And in the end, skills can be developed and improved, but motivation is another story..

I wouldn't hold my breath about me being much better ! XD Now that we discussed a little, I guess were pretty close in terms of knowledge. Though, you seem to be much farther ahead than I though in term of reversing the actual game files.
In terms of programming knowledge I'm rather advanced. But this is my first venture into figuring out how the scripting works in anything =P, So in that respect I'm a newbie/intermediate.
Quote originally posted by psy_commando:
Yeah, I saw those palettes, but they seemed incomplete for each pokemon oddly. They just had some of the most preeminent color on the pokemon. Or at least, from what I saw they did. While the palette extracted from red rescue team using VBALink had the entire correct lines for most pokemon. And the palette looked the same as the one DeSmuMe would read from the EoS game.(I'm not even sure why it won't let me build a palette from the current scene and export it, instead of just displaying it..)
Incomplete? I have the complete palette in my sir0 files. 16 colors, the format of the palette is RRGGBB??*16. I open the file (currently) in YY-CHR and use that palette (which I manually remove the ?? bytes), adding the required number of bytes to make it a "full palette" of 256 colors, then load it into YY-CHR, letting me view the "official" colors for each pokémon.
Quote originally posted by psy_commando:
And that sounds good! If you can get the specs written down, I might be able to write a little program to display them!
Btw, I was wondering, what language are you using to code this in ? Because, I could probably write that in the same language ? I'm more partial to C++ for working with bytes and such, but it might be easier for cooperation to use the same thing ?
I do have the full specs already written down but there is a lot of extra stuff in there right now. If you look at my linked post (relinked here for convenience) I explain the SIR0 files in it on a basic level. =)

As for language, I use C#. I refuse to program in C++ if I don't have to, and I honestly hate using it. C# is so much cleaner and better in so many ways. If you don't know C#, I highly recommend it! You'll never go back to C++, I guarantee it =P
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #54    
Old May 12th, 2014 (11:29 PM). Edited May 13th, 2014 by psy_commando.
psy_commando's Avatar
psy_commando
 
Join Date: Mar 2014
Location: Quebec, Canada
Gender: Male
Nature: Modest
Quote originally posted by Nerketur:

Not sure what Z-param you mean here.

Nevermind about that.

Quote originally posted by Nerketur:

They aren't compressed. Unpacking is like taking items from a box they were packed in, like when you move from an old house to a new one. Decompressing is something completely different in Computer Science terms. If you look at the format, the number of files parameter is at offset 4, and that is why the files is wrong. Change the num files offset to 4, then change the "start offset" to 8 (because again, that's in the pack format). That way you'll get all the files. However, make sure you select "Start offset/length" as the kind. if you get all SIR0 files, then you unpacked it properly and should hit "apply". =) I explain this indirectly in the post I linked to at the bottom.

Well, I just assumed it was compressed, because I don't really see any advantage to grouping all those files into one, if its not for compression. Unless, they're just loading everything straight into memory..

Thanks for the offsets ! I got 599 of them now ! Honestly, I never really used Tinke all that much, and I'm still not very familiar with the formats on the DS.
As for the link, I can't seem to find those offset you just gave me. I know you've said indirectly, but I'm not sure what you mean in this case. :/

Quote originally posted by Nerketur:
I sincerely doubt it. If it was padding there would be no reason to have an offset to it!

Why not ? The offset you're mentioning could be simply a "pointer" to the end of the data +1, which is used relatively commonly. The rest could be padding to align the next data block in the packed bin file ?

Or maybe its a string of some kind with a fixed length ? I know that in some of the main series games, in pokemon name fields, when some names are shorter than the 12 characters (I think), the rest is basically *pokemon name* 0x0 0xFF 0xFF ... repeat the 0xFF until all the 12 bytes are filled. It depends of the gen though. Sometimes other values might gets left in there, the so-called trash bytes.


Quote originally posted by Nerketur:

I do realize this. I'm a Computer Science masters student. =)

Yes, I was just explaining why I was asking this. Its hard to understand eachothers if we twist new meanings for words, so I was just trying to understand what you meant. I didn't mean to belittle you or anything. Sorry if it sounded that way..

Quote originally posted by Nerketur:

I say op codes because the scripting is very similar to assembler where the first byte is the op code and the remaining ones are parameters. It's scripting only because it isn't ARM assembler. Granted, my terminology is a bit wonky, but eh. I'm using basically the same terminology Hackmew used, I believe.
Yes, but the only issue here is that opcodes commonly refer to CPU opcodes, or sometimes their mnemonics. So its slightly hard for someone relatively familiar with them to get what you mean. Well in my case anyways.
Of course, I don't mean to tell you what to do. And you just cleared everything up anyways.

Quote originally posted by Nerketur:

All part of my plan. Honestly, there's not much else I can gain from guessing. I know almost everything I can (scriptwise) from guessing already. It's quite a lot, but it's not enough to really make a good hack. Given what I know, you can do almost anything cutscene related, except ruin other scripts. I don't know the details on doing that, sadly, even if I do know the commands used. That is why I need the debugger. So I can figure out why it just... doesn't work for certain things.
Alright, sounds good ! I wasn't sure what you needed the debugger for, and tried to find you simpler to setup alternatives, but you seem to have everything worked out already.

Quote originally posted by Nerketur:

In terms of programming knowledge I'm rather advanced. But this is my first venture into figuring out how the scripting works in anything =P, So in that respect I'm a newbie/intermediate.
Well, same with me for reversing scripts XD

Which kinda makes me wonder, you explained those "opcodes" you were talking about earlier, and it kinda made me realize something.

Maybe the dev used some kind of virtual machine to run their game scripts ? Or used some scripting language that was compiled into bytecode?
It would explain the "opcode" like structure of the scripts you're talking about ! Given, on a VM programs are first transformed into bytecode then run by the VM. And I think some other scripting language generate intermediate bytecode like that. Not to mention that bytecode is very similar to opcodes.

Then again, I don't know enough about the scripts you've found to really say this for certain.
Those were just some random thoughts I suddenly had however. So, just take that as me brainstorming a little. XD

Quote originally posted by Nerketur:

Incomplete? I have the complete palette in my sir0 files. 16 colors, the format of the palette is RRGGBB??*16. I open the file (currently) in YY-CHR and use that palette (which I manually remove the ?? bytes), adding the required number of bytes to make it a "full palette" of 256 colors, then load it into YY-CHR, letting me view the "official" colors for each pokémon.
Well, I was mainly talking about those shades of color before the actual sprites. I never found the full palette..
I had a few potential candidates, but I didn't feel like entering random tables of data into an image manually to see if they're forming a color palette. XD
Of course now that I can see its not a huge single potentially compressed file, it helps putting things in perspective! XP

Quote originally posted by Nerketur:

I do have the full specs already written down but there is a lot of extra stuff in there right now. If you look at my linked post (relinked
here for convenience) I explain the SIR0 files in it on a basic level. =)
Right, but I meant the sprite animations, the headers, the palettes, etc.. In this post you linked, you only discuss the pixel format for the images.

And for the overall SIR0 file you describe it like this :
Quote:
SIR0:
Some type of data
picture
data for above picture
(repeat above ad nauseum)
some pointer data
I'm sorry if I sound difficult, but that, and the pixel format leaves me a lot to figure out again. And I say "again", because you mentioned having found out about those.
I mean, I can most likely figure it out myself in a few days, but are you sure you don't have some notes somewhere you could just copy paste in here ?

If not, well thanks anyways. I'll just go through it the hard way. At least now I have the individual files to work with, thanks to your help !

And if I understand correctly, all sprites are 32x32 pixels, right ? And the image's pixels are read from the file and then organized like this ? :

0x00 0x01 0x02 0x03 0x10 0x11 0x12 0x13 ...
0x04 0x05 0x06 0x07 0x14 0x15 0x16 0x17 ...
0x08 0x09 0x0A 0x0B 0x18 0x19 0x1A 0x1B ...
0x0C 0x0D 0x0E 0x0F 0x1C 0x1D 0x1E 0x1F ...
...

Then it goes on like that on 32 columns, and 32 rows or 1024 pixels of that pattern ?

And again if I understand correctly each pixel is a 4 bits long value referring to a color in the palette, and stored in bunches of 64 (8x8) over several blocks of 12 bytes that specify a data length for the pixels?
But wait, only 24 pixels would fit in 12 bytes, no ?
I guess I'll have to take a look at this when its not 3am.. >_<

Quote originally posted by Nerketur:

As for language, I use C#. I refuse to program in C++ if I don't have to, and I honestly hate using it. C# is so much cleaner and better in so many ways. If you don't know C#, I highly recommend it! You'll never go back to C++, I guarantee it =P
I did a lot of C# already. Its a nice tool !

I'm not sure what you're talking about with the "cleaner" part though. C++ will let you do nasty things, but its up to you to avoid doing them. There are many idioms to help avoid doing unsafe, dirty things.

Namely my favorite idiom, that I can't use reliably in C# or Java unfortunately because of the garbage collector, the RAII idiom! I also love the CRTP (Curiously Recurring Template Pattern) the name especially ! The last one gave me headaches for days to try to understand why and how it worked XD

I had a really passionate teacher, and he showed us so much mind boggling stuff, and how to make incredibly clean things. And more importantly, to not code the C way in C++, and to use objects as much as possible. But honestly, some languages are better suited for some tasks, so I wouldn't say any is really much better than another. I kinda stopped being picky about languages after being forced to use languages I wasn't a big fan of in various little jobs..

With that said, I really don't mind using C#, if it would make collaboration easier !

*EDIT*: Nevermind about the 0xFF thing I wrote. I thought you meant something else.. XD Given there are so many extremes like 0 and FF, maybe its some kind of opacity map ?
Reply With Quote
  #55    
Old May 13th, 2014 (12:12 PM). Edited May 13th, 2014 by Nerketur.
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Quote originally posted by psy_commando:
Well, I just assumed it was compressed, because I don't really see any advantage to grouping all those files into one, if its not for compression. Unless, they're just loading everything straight into memory..

Thanks for the offsets ! I got 599 of them now ! Honestly, I never really used Tinke all that much, and I'm still not very familiar with the formats on the DS.
As for the link, I can't seem to find those offset you just gave me. I know you've said indirectly, but I'm not sure what you mean in this case. :/
There should be 593 exactly. I'm really not sure where you got the extra 6 files. Maybe you mistyped?

I don't see much of an advantage either. I'd assume memory too, since every Pokémon has to be available at a moments notice, but I'm unsure, since dungeon info is the same way. It could just be they wanted it really hard to open! Or grouped by format, or many other reasons. Code-wise, there is a limit to the number of files in the nitro system, and I also know it can be slower so it could be either of those reasons.

Also, more a side note, but everything I know about NDS files was self-taught, specifically because of this very venture! Hehe. (Well, except for the NDS header itself. It was more of a 'look on GBATek thing') Really, other than SIR0, the files I know the most about are the .SS? files and .LSD. other than that I know close to zip. Other than the fact .bin usually means packed file.
Quote originally posted by psy_commando:
*EDIT*: Nevermind about the 0xFF thing I wrote. I thought you meant something else.. XD Given there are so many extremes like 0 and FF, maybe its some kind of opacity map ?
3,360 bytes in total (in the 26th file (holds female pikachu)), an offset to it and after it, pointed to by the same offset group. The offsets behind it are offsets pointing to location data, the offsets after it are pointers to animation data. I'm thinking its some sort of flags for how to change the sprites, or map sprites to directions or something, since in the file I checked the size is EXACTLY 10*the LENGTH of the pointers for the images. All the evidence points to it being used. I just don't know how. When I'm done I might run the game with that section zeroed out and see what happens.

I've thoooought about opacity maps. Thats a definite possibility, honestly. Let me check. It would be the only other thing that made sense. (even though they could just do color 0 = transparant)
Quote originally posted by psy_commando:
Yes, I was just explaining why I was asking this. Its hard to understand eachothers if we twist new meanings for words, so I was just trying to understand what you meant. I didn't mean to belittle you or anything. Sorry if it sounded that way..

Yes, but the only issue here is that opcodes commonly refer to CPU opcodes, or sometimes their mnemonics. So its slightly hard for someone relatively familiar with them to get what you mean. Well in my case anyways.
Of course, I don't mean to tell you what to do. And you just cleared everything up anyways.
It's okay. In this case its the mnemonics. They made their own assembly language! =P

In fact, this is ALSO what happened with the main games too. It's similar to assembly there just as it is here. =)
Quote originally posted by psy_commando:
Maybe the dev used some kind of virtual machine to run their game scripts ? Or used some scripting language that was compiled into bytecode?
I'm not sure its a virtual machine... but I'm almost POSITIVE it was compiled by a compiler. All the evidence points towards it, and it isn't even a very GOOD compiler. Quite a bit of redundancy, but it explains a lot of things. Like all the u?XXXX.ssb files! everything has the same 'structure', and honestly would be pretty easy (comparatively) to reverse back to the source. (which is usually the case with scripting languages, and languages like Java and C# which ARE basically VMs)
Quote originally posted by psy_commando:
Well, I was mainly talking about those shades of color before the actual sprites. I never found the full palette..
<snip>
Right, but I meant the sprite animations, the headers, the palettes, etc.. In this post you linked, you only discuss the pixel format for the images.
<snip>
...are you sure you don't have some notes somewhere you could just copy paste in here ?
I do, but I'd have to tweak it to post on here. It's LONG because I am literally labeling all the different offsetts with what they do and its probably a bit confusing as is. but it's far more complete. It would be MUCH better to ... Actually, I'll use pastebin. http://pastebin.com/8btvKGDu
Quote originally posted by psy_commando:
I did a lot of C# already. Its a nice tool !

</snip>

With that said, I really don't mind using C#, if it would make collaboration easier !
Firstly... Ahh, language wars. This will be spoiler'd since its mostly off topic.
Spoiler:
If I'm being totally honest here, I have never actually 'liked' C or C++. The times that I'm forced to use it, like extending Python, I will. but the main reason I don't like it is you are so constrained. you have to do things 'the long way', just like in assembler. Even if you include the object oriented properties of C++, (which are pretty awesome, I must admit) it doesn't remove the fact that efficient C++ code is either unreadable (because you do many things in one line/use optimizations) or it's annoyingly long (because you choose to do everything yourself). This is why I love Python. Efficient code can be three lines in python and you still understand it! Even if you aren't a programmer.

Now, with that said, there ARE some plus sides to C++. You can make your own garbage collector, so the memory you use can be freed instantly. Pointers allow for data to be stored and restored "in any format". It is the fastest language (IF HAND-CODED) other than assembler. It supports MULTIPLE inheritance.

But Java says EVERYTHING is an object. Not true in C++. Makes things annoying. My only true nitpick with Java is that PRIMITIVES CANNOT BE USED AS OBJECTS! Man, that's annoying. "oh you have to use the Integer wrapper class" That's all fine and dandy, but then WHY cant you cast an Integer[] to an int[]? It makes object sense to not be able to, but its just ugh.

This is why I love C#. You can do anything you can do in C, with the ease of the way Java does things. You can use primitives as objects without having to cast. a List<int>, or a Dictionary<ushort, string>. It's a bit more work to do lower level things like read into a struct or get a file pointer, but for those things it SHOULD be more difficult because you should be careful using them!

(Responding to this should be done in PM. This thread isn't meant for language discussions.)

Secondly, I'm very glad your teacher did so, but my preferred language to code this in is definitely C#. So I'm glad you like it too! =D
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #56    
Old May 13th, 2014 (03:57 PM). Edited May 14th, 2014 by psy_commando.
psy_commando's Avatar
psy_commando
 
Join Date: Mar 2014
Location: Quebec, Canada
Gender: Male
Nature: Modest
Well in tinke, I set "Read at" to 4, and "Start offset" to 8. And left everything else to default. And it gives me 599 files. Except, if I press calculate, it climbs way up to 1216 files... That thing is kinda buggy.

And as for the reasons to pack files together, if there's a filesystem file limit, that's probably it. And yeah, I really need to brush up on my NDS knowledge..

About the transparency thing. They could use color 0 as transparency. I can't remember seeing sprites with semi-transparent parts.. But the UI has many parts that are half transparent and such. So I guess that yeah, zeroing it out, or only half of it would pretty much settle this.

Yeah, I'm not sure why I said VM.. So this is probably some script compiled to bytecode, then compiled and run just-in-time ? That makes sense. And its hard to reverse back to the source if we don't know what the original language is :/

And thanks for the notes. So far, I don't get too much of it, but I'll eventually figure them out! XD

Oh, and I didn't mean to start a war of some kind.. But alright, I'll reply to you via pm.

*EDIT*: Ok, so I counted all the mentions of SIR0 in the m_ground.bin file, and there are indeed 599 of them, not 593 as you said earlier. And in the header, the number of file is 0x0257 which is 599. I began writing something too for loading the sprites and all, though I'm finding out my C# is rusty a little..
However, at this point, maybe I should make a separate thread :/

But, tell me, what do you think I could do right now that could help you out ?
Reply With Quote
  #57    
Old 4 Weeks Ago (01:02 AM).
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
I require assistance. There's a problem I have encounted while testing one of the areas. The beginning character says the first three letters of the file, such as "M02" Then, the sequential characters say the last three letters of the senquencing lines. Such as this...
Chatot:M02
Chatot:oor.
Chatot:ork.
[partner]:ere.
Chatot:ide!
And so on and so forth... It's in an area majorly part of the story, so I can't turn a blind eye... Do you know what this is?
Reply With Quote
  #58    
Old 4 Weeks Ago (01:36 AM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
I'm fairly sure I know exactly what happened there. You likely decided to change the number of "constants" when the number was originally none. And if so, then that's a bug I diddn't realize existed until quite recently, but it should be fixed in my new update, which "should" be released by new years. But nno promises on that. For now, changing the number of constants can mess things up, because of a slight error I made when calculating how the file was put together. (And I subsequently fixed it when I realized what I was doing, getting the WRONG offsets, so the whole thing screws up, even though my program will always read it correctly, because the game uses the offsets.)

May I know which scene you're speaking of? At least then I can reproduce what you did and see if it really is fixed
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #59    
Old 4 Weeks Ago (04:56 PM).
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
Thanks for replying. It's the scene where Chatot takes you and your partner to the guild's second underground floor to meet with Wigglytuff and register the team. It's in folder G01P04A. The error was first found in the file m02a0109.ssb, but I recently found it again in m02a0202.ssb, where the first guild briefing is held. So I've suspected that the error affects the entire folder. Not anywhere else, as they work fine. And only the text is affected, not the positions or anything like that.

I gotta admit, I didn't think you'd reply this fast. I'm grateful you did <3
Reply With Quote
  #60    
Old 4 Weeks Ago (08:54 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Yeah, it's the error I thought. This is fixed in the current program I have that's not yet released. In the meantime, you have two options. Option A.) reload a backup of the ROM you changed. Option B.) Fix all the pointers in the changed ROM manually. This isn't excruciatingly hard, but it's really annoying. I'm just glad I figured out this bug in time (read: before I gave up and assumed such a change was impossible).

I don't remember all the conditions that cause the bug to pop up, but its REALLY obvious if that strings table or constants table ever changes. For the longest time I thought that meant you couldn't successfully add constants, but I was wrong!

Evenm so, please do continue giving me these errors if new ones pop up. I'm sure as many as I fixed, there are bound to be others that I have yet to fix
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #61    
Old 3 Weeks Ago (01:21 AM). Edited 3 Weeks Ago by Spherical Ice.
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
I already did Option A. And the error still appeared. ...But maybe that was caused by me directly copy and pasting the edited lines from the first one.

And I'm new at this. So I don't know how to accomplish Option B.

Perhaps I'll try tinkering with it more.

Well. I tried everything I could. And it's still errored.

I'll just wait for your beta to come out. In the meantime, I'll just ignore that particular folder as I create my edit.

And thank you for your help.

I've encountered the exact same error. But this time, in a different folder. It seems to appear when a certain error message pops up. No matter what I click, the error contaminates the folder. Also, I haven't told you that it's PMD Sky that I'm editing.

By the way, I'd like to edit things such as gameplay messages (like the things partners say in dungeons), bosses (I'd like to make some Pokémon female), and dungeon names. Screwing around with positions and portraits would be cool too. So will changing the Pokémon's names~. You already have a lot to work on, so I'll understand if you can't do everything.

Thanks for everything~
Reply With Quote
  #62    
Old 3 Weeks Ago (12:21 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Explorers of Sky, huh? That shouldn't be a huge issue, but my program will not parse Sky as completely as it does Time/Darkness. Even so, I'm in the process of making sure Sky is processed as good as I can make it :D

As for the error, which error are you getting? Now I'm curious. I already know the bug, but its been so long I don't remember the errors caused, and it might point to a new bug I haven't fixed. I mainly do all my testing on Explorers of Time, after all. Only every so often going back into Sky.

That said, however, hopefully this new thing I'm doing will make testing for both much easier, and I might start learning more about Sky, too. Who knows? Maybe soon you'll be able to edit the special missions :D

A lot of work has been done already, with a few bonus features, but right now I'm working on making everything easier to manage from a developers point of view. I'll probably end up releasing something by new years. If for no otther reason than to fix the bug you're experiencing. Because trust me, such an annoying bug makes hacks almost impossible

So yeah, expect something by new years. Might not be a full beta, but it should be pretty cool, nevertheless.

Quote:
By the way, I'd like to edit things such as gameplay messages (like the things partners say in dungeons), bosses (I'd like to make some Pokémon female), and dungeon names. Screwing around with positions and portraits would be cool too. So will changing the Pokémon's names~. You already have a lot to work on, so I'll understand if you can't do everything.


Everything you're asking for is in the works. Some are very close to being realized, like portraits and positions. (you can already mess around with positions if you know what you're doing with my unrealeased version), some are already there, but in limited ways (gameplay messages, dungeon names), and others I will not stop until I see them complete (boss editing). Given enough time, I'll be abe to do everything... but my focus will still be on scripting. Thats why my team is so important. People that are very good at other things like psy_commando! Working together, everything will be done far faster than working on our own
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #63    
Old 3 Weeks Ago (06:23 AM).
Lunedi's Avatar
Lunedi
Uruguayan Random Guy
 
Join Date: Oct 2008
Did you thought in a Sprites Editor and a YAPE Like Editor? D:
That would be pretty nice.


Cya~
__________________
I've tried to support so many hacks, that i've broken up the rules, i'm such an awesome fan D:
Reply With Quote
  #64    
Old 3 Weeks Ago (02:19 PM).
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
Sorry it took me so long, but I have finally aquired the pesky error message.
But of course, the darn website won't let me insert the image in the post! I dunno what to do about that...
Reply With Quote
  #65    
Old 3 Weeks Ago (09:58 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Quote originally posted by Lunedi:
Did you thought in a Sprites Editor and a YAPE Like Editor? D:
That would be pretty nice.


Cya~
Yes, actually! Thought has been put into that, and we know enough about the sprites that this is possible now! But actually implementing the sprite changer will take a bit more time.
Quote originally posted by SilverwingDB:
Sorry it took me so long, but I have finally aquired the pesky error message.
But of course, the darn website won't let me insert the image in the post! I dunno what to do about that...
You could always use imgur, or photobucket, or any other image upload site and post the link to it.


In other news, a pre-beta is now out!!! This version fixes the error that makes it impossible to make a playable hack, and it will open the borked rom. Saving it will (I think) fix the issue!

Not much else to say, other than I feel like a lot of what we don't know, we will soon know! :D

PS: I'm a bit late on expected release of this pre-beta, no telling when full beta will be out, but hopefully it will be out in a few months at max!
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #66    
Old 3 Weeks Ago (11:56 PM). Edited 3 Weeks Ago by SilverwingDB.
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
Problem is, the site wouldn't let me post the link either. I attempted it now, but the site still won't let me display images or post links. Hopefully I'll aquire the ability in the future,

By the way, thank for for getting the pre-beta up. I already downloaded it. Will I be able to fix my screwed up rom file just by editing it in the pre-beta? Or is there more to it? Looking forward to running the program and seeing the full beta! Can't wait!

Edit: You just said it'll fix the issue (hopefully) by simply saving it. Guess I glossed over that. Oops.

Another edit: I opened up the program and attempted to save in it. I could not. Tried to change a small bit of script to see if that'll work. Could not save. The save command is simply grayed out. This confounds me. Do you know what is going on?

Too many edits: Ah. I just switched that box I never mess with to hex, then I was able to save. I was worried I couldn't save. Well, this is helpful to know for people who wish to use the tool. I'm just glad I discovered it! Let the world know!

Edit abuse: Oh dear. For some reason, I can't save a certain file in the pre-beta for some reason. That all-too-familiar error stops me every time I try. I attempted to just edit the file in alpha 3. I successfully edited it, but now I can't save that file at all in the pre-beta.

Seems that I can display the error now. About time, too. Now look at it. What are these shenanigans?

Ugh: Seems that I was incorrect on the error being the same error. They look the same, but if ya compare 'em...

They're different shenanigans. This is the one that pops up in the pre-beta. The one that prevents me from saving a certain file.
...I just want to work on my stupid edit...
Reply With Quote
  #67    
Old 3 Weeks Ago (12:10 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Found the bug and fixed it! Redownload and the error should be gone! And thank you for the report :D
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #68    
Old 3 Weeks Ago (12:55 PM). Edited 3 Weeks Ago by SilverwingDB.
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
Thanks, son! I'll go download it! Again, thank you!

Edit: Oh noes. When I went and tested the file, it does not load in the game. I checked the gotos and compaired them with the unedited file. They're the same. I just don't know what's going on...
Reply With Quote
  #69    
Old 3 Weeks Ago (01:29 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
Try from a fresh ROM. I do know that it might be the ROM you're using, and it also might be a problem with the groups. I'm not sure exactly what the issue is, but I did test my program by saving a file in the script, and the game did load it. So I don't think my program is the issue. Do test and tell me your result
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #70    
Old 3 Weeks Ago (08:26 PM).
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
Oh dear. Whatever file I edit in the program, it does not load in the emulator. :[

Edit: I also found this.
Reply With Quote
  #71    
Old 3 Weeks Ago (08:55 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
The only reason that would normally happen is if your dict.txt file is incorrect. try redownloading or making sure that dict.txt is in the same directory. If neither of those are the issue, then what does it say under details?
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #72    
Old 2 Weeks Ago (03:42 AM).
HerobrineHunter's Avatar
HerobrineHunter
 
Join Date: Dec 2014
Location: IN THE WORLD OF POKEMON
Gender: Male
Nice!
Very nice tool. Keep it up Bro
__________________
Reply With Quote
  #73    
Old 20 Hours Ago (11:51 PM).
Nerketur's Avatar
Nerketur
PokéScripter
 
Join Date: Nov 2010
Location: Cyberspace
Gender: Male
Nature: Quirky
As a small quick update, I'm now also an editor of the Project Pokémon Wiki! Working on the script commands page which is also helping me clarify a few commands and which commands go for time and which go for sky! Plan to update my program again soon, once I have the dict file updated, though I might release just that file sooner than the program. Long story short, once I fix a few other bugs, the program will be able to parse every command correctly! At least, in Time. Sky will take a bit more research. Thank you for your patience, everyone :D
__________________
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Reply With Quote
  #74    
Old 8 Hours Ago (12:30 PM).
SilverwingDB's Avatar
SilverwingDB
 
Join Date: Apr 2014
Gender: Female
I can't wait, son. For now, I've given up my rom edit, because it's impossible to not run into an error. Thank you for your dilligence.

Also, is there a way to replace music and other files (such as the title) in the game? I've seen one guy replace the music before, but he said that he couldn't play the game without it crashing.

I've also seen one dude edit the menu and dungeon text, but he needed to unpack the rom to do so.

I await the day where PMD will be fully editable.~
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 08:46 PM.