Kuribo64
Views: 20,053,197 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
04-25-24 04:47 PM
Guest:

Main - Posts by JwopDk

Pages: 1 2
JwopDk
Posted on 04-05-13 05:19 AM, in Ricco Harbour (rev. 2 of 04-05-13 05:24 AM) Link | #19180
I always get this error whenever I try to use bmd2bdl:

Traceback (most recent call last):
File "D:\Programmer\Python\lib\site-packages\cx_Freeze\initscripts\Console3.py", line 27, in
File "bmd2bdl.py", line 63, in
IndexError: list index out of range


The main reason I want this to work is so I look at the differences between the BMD file and the resulting BDL file and create my own converter in C, making it much smaller and more efficient. I might even release it on this site.

JwopDk
Posted on 04-05-13 06:57 AM, in Model formats - A better understanding (rev. 6 of 04-16-13 11:54 AM) Link | #19184
I think it would be important to have more info on the MDL3 section of the BDL format as it is the only thing that differs from the BMD format (apart from a few bytes at the start of the file), and that the current converter isn't well documented.

Here is my revised version of bdl2bmd in C which can be found here: http://www.sendspace.com/file/mjvsej
(I forgot to reset the file size at 0x8 in the old version
and I made it so that it uses file buffers a bit more safely)
Let me know if it's a bit easier to understand than the original (I included source)

JwopDk
Posted on 04-06-13 03:43 AM, in Model formats - A better understanding (rev. 15 of 04-14-13 01:51 PM) Link | #19231
Ok, so I got some info from mdl3.py from obj2bdl and proceeded to write up a table of the basic header:
(note that this post will be updated as I find more info)
+-------------------------------------------+
| MDL3 Header |
+------+------+-----------------------------+
|Offset| Size | Description |
+------+------+-----------------------------+
| 0x00 | 0x04 | Magic "MDL3" |
| 0x04 | 0x04 | Size of section |
| 0x08 | 0x02 | Number of materials |
| 0x0A | 0x02 | Padding? (0xFFFF) |
| 0x0C | 0x04 | Packet Header Offset (0x40) |
| 0x10 | 0x04 | SS1 Header Offset |
| 0x14 | 0x04 | Matrix Index Header Offset |
| 0x18 | 0x04 | Unknown Header Offset |
| 0x1C | 0x04 | Index Header Offset |
| 0x20 | 0x04 | Material Name Header Offset |
| 0x24 | 0x1C | Padding |
+------+------+-----------------------------+

+-----------------------------+
| Packet Header |
+------+------+---------------+
|Offset| Size | Description |
+------+------+---------------+
| 0x00 | 0x04 | Packet Offset |
| 0x04 | 0x04 | Packet Size |
+------+------+---------------+

+--------------------------------------+
| SS1 Header |
+------+------+------------------------+
|Offset| Size | Description |
+------+------+------------------------+
| 0x00 | 0x02 | Channel Colour Offset |
| 0x02 | 0x02 | Channel Control Offset |
| 0x04 | 0x02 | Texture Gen Offset |
| 0x06 | 0x02 | Texture Offset |
| 0x08 | 0x02 | TEV Offset |
| 0x0A | 0x02 | Pixel Offset |
| 0x0C | 0x04 | Padding (0xFFFFFFFF) |
+------+------+------------------------+
| Loops for every material |
+--------------------------------------+

+----------------------------------------------------------+
| Matrix Index Header |
+------+------+--------------------------------------------+
|Offset| Size | Description |
+------+------+--------------------------------------------+
| 0x00 | 0x04 | Big endian floating point? (0x3CF3CF00) |
| 0x04 | 0x04 | Little endian floating point? (0x00F3CF3C) |
+------+------+--------------------------------------------+
| Loops for every material |
+----------------------------------------------------------+

+-------------------------------------------------------------------------+
| Unknown Header |
+-------------------+---------------------+-------------------------------+
| Offset | Size | Description |
+-------------------+---------------------+-------------------------------+
| 0x00 | Number of materials | Repeats the value 0x01 |
| Number of entries | Alignment | Aligns to the next 0x04 bytes |
+-------------------+---------------------+-------------------------------+

+--------------------------------------------+
| Index Header |
+------+------+------------------------------+
|Offset| Size | Description |
+------+------+------------------------------+
| 0x00 | 0x02 | Index (i) |
+------+------+------------------------------+
| for i = 0, i < Number of materials, i += 1 |
+-----+-------+------------------------------+
| i*2 | Align | Padding |
+-----+-------+------------------------------+

+------------------------------------------------------------------------------------------------+
| Material Name Header |
+-------------------------------------+----------------------------+-----------------------------+
| Offset | Size | Description |
+-------------------------------------+----------------------------+-----------------------------+
| 0x00 | 0x02 | Number of materials |
| 0x02 | 0x02 | Padding? (0xFFFF) |
| 0x04 | 0x04 * Number of materials | Unknown |
| (0x04 * Number of materials) + 0x04 | 0x04 * Number of materials | Names of materials in ASCII |
+-------------------------------------+----------------------------+-----------------------------+

Once I get enough info I might see if I can create a BMD to BDL converter by inserting
an empty (yet valid) MDL3 Section into the output BDL file and then maybe go from there.

EDIT:
I think it might be better to copy and modify the MAT3 section from
the input BMD and use THAT as the MDL3 section in the output BDL.

JwopDk
Posted on 04-06-13 01:23 PM, in Model formats - A better understanding (rev. 6 of 04-06-13 03:22 PM) Link | #19248
@blank Yeah I was thinking a dummy MDL3 section might not work either and the
best way was to copy and modify the MAT3 section and use THAT as the MDL3 section.

EDIT:
Always check my previous post for new MDL3 info.
Also, I plan on doing a similar analysis on MAT3 so I can compare it with MDL3.

JwopDk
Posted on 04-12-13 03:36 PM, in Model formats - A better understanding (rev. 4 of 04-13-13 04:04 AM) Link | #19907
Ok, so after a week of being away and trying to understand the MDL3 section I finally understood what you guys were on about with GP packets.

To those who aren't up to speed, the core of the MDL3 section is basically full of hardware commands that it sends mostly to the blitting processor (the thing that renders or "paints" 3D objects, lighting effects and other things on to the 640x480 screen), which is a way that is slightly different and perhaps more efficient than the original MAT3 section, which from what I understand contains arguments to the functions (or in other words variables to the formulas) within the game. I think MDL3 might be more efficient than MAT3 purely because my instincts tell me hardware is faster than software, but I don't really know. Hell, I don't even know if Super Mario Galaxy uses both or just MDL3 or whatnot.

Anyway, realising this, I proceeded to create a rather lousy disassembler of sorts for the wii graphics code (what's used in the MDL3 section) which can be found here (source included 'cause I'm such a nice guy): http://www.sendspace.com/file/djjr4z

Finally, as promised, I made an analysis of the main header of the MAT3 section, not bothering to detail any of the many components it entails:
+-------------------------------------------------+
| MAT3 Header |
+------+------+-----------------------------------+
|Offset| Size | Description |
+------+------+-----------------------------------+
| 0x00 | 0x04 | Magic "MAT3" |
| 0x04 | 0x04 | Size of section |
| 0x08 | 0x02 | Number of materials |
| 0x0A | 0x02 | Padding? (0xFFFF) |
| 0x0C | 0x04 | Entry Header Offset (0x84) |
| 0x10 | 0x04 | Index Header Offset |
| 0x14 | 0x04 | Material Name Header Offset |
| 0x18 | 0x04 | Indtex Header Offset |
| 0x1C | 0x04 | Cull Mode Header Offset |
| 0x20 | 0x04 | Material Colour Offset |
| 0x24 | 0x04 | Number of Channels Offset |
| 0x28 | 0x04 | Channel Control Offset |
| 0x2C | 0x04 | AMB Colour Offset |
| 0x30 | 0x04 | Unknown #1 (Same offset as below) |
| 0x34 | 0x04 | Number of Texture Gens Offset |
| 0x38 | 0x04 | Texture Coordinates Gen Offset |
| 0x3C | 0x04 | Unknown #2 (0x0) |
| 0x40 | 0x04 | Texture Matrix Offset |
| 0x44 | 0x04 | Unknown #3 (0x0) |
| 0x48 | 0x04 | Texture Offset |
| 0x4C | 0x04 | TEV Order Offset |
| 0x50 | 0x04 | TEV Colour Offset |
| 0x54 | 0x04 | TEVK Colour Offset |
| 0x58 | 0x04 | Number of TEV Stages Offset |
| 0x5C | 0x04 | TEV Combiner Offset |
| 0x60 | 0x04 | Swap Mode Offset |
| 0x64 | 0x04 | Swap Mode Table Offset |
| 0x68 | 0x04 | Fog Offset? |
| 0x6C | 0x04 | Alpha Compare Offset |
| 0x70 | 0x04 | Blend Mode Offset |
| 0x74 | 0x04 | Z Mode Offset |
| 0x78 | 0x04 | Z Compare Location Offset |
| 0x7C | 0x04 | Dither Offset |
| 0x80 | 0x04 | Unknown #4 Offset |
+------+------+-----------------------------------+

And yeah. I hope this page gets some more interest.

JwopDk
Posted on 04-16-13 03:06 PM, in Model formats - A better understanding (rev. 6 of 04-17-13 07:43 AM) Link | #20633
Hi guys,
Vaguely off-topic, but I made this command-line tool for patching single files to a RARC file which can be
found here: http://www.sendspace.com/file/q37gv4

The main reason for doing this is that I haven't been able to get Wiimm's tools working on my Linux computer
(I run the windows port of tcc in wine to make my programs for windows computers), because apparently
it can't find libpng14 even though I installed correctly. I also wanted to get a better understanding of how
the RARC format works, and also this program fits nicely with the set of tools that Thakis and Shevious made,
which is how I've been testing new models in Super Mario Galaxy.

Finally, I just want to say, even if you don't really care what I'm posting on this thread, I'm still going
to go ahead and make my own BDL to BMD converter, because despite the time it's taking to make, I'd rather make
my own converter than try to set up a python environment that requires some external libraries just to convert
a level file from a Nintendo game, which I concede would be much easier, but again, I like to know how these things work.
No offense, blank, your tools are awesome and you know so much more than I do
about this stuff, but I feel that for the average user it might be simpler just to drag a level file on top of
an exe that only uses core Windows DLLs found in System32. Also, a 1.6MB exe from a 5KB python script is slightly
ridiculous :P

JwopDk
Posted on 10-22-14 10:08 AM, in Captain Grabbin' - A Wii Disc File Extractor! (rev. 11 of 06-21-15 09:10 AM) Link | #49996
Captain Grabbin' is a Wii homebrew app that opens a Wii disc in the drive and allows you to extract files and folders from inside of it.
It is designed to be somewhat of a replacement for WiiScrubber, so instead of extracting a whole ISO before picking a few files, Captain Grabbin' allows you to specifically choose which levels or songs or whatever you want to extract from the disc, while also allowing you to extract whole folders at a time, something WiiScrubber can't do.

This might already exist, but I couldn't find an alternative. If it doesn't, then I hope this proves useful.
I can't be the only one who was annoyed by having to rip the whole disc or illegally download a game I already own just to get some levels or music, and I'm pretty sure other people in these forums might have had similar issues.

Anyway, here it is:

v0.1b Download - https://mega.co.nz/#!z1JiQSRY!C1Ql2iS5bhzmE_pGgX5-O9wLrI0DojBbvWCh--3VYRs
========Fixes========
- Extracting large files (>50 MB) doesn't crash anymore
- Implemented a check for the amount of available space on USB/SD card
====Improvements=====
- More efficient extraction method, taking more data at a time
======Additions======
- A better progress display, with things like percentage completed, amount of data extracted, etc.
========Todo=========
- Still with the graphics that won't make your eyes bleed.
The next version should be v0.2, and will have an interface similar to my post below.

There are more important things that I've fixed, but I've honestly forgotten half of them.
------------------------------------------------------------------------------------------------------------
v0.1a Download - https://mega.co.nz/#!GwRGmYSA!nm0S8uIOVGX5DGQt943HO5hiBfZrRtJ4hD8C4QiJXKM
========Fixes========
- Extracting folders now works properly, instead of creating folders where it shouldn't
======Additions======
- Progress thing keeps track of the amount of files extracted
- Prints folder/file size
=========Todo========
- Actual graphics (working on it)

------------------------------------------------------------------------------------------------------------
v0.1 Download - https://mega.co.nz/#!S8ZDWZyb!y0YhXavsrILBMWroilnIoatpcTcIIfaqQJ6K9Bje3tw
(Warning: it's ugly as butts, but it works. I'll make a GUI if people are interested.)

EDIT: Oh yeah, it has SD card and USB support, but USB is slower. I can't help that, it's a hardware limitation.
Also, there might be a few bugs. I definitely plan on fixing as many bugs as possible and adding actual graphics. This is still in its early stages!

JwopDk
(post deleted) #49999

JwopDk
Posted on 10-22-14 10:49 AM, in Captain Grabbin' - A Wii Disc File Extractor! (rev. 3 of 10-22-14 10:52 AM) Link | #50002
Does this tool allow you to pick and choose files to extract?

Absolutely. There's the whole directory tree thing, like in WiiExplorer. You can highlight and extract single folders or files at a time. Naturally, extracting folders is recursive, meaning everything that goes underneath that folder is extracted.
You can check out the source if you want; it's in C. In hind-sight, due to the way browsing folders works, it might have been wiser to use C++. Oh well, it works!

JwopDk
Posted on 10-24-14 01:53 PM, in Captain Grabbin' - A Wii Disc File Extractor! Link | #50053
Grabbin Grabbin v0.1a has been released! See first post for details.

JwopDk
Posted on 10-24-14 04:49 PM, in Captain Grabbin' - A Wii Disc File Extractor! Link | #50063
It extracts files and folders inside of the ISO.

JwopDk
Posted on 10-25-14 12:22 AM, in Captain Grabbin' - A Wii Disc File Extractor! (rev. 3 of 10-25-14 12:28 AM) Link | #50102
From what I understand, Cleanrip works perfectly well as a utility to extract ISOs. I could add that feature if I wanted, but pretty much what Splitwirez said, maybe not for this app.

Anyway, I'm working on mainly the graphics at the moment, and so far it looks like this:

[image]

The name of the game sits next to the Captain Grabbin' bit, and the files and folders go on top of the parchment. Oh, and the Wind Waker texture that goes above the blue background will be animated and move.

===========================================================================================================

That was a bit vague. You could be a bit clearer. Perhaps mention that it doesn't rip an ISO at all, rather than implying it?


Ok, sorry, I'll fix that. You know when you try explain something to someone and you forget to mention half the stuff that's actually important? Yeah, that's me.

JwopDk
Posted on 10-26-14 04:41 PM, in The first ever custom powerup! Link | #50238
I might be able to make some tools to help with this. Maybe a program to help patch PPC assembler code to main.dol? I dunno, this hack looks really interesting.

JwopDk
Posted on 10-28-14 04:58 AM, in Captain Grabbin' - A Wii Disc File Extractor! Link | #50355
Has anyone come across any issues or bugs? I'm not sure whether Brawl would work, since it's a dual-layer disc.

JwopDk
Posted on 11-02-14 11:28 AM, in Captain Grabbin' - A Wii Disc File Extractor! (rev. 2 of 11-02-14 11:28 AM) Link | #50598
Captain Grabbin v0.1b is afoot! Check the first post to see the new fixes and features.

JwopDk
Posted on 11-02-14 11:37 AM, in An Interactive DOL Editor/Expander/Disassembler/Patcher? Link | #50599
I don't know whether this sort of thing would be in demand, but I might be able to make an app for PC that can do those sorts of things, as well as maybe scripting and other stuff. Would anyone use that? It would probably be more useful with Dolphin.

JwopDk
Posted on 11-02-14 11:49 AM, in An Interactive DOL Editor/Expander/Disassembler/Patcher? Link | #50605
Yeah, I was kind of thinking of something like LemASM, except not broken and more useful.

JwopDk
Posted on 11-02-14 12:42 PM, in An Interactive DOL Editor/Expander/Disassembler/Patcher? (rev. 2 of 11-02-14 12:51 PM) Link | #50609
Since when can Riivolution patch DOLs, anyways?


I don't know if it can or not, regardless this would work well with an emulator.

http://www.smwcentral.net/?p=viewthread&t=73708 maybe?

its made for mario 64 but it can be used for everything actually, it just assembles your code into the rom. but I do not know if the program wants to open other files then only n64 files.


I think that was what partially inspired me to start making this program. It looks pretty good, I might take some ideas and notes from it.
This program, which I think I'll call "Dolphin Force", will have more of an emphasis on editing a DOL/ELF file rather than being strictly an assembler, although from closer inspection, CajeASM looks like it's more than that.

JwopDk
Posted on 11-02-14 01:01 PM, in An Interactive DOL Editor/Expander/Disassembler/Patcher? Link | #50611
Yay, Dolphin-exclusive content! Fun! Lag! Crashes! I can't wait to switch to Dolphin even though it lags beyond comprehension on most computers, crashes every 15 seconds, and CAN'T EVEN READ OR WRITE SAVE FILES on my computer. My point is, it may work well on Dolphin, but Dolphin itself doesn't work well...atleast, not for most people.


1) That's not my problem, 2) GC/Wii emulation will get smoother, faster with newer hardware, and less buggy over the years, so that won't really be an issue forever. Besides, I'm pretty sure most people interested in Dolphin now have PCs that game play games at at least 70% speed, and really, that's probably enough for now.

JwopDk
Posted on 11-16-14 11:24 AM, in An Interactive DOL Editor/Expander/Disassembler/Patcher? Link | #51252
So I was going to do use vdappc and powerpc-gekko-binutils to do all the assembling and disassembling of individual instructions for me (like what ASM Helper Tool does), but I decided this program would work better if it had access to more than just the input raw machine code and output PowerPC assembler (eg. access to things like instruction types, branch targets, relative jumps, etc.).

Long story short: I'm making a PowerPC Gekko assembler and disassembler from scratch, written in C++ so that its object-oriented. That will make it much easier to integrate with the rest of this interactive disassembler of sorts.

This means it's gonna take a hell of a long time to make, so we'll see how it turns out.
Pages: 1 2

Main - Posts by JwopDk

Page rendered in 0.048 seconds. (2048KB of memory used)
MySQL - queries: 21, rows: 137/137, time: 0.009 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.