Mario Kart 64 Hacking General Discussion « 1 ... 8 9 10 11 12 ... 17 »
Users browsing this thread: 1 Guest(s)

mib_f8sm9c, here is what I've been putting together for the kart replacement assembly file. It demonstrates where the offsets are in the ROM and base address for segment 0F. I don't think anything actually gets loaded into segment 0F, just the programmers used that segment to address things. Note this file only replaces the Mario palette. I'll post an update when I finish this.

I also mad a tool to generate the CI texture and palette data, but don't have a windows build at the moment.
​n64ci source

Here is the example I made with it replacing Mario with Super Mario Kart Mario:
[Image: EcO7NDz.gif]


Attached Files
Size: 28.33 KB / Downloads: 90 .zip   mk64.karts.zip


Nice, a few random pixels here and there, but mostly fine.
Who you callin pinhead

That looks fantastic! Very exciting Smile

Darn you, you beat me to it : P And here I thought I found that kart graphics reference table at 0xDEAC0 first. Well, learning that the 0F doesn't seem to have any meaning to it is nice. That should make things easy.

I'm part of the way on working through a C# version of this. I kinda want to separate the rom expanding and kart data appending process though, isn't the kart data relatively large compared to the rest of the rom?

Alright guys, I'm back! And ready to get back on this project more regularly again.

Right now I'm focusing on two things, adding in a course viewer and a kart graphics importer/exporter. I have a working course viewer which I need to clean up and add to the project and I have the kart graphics correctly loading and viewable currently.

[Image: KOEk2sV.png]
(Yes I am aware of the wheel graphics not loading correctly : ) I know how to fix it, I am just not decided about the best way to handle it if you want to load your own vehicle)

I'm excited to be back and working on this, guys. With luck I'll see the kart importer working within the next week or two. The wheels will be tricky, but if I ignore them it won't be too bad.
(This post was last modified: 14-06-2016, 04:37 AM by mib_f8sm9c.)

Next version of SM64 Editor will support MK64 music importing.



I have identified where the title screen logo is referenced from. The logo is stored in MIO0 block at ROM offset 0x719480 and is stored as RGBA32 256x128 data (thanks to shygoo for helping locate it). Keeping with the liberal use of segmented addresses for compressed data, the logo is referenced by segmented address 0x0F0D7510 in asm function at 8006EE44/06FA44. I used the following code to mock up a "1500cc" variant of the logo.

[Image: MqVUroC.png]

Code:
​// assign segment 0F base
// Title logo: 719480 / 0F0D7510
origin 0x641F70
base 0x0F000000

// store MIO0 texture in unused space at end of ROM since it will probably be larger
origin 0xBEB000
title_logo:
insert "textures/00719480.mio0"
align(0x4)
title_logo.end:

// update asm pointer to 0F4D9090
origin 0x06FA4C // 8006EE4C
lui   a0, (title_logo >> 16)
lui   a1, 0x8019
lw    a1, -0x2650(a1)
ori   a0, a0, (title_logo & 0xFFFF)
addiu a2, zero, title_logo.end - title_logo

I also went ahead and mocked up some TKMK00 encoded 1500cc race types for the menus. krom, if you want to include these in your 1500cc hack, let me know what values you want and I'll generate them.
[Image: DmKLW3p.gif]
(This post was last modified: 22-06-2016, 02:44 AM by queueRAM. Edit Reason: pretty )

Music importing? More menu customization? Stuff is really going off! It's an exciting time to be alive.

Sorry for the radio silence, I fell out of things for a bit, but I just got the best idea for a custom racer so I'm going to turn on the turbo for the kart editor! I spent a few hours today/yesterday, and I have a lot of the structure in place now for managing kart data.

[Image: 75nmmGZ.png]

The little image I'm including might not look like much, it's just showing off replacing all kart image references with DK's kart, but it's a lot more impressive in the code. There's be the ability to save complete character data with variable #'s of images for the animations, and sharing images between animations, and you can swap out characters that have previously been added to the rom. As soon as I write in the ability to append new image data to the rom, it's basically already in place to reference/save/load that data automatically.

Some extra stuff needs fixing too, like editing character profiles/names and handling wheel palettes, but at the rate I'm going I should be able to knock all this out fairly quickly. I'm going to visit some friends next Friday and I want to have this character swap done by then, so you can probably expect a test kart importer version done by/before then.

Cool! Really hyped for this, keep up the good work.
Who you callin pinhead

Well shoot, I posted on my Twitter that I expected to have a test version of the Kart Editor done before tomorrow, but it seems like declaring a deadline is the best way to ensure that you never meet it... so in place of that I'll show off what I have. I'm very close to having something workable, but there's one major problem I still have to solve before being happy with the result.

Right now I have three different parts to the Karts Editor. The first is the Karts Manager, which simply lists all the Karts available (including both original racers & created racers). All it allows right now is to add/remove karts, and to edit the names of those new karts, but eventually portraits for the racers/stats for the karts will be in this section too. You can see that I have added a new kart named "Larry". (For now racer names are limited to 7 characters, but when I get the Text Bank references up and running it will probably be as long as you'd like)

[Image: QOTDSlv.png]

The second is the Selected Karts Manager. This one manages which Karts are actually used in the game. You can re-order the karts, create duplicates of karts, and add in your custom karts here. Fairly simple idea.

[Image: Gw1kcnI.png]

The last is the real monster of the editor, the Kart Animation Manager. This one will list all the images/animations associated with a given kart. Here's where you'll be importing images for your new kart. There's interpolation in place so that you don't need to have the same # of images per animation as is listed in the ROM, it'll re-use images as needed. There's also a simple overlay image that you can use to show what the racer should look like at that point.

[Image: apzUcPc.png]

There's a total of 19 animations:
9 Turn animations - 35 images each (from behind, the kart leans into the turn for the first half)
9 Spin animations - 20 images each (racer doesn't move, full spin)
1 Crash animation - 32 images (crash animation, doesn't use wheel palette)

Those 9 animations span from -25 degrees to 25 degrees incline on the racers. There's more information about the animation make-up that I'll get to at a later date.

The last problem I'm sitting on right now is the wheel textures. The color palette for the wheels are stored separately from the color palette for the kart itself. It's done that way to allow the wheels to change colors easily and look animated. It's not hard to extract the images for that then, but importing is a different monster. For this first version, I'll probably not allow any colors outside the kart palette, so the wheels won't look animated, but eventually I'll want to fix that. Maybe I'll have the person export the wheels separately from the rest of the kart, and then overlay the two images together? I haven't decided the best route yet.

Okay, I'm pretty sure you guys are tired of me treating this forum like my own dev blog, so I'll stop here and see how much further I can push tonight.

EDIT: Filled out the missing sections of the animations window & fixed up a saving bug. However I found some weird behavior with the wheel textures on images I re-arranged but didn't edit. As a result, I don't have confidence in being able to understand the wheel textures for the first release, and will not be messing with it. That'll be something for next week.
(This post was last modified: 27-06-2016, 05:45 AM by mib_f8sm9c. Edit Reason: Further work )

Mario Kart 64 Hacking General Discussion « 1 ... 8 9 10 11 12 ... 17 »
Users browsing this thread: 1 Guest(s)