Register - Login
Views: 95492974
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
10-23-18 01:12:38 AM

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

Shyguy
Level: 19


Posts: 34/91
EXP: 35498
For next: 279

Since: 03-25-14


Since last post: 2.0 years
Last activity: 2.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 205
For next: 74

Since: 07-17-14


Since last post: 4.0 years
Last activity: 4.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 35498
For next: 279

Since: 03-25-14


Since last post: 2.0 years
Last activity: 2.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 185


Posts: 12160/12211
EXP: 86714047
For next: 1045688

Since: 07-03-07

From: 52-2-88-7

Since last post: 3.0 years
Last activity: 3.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 105


Posts: 3144/3306
EXP: 12171574
For next: 90686

Since: 08-02-07

From: Pororoca

Since last post: 36 days
Last activity: 8 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: 440
For next: 89

Since: 07-20-14


Since last post: 4.0 years
Last activity: 4.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 440
For next: 89

Since: 07-20-14


Since last post: 4.0 years
Last activity: 4.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 440
For next: 89

Since: 07-20-14


Since last post: 4.0 years
Last activity: 4.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: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.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: 440
For next: 89

Since: 07-20-14


Since last post: 4.0 years
Last activity: 4.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)
shyguyhex

Level: 14


Posts: 22/45
EXP: 12639
For next: 432

Since: 01-03-14


Since last post: 3.0 years
Last activity: 2.0 years

Posted on 07-20-14 05:38:54 PM Link | Quote

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


That wouldn't work :p, GS codes write to RAM addresses, not ROM addresses. RAM and ROM are two very different things so you would need a GS code interpreter. It would basically read the GS codes from a designated bank in the ROM and then write the values into RAM.
Luca91
Random nobody
Level: 5


Posts: 5/5
EXP: 440
For next: 89

Since: 07-20-14


Since last post: 4.0 years
Last activity: 4.0 years

Posted on 07-20-14 05:40:59 PM Link | Quote
Originally posted by shyguyhex

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


That wouldn't work :p, GS codes write to RAM addresses, not ROM addresses. RAM and ROM are two very different things so you would need a GS code interpreter. It would basically read the GS codes from a designated bank in the ROM and then write the values into RAM.


Oh you are right! Silly me, I totally ignored the fact that GS works by patching RAM address and not ROM address!

Thanks for pointing this out!!
Pages: 1 2 3 4 5 6 7 8 9 10 ... 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 5d36857 [2018-03-03]
©2000-2018 Acmlm, Xkeeper, Inuyasha, et al.

29 database queries, 5 query cache hits.
Query execution time: 0.248905 seconds
Script execution time: 0.047889 seconds
Total render time: 0.296795 seconds
Memory used: 786432