News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: The Console Tool (by Low Lines)  (Read 252677 times)

Rhys

  • Hero Member
  • *****
  • Posts: 706
    • View Profile
    • CN
Re: The Console Tool (by Low Lines)
« Reply #40 on: January 17, 2010, 03:34:44 pm »
That sounds awesome, will you be providing any inbuilt decompression for plugins for the standard compression types like LZ77?

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #41 on: January 19, 2010, 03:35:21 pm »
If anyone belittles how much work it takes to make GUIs, seriously...shoot them! It's taken me a fair while to think up / build and design all the GUIs I believe I need for the plugin editor, and that's not including my perfectionist like manner :p

Anways here are the preliminary GUIs that will make up the Plugin Editor.


So far only the Plugin Editor/Info dialogs are actually part implemented. If anyone suggests or ideas that I could include, feel free to say so. The idea of this whole project is making something like Photoshop/Flash which is so easy and I suppose "fun" to use once you know how they work. So when I design the GUIs, I'm building as to how I would like a GUI to work, and not simply a quick and easy way to get the job done.

Oh and in case anyones wondering, the icons I'm using are from FAMFAMFAM but I'm also looking at adding Fugue and some others which I think go well together (as the FAMFAMFAM icon set is limited somewhat), thus increasing the variety I'll have for file icons AND the GUI. I'll probably also make up some custom ones after I get past the goals I already have with this project.

« Last Edit: November 17, 2010, 08:41:23 pm by Low Lines »

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4572
  • じー
    • View Profile
    • The BRPXQZME Network
Re: The Console Tool (by Low Lines)
« Reply #42 on: January 19, 2010, 03:41:25 pm »
If anyone belittles how much work it takes to make GUIs, seriously...shoot them! It's taken me a fair while to think up / build and design all the GUIs I believe I need for the plugin editor, and that's not including my perfectionist like manner :p
While there are planning strategies that make this kind of thing easier, most good GUI coders I know code drunk....

They are different people from the good UI designers I know, mind you
we are in a horrible and deadly danger

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #43 on: January 19, 2010, 03:48:55 pm »
While there are planning strategies that make this kind of thing easier, most good GUI coders I know code drunk....

Lol wells, I don't even drink alcohol, so I dunno what that says about me :p I get to cheat a little though, I am using Netbeans to build the GUIs, it's more or less a drag and drop for the most part, but I have to go in and make all the fine details myself, and custom modifications like the tree, list and the icon picker are coded from scratch. It also takes time to make sure everything reacts properly, like the Info/Hierarchy/Code dialogs are children of the Plugin Editor dialog, so if you minimize it or the main window, it has to remember which dialogs were open etc. Then there's interaction between dialogs etc, the list goes on, but they're kick ass once they're done, which is the whole point :)

Nightcrawler

  • Hero Member
  • *****
  • Posts: 5785
    • View Profile
    • Nightcrawler's Translation Corporation
Re: The Console Tool (by Low Lines)
« Reply #44 on: January 20, 2010, 09:06:21 am »
Use a design pattern that separates out the view domain such as an MVC/MVP variant. You can then rearrange, tweak, or even change display technologies and your code hardly changes at all. Even better, you can then have some test code to test your software for you in an automated fashion.

A smart design pattern such as the one mentioned will make nearly all of the things you mentioned much simpler and not much of a problem. I wouldn't do a large scale GUI heavy project without one. I prefer Passive View which is an MVP variant that basically takes the concepts to the extreme for maximum benefit.
TransCorp - Over 20 years of community dedication.
Dual Orb 2, Wozz, Emerald Dragon, Tenshi No Uta, Glory of Heracles IV SFC/SNES Translations

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #45 on: January 21, 2010, 01:18:57 am »
Use a design pattern that separates out the view domain...
I don't quite have a very good understanding of all that, but I think I'm already partly doing it anyways :p

I've been spending most of my time being nit-picky about the look of parts of the GUI so I haven't gotten too much more done on it, however I have an urge to get back to working on the formats again :p The plugin tree is about part way to where I want it. Essentially, the aim was to render the XML plugin into a tree made up of tables, basically that it can function as the documentation for that format at the same time. Below is my start on that...

The grayed rows pop up when the next node has skipped some bytes, which ought to help with error checking etc (I did it deliberately here though). Generally when I put something aside for a bit and then go back to it, it turns out better anyways :p

[major edit]

Okay, I'll be honest and say that I've been considering it for a long time now, I'm going to release a demo version. However as of right now I'm on a Battlestar Galactica marathon so I have no clue as to what is working and what isn't, and if there are any major bugs, I'll fix them up ASAP. If the program stops working, simply close it and reopen it and all problems should be resolved. Also when reading a large number of files (or a fairly chunky archive table such as Gamecube ones), the program WILL appear as though it's not doing anything, but this is because it's checking all files for specific formats and I haven't added any processing dialog yet. The only time you can know for sure if you've come across an error is if the GUI doesn't display properly.

You should be able to export files (which includes automatic decompression) which should be handy for those who need a quicker way to extract stuff and don't want to use 5 programs to do it. It will decompress stuff to the same folder with "_extract" added for decompressed files. You can also bookmark folders which are saved to the settings.ini which will work with future versions unless I choose to change it which is unlikely as of this moment.

Other than that...happy hunting!
consoleTool_v01b.zip

[edit2]

There was a problem with the OpenGL extensions, causing Model stuff to not work...Update with fix...
consoleTool_v02b.zip
« Last Edit: November 17, 2010, 08:32:08 pm by Low Lines »

samurai goroh

  • Jr. Member
  • **
  • Posts: 30
    • View Profile
    • My page
Re: The Console Tool (by Low Lines)
« Reply #46 on: January 25, 2010, 12:15:03 pm »
Cool to finally see a release (even if it's a demo), I'll check it out right away :D
I'm the best in the universe, remember that [F-zero X]

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #47 on: January 26, 2010, 04:48:28 am »
Since posting the demo, I've been steadily working on alot of the bugs...That noted here's a list of them and my progress...
Code: [Select]
Browser
 - Loading folder bookmarks (which my cause an error) *fixed

Sprite Cells/Animations
 - Overall GUI problems *fixed (as far as I can tell)
 - Sprite Palette Indexing *partially fixed
 - Tile Mirroring *fixed
 - Screen/Maps Problems

3D Models
 - Material Size Bug *fixed

ISO Loader
 - Doesn't work

Also note that the Plugin Editor is disabled, and the Hex Viewer only displays files (meaning you can't select chunks or anything atm).
I've also updated the SM64DS model plugin to work with the new data structure I'm using.

I was also randomly looking at model files of one of the Nintendogs games and had a quiet giggle at this...


Reminds me of something from Resident Evil XD...Not so innocent now huh Nintendo?
« Last Edit: November 17, 2010, 08:33:07 pm by Low Lines »

Gemini

  • Hero Member
  • *****
  • Posts: 2024
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: The Console Tool (by Low Lines)
« Reply #48 on: January 26, 2010, 06:27:32 am »
Is that a NintenB.O.W.? :D
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4572
  • じー
    • View Profile
    • The BRPXQZME Network
Re: The Console Tool (by Low Lines)
« Reply #49 on: January 26, 2010, 08:24:22 am »
Can’t... unsee....
we are in a horrible and deadly danger

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #50 on: January 26, 2010, 08:38:40 am »
Can’t... unsee....
If you are talking about toggling visibility of model stuff, it wasn't readded (alot of stuff had to be disabled for debugging purposes) when I released the demo. It will be back in future releases...

I think the reason why the poor puppy dog is mutated is because the initial stack id for polygon0 is wrong, which is set in the Bones section. I've managed to fix a some of the NSMB models (such as goomba) which used Bone Command #5, which seems to set the initial stack to the last one in memory.

Atm I'm looking at NSBTP files, which I am almost certain are texture animations...

[edit]

Ohs and I've also fixed A3I5/A5I3 textures which display wrong (bright green means errors).

BRPXQZME

  • Hero Member
  • *****
  • Posts: 4572
  • じー
    • View Profile
    • The BRPXQZME Network
Re: The Console Tool (by Low Lines)
« Reply #51 on: January 26, 2010, 11:16:25 am »
Yeah, I was talking about the cute puppydog gone horribly wrong ;_;
we are in a horrible and deadly danger

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #52 on: January 26, 2010, 07:43:01 pm »
Okay, I shot my way through the Umbrella Corporation and found the antidote to return ninpuppy to normal 8)
Cause...one bone command had the wrong length, causing it to skip/break on the next command, and also the stack initilizer was using the object's id instead of the stack id for that object.
« Last Edit: November 17, 2010, 08:33:58 pm by Low Lines »

Killa B

  • Hero Member
  • *****
  • Posts: 1153
  • Fallen Angel
    • View Profile
    • Killa B
Re: The Console Tool (by Low Lines)
« Reply #53 on: January 26, 2010, 08:46:11 pm »
Not sure if I've already said this or not, but this project is really fucking cool.
I always dreamed of doing a Pokemon hack

DarknessSavior

  • Hero Member
  • *****
  • Posts: 5031
  • Darkness.
    • View Profile
    • DS: No, not the Nintendo one.
Re: The Console Tool (by Low Lines)
« Reply #54 on: January 26, 2010, 10:13:45 pm »
Aww...I liked the zombie-puppy.

~DS
Red Comet: :'( Poor DS. Nobody loves him like RC does. :'(
Sliver-X: LET ME INFRINGE UPON IT WITH MY MOUTH
DSRH - Currently working on: Demon's Blazon, Romancing SaGa, FFIV EasyType.
http://www.youtube.com/user/DarknessSavior

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #55 on: January 27, 2010, 06:56:19 am »
First off, I've fixed a bug where opening an archive within an archive (ie in a NDS ROM) that contains folders, caused the tree to stuff up. Yay! Also, in case you missed my post, from now on, any releases will be added to my signature...

Atm I'm focusing on Zelda Hourglass, and am trying to get most models to work properly, as well as examining the four Model Animation formats, they being, NSBCA, NSBMA, NSBTP and NSBTA. Though I'm not certain, here's what each animation format does...

NSBCA...animates models by manipulating the geometry via Rotating/Scaling/Translating etc
NSBMA...seems to manipulate materials somehow, perhaps via transparency, or positioning. Examples I've seen generally are a form of lighting such as an object that glows.
NSBTP...animates materials by swapping textures much in the same fashion as sprite animation. An example would be link's eyes blinking.
NSBTA...seems to manipulate textures, most likely via positioning. An example would be the waves in zelda.

The file structures of all 4 are fairly similar, I just haven't determined how all the data is stored quite yet, but I'm working on it....

Penance

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: The Console Tool (by Low Lines)
« Reply #56 on: January 27, 2010, 10:38:14 am »
Such an amazing tool. I can't fucking wait to try it.

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #57 on: January 28, 2010, 01:23:46 am »
I think a lot of bugs in the models is because of poor interpretation of the Bone Commands. Kiwi.DS's implementation generally works well with most models, but it tends to stuff up on weird ones. I think this is due to variables not being inherited properly etc. I've been trying to fix all problems, but it's more or less fixing one model breaks another so there's still lots of figuring out to do.

An interesting result of my testing produced this...


I call it Nindumbopuppy XD

[edit]

Fixed texture mirroring.
Added texture scaling (mostly works).
Added texture clipping (though I'm not totally sure where the flags are stored in the material data...).
« Last Edit: November 17, 2010, 08:34:45 pm by Low Lines »

Spikeman

  • Hero Member
  • *****
  • Posts: 1063
  • *unce unce unce*
    • View Profile
    • None at the moment, check out my Last.fm page instead?
Re: The Console Tool (by Low Lines)
« Reply #58 on: January 28, 2010, 09:34:35 pm »
Do you want us to post any buggy models we find? I was looking through Custom Robo DS and some of them displayed correctly but a lot were completely broken.
Open Source Hacking Projects: Guru Logic Champ, Telefang 2, (Want more? Check out my GitHub!)

Low Lines

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • lowlines
Re: The Console Tool (by Low Lines)
« Reply #59 on: January 28, 2010, 10:20:59 pm »
Do you want us to post any buggy models we find? I was looking through Custom Robo DS and some of them displayed correctly but a lot were completely broken.
No point really, generally the models that are broken don't point to stacks in a sequential order (ie obj 1 = stack 1, obj 2 = stack 6), plus the so called "dummy ID" seems to also be used somehow too as some models store numbers in there too. I'm not just aiming for models to display properly, but for objects to register the right parts to them...For instance, with the dog model, when it is displaying properly, "tail1" selects parts of the dogs back leg etc.

Atm I'm trying to get one of the phantoms for Hourglass to display properly.


Kiwi.DS implementation sets the matrix stack using the stack id, if you check out this model (BattleChaser), you'll see all the limbs display properly, but the chest but breaks. The implementation I used here uses the object id when setting the matrix stack, the result being that the chest displays properly but the right leg is broken. The most annoying part is that for some reason the leg and the chest are sharing the same object/stack when they shouldn't be!! Another thing to note is that the "dummy id" also shows values of 0-3 with this model too which complicates things.

Here's a print out of the bones commands...
Code: [Select]
============================================================================================================
00 | 0x26 | [Connect to Object] Object ID: 00 | Parent ID: 00 | Dummy ID: 02 | Stack ID: 00 [Restore ID: -1]
01 | 0x26 | [Connect to Object] Object ID: 01 | Parent ID: 00 | Dummy ID: 03 | Stack ID: 01 [Restore ID: -1]
02 | 0x26 | [Connect to Object] Object ID: 02 | Parent ID: 01 | Dummy ID: 03 | Stack ID: 02 [Restore ID: -1]
03 | 0x26 | [Connect to Object] Object ID: 03 | Parent ID: 02 | Dummy ID: 01 | Stack ID: 03 [Restore ID: -1]
04 | 0x66 | [Connect to Object] Object ID: 04 | Parent ID: 01 | Dummy ID: 03 | Stack ID: 04 | Restore ID: 01
05 | 0x26 | [Connect to Object] Object ID: 05 | Parent ID: 04 | Dummy ID: 01 | Stack ID: 05 [Restore ID: -1]
06 | 0x66 | [Connect to Object] Object ID: 06 | Parent ID: 01 | Dummy ID: 01 | Stack ID: 06 | Restore ID: 01
07 | 0x66 | [Connect to Object] Object ID: 07 | Parent ID: 00 | Dummy ID: 03 | Stack ID: 07 | Restore ID: 00
08 | 0x26 | [Connect to Object] Object ID: 08 | Parent ID: 07 | Dummy ID: 03 | Stack ID: 00 [Restore ID: -1]
09 | 0x26 | [Connect to Object] Object ID: 09 | Parent ID: 08 | Dummy ID: 01 | Stack ID: 08 [Restore ID: -1]
10 | 0x66 | [Connect to Object] Object ID: 10 | Parent ID: 07 | Dummy ID: 03 | Stack ID: 09 | Restore ID: 07
============================================================================================================
11 | 0x02 | [Object ID: 0] Visibility: 1
============================================================================================================
12 | 0x03 | [Set First ID: 1]
============================================================================================================
13 | 0x04 | [Material Pairing]  | Material ID: 01 | Check: 5 | Polygon ID: 01 [First ID: 1]
============================================================================================================
14 | 0x66 | [Connect to Object] Object ID: 11 | Parent ID: 10 | Dummy ID: 01 | Stack ID: 01 | Restore ID: 09
============================================================================================================
15 | 0x03 | [Set First ID: 3]
============================================================================================================
16 | 0x04 | [Material Pairing]  | Material ID: 00 | Check: 5 | Polygon ID: 00 [First ID: 3]
============================================================================================================
17 | 0x01 | [End of Bones Section]
18 | 0x00 | [Padding]
19 | 0x00 | [Padding]

The data in brackets on the right hand side mean that the command itself doesn't specify the data, and it relies on whatever values are loaded into the respective variables.

Also note that if you test out this model yourself, you'll get a different result as I've been tweaking the model viewer since the demo release...

[edit]

Ok I think I understand what the problem is...The reason why the phantom's chest and leg are breaking is because they ARE using the same stack. I've been treating the matrix stack as multiple 4x4 matrices, when it's really more like a buffer. I was looking at some of the Debugging tools in DeSmuME and I noticed that there were like 32 matrices. What I've been doing (what Kiwi.DS's code did) was parse all the stacks before rendering the models, thus any stack used by several objects would only retain the last stack loaded into it, and this is why the phantom's chest and right leg breaks when swapping between object id and stack id.
« Last Edit: November 17, 2010, 08:35:31 pm by Low Lines »