Register - Login
Views: 87404912
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
11-21-17 11:26:54 PM

Jul - SM64 Hacking - 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 ... 69 70 71 72 73 74 75 76 77 78Next older thread
Yoshimaster96

Shyguy
Level: 19


Posts: 33/91
EXP: 31744
For next: 4033

Since: 03-25-14


Since last post: 1.0 years
Last activity: 1.0 years

Posted on 07-12-14 09:16:59 PM Link | Quote
Originally posted by shyguyhex
Originally posted by Yoshimaster96
Originally posted by shyguyhex
Originally posted by Yoshimaster96

If they aren't in the final game, then what is in the Mario head intro?

My bad, completely forgot about those ones

Do you know its model ID and behavior?


I think since the star is just used as a graphical entity for the starting screen, it wouldn't have a behavior. And I'm not familiar with the level commands so I'm not sure how it would be loaded in as a model ID.

I don't know if it helps but this is the area in ram with the commands used to draw the star - 801B1A80
Thanks! Do you know what its arguments are?
shyguyhex

Level: 14


Posts: 11/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-13-14 02:11:36 AM (last edited by shyguyhex at 07-13-14 02:13:51 AM) Link | Quote
Originally posted by Yoshimaster96
Thanks! Do you know what its arguments are?

The 'FD' commands in that section are all followed by segment-offset pointers to the stars' raw image data.

If you're trying to make a level object that uses the beta sprites then I would suggest either writing an asm hack that copies the uncompressed images and commands over to another place in ram during the starting screen, or get it loaded into a level from rom somehow. You would also need to make a geolayout script and a behavior to get a working model with animated frames. For the layout script you could probably just copy the 2D coin's script and change all of the pointers, and for the objects behavior, you would want to have 0C000000 802AB70C in the active part of the script, which is the asm function used by coins to continually rotate the gfx case in the object's structure.

Here's the coin's layout script:
(ram version @ 800F8AA4)

00280001 800F8AA4 800F8AA4 00000000 800F8ABC 0032B401
010C0001 800F8ABC 800F8ABC 800F8AA4 800F8ADC 8029DB48 00000000 00080000 // 8 frame switch
001B0401 800F8B84 800F8AF4 800F8ABC 00000000 03007800
001B0401 800F8ADC 800F8B0C 800F8ABC 00000000 03007800
001B0401 800F8AF4 800F8B24 800F8ABC 00000000 03007828
001B0401 800F8B0C 800F8B3C 800F8ABC 00000000 03007828
001B0401 800F8B24 800F8B54 800F8ABC 00000000 03007850
001B0401 800F8B3C 800F8B6C 800F8ABC 00000000 03007850
001B0401 800F8B54 800F8B84 800F8ABC 00000000 03007878
001B0401 800F8B6C 800F8ADC 800F8ABC 00000000 03007878
^cmd ^cmd ptr ^cmd ptr ^cmd ptr ^cmd ptr ^segment-offset pointers to 'E7' commands



First E7 @ 800BB7B0


E7000000 00000000
FD700000 03005780 // 800B9730 the raw image data
06000000 03007780 // 800BB730 another E7 and other cmds
04300040 030056C0 // 800B9670 a bunch of signed short ints that scale the image and set other properties
06010000 030077D0 // 800BB780 two BF commands, they account for halves of the image somehow



There's probably an easier way of doing this that I'm unaware of though lol
Yoshimaster96

Shyguy
Level: 19


Posts: 34/91
EXP: 31744
For next: 4033

Since: 03-25-14


Since last post: 1.0 years
Last activity: 1.0 years

Posted on 07-15-14 11:59:40 AM Link | Quote
What collision do I use so the Chill Bully won't destroy itself?
shyguyhex

Level: 14


Posts: 13/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-16-14 01:07:15 AM (last edited by shyguyhex at 07-16-14 05:03:14 AM) Link | Quote
Hey guys, I'm adding a little collision thing to my program.


Is there any documentation on that big group of signed shorts?

edit: first int is actually 2 bytes - first byte is 01 or 03 when it's an object and second byte changes per room/zone

edit2:

Worked out what most of the stuff is, I had the bytes ordered wrong in the first pic, ha
SpazTron64[NC]
Random nobody
Level: 4


Posts: 3/3
EXP: 181
For next: 98

Since: 07-17-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 07-17-14 11:37:47 AM (last edited by SpazTron64[NC] at 07-17-14 02:15:37 PM) Link | Quote
Hi VL-tone and Messiaen.I was at messiaen's site and i found the firemario.c code which he previewed on youtube.I followed the tutorial for C compiling with MSYS and the n64 toolchain.Everything went well until i typed in the console MAKE.From there i got a BUNCH of errors which i tried to fix but to no avail.To make matters even worse i have no header file to start with so its a big problem.

Here are the files i used:
(hook.txt,Makefile,firemario.c/main.c)
https://www.dropbox.com/s/ru7hrpeqd7pah2o/FireMario.zip

EDIT:Also heres a screenshot
https://www.dropbox.com/s/a0aydeqh9i1qm9l/Firemariofail.png

EDIT No. 2:I found some headers on messiaen's site and they seem to be working.But im getting error 127 when i type make.
This is what it says:
make:mips64-gcc: Command not found.

Edit 3(oh god here we go again...):Ah crap now that ive fixed that im getting more errors in the code for example
M64_FIRST_OBJ_STRUCT undeclared (first use in this function)
and in function _start it doesnt say whats wrong.

OH GOD PLEASE SOMEBODY COMPILE THIS FOR ME and tell me how he/she did it so that i can know.
shyguyhex

Level: 14


Posts: 14/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-17-14 03:28:27 PM (last edited by shyguyhex at 07-17-14 03:30:41 PM) Link | Quote
Originally posted by SpazTron64[NC
]
Edit 3(oh god here we go again...):Ah crap now that ive fixed that im getting more errors in the code for example
M64_FIRST_OBJ_STRUCT undeclared (first use in this function)
and in function _start it doesnt say whats wrong.


You're either missing a file or the paths are screwed up somehow
Yoshimaster96

Shyguy
Level: 19


Posts: 35/91
EXP: 31744
For next: 4033

Since: 03-25-14


Since last post: 1.0 years
Last activity: 1.0 years

Posted on 07-17-14 07:19:11 PM Link | Quote
Originally posted by Yoshimaster96
What collision do I use so the Chill Bully won't destroy itself?
Does anyone know of the correct collision to use for the Chill Bully?
shyguyhex

Level: 14


Posts: 15/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-17-14 07:39:05 PM (last edited by shyguyhex at 07-17-14 07:42:43 PM) Link | Quote
Originally posted by Yoshimaster96
Originally posted by Yoshimaster96
What collision do I use so the Chill Bully won't destroy itself?
Does anyone know of the correct collision to use for the Chill Bully?





He's standing on top of 2E and the surface below the platform is 01 which is lava/frostbite ice
shyguyhex

Level: 14


Posts: 16/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-17-14 08:52:39 PM (last edited by shyguyhex at 07-17-14 09:21:38 PM) Link | Quote
Hey guys, I think I found something beta/unused and I don't know where to post it (since the beta stuff thread is closed), so I'll just post it here (apologies if this was already found).

I was labeling all of the collision flags for the painting wobble triggers and I noticed that there are some unused slots, then I remembered that the snowman's land wall doesn't wobble when you walk near it. So I went next to it and started changing the floor's collision to some of the unused flags and sure enough, the wall started wobbling



The unused flags are CA, CB and CC.

Edit: here are the other ones in the 'painting wobble' range that appear to be unused as well
B8, B9, BA
C7, C8, C9
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 183


Posts: 12160/12211
EXP: 83122272
For next: 1378831

Since: 07-03-07
From: 52-2-88-7

Since last post: 2.0 years
Last activity: 2.0 years

Posted on 07-18-14 10:24:02 PM Link | Quote
IIRC, the flags are present on all or most walls and you can turn them on or off; not specific to that wall.

I could be totally wrong on this, but I'm the closest thing to a person from long ago here to answer your query, though.
shyguyhex

Level: 14


Posts: 17/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-19-14 09:47:45 PM (last edited by shyguyhex at 07-19-14 10:26:41 PM) Link | Quote
Originally posted by Lyskar
IIRC, the flags are present on all or most walls and you can turn them on or off; not specific to that wall.

I could be totally wrong on this, but I'm the closest thing to a person from long ago here to answer your query, though.


Mmkay, so the paintings sort of 'come packaged' with the collision flags ready by default but it was probably just turned off for this particular one. I guess that makes sense considering there are only two collision spots on the ground next to this wall.

I'm still sort of puzzled by B8 and C7 though, I haven't checked the actual code but they don't seem to be related to any paintings at all.

edit: I figure B8 is probably associated with the hazy maze cave entrance

00 Environment default
01 Burn/Frostbite
0A Death floor
0B Close camera
0D Water
0E Water (flowing)*
12 ?? Freezes game
13 Slippery
14 Slippery (slightly)
15 Anti-slippery
1B Endless stairs check
21 Sand
22 Quicksand (lethal, slow)
23 Quicksand (lethal, instant)
24 Quicksand (non-lethal, flowing)*
26 Quicksand (non-lethal)
27 Quicksand (non-lethal, flowing)2*
28 ?? cannons, platforms, the star thing in the courtyard, warp pipe surface
29 Grass
2A ?? hill with the red coing in BoB?
2C Windy*
2D Quicksand (lethal, flowing)*
2E Slippery (ice)
2F Wing cap level entrance
30 Hard floor
32 Kill mario?
33 Timer start
34 Timer stop
35 Grass?
36 Grass slippery?
37 Hard floor anti-slippery
38 Flying windy
65 Far camera (King Bobomb's platform)
6F ? wooden bridge in bowser level
70 ? grass next to rolling balls in bob
75 Slippery
76 ? Orange boxes, tick tock clock floor, crystals, things in mirror room, whomps
79 Close camera
7A ? Dorrie's back, purple buttons
A6 Painting wobble (BoB 1)
A7 Painting wobble (BoB 2)
A8 Painting wobble (BoB 3)
A9 Painting wobble (CCM 1)
AA Painting wobble (CCM 2)
AB Painting wobble (CCM 3)
AC Painting wobble (WF 1)
AD Painting wobble (WF 2)
AE Painting wobble (WF 3)
AF Painting wobble (JRB 1)
B0 Painting wobble (JRB 2)
B1 Painting wobble (JRB 3)
B2 Painting wobble (LLL 1)
B3 Painting wobble (LLL 2)
B4 Painting wobble (LLL 3)
B5 Painting wobble (SSL 1)
B6 Painting wobble (SSL 2)
B7 Painting wobble (SSL 3)
B8 Painting wobble (?)
B9 Painting wobble (?)
BA Painting wobble (?)
BB Painting wobble (BFS)
BC Painting wobble (BFS?)
BD Painting wobble (BFS?)
BE Painting wobble (WDW 1)
BF Painting wobble (WDW 2)
C0 Painting wobble (WDW 3)
C1 Painting wobble (THI t 1)
C2 Painting wobble (THI t 2)
C3 Painting wobble (THI t 3)
C4 Painting wobble (TTM 1)
C5 Painting wobble (TTM 2)
C6 Painting wobble (TTM 3)
C7 Painting wobble (?)
C8 Painting wobble (?)
C9 Painting wobble (?)
CA Painting wobble (SML 1, unused)
CB Painting wobble (SML 2, unused)
CC Painting wobble (SML 3, unused)
CD Painting wobble (THI h 1)
CE Painting wobble (THI h 2)
CF Painting wobble (THI h 3)
D0 Painting wobble (Metal cap)
D1 Painting wobble (Metal cap?)
D2 Painting wobble (Metal cap?)
D3 Horizontal level entrance (still have to label these)
D4 Horizontal level entrance ()
D5 Horizontal level entrance ()
D6 Horizontal level entrance ()
D7 Horizontal level entrance ()
D8 Horizontal level entrance ()
D9 Horizontal level entrance ()
DA Horizontal level entrance ()
DB Horizontal level entrance ()
DC Horizontal level entrance ()
DE Horizontal level entrance ()
DF Horizontal level entrance ()
F0 Horizontal level entrance ()
F1 Horizontal level entrance ()
F2 Horizontal level entrance ()
F3 Horizontal level entrance ()
F4 Horizontal level entrance ()
F5 Horizontal level entrance ()
F6 Horizontal level entrance ()
F7 Horizontal level entrance ()
F8 Horizontal level entrance ()
F9 Horizontal level entrance ()
FA Horizontal level entrance ()
FB Horizontal level entrance ()
FC Horizontal level entrance ()
FD Vertical level entrances ?
FF Bowser1 entrance ?
shyguyhex

Level: 14


Posts: 18/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-19-14 10:50:23 PM (last edited by shyguyhex at 07-20-14 04:37:41 AM) Link | Quote
Anybody knowledgeable with the PI registers?



lui t0, 0xA460 // pi registers
lw s0, 0x10 (t0) // pi_status
bne r0 s0 0x09 // break if pi_status != 0
nop
lui t2, 0x0040 // ram address 80400000
sw t2 0x0 t0 // pi_ram = 00400000
lui t2 0x107F // rom address 007FFFF0
ori t2 t2 0xFFF0 // ^
sw t2 0x4 t0 // pi_rom = 0x107FFFF0
ori t2 r0 0x03
sw t2 0xC t0 // pi_length = 0x3
nop
jr ra // done


I wrote this as a test for loading a word from the rom and it seems to work fine in nemu but I'm not sure if it's 'conventionally correct'/would work on real hardware?
Joe
Common spammer
🗿
Level: 104


Posts: 3144/3289
EXP: 11573829
For next: 288297

Since: 08-02-07
From: Pororoca

Since last post: 9 days
Last activity: 10 hours

Posted on 07-20-14 07:25:55 AM Link | Quote
The PI bus requires a minimum of two byte alignment, but RDRAM has a stricter alignment requirement - something like eight or sixteen bytes, if I recall correctly. I don't know how the DMA behaves when you request an aligned address with a misaligned length.

It's also possible to read the cartridge ROM directly, without using DMA, but I don't know if there are any side effects when there's DMA running at the same time.


Oh, and I think you've misplaced that last nop.
Luca91
Random nobody
Level: 5


Posts: 1/5
EXP: 390
For next: 139

Since: 07-20-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 07-20-14 10:39:27 AM (last edited by Luca91 at 07-20-14 11:08:12 AM) Link | Quote
Hi all,
I'd like to start sm64 hacking so I've just setup and configured the n64 toolchain plus the mario64.h header file.
I can compile the Messiaen "Pong of death" exaple, but the resulting gameshark codes are different..
For example this is part of the Messianen cheats.ini:



CheatName1Code0=812CB26C 0C10
CheatName1Code1=812CB26E 0000
CheatName1Code2=812CB278 1000
CheatName1Code3=812CB27A 0040
CheatName1Code4=81400000 27BD
CheatName1Code5=81400002 FF40
CheatName1Code6=81400004 AFBF
CheatName1Code7=81400006 00BC
CheatName1Code8=81400008 AFBE
CheatName1Code9=8140000A 00B8



While, mine is:



CheatName1Code0=812CB26C 0C10
CheatName1Code1=812CB26E 0000
CheatName1Code2=812CB278 1000
CheatName1Code3=812CB27A 0040
CheatName1Code4=81400000 27BD
CheatName1Code5=81400002 FFD8
CheatName1Code6=81400004 AFBF
CheatName1Code7=81400006 0024
CheatName1Code8=81400008 AFB3
CheatName1Code9=8140000A 0020





I can't figure out why I get those different address.. Any help please ?


EDIT: I've just figured out that my codes still works, so I think that the cheats.ini from Messiaen is from an older version of death pong

Just another question: in the example Makefile there is :

$(BINCODE) $(PRJNAME).bin 81400000 codes.txt # Turn binary into GS code


why the address is 0x81400000 ? is this a standard sm64 value for hacks or what ? Thanks

shyguyhex

Level: 14


Posts: 19/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-20-14 02:53:08 PM Link | Quote
Originally posted by Joe
The PI bus requires a minimum of two byte alignment, but RDRAM has a stricter alignment requirement - something like eight or sixteen bytes, if I recall correctly. I don't know how the DMA behaves when you request an aligned address with a misaligned length.


Thanks Joe, that's exactly what I needed

Originally posted by Luca91
why the address is 0x81400000 ? is this a standard sm64 value for hacks or what ? Thanks


That's where the 4MB of expansion pack memory starts, it was never used by the original SM64 so you can put as much data there as you want without interrupting the game
Luca91
Random nobody
Level: 5


Posts: 2/5
EXP: 390
For next: 139

Since: 07-20-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 07-20-14 04:25:07 PM (last edited by Luca91 at 07-20-14 04:25:47 PM) Link | Quote


That's where the 4MB of expansion pack memory starts, it was never used by the original SM64 so you can put as much data there as you want without interrupting the game



Sorry for the noob question, but can you explain me how exactly this works ? I mean, as far as I've understood the code is injected at 0x81400000 because at that address there is the 4mb expansion pack that ins't used by the game, but how the code get called by the game ? does the game automatically call any code located at 0x81400000 ?
Thanks for your time
shyguyhex

Level: 14


Posts: 20/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-20-14 04:40:33 PM (last edited by shyguyhex at 07-20-14 05:00:32 PM) Link | Quote
Originally posted by Luca91
Sorry for the noob question, but can you explain me how exactly this works ? I mean, as far as I've understood the code is injected at 0x81400000 because at that address there is the 4mb expansion pack that ins't used by the game, but how the code get called by the game ? does the game automatically call any code located at 0x81400000 ?
Thanks for your time


CheatName1Code0=812CB26C 0C10
CheatName1Code1=812CB26E 0000

^ If you convert the 32bit value from this part of the code (0C100000) to MIPS ASM you'll get

JAL 0x80400000

This instruction will move the program counter to the expansion pack

Also the memory location isn't actually at 81400000, it's at 80400000. The "81" is just a prefix that tells gameshark to write a 16bit value instead of an 8bit value
Luca91
Random nobody
Level: 5


Posts: 3/5
EXP: 390
For next: 139

Since: 07-20-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 07-20-14 04:51:25 PM (last edited by Luca91 at 07-20-14 04:52:07 PM) Link | Quote
Thank you shyguyhex, you have just resolved many of my questions regarding code executions

I'd also like to ask, if I manually patch those codes with an hex editor on the rom file, do you think that this will works ?

may I also ask if the hook code (812CB26C 0C10 etc) is called every frame ? I think yes, but I'd like to be sure
shyguyhex

Level: 14


Posts: 21/45
EXP: 11367
For next: 1704

Since: 01-03-14


Since last post: 2.0 years
Last activity: 1.0 years

Posted on 07-20-14 05:14:44 PM (last edited by shyguyhex at 07-20-14 05:15:03 PM) Link | Quote
Originally posted by Luca91
Thank you shyguyhex, you have just resolved many of my questions regarding code executions

I'd also like to ask, if I manually patch those codes with an hex editor on the rom file, do you think that this will works ?

may I also ask if the hook code (812CB26C 0C10 etc) is called every frame ? I think yes, but I'd like to be sure


You could probably patch the gameshark code to a rom patched with a gameshark code interpreter (I haven't used a gs interpreter patch before though so I could be wrong)
Related thread: http://jul.rustedlogic.net/thread.php?id=16157

And the hook code is called every frame; I checked the code and the function starting at 802CB264 is called from Mario's behavior script, so it's constantly running
Luca91
Random nobody
Level: 5


Posts: 4/5
EXP: 390
For next: 139

Since: 07-20-14


Since last post: 3.0 years
Last activity: 3.0 years

Posted on 07-20-14 05:30:50 PM Link | Quote

You could probably patch the gameshark code to a rom patched with a gameshark code interpreter (I haven't used a gs interpreter patch before though so I could be wrong)



Perfect, thanks for your time!

I was thinking about that the gs codes just modify the values at an defined address, for example:

812CB26C 0C10, I was thinking that this code just write 0C at 812CB26C and 10 at 812CB26D.

So I was thinking that no GS interpreter were needed... maybe I'm wrong x)
Pages: 1 2 3 4 5 6 7 8 9 10 ... 69 70 71 72 73 74 75 76 77 78Next older thread
Jul - SM64 Hacking - Help/Questions about Toad's Tool 64 and SM64 hacking New poll - New thread - New reply




Rusted Logic

Acmlmboard - commit 2f1bc75 [2017-08-27]
©2000-2017 Acmlm, Xkeeper, Inuyasha, et al.

29 database queries, 5 query cache hits.
Query execution time: 0.223337 seconds
Script execution time: 0.019894 seconds
Total render time: 0.243231 seconds