Mario Kart 64 Hacking General Discussion « 1 2 3 4 5 ... 17 »
Users browsing this thread: 3 Guest(s)

Today I mapped out the kart textures and palettes and made a fun little viewer for them:
[Image: 8a8de59c9db004cc99310a91f679ab9c.gif]
​Demo here

(The wheels are messed up at the moment because the palette data for them is stored separately from the kart palette data, and I haven't bothered mapping that)

Spoiler: Map
Each kart palette is 0x180 bytes, each wheel palette is 0x80 bytes
321 kart textures per character

Luigi:
145470 texture bank
?????? wheel palettes
1E006C kart palette

Mario:
1E01F0 texture bank
?????? wheel palettes
2728A0 kart palette

Yoshi:
272A20 texture bank
?????? wheel palettes
309DC8 kart palette

Peach:
309F50 texture bank
?????? wheel palettes
39DF38 kart palette

Wario:
39E0C0 texture bank
?????? wheel palettes
43B25C kart palette

Toad:
43B3E0 texture bank
?????? wheel palettes
4CBCC8 kart palette

DK:
4CBE50 textures bank
?????? wheel palettes
57DCE4 kart palette

Bowser:
57DE70 texture bank
?????? wheel palettes
63E0F8 kart palette

641F70 end of kart texture data, start of course texture data
My threads are now being maintained here

This looks super nifty. Very nice work. I'm super busy for the next month or so, but at some point I wouldn't mind helping out a bit on this project too : )

Nice job Smile

(25-08-2015, 05:03 AM)shygoo Wrote: Today I mapped out the kart textures and palettes and made a fun little viewer for them:
[Image: 8a8de59c9db004cc99310a91f679ab9c.gif]
​Demo here

(The wheels are messed up at the moment because the palette data for them is stored separately from the kart palette data, and I haven't bothered mapping that)



Spoiler: Map
Each kart palette is 0x180 bytes, each wheel palette is 0x80 bytes
321 kart textures per character

Luigi:
145470 texture bank
?????? wheel palettes
1E006C kart palette

Mario:
1E01F0 texture bank
?????? wheel palettes
2728A0 kart palette

Yoshi:
272A20 texture bank
?????? wheel palettes
309DC8 kart palette

Peach:
309F50 texture bank
?????? wheel palettes
39DF38 kart palette

Wario:
39E0C0 texture bank
?????? wheel palettes
43B25C kart palette

Toad:
43B3E0 texture bank
?????? wheel palettes
4CBCC8 kart palette

DK:
4CBE50 textures bank
?????? wheel palettes
57DCE4 kart palette

Bowser:
57DE70 texture bank
?????? wheel palettes
63E0F8 kart palette

641F70 end of kart texture data, start of course texture data


I think the wheel palette data is http://pastebin.com/7seZG6me. Those could be the textures though, I just know changing the pointers around makes the wheels look different. If it isn't there, then it's chunked in the same DMA read as the kart textures as swapping pointers to kart textures and not fixing up the 16 bit sizes located in the array at 800DDEB0 (0DEAB0) causes the wheels to be rendered incorrectly (but it makes more sense to assume that the wheel textures are chunked with the kart textures).

Edit:
So after doing some more investigating, I'm pretty sure what I thought was part of the wheel palette is indeed part of the wheel palette. Most (all?) of the textures in the kart data bank at $145470 are compressed and that data is not compressed. The funny thing is that the DMA load that takes place at the aforementioned palette addresses is only 128 bytes in length -- if it is palette data it's only part of a palette (64 entries). Still working on figuring out how this might work in conjunction with the regular kart palettes. Any ideas?
(This post was last modified: 02-09-2015, 02:20 AM by orbitaldecay.)

I'm also working on documentation for all of the tables that need to be updated if the kart data bank is moved (for example, when replacing textures the offsets into the bank all need to be adjusted). It can be found at pastebin.com/08LRvtEf. It's a work in progress, so please don't copy it from here yet. I'll keep it updated as I make progress.

The viewer now parses a fair amount of the special display list commands so geometry is rendered properly:
[Image: b1e95f622ce9f04dff6e8a51a478790e.png]
Huge thanks to Zoinkity for providing notes on the commands (http://pastebin.com/raw.php?i=QMfNHWA2)

The textured mesh is a bit ugly because I haven't implemented proper UV mapping, also some textures aren't where they should be so the dlist reader probably isn't perfect yet either.

I'm outlining some plans for a level script engine patch to make the game more importer-friendly, my notes can be seen here https://raw.githubusercontent.com/shygoo/mk64project/master/Todo.txt


Attached Files    
My threads are now being maintained here

I just wanted to say that I am very excited to see MK64 hacking in motion and it's awesome to see so much progress - I've been waiting for something like this for a long time. Thank you!

This looks awesome. Keep up the work! Not sure of the orientation on the UV mapping but it seems that it's just in need of a bump whichever direction the castle is on Royal Raceway (front to back). Maybe if you fixed the UV map it could also solve the issue with the wrong textures showing up. This is very exciting progress, if I knew anything about this stuff I would help.

I played around with this a bit tonight, to see if I could get the textures to work properly. I bit off a bit more than I can chew, definitely made little progress, but it was fun trying to get to the bottom of things.

By chance Shygoo have you ever tried running the python script that Zoinkity included? I'm tempted to try it out and then plug it into the F3DEX parser my Starfox editor has, to see if the textures can come out right.

I hope you don't mind me poking around with this some more, I've just recently been doing some F3DEX2 work and I was interested to see if I could use what I've learned in this program.

I've been making a big mess of the code, but here's a before/after pic of what I've done so far:

[Image: JpberQn.png]

Where it works, it really seems to work, but there's still quite a few errors in it. I also need to play the actual game so I can compare the scaling of the textures.

I wish I knew the source to the wrong-texture-being-loaded issue.

Mario Kart 64 Hacking General Discussion « 1 2 3 4 5 ... 17 »
Users browsing this thread: 3 Guest(s)