Register - Login
Views: 99798348
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 06:06:46 AM
Jul - Posts by messiaen
Pages: 1 2 3 4 5 6 7 8 9 10 ... 45 46 47 48 49 50 51 52 53 54
messiaen
Catgirl
Level: 68


Posts: 1060/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-13-12 09:38:52 PM, in Help/Questions about Toad's Tool 64 and SM64 hacking (last edited by messiaen at 02-13-12 06:41 PM) Link
You are not using the Offset X,Y,Z functions to "fit" your model in the playing area, those will displace the model in any axis. Fill the values and click the "Set" button so you can see the results.

Also, the importer may give false warnings about vertexes being out of range, it's probably a bug I have to fix.
messiaen
Catgirl
Level: 68


Posts: 1061/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-23-12 12:01:08 PM, in Help/Questions about Toad's Tool 64 and SM64 hacking Link
Just take a good look how cheats.ini works. Make sure this is correct:


[SUPER MARIO 64.Cheats]
NumCheats=2 <-- number of cheats, NOT zero-indexed. If this number was 1, Nemu would ignore the second cheat code

CheatName0=Test cheat
CheatName0Code0=81256526 C116
CheatName0Code1=812566A2 C116
CheatName0Code2=812566BE C116
CheatName0Code3=81256726 C116
CheatName0Code4=81256742 C116
CheatName0Code5=812567FE C116
CheatName0Code6=8125681A C116
CheatName0Code7=812569B6 C116
CheatName0Code8=812569D2 C116
CheatName0Code9=812E451A C116
CheatName0Code10=812E4902 C116
CheatName0Count=11 --> again, NOT zero-indexed

CheatName1=Whatever
CheatName1Code0=812CB26C 0C10
CheatName1Code1=812CB26E 0000
CheatName1Code2=812CB278 1000
CheatName1Code3=812CB27A 0040
CheatName1Count = 4
messiaen
Catgirl
Level: 68


Posts: 1062/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-23-12 04:08:38 PM, in Mario 64 Level Importer (last edited by messiaen at 02-23-12 01:10 PM) Link
I did some work on the importer today, there are still plenty of things to do but its progressing well.

After you import an object, you'll have to generate an Geometry Layout for it (otherwise, the object will appear as a "tree" in the game, which I'm using as a placeholder object for the unused custom objects slots).

When it comes to creating a behavior, you have two options.

1 - The behavior generator, which can customize scaling, solidity, collision, interaction and functions for simpler objects.
2 - Importing a "raw" behavior file and using the built-in hex editor/parser to adjust it. I'm including as seperate file behaviors for doors, NPCs, enemies (I could use some help on this). There will be a few "helpers" on the behavior interface, mostly information on data such as animation pointers, etc.

You can also use both, first generating a behavior and then fune tuning it with the behavior editor. The behavior generator won't be very extensive, especially when it comes to selecting preset functions, but eventually when people test more with it I can include further options.

So, the basic workflow to import a custom object:

1 - Import custom object in the selected bank/slot
2 - Generate Geometry Layout for it from the custom objects menu
3 - Generate/edit/import Behavior for it from the custom objects menu
4 - When importing your level, select the appropriate custom object bank. Once the level is imported/reimported, TT64 should be able to detect the custom objects. Unused objects will appear as "tress".
messiaen
Catgirl
Level: 68


Posts: 1063/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-23-12 06:18:43 PM, in Correctly Compilling C For Usage With N64 Link
Sent by Cajetan in a PM. Please post question in the appropriate threads, not in PMs, geeky stuff is the purpose of this forum.

Originally posted by Cajetan
Okay another question(sorry for annoying you, but there isn't any other who knows stuff like that): How do i setup all stuff correctly?

Yes, i did following:
Installed MinGW, MSYS everything perfectly. I also got z64actor and z64teleport successfully compiled. Now i wanted to make my OWN code for SM64. Now comes the hard part for me: How do i setup everything correctly. In my folder is following:

m64helloworld.c
mario64.h
mario64.x
hook
makefile

Now with MSYS i did cd to that folder. Now i typed in: make
i get following errors:

"make: *** No rule to make target `mario64.o', needed by `mario64.elf'. Stop."

So, but i know mario64.o and mario64.elf get generated... i can't have them, because they must be later generated... So what am i doing wrong here?


I don't blame you, makefiles are very confusing.

Your makefile PRJNAME is probably mario64, so it expects your source file to be called mario64.c, unless you specify otherwise.
messiaen
Catgirl
Level: 68


Posts: 1064/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-23-12 06:24:20 PM, in How do you make game-specific tools? Link
If you already have some basic programming experience, I wouldn't recommend using C for tools. Use C#, Python or anything else high-level so you can quickly get a GUI working. If your game is tile-based, this tutoria may be of interest.
messiaen
Catgirl
Level: 68


Posts: 1065/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-24-12 12:47:02 PM, in Correctly Compilling C For Usage With N64 Link
Seems like you aren't including n64.h.

Use #include before anything else in your main .c file.

If that doesn't work, copy n64.h to the local directory and use #include "n64.h" instead.
messiaen
Catgirl
Level: 68


Posts: 1066/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-24-12 03:10:13 PM, in Correctly Compilling C For Usage With N64 Link
Can't help if you don't post the contents of your hlw.x file. Make sure it's exactly the same as mario64.x and it will work fine.

The "hook" is what CALLS your code. In the examples provided, its called from Mario's Behavior, so whenever Mario is playing, your function (which by default is at 0x80400000) will be called.

The hook file is simply a Gameshark code that paches

JAL 0x80400000
NOP

to Mario Behavior, which is equivalente to a YourHack(); function call in C.

"Injecting" the hack into the ROM without using Gameshark codes is a bit more complicated.
messiaen
Catgirl
Level: 68


Posts: 1067/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-24-12 03:11:44 PM, in Mario 64 Level Importer (last edited by messiaen at 02-24-12 12:30 PM) Link
Read the help, watch tutorials, read this thread, etc, this has already been explained many times.

Someone in YouTube posted a very simple fix to the textures problem in the 3D preview, actually the problem is way simpler than I thought! Just make sure your obj/mtl file doesn't contain spaces. Since Irrlicht is cross-platofmr, I guess this is probably some Windows-only problem, I'll see what I can do to fix it.
messiaen
Catgirl
Level: 68


Posts: 1068/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-24-12 04:40:34 PM, in Correctly Compilling C For Usage With N64 Link
It would be nice if you could do it really step-by-step, with lots of pictures from all the steps (installing MSYS/MinGW, downloading the files, setting things up, etc).

I'm doing some modifications in the ROM Layout for the next version of the importer, so injecting new code will be a bit easier.
messiaen
Catgirl
Level: 68


Posts: 1069/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-25-12 12:55:39 PM, in Post your SM64 mods, patches and screenshots here! (NO ROM LINKS!) Link
Your scaling doesn't seem to work well, you shouldn't have to rely on MoonJump to do most of the jumps.
messiaen
Catgirl
Level: 68


Posts: 1070/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-25-12 03:45:24 PM, in Correctly Compilling C For Usage With N64 (last edited by messiaen at 02-25-12 12:46 PM) Link
Please provide a link to the GCC N64 Toolchain setup tutorial". By the way, that tutorial was made by ZZT32.

Animations.h isn't needed, unless someone completes that with descriptions of all object animations.

Some possible tutorials you or someone else could try writing, or rather, guides for what you can learn from the examples. I strongly recommend reading all the basic tutorials on cprogramming.com. It's essential understanding struct pointers AND pointers-to-pointers syntax (you'll be using this to acess most structs).

1) Using pointers to alter things in RAM
- Reading/writing 8, 16 and 32-bit values (types u8, u16, u32 and floats)
- Converting simple Gameshark codes to C code

2) Reading data from the game: current level, number of stars
- Using conditionals to enhance simpler codes
- Making your code execute only on a specific level, or on a minimum number of stars

3) Acessing the Mario struct
- Pointer-to-pointer struct syntax and acessing members, ie (*Struct)->member
- Checking current and previous action
- Reading JoyPad input using & and == operators.

4) Detecting current collision type Mario is stepping
- Adding action to existing collision types
- Creating custom collision types

5) Acessing the Object Struct
- Basic variables: action, position, collision spheres & interaction, x/y/z speed, distance from Mario or from other object
- Deactivating (killing) objects
- Changing action based on object timers
- Changing current animation
- Checking behaviors
- Spawning child objects
- Segmented vs RAM pointers (SegmentedToVirtual function)
- Iterating through the object linked list to find an specific object.

6) DMA
- Copying data from the ROM to RAM
messiaen
Catgirl
Level: 68


Posts: 1071/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-25-12 07:42:41 PM, in Mario 64 Level Importer Link
Screenshots of the behavior generator interface (Dudaw, are you working on those function lists? I really need help on this. Celux, do you have anything to contribute regarding useful functions for that list?):



and


messiaen
Catgirl
Level: 68


Posts: 1072/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-25-12 09:10:00 PM, in Help/Questions about Toad's Tool 64 and SM64 hacking Link
You have probably assigned the wrong behavior to some object. Behaviors will only work if you have the correct banks loaded (unless you manually modify them).
messiaen
Catgirl
Level: 68


Posts: 1073/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-26-12 12:07:30 AM, in Mario 64 Level Importer Link
I'm adding functions based on the behavior descriptions, it will be up to the users to see how they interact. You can add any 0x0C command as many times as you want.
messiaen
Catgirl
Level: 68


Posts: 1074/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-27-12 10:01:07 AM, in Mario 64 Level Importer Link
Originally posted by Dudaw
Howdy.
I completed the list and there are about 589 total functions called in the behavior scripts.
Around half are loop functions, while the others are functions coming before the 0x08 mark.
There are quite a bit here, so coming up with descriptions for all of them will probably take some time.
I'll start with descriptions on the loop functions, specifically the solid objects.



I'm calling the functions before the "loop" area initialization functions, since what they do is just initialize variables, usually processing Param IDs. Descriptions of them aren't needed, just some notes on which "loop" functions they refer to. I'm guessing in most cases they can simply be ignored, at least for the simpler behaviors.

You can make an object visible all the time by setting drawing distance in the geometry layout or behavior, it seems 0x802A4120 does a bit more than it looking quickly at its disassembly, but any description is better than nothing, so thanks on that.

I'll implement some flexible text format function file so users can add new function descriptions and share them without me having to update the importer.
messiaen
Catgirl
Level: 68


Posts: 1075/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-28-12 03:20:06 AM, in Mario 64 Level Importer Link
Format and example of the function list file:

[FLoop]
Text=Breakable when hit by a cannon. Needs a collision sphere. (0x802AA1B8)
Tag=802AA1B8
[FLoop]
Text=Clock-like rotation on Y Axis (0x802AA774)
Tag=802AA774
[FLoop]
Text=Y Rotation + produces fire (0x802AF3FC)
Tag=802AF3FC
[FLoop]
Text=Twomp-like Behavior (0x802AD34C)
Tag=802AD34C
[FLoop]
Text=Elevator movement (0x802ADF6C) [has init]
Tag=802ADF6C
[FInit]
Text=Processes Behavior Params for 0x802ADF6C (Elevator function)
Tag=802ADDF8


FLoop adds new 'loop' function (those between 0x08000000 and 0x09000000 blocks in the behavior data), while [FInit] adds a new initialization function. "Text" is the description displayed on the function combobox, and Tag is the function address. They must appear in this specific order.

The [has init] part of description means there's an initialization function that should probably be coupled to ensure the complete function of the behavior.

I will release a stand-alone version of the behavior generator so people can experiment those functions. A good starting point is to use the Green Pipe model ID and collision data, since it's available on all banks.
messiaen
Catgirl
Level: 68


Posts: 1076/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-28-12 09:54:58 PM, in Mario 64 Level Importer Link
Originally posted by Dudaw
Here's the function list:
http://dudaw.webs.com/sm64docs/sm64_functions_list.txt
- I added also "does/doesn't have initialization function" to accommodate the format of the importer list you showed.

and the behavior list:
http://dudaw.webs.com/sm64docs/sm64_behavior_list.txt


Thanks Dudaw, I'll add most of those to the functions list, discovering what works or not will be up to the users. I'm using the 0x0F command to implement X/Y/Z rotation on any object.

One thing I want to implement sometime is a behavior command to disable the object based on a few conditions. For instance, something like:

If RAM Value (number of stars, for instance) equals / is less than / is more than arbitrary value THEN remove object.
messiaen
Catgirl
Level: 68


Posts: 1077/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-29-12 01:54:58 AM, in Mario 64 Level Importer Link
Actually, thinking it better, none of the two options is totally satisfactory.

1) If you use Behavior Params, you may have conflicts with other functions. Think for instance of a NPC talking object, which uses Behavior Params to store message ID / other informations. A lot of functions rely on BParams.

2) If you encode the required data into the behavior, BParams will be available but the behavior will be less flexible.

I'm still leaning torwards option 2, because there's plenty of free space for custom behaviors (300, one for each possible custom object. Each behavior is reserved 0x100 bytes, much more than needed, so experienced users can actually use this extra space for additional behaviors if they want).
messiaen
Catgirl
Level: 68


Posts: 1078/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 02-29-12 01:01:30 PM, in Post your SM64 mods, patches and screenshots here! (NO ROM LINKS!) Link
Skillux: Looks very nice, but please consider SERIOUSLY changing your nick . It's cool that you admire Skelux work, but this will confuse others (plus, some people won't take you seriously).
messiaen
Catgirl
Level: 68


Posts: 1079/1085
EXP: 2596326
For next: 132474

Since: 11-20-07


Since last post: 8.1 years
Last activity: 7.2 years

Posted on 03-12-12 02:01:13 PM, in Help/Questions about Toad's Tool 64 and SM64 hacking (last edited by messiaen at 03-12-12 11:04 AM) Link
Basically, you can't open an extended/expanded ROM in Nemu64 (actually, you can, but it's a lot of trouble, especially with ROMs modified by the level importer). Use a normal 8MB ROM.
Pages: 1 2 3 4 5 6 7 8 9 10 ... 45 46 47 48 49 50 51 52 53 54
Jul - Posts by messiaen


Rusted Logic

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

24 database queries, 52 query cache hits.
Query execution time: 0.100047 seconds
Script execution time: 0.024633 seconds
Total render time: 0.124680 seconds