Jump to content

N64/Zelda hacking tools (DList conversion etc)


xdaniel
 Share

Recommended Posts

http://magicstone.de/dzd/random/besitu-hacked-9.ppf - Nailed it! :D (maybe)

 

mWGeT6N.png

 

Apparently, mesh type 0 isn't just one address per entry, it's two - first address is the opaque display list, second is the transparent one. So, for example, besitu's modified mesh header in the above patch:

 

ROM 0x03545030: 00 01 0000 0300003C 03000044

ROM 0x0354503C: 030012E8 030003F0

 

00 is the mesh type, 01 is the number of entries, 0300003C 03000044 seem to be (2nd one might actually be a pointer to something else; maps have a 01 byte at that address?) the start and end address of the display list pointer table. Next, 030012E8 is the display list with all opaque geometry, while 030003F0 is the one with transparent geometry.

 

...at the very least, that seems to be the case with other maps like turibori_room_0 (fishing pond) or bdan_room_0 (Jabu-Jabu's first room) - they have the number of entries set to 01, but have two addresses, the second of which is the water of each room, and in the fishing pond's case some bits of decoration on the walls.

 

Anyway, if that patch works fine on hardware and looks the way it's supposed to, I think we might've solved ourselves a big problem with custom maps.

  • Like 4
Link to comment
Share on other sites

How's the tool going? Think you'll have it working and uploaded before the holidays end?

I addressed that a few posts ago, actually, and it's more likely to be January:

 

Alright, doing more cleanup work, etc. tomorrow. Not sure if I'll be able to get a release of the converter out before or during Christmas - will be with my family over the holidays, and while I will bring my laptop, I don't think I'll be using it much -, early to mid January should be realistic, tho.

...might be a bit conservative even, early January is very possible.

Link to comment
Share on other sites

Sure, just curious so I can plan a re-haul of my models for re-importing, including the chain chomp. Majora's Clock, Chain Chomp, and Unicat will need a re-import and some organization if the stuff will be larger than last time (assuming more calls are being placed to fix the errors), luckily I have plenty of space from one model I ditched last time.

 

Not a big concern, I knew you'd figure out the problems. Going great.

 

I've been relaxing from school stress the last week or so, so I might've missed your notice, or just forgot.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I should add... you should allow any RAM segment to be entered. Some segments have 8X aside from the usual 03-06, etc.. Virtual addressing-wise. Actor files sometimes contain display lists, and you will find this in ovl_En_Ganon_Organ as well as the Arwing, and Ganondorf has some hidden display lists that I would love to decipher in a current investigation I did to his AI file.

Link to comment
Share on other sites

As usual, I'm jumping between projects, and right now I'm working on SceneNavi more. This here isn't forgotten, this isn't abandoned, I said it'll be January for a first release, and it's going to be that. When exactly in January I cannot say, but probably this week for a preliminary "not that user-friendly but working" release.

 

And just wondering, is there really not a single other thing you can do in your hack right now, besides fixing Unicat?

Link to comment
Share on other sites

As usual, I'm jumping between projects, and right now I'm working on SceneNavi more. This here isn't forgotten, this isn't abandoned, I said it'll be January for a first release, and it's going to be that. When exactly in January I cannot say, but probably this week for a preliminary "not that user-friendly but working" release.

 

And just wondering, is there really not a single other thing you can do in your hack right now, besides fixing Unicat?

I have Deku Tree's cutscene to do, but there's plans for switching models for it. I've been picking at the cutscene info lately digging for info. Also a map I want to make that won't happen without a working importer, so I'm not really worried about that currently either.

 

I've been brainstorming today too. There are many things I want to do that will require new models. I'm still making notes as I've already completed the Deku Tree I worked on.

Link to comment
Share on other sites

  • 3 weeks later...

Don't mind the title text, it's all in good fun, I hope! :P

 

xg3ixef.png

 

Download: http://magicstone.de/dzd/random/Model2F3DEX2-PublicBuild0.rar

 

Usage: ObjFile | o= [inputFile],[baseAddress],[ForceRGBA],[AddPadding],[OutputFile]

 

All arguments must be given, but I'll try to make the optional ones really optional from the next release, I guess.

  • InputFile: Path to .obj file you want to convert.
  • BaseAddress: Base address for addressing inside display lists, ex. if you want to convert a model for a room, and want the textures and display lists to start 0x50 bytes in, you put 0x03000050 as the BaseAddress.
  • ForceRGBA: Force all textures to be converted to RGBA, set to true or false, defaults to false. I'd prefer for people NOT TO JUMP ON THIS immediately because they're scared other formats might not work correctly. THEY SHOULD. And if you can prove that they DON'T, I'd be happy to look into why! Sorry for my wording, but I hate it when people jump to conclusions and resist trying something new...
  • AddPadding: Add actual padding bytes to the output according to the BaseAddress, so if you've put ex. 0x03000050 as BaseAddress, this will add 0x50 null bytes at the start of the output. Also true or false, and defaults to false.
  • OutputFile: Path to the output file you want to write.
Argument example: Model2F3DEX2.exe ObjFile="E:\oot-obj\__ACCURACY_TESTS__\test.obj",0x03000050,false,false,"E:\oot-obj\__ACCURACY_TESTS__\convert.bin"

 

This example uses this .obj file, results in the above screenshot, and thus in this output.

 

Other notes: As per an earlier post of mine, group names are used to determine if culling and lighting should be enabled/disabled. Works exactly as described in that post, so refer to that for details. Also, base address can be anything. It's not limited to RAM segments, so you can enter an absolute address like 0x80123456 for this and it should work.

 

Well, looking forward to your feedback and feel free to ask any questions.

  • Like 7
Link to comment
Share on other sites

So this converts hardware compatible object models atm, correct and not maps yet? 

It generates a binary output that is purely a dlist. You can still convert a map using an existing tool to get the collision etc, and then overwrite the F3D commands with those from the output .bin file.

Link to comment
Share on other sites

WutxDan_zps598a1021.jpg

What the hell? I can't seem to use this...

 

EDIT: nevermind, I got it working... seems to be picky about what I enter.

 

Also, how do I uncull a face I want to show? I want my object not to make one side invisible.

 

-----------------------------------

 

EDIT2:

--------

I see nothing different from Unicat other than a borkload of extra stuff after her display list... now she's twice the size, which isn't what I expected, but I'll look into it..

 

She also still crashes, even just plain on her own.

Link to comment
Share on other sites

EDIT: nevermind, I got it working... seems to be picky about what I enter.

 

Also, how do I uncull a face I want to show? I want my object not to make one side invisible.

 

-----------------------------------

 

EDIT2:

--------

I see nothing different from Unicat other than a borkload of extra stuff after her display list... now she's twice the size, which isn't what I expected, but I'll look into it..

 

She also still crashes, even just plain on her own.

1)

Other notes: As per an earlier post of mine, group names are used to determine if culling and lighting should be enabled/disabled. Works exactly as described in that post, so refer to that for details.

2) Are you 100% sure your method for replacing Navi and all that is correct? And how did you try her "on her own", how'd you load her and/or what did you replace? Could you post or send me both, the .obj and .mtl files you used, and the converted data you tried to import?

Link to comment
Share on other sites

Replaced besitu's room model with a Unicat freshly converted from the .obj you provided: http://magicstone.de/dzd/random/unicat-besitu.ppf - If this doesn't work on hardware, I'll need to have another closer look at the conversion, but if it does work, the data created by my tool is likely fine (display list, vertices, texture) and your method of replacing Navi might not be working out right.

 

Also, I do have noticed that at least for Unicat here, the texture's alpha channel doesn't work in-game. Will look into texture conversion and the various texturing-related commands in the display list...

 

 

WWxpRo9.png

 

 

Edit, also, the command line I used for conversion: model2f3dex2 ObjFile="C:\Users\Daniel\Downloads\UnicatV2\Unicat2.obj",0x03000050,false,false,"C:\Users\Daniel\Downloads\UnicatV2\test.bin" - speaking of which, specifying paths (relative paths in particular) in the arguments is a bit buggy too, another thing I need to fix.

Edited by xdaniel
Link to comment
Share on other sites

I was about to quit on this last attempt, but I managed to finally run the game on N64 with Unicat... but she doesn't appear on TV like she does in Mupen:

UniMupen_zps8e1dccd9.jpg

 

I'm starting to think I should start by modifying Navi to use Unicat's texture instead, and see what happens...

 

-------------------------------

 

EDIT:

I figured out how to make Unicat transparent by adding FC 26 2A 60 15 0C 93 7F before the texture draw command FD 50 00 00 04 05 69 B0:

TextureAlphaMode_zpsb36dd4c9.jpg

She still turns up funky on TV, but at least this way works. My guess is it uses a pixel on either the bottom-left or upper-left corner of the texture to determine the transparency, just like any 2D Game Engine that has transparency. Considering Unicat was a transparent PNG, this works with her. It's directly copied from Navi's display list for her orb, where she uses a CI texture.

Link to comment
Share on other sites

*DUMBFOUNDED*

 

wait...

 

Force RGBA: Force all textures to be converted to RGBA, set to true or false, defaults to false. I'd prefer for people NOT TO JUMP ON THIS immediately because they're scared other 
 
formats might not work correctly. THEY SHOULD. And if you can prove that they DON'T, I'd be happy to look into why! Sorry for my wording, but I hate it when people jump to conclusions and resist trying something new...
 
*Icy Cold-Dead Stare*
 
I know whom that was directed at XDaniel...  I'll be keeping an eye on you.
 
P.S.  Ironic, you realize Airikita's problems are probably because you never chose to properly fix the Alpha Channels.
 
Just sayin'
Link to comment
Share on other sites

Replaced besitu's room model with a Unicat freshly converted from the .obj you provided: http://magicstone.de/dzd/random/unicat-besitu.ppf - If this doesn't work on hardware, I'll need to have another closer look at the conversion, but if it does work, the data created by my tool is likely fine (display list, vertices, texture) and your method of replacing Navi might not be working out right.

 

Also, I do have noticed that at least for Unicat here, the texture's alpha channel doesn't work in-game. Will look into texture conversion and the various texturing-related commands in the display list...

As long as you can get it working, just review some info on the forums or where-ever... I imagine the alpha channels use some specific calculation? Whatever works.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

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