Jump to content

N64/Zelda hacking tools (DList conversion etc)


xdaniel
 Share

Recommended Posts

Posted Image

Nope.

 

try replacing the start of that with this

 

E7 00 00 00 00 00 00 00 E3 00 10 01 00 00 00 00D7 00 00 02 07 D0 09 C4 FD 90 00 00 04 05 84 20F5 90 00 00 07 01 40 50 E6 00 00 00 00 00 00 00F3 00 00 00 07 0F F4 00 E7 00 00 00 00 00 00 00F5 80 04 00 00 01 40 50 F2 00 00 00 00 07 C0 7CFC 12 7E 03 FF FF FD F8 E2 00 00 1C C8 11 20 78D9 FF FF FF 00 0F 00 00 E7 00 00 00 00 00 00 00
Link to comment
Share on other sites

Still looks the same as before... no difference.

 

I copied and pasted the whole thing.

so it's not an instruction ordering problem either...that only leaves 1 problem. it's shading. you need to mux up an unlit combiner instruction. I have the doc for FC on my pc somewhere, I'll try to write you one right quick...

 

 

EDIT:

aight, here's what I came up with.

FC 13 6C 26 FF DB 9F CF

I can't guarantee it'll work, but the equation I used was

color = (TEXEL0 - 0) * 1 + 0alpha = (1 - TEXEL0) * 1 + 0

the doc I posted is at http://glitchkill.proboards.com/index.cgi?board=ootmod&action=display&thread=5930

Link to comment
Share on other sites

This works: FC 11 96 23 FF 2F FF FE

 

 Thanks Kaminotamashi.

 

Posted Image

 

 

 

EDIT: So I've been playing around with the values starting from scratch, and I came up with this:

Posted Image

 

I'd say Link has played with "Mario paint"  XD

 

Anywho, it's really funky and copies nearby textures in a messy way. If anyone wants to use it, here's the FC value:

FC 11 76 03 FF FF FD F8

Link to comment
Share on other sites

Doesn't appear to be a Model2N64 problem as such, you didn't make Milkshape 3D generate vertex normals. Easiest but not a perfect fix: In Milkshape, go to menu "Face" then select "Smooth All", or just press Ctrl+M. See if that works well enough for you, otherwise you'll probably need to read up on how to do lighting, smooth shading, etc. in Milkshape, I don't really know either.

 

Posted Image

 

Link to comment
Share on other sites

Thanks for the tip. I did manage to fix it, although I didn't use Milkshape to fix it. I tried looking up how to fix it, but there wasn't much info on the problem.

 

EDIT: also, how do I prevent a model from not being transparent inside? I want my next model to be opaque inside.

Link to comment
Share on other sites

If you mean what I think you do, disable backface culling - in Model2N64, right-click a group and disable CullBack from the Flags menu.

I did so, but it does not seem to be working.

 

EDIT: I probably did something to prevent it from working. I will try again.

 

EDIT2: Nope, somehow it's not working.

Link to comment
Share on other sites

Posted Image

I don't know if it's the fact that it's a gi object, or that your converter is just not cooperating... I have been unable to get it to work for gi items for some things...

 

(P.S. Clock has a texture, and I only converted one piece individually, not extra groups)

Link to comment
Share on other sites

Sort of... it has a new effect that will be useful in a custom dungeon... I might have it used in a few dungeons, but for now I'm not sure.

 

I could make it act as a clock from Zelda 1, but currently I am fustrated that the converter is not working correctly.

Link to comment
Share on other sites

  • 1 month later...

With Hylian Toolbox v1.7 now out... http://magicstone.de/dzd/random/model2n64cht-test4.rar

 

It has a few bugs that'll need ironing out - like how the -nocull flag apparent doesn't work - but overall it's working very well.

 

Model2N64-CHT v1 (Command line version for Hylian Toolbox)
Written 2013 by xdaniel / http://magicstone.de/dzd/

Arguments:
 -model <filename>: Model to convert
 -output <filename>:  Output path of converted file
 -seg 0x<segment>:   RAM segment for converted data
 -offset 0x<offset>:  Base offset for converted data; prepended as padding

Optional arguments:
 -verbose:   Print various status messages
 -dlout <filename>: Output path of list with DL addresses
 -ignorecolor:   Forces converter to ignore material colors (Ka, Kd)
 -nocull: Disables backface culling
 -nolight:   Disables lighting
 

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

I need to make this suggestion...

 

Some objects use flat planes to render textures in a 2D illusion, such as the Hookshot pointer and Navi's orb.... both of them rotate to face the camera.

 

I noticed in Navi's code that the display list doesn't point to the "white square" that's her orb in gameplay_keep, and none of the display lists loaded point to it. The address is 0x15790 in UoT, yet in gameplay_keep there is a pointer 04015780, which apparently references this model.

 

It's possible I just overlooked something simple in the display list, but when I switched the hookshot pointer code to use a new pointer, the new pointer did not rotate properly to face the camera.

 

It could just be part of the code, but is it possible the display list has something in it that might utilize a rotation

Link to comment
Share on other sites

For one, 0x15780 appears to be the correct start address, as the last command right before that at 0x15778 is EndDL/0xDF. 0x15790 is likely yet another UoT bug; I vaguely seem to remember something regarding display list addresses being off by a bit...

 

Secondly, the command at 0x15780 is Mtx/0xDA, which, in this case, loads a matrix from RAM segment 0x01 - the segment, and the matrix contained, very likely being set up at runtime by the game, and very likely what transforms the model to always face the screen. The next command after that is a DL/0xDE display list call to segment 0x08, which is also set up at runtime, so I have no idea what it contains; might be animation-related, might be something else, I don't know.

 

A wild guess and not guaranteed to work, to make a different/custom model that replaces Navi's sphere also face the screen, would be to 1) leave the pointer to 0x15780 intact, 2) leave the Mtx command there intact, 3) overwrite the DL call at 0x15788 with one to the replacement model, and 4) overwrite the RDPPipeSync/0xE7 at 0x15790 with an EndDL. Again, a wild (but educated) guess, and probably not something I'm gonna try out myself (honestly too lazy).

Link to comment
Share on other sites

For one, 0x15780 appears to be the correct start address, as the last command right before that at 0x15778 is EndDL/0xDF. 0x15790 is likely yet another UoT bug; I vaguely seem to remember something regarding display list addresses being off by a bit...Secondly, the command at 0x15780 is Mtx/0xDA, which, in this case, loads a matrix from RAM segment 0x01 - the segment, and the matrix contained, very likely being set up at runtime by the game, and very likely what transforms the model to always face the screen. The next command after that is a DL/0xDE display list call to segment 0x08, which is also set up at runtime, so I have no idea what it contains; might be animation-related, might be something else, I don't know.A wild guess and not guaranteed to work, to make a different/custom model that replaces Navi's sphere also face the screen, would be to 1) leave the pointer to 0x15780 intact, 2) leave the Mtx command there intact, 3) overwrite the DL call at 0x15788 with one to the replacement model, and 4) overwrite the RDPPipeSync/0xE7 at 0x15790 with an EndDL. Again, a wild (but educated) guess, and probably not something I'm gonna try out myself (honestly too lazy).

Actually I did a quick test with replacing the pointer to Navi's orb with the Heart Piece, and behold! It doesn't face the screen.

 

Seems related to those attributes it originally points to.

 

EDIT:

I put a DE - DF pointer at 15790, and guess what? The heart piece now faces the screen! Those commands before E7 have something to do with it.

Link to comment
Share on other sites

EDIT:I put a DE - DF pointer at 15790, and guess what? The heart piece now faces the screen! Those commands before E7 have something to do with it.

Well, yes? As I was saying, at 0x15780 is a Mtx command. Matrices are what position stuff - everything, from the camera itself to tiny dust particles - in a three-dimensional space in games. I bet that command loads the matrix that transforms the following display list's / model's vertices so that the model faces the screen.It would be interesting to know what the DL call right after the Mtx command is responsible for, tho, like if that's still needed with, for example, the Heart Piece, or if that's specific to Navi's original model.
Link to comment
Share on other sites

The DE is calling inline to the actor, which in the actor file is JR RA at 0x0. I don't see the purpose in it on its own, unless it's used with other combinations.

 

EDIT:

I did a successful test with switching Navi, creating a separate list: https://www.the-gcn.com/topic/2618-singling-out-navi

 

It's possible it's for Navi-only, but without it, it wouldn't work properly.

 

 

EDIT 2:

How to do transparent part again:

Posted Image

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.