Register - Login
Views: 99866868
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-04-22 06:11:36 PM
Jul - SM64 Hacking (Archive) - Help/Questions about Toad's Tool 64 and SM64 hacking New poll - New thread - New reply
Pages: 1 2 3 4 5 6 7 8 9 10 ... 42 43 44 45 46 47 48 49 50 ... 68 69 70 71 72 73 74 75 76 77Next older thread
Me-me
340
Level: 41


Posts: 310/341
EXP: 462143
For next: 18002

Since: 08-05-07


Since last post: 9.7 years
Last activity: 8.1 years

Posted on 01-18-11 12:58:59 PM (last edited by Me-me at 01-18-11 09:59 AM) Link | Quote
Can't say I've gotten exacly that error, but it is similar in nature. Whenever I open one of my ROMs, there's a few levels that generates a script error
if you try to access them. It says e.g. Draw: Bob-ombs Battlegfield, but never finishes loading and instead causes a script error (Index out of range).
The only special about the ROM is that it's manually Hex-edited by me in some places.
Meltfire
User
Level: 12


Posts: 4/23
EXP: 7088
For next: 833

Since: 01-12-11


Since last post: 10.2 years
Last activity: 9.5 years

Posted on 01-18-11 03:47:42 PM Link | Quote
Hi i'm back and thanks everyone for helping me earlier but now i'm again with a very noobish problem.

I completed my second level and I decide to add music with MusicXML Importer instead of using MML file.

And It work. But there no sound sfx coming from the game. I try again with a much simpler midi file that only have three channels but still no sound. Thanks again.
Me-me
340
Level: 41


Posts: 311/341
EXP: 462143
For next: 18002

Since: 08-05-07


Since last post: 9.7 years
Last activity: 8.1 years

Posted on 01-18-11 07:23:40 PM (last edited by Me-me at 01-19-11 10:01 AM) Link | Quote
I assume you only overwrite one sequence (not choosing "-all") in the importer.
Also, specific channels are used for sfx, (I think channel 9 or 10 is reserved)
so overwriting them might put off the sound effects.
If you have another sequence imported, check it's length too.

Now I don't know anything more about this, I'll leave it to someone else. And hope it works out for you.
DeathBasket
Random nobody
Level: 5


Posts: 3/3
EXP: 335
For next: 194

Since: 12-12-10

From: Aberystwyth University

Since last post: 11.3 years
Last activity: 9.7 years

Posted on 01-19-11 09:43:26 AM Link | Quote
Originally posted by Meltfire
Hi i'm back and thanks everyone for helping me earlier but now i'm again with a very noobish problem.

I completed my second level and I decide to add music with MusicXML Importer instead of using MML file.

And It work. But there no sound sfx coming from the game. I try again with a much simpler midi file that only have three channels but still no sound. Thanks again.


Do you mean that there is no sound at all or just no sound effects? The error you're having sounds like there's a problem with the imported sequence file.
It may sound obvious but you are converting your MIDI file into a MusicXML file before trying to use the importer, right?
If you are then check your file for things that may cause errors before having it converted. I don't know what settings are implemented in the MusicXML format or this converter so I can't help you there, sorry.
messiaen
Catgirl
Level: 68


Posts: 956/1085
EXP: 2596696
For next: 132104

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 01-19-11 11:41:27 PM (last edited by messiaen at 01-19-11 08:43 PM) Link | Quote
Originally posted by RDX
the #texture error is something that has long haunted me in toads tool. Whenever i reach some point in the creation of a level, when I try to open it in Toads Tool I'll get the #texture error and the level won't load at all. Why is that?


I think it's a TT64 issue with too many textures being used. Try to import your level without using the textures from the material file and see if the level can now be opened in TT64.

Originally posted by Me-me
Can't say I've gotten exacly that error, but it is similar in nature. Whenever I open one of my ROMs, there's a few levels that generates a script error
if you try to access them. It says e.g. Draw: Bob-ombs Battlegfield, but never finishes loading and instead causes a script error (Index out of range).
The only special about the ROM is that it's manually Hex-edited by me in some places.


Are you sure the importer caused this? Did this problem happen with the last two versions (v12 and v13) ? If so, can you send me the ROM and tell me which levels so I can take a look?

Originally posted by Meltfire
I completed my second level and I decide to add music with MusicXML Importer instead of using MML file.

And It work. But there no sound sfx coming from the game. I try again with a much simpler midi file that only have three channels but still no sound. Thanks again.


Is the file bigger than 13k (the size of the biggest sequence in the game)? If so, that may be the problem (though I'm not sure about it, I need to test this more).
Me-me
340
Level: 41


Posts: 312/341
EXP: 462143
For next: 18002

Since: 08-05-07


Since last post: 9.7 years
Last activity: 8.1 years

Posted on 01-20-11 02:11:49 PM (last edited by Me-me at 01-20-11 11:17 AM) Link | Quote
Originally posted by messiaen
Are you sure the importer caused this? Did this problem happen with the last two versions (v12 and v13) ? If so, can you send me the ROM and tell me which levels so I can take a look?


Sorry for the misleading post, the errors appeared before using your importer actually.
Funny, the importer fixed the errors, and now I can continue hacking o.o

It seems like some stuff I did in the hex editor prevented original levels from loading... or I might be way off

Edit:
This maybe isn't where I should post this, but lets say I want to find something particular in a ROM from a hex editor. Where should I start?
For example the coin colour. Where should I look to find the bytes that determines their colour?
If it requires a long explanation, just say so and I'll try to find out by myself.

____________________
HAHAH! Signature? I don't think so.
Meltfire
User
Level: 12


Posts: 5/23
EXP: 7088
For next: 833

Since: 01-12-11


Since last post: 10.2 years
Last activity: 9.5 years

Posted on 01-20-11 06:05:16 PM Link | Quote
Originally posted by Me-me
I assume you only overwrite one sequence (not choosing "-all") in the importer.
Also, specific channels are used for sfx, (I think channel 9 or 10 is reserved)
so overwriting them might put off the sound effects.
If you have another sequence imported, check it's length too.



I follow Me-me advice by decreasing the length of the midis using 3MLE midi editer. Since most midis loop twice. Also when I imported into the game to test out the music I now choose a sequence number instead of choosing "-all" and that helped alot.

Thanks later I post a short video of my hack progress in a another thread.
Joe
Common spammer
🍬
Level: 111


Posts: 1789/3392
EXP: 14503130
For next: 365230

Since: 08-02-07

From: Pororoca

Since last post: 13 days
Last activity: 1 hour

Posted on 01-20-11 08:13:43 PM Link | Quote
Originally posted by Me-me
This maybe isn't where I should post this, but lets say I want to find something particular in a ROM from a hex editor. Where should I start?
For example the coin colour. Where should I look to find the bytes that determines their colour?
If it requires a long explanation, just say so and I'll try to find out by myself.
First, find out if somebody else knows where it is. That alone will save you a lot of time.

If nobody knows where it is, you need to figure out what numbers represent the data you're looking for. In the case of coins, they are a grayscale image with a color tint applied, so you're most likely looking for a 15-bit RGB value. You need to now what this value is in order to find it. With coins, it's fairly simple to replace the texture with solid white and take a screenshot of the game, then pick out the color and convert it appropriately.

Once you have numbers, it's a matter of finding and replacing (and keeping a backup in case something important is represented with the same numbers). If you need to know more than that, I'd be glad to explain in detail.

____________________
messiaen
Catgirl
Level: 68


Posts: 958/1085
EXP: 2596696
For next: 132104

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 01-20-11 08:59:09 PM Link | Quote
YoshiElectron has done some codes to modify the coins colour, you can see what it modifies in RAM and search that in the ROM.

Never looked at the grayscale textures, but the colours are probably part of the vertex data (will dig up some information on that later).
Me-me
340
Level: 41


Posts: 316/341
EXP: 462143
For next: 18002

Since: 08-05-07


Since last post: 9.7 years
Last activity: 8.1 years

Posted on 01-20-11 10:18:27 PM (last edited by Me-me at 01-20-11 07:22 PM) Link | Quote
Originally posted by Joe
If you need to know more than that, I'd be glad to explain in detail.

Well, since you willingly said so yourself, I'd really want to hear more about this

Also, thanks for telling me Messiaen, I went to his page and found the codes. I will try using them to search tomorrow.

I also really want to know where Mario's voice pitch value is stored. I saw some strange gameshark code about it on some site but it didn't work (Maybe it was for PAL)

But my prioroty right now is to learn how to find this stuff myself, because I don't like asking people to take of their time to do stuff for me. It makes me feel lazy

____________________
HAHAH! Signature? I don't think so.
Joe
Common spammer
🍬
Level: 111


Posts: 1790/3392
EXP: 14503130
For next: 365230

Since: 08-02-07

From: Pororoca

Since last post: 13 days
Last activity: 1 hour

Posted on 01-21-11 04:18:58 AM Link | Quote
Don't worry about it, I'm doing this for fun.

I'm not familiar enough with Super Mario 64 to give you any advice specific to the game, but I can explain how to search for colors.

---

First, you need an RGB color value. How about this:

(156, 255, 57)

That's a nice bright green. Now, you'll need to know about hexadecimal and binary to do anything with that. I'm not going to explain it here, there are plenty of places to go learn.

That in hexadecimal is 9C FF 39. You could try searching for that, or try searching with R and B reversed (it happens, though it's uncommon).

Hold on though, that's 24 bits long. In MIPS III assembly, you can either load data indirectly with pointers, or directly as part of the opcode. It's common to load constants directly. However, you can't load more than 16 bits at a time directly; it has to be split up between opcodes. So, you may need to search for just G and one of the other two colors to find it; the color value you didn't search for will typically be no more than four bytes away if you've found it.

Hmm, but what about that 16-bit color mode I mentioned in one of my earlier posts? That's also pretty common on the N64.

Well, for that you'll need to work in binary. Like so:

10011100 11111111 00111001

Then, chop off the last three bits of each value. Those three bits usually either match the first three or are zeros. So then you'll have this:

10011 11111 00111

That's only 15 bits. There's one missing! Fortunately, that's intentional. The missing bit is usually a 0, and it usually goes at the beginning. (Just like sometimes R and B change places, sometimes that bit is at the other end or is a 1. It's also possible for G to be 6 bits instead of 5. Since none of those formats are easy to work with on the N64, it's very unlikely any games use them.)

So, taking the most popular format's example, rearrange the bits so you can convert back to hexadecimal like so:

0 10011 11111 00111
0100 1111 1110 0111
4F E3

And there you have it, a 16-bit color ready for searching.

---

Once you find a value that looks promising, deal with it hacker-style: replace it with random garbage, and see what changed.

I hope this helps, it's quite a bit longer than I originally intended.

____________________
Me-me
340
Level: 41


Posts: 317/341
EXP: 462143
For next: 18002

Since: 08-05-07


Since last post: 9.7 years
Last activity: 8.1 years

Posted on 01-21-11 09:55:10 PM (last edited by Me-me at 01-21-11 07:06 PM) Link | Quote
Hmm, while I did understand how to convert the colour RGB code and all that, I can't figure out how to use the values to search.
Should I search for them as 16 bit Integer numbers? If so, I can't find it anywhere in the ROM (pure yellow, 7FE0)
Sorry, I actually find them, but WAY too many other places uses these values too

Also, unfortunately, and according to YoshiElectron's notes the game uses four different colour values for each corner of the coin texture.
While he DID give the addresses to them in RAM, I'm having trouble with searching the ROM using them

If thinking of using your method to find the colour of the Bowser keys, since they don't use textures (and probably just have one RGB colour code).

____________________
HAHAH! Signature? I don't think so.
Joe
Common spammer
🍬
Level: 111


Posts: 1793/3392
EXP: 14503130
For next: 365230

Since: 08-02-07

From: Pororoca

Since last post: 13 days
Last activity: 1 hour

Posted on 01-21-11 10:36:41 PM Link | Quote
Originally posted by Me-me
Also, unfortunately, and according to YoshiElectron's notes the game uses four different colour values for each corner of the coin texture.
While he DID give the addresses to them in RAM, I'm having trouble with searching the ROM using them
You have the addresses in RAM, so try copying a section of RAM from around those addresses (10 to 20 bytes ought to be plenty) and search for it in ROM.

I don't know if the coin colors are 15-bit or 24-bit. You'll be able to tell by how many bytes each color value is.

Also, sadly, my method of searching for colors doesn't work without exact color values. The Bowser keys are affected by light, so unless your emulator can disable those effects (or doesn't support them ), you'll have to find some other way.

____________________
messiaen
Catgirl
Level: 68


Posts: 959/1085
EXP: 2596696
For next: 132104

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 01-21-11 11:44:23 PM Link | Quote
N64 textures often use the 16-bit RGBA 5551 format Joe described, however polygon colors are actually 24-bit, so it's actually easier to modify.

Here's a guide how to find and modify any color using Toad's Tool script dumper. Warning: this will only work on grayscale textures and colored polygons (such as those used in Mario body parts, Goomba's, etc).


1 - Go to Preferences -> Script Dumps to start the script dumper.
2 - Go to Polygons and choose the object (in this example, the Red Coin).
3 - Find all 0x04 commands, which are used to load the vertex data:

00AB9D64 / 03007958 [ 04 30 00 40 03 00 57 40 ]
00AB9D8C / 03007980 [ 04 30 00 40 03 00 57 40 ]
00AB9DB4 / 030079A8 [ 04 30 00 40 03 00 57 40 ]


Since they are the same, our work will be simple.

4 - The relevant part is the last four bytes: [03] [00 57 40]. The first byte (0x03) is the bank number and the last three bytes (0x5740) the offset.
5 - There is actually just one Bank 3, a huge bank which contains objects shared by all levels. We know that its ROM location is 0xAB240C (either by finding a level which contains that object/bank or by looking at VL-Tone docs)
6 - Now we add 0x5740 to 0xAB240C to find where that vertex data is on the ROM. Before we proceed, let's look back at that 0x04 command above:

04 [30] 00 40 03 00 57 40

This second byte (0x30) tells how many vertexes are loaded. Rule: Sum up 0x10 bytes to that value.

7 - Now open your hex editor, go to 0xAB7B4C (0xAB240C + 0x5740) and look at the next 0x40 bytes of data:

FFDD 0000 0000 0000 0000 07C0 [FF00 00FF] (vertex 1)
0023 0000 0000 0000 07C0 07C0 [FF00 00FF] (vertex 2)
0023 0046 0000 0000 07C0 0000 [FF00 00FF] (vertex 3)
FFDD 0046 0000 0000 0000 0000 [FF00 00FF] (vertex 4)

Each vertex entry is 0x10 long. The last 4 bytes are what you are looking for: 3 bytes for the RGB value and another one for alpha.
Me-me
340
Level: 41


Posts: 318/341
EXP: 462143
For next: 18002

Since: 08-05-07


Since last post: 9.7 years
Last activity: 8.1 years

Posted on 01-22-11 11:16:25 AM Link | Quote
This helped a lot, and now I've successfully changed the colours of all coins

While greyscale textures uses the same 0x04 command lines,
3D objects have different ones, like the bowser key (offset 0xAB240C):
04 F0 01 00 03 01 [56 F8]
04 F0 01 00 03 01 [57 F8]
04 F0 01 00 03 01 [58 F8]
04 F0 01 00 03 01 [59 F8]
04 F0 01 00 03 01 [5A F8]
04 F0 01 00 03 01 [5B F8]
04 D0 00 E0 03 01 [5C F8]
04 F0 01 00 03 01 [5D D8]
04 F0 01 00 03 01 [5E D8]
04 D0 00 E0 03 01 [5F D8]

Well... what do I do? There are multiple references.

____________________
HAHAH! Signature? I don't think so.
messiaen
Catgirl
Level: 68


Posts: 960/1085
EXP: 2596696
For next: 132104

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 01-22-11 11:30:17 AM Link | Quote
Originally posted by Me-me
This helped a lot, and now I've successfully changed the colours of all coins

While greyscale textures uses the same 0x04 command lines,
3D objects have different ones, like the bowser key (offset 0xAB240C):
[list]

Well... what do I do? There are multiple references.


You'll have to experiment changing each one. There are more references because the polygonal structure of the key is much more complex (the coin is a simple square, the texture combined with transparency gives the illusion of a highly detailed object).

A reminder: the offset is actually 3 bytes, not 2:
04 F0 01 00 03 [01 56 F8] (0x156F8)
openm64
Random nobody
Level: 3


Posts: 1/1
EXP: 64
For next: 64

Since: 01-22-11


Since last post: 11.3 years
Last activity: 11.2 years

Posted on 01-22-11 04:15:27 PM (last edited by openm64 at 01-22-11 01:20 PM) Link | Quote
Hey, I've been thinking for some time about making a Mario 64 editing library. My idea is to make it able to work freely with the data, e.g. change the size of stuff, move banks around, add new stuff, etc. Anyway, I just want to ask you some questions:

- Where can I get the most updated documentation (or code)? As a test and for learning, I used VL-Tone level layout script documentation to load level layout scripts, and about half the commands weren't documented, plus there are some errors in it.

- How would I go about reorganizing banks (the stuff loaded with 0x00, 0x01, 0x17, 0x1A, etc.) internally (changing the size of their components)?

I think it gets a bit hard, because I need to modify every single offset that refers to them. I know the are referred from level layout, geometry layout and polygon drawing scripts, but where else are they referred from? Is this a crazy idea?

(I could also do a dirty trick and just append the modified stuff at the end of the bank, therefore keeping the unmodified offsets valid, but this wastes precious space).

I think I have more, but that's enough for now, and I'll be very grateful if you answer them ^^.
RDX

Level: 32


Posts: 157/198
EXP: 193576
For next: 12866

Since: 02-14-09


Since last post: 10.8 years
Last activity: 10.5 years

Posted on 01-22-11 05:30:30 PM Link | Quote
Are there any programs that export the level models from the game? I'm pretty sure there are, and I'm pretty sure one of them mentioned was Mupen (Which I'm downloading right now). But I thought I'd ask anyway, in case I'm wrong/there's a better program.

____________________
Dudaw
Member
Level: 17


Posts: 9/49
EXP: 22058
For next: 2685

Since: 01-07-11


Since last post: 9.2 years
Last activity: 5.8 years

Posted on 01-22-11 06:45:31 PM (last edited by Dudaw at 01-22-11 03:46 PM) Link | Quote
Originally posted by RDX
Are there any programs that export the level models from the game? I'm pretty sure there are, and I'm pretty sure one of them mentioned was Mupen (Which I'm downloading right now). But I thought I'd ask anyway, in case I'm wrong/there's a better program.

I've seen a lot of these.
Nemu64 is supposedly the best option, although it just doesn't work on my PC ever.
There's also a plugin for PJ64 (forgot the name) but it has an "export VRML" option.
There's another program called 3D Ripper DX but Jabo's plugin v1.5 was the only plugin that seemed to work with that program for me.
For the tools that export VRML, you should probably go get Blender to open them and export to whatever the desired model type may be.

____________________
"zOoM!"
http://sites.google.com/site/4thstudios
http://www.youtube.com/dudaw12
RDX

Level: 32


Posts: 158/198
EXP: 193576
For next: 12866

Since: 02-14-09


Since last post: 10.8 years
Last activity: 10.5 years

Posted on 01-22-11 08:52:40 PM (last edited by RDX at 01-22-11 05:54 PM) Link | Quote
Thanks, Nemu worked.

My idea, not quite. What I was going to do was create a mirrored version of the original game with stars in different locations, as a sort of Super Mario Master Quest. Essentially it would be a toads tool hack, except omigosh everything looks backwards. But ironically enough the collisions are all iffy, and Mario keeps getting stuck in various walls.

I might go back and try again, I didn't bother texturing it or anything. Either way it's not a huge deal, it was just a random idea I had.

____________________
Pages: 1 2 3 4 5 6 7 8 9 10 ... 42 43 44 45 46 47 48 49 50 ... 68 69 70 71 72 73 74 75 76 77Next older thread
Jul - SM64 Hacking (Archive) - Help/Questions about Toad's Tool 64 and SM64 hacking New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

33 database queries, 6 query cache hits.
Query execution time: 0.105006 seconds
Script execution time: 0.029608 seconds
Total render time: 0.134614 seconds