forked from Achilles1515/20XX-Melee-Hack-Pack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScratchpad - Achilles.txt
28602 lines (22298 loc) · 624 KB
/
Scratchpad - Achilles.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Achilles' Scratchpad
- My random notes and codes for Melee hacking R&D, and for the 20XX Hack Pack.
- started 2/6/15
/*
SUBLIME color coding edit
D:\Users\dowens\AppData\Roaming\Sublime Text 2\Packages\Assembly-Syntax-Definition-master\Assembly x86 AT&T.tmLanguage
*/
********************************
* Function Notes - Very Random *
********************************
- just add to this list whenever
8004cbc0 DataOffset_CheckIfOnDropThroughPlatform
- input = r3 = internal data offset + 0x6F0 (1776)
output = r3 = 0, then false
8006b82c - playerthink_physics
- input, r3 = external player data pointer
8008e5c4 - DI Trajectory Change
- input r3 = internal data offset
- after function, f6 = DI angle (radians)
8007d5d4 - DataOffset_Jumping_StoreAirBool_LoseJump_NoECBUpdate
80022C30 Angle_RetrieveGivenX&Y
inputs:
f1 = Y value
f2 = X value
(not sure if these matter)
output = f1 = degree (radians, 0 = right)
I think output f6 or one of them is the float for degrees, instead of radians. maybe, unchecked.
*************************
* 20XX Stage File Names *
*************************
GrGb.hat Great Bay Hacked
GrKg.hat Kongo Jungle Hacked [no rock, logs, barrels]
GrSh.sat Skyrule [Redux]
GrOy.hat Yoshi's Island 64 Hacked [Milun]
GrOy.wat WarioWare, Inc.
***************
* RTOC Values *
***************
-0x7658 = -1.00
-0x3C28 = -0.200
-0x778C = 0.0000
-0x7510 = 0.017453 (pi/180)
-0x76AC = 1.00
-0x3C30 = 2.00
-0x1764 = 4.00
-0x3C2c = 10.00
-0x7738 = 433000080000000 (lfd, "magic number")
-0x7740 = 0.003906 = hitbox radius/axis offset multiplier (multiplies subaction event hitbox)
-0x3d80 = 20000 = Home-Run Contest (HRC) collision extension amount (0x4DBC60)
-0x7ec8 = -50000 (TopN X-min before freezing game), see code line 8000e254
-0x7ec4 = 500000 (TopN X-max before freezing game)
**************
* r13 values *
**************
-0x4940 = player on-screen percents, how many are displayed (7 is four players that are scaled down)
-0x514C = pointer to 0x9fe0 in PlCo.dat (804d6554)
-0x5158 = pointer to stale move list multipliers
-0x51E4 = pointer to RAM collision link table
1) take link number (r3)
2) rlwinm r0,r3,3,0,28
3) lwzx this result and pointer at -0x51e4
4) result is a pointer to the stage file data for this link
I think 8004dc90 find the new x/y coords for a player on a moving platform,
based on the collision link start and end loc currently standing on
- 8005628c --> storing new collision point location
-0x51E8 = pointer to RAM collision data (some?)
-0x51EC = pointer to Coll_Data for current stage
-0x6c98 = DBLevel Flag
-0x6cb8 = Stage ID (804D49E8)
********************************
* Match/Character Data Structs *
********************************
804978a0 = event match
*********************************
* 20XX Custom Stage Flag Values *
*********************************
byte is @ 803fa2e5
Universal:
(00000001)
to
(00000007) = stage spawns (first 3 bits)
Battlefield:
(10) = water BG, set in stage init function
(40) = Custom Plats 1
(80) = Custom Plats 2
(C0) = Custom Plats 3
Pokemon Stadium:
(08) = water mode
(10) = rock mode
(20) = grass mode
(40) = fire mode
(80) = frozen, checked every frame on stadium
Final Destination
(40) = long stage floor (only for vanilla/textured final destination files, no model imports)
(80) = no background transitions
Brinstar
(80) = Disable rising lava
All-Star Rest
(80) = Disable portal from exiting stage
Corneria
(80) = Disable ships
(40) = Disable gun
Princess Peach's Castle
(80) = Disable Bullet Bill and switches
Mushroom Kingdom II
(80) = Disable Pidgit, Birdo, and Logs
Trophy Snag
(80) = Disable trophy drop
***************************
* Debug Menu Exits to CSS *
***************************
When exiting...
1a42f8 is executed.
- stores r3=0 into 80479d31
- r3 is given 0 from 801b0a14
- stores a 1 [byte] into 80479d3c
Then 1a4b60 is executed.
Then 1a43a0 is executed
041b0a14 38600002
Debug Menu Exits to Menus
- trying to find fix for CSS freezing
[Achilles]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x801b0a14 --- 38600000 -> 38600001
-==-
----------------------
**************************************************
* X/Y/Z Axis Pause Screen Translation w/ C-Stick *
**************************************************
PAUSE Camera Offsets:
80452f2c - [8bit] player the camera is focused on
80452f2d - [8bit] player who paused the game.
80452f7c = x pause camera translation
80452f80 = y pause camera translation
80452f84 = z pause camera translation
(p1)
4c1fd4 = x c-stick axis
4c1fd8 = y c-stick axis
(p3)
4c2060 = y axis
...so each player's c-stick axis is 0x44 away from one another!
inject @ 8002cb34
- function for storing pause camera offsets
-r29
# default code line
extsb r4,r0
#player number who paused game is in r0
lis r3,0x804c
ori r3,r3,0x1fac # load P1 button input location
mulli r6,r0,0x44
add r3,r3,r6
#load dead zone (-0.28)
lwz r6,-0x514c(r13) # load PlCo.dat offset
lfs f17,0(r6) # load 0.28
fneg f1,f17 # f1 is -0.28
C_STICK_Y:
#load c-stick y axis
lfs f15,0x2c(r3)
fcmpo cr0,f15,f1
ble- C_STICK_Y_GO
fcmpo cr0,f15,f17
blt- C_STICK_Y_END
C_STICK_Y_GO:
C_STICK_Y_CHECK_Z:
lwz r6,0(r3) # load current buttons
rlwinm. r6,r6,0,27,27 # (00000010)
beq- C_STICK_Y_TRANSLATION
lfs f16,0x31C(r31)
fadd f16,f15,f16
stfs f16,0x31C(r31)
b C_STICK_Y_END # if Z trans, skip x trans
C_STICK_Y_TRANSLATION:
lfs f16,0x318(r31)
fadd f16,f15,f16
stfs f16,0x318(r31)
C_STICK_Y_END:
C_STICK_X:
#load c-stick x axis
lfs f15,0x28(r3)
fcmpo cr0,f15,f1
ble- C_STICK_X_GO
fcmpo cr0,f15,f17
blt- C_STICK_X_END
C_STICK_X_GO:
#load current x translation
lfs f16,0x314(r31)
fadd f16,f15,f16
stfs f16,0x314(r31)
C_STICK_X_END:
END:
--------------
Camera - Set Z dimension (?) to 0 on unpause
- otherwise unpausing after changing the z-axis translation makes camera weird
inject @ 801c5804 - lis r3,0x804a
lis r3,0x8045
li r4,0
stw r4,0x2c84(r3)
lis r3,0x804a
************************
* Single Player Stages *
************************
Platform edges (default) are 18.800001 +- horizontal offset.
- 23.5 (0x41bc0000) is value if battlefield wasnt scaled down.
Strings: Horizontal - F92705
Size Mult: F92719
Pointer to platform link data
c17240
@458e88 pointer, the value at that address is
80c29700 (no items, reg)
c4094558
ccb7b0 - memory write bp
- 342b4
Good Spawn:
X- 537 = 44064000
Y- 190 = 433e0000
207e34
Good Spawn Hyrule Maze:
X = -88 = 42b00000
Y = -226 = c3620000
+$Yoshi's never spawn on adventure
04207e68 60000000
$Adventure Mush never enters new stage state
04207e2c 3800FFFF
$Test No Yoshis on Adventure and no Link spawn
0416a4c8 4e800020
Hyrule Maze
16a4c8 branched into from 80016d084
Function 67c98 controls initializing spawn positions x/y coords into player and other character data offset related things
-executed at beginning of match and after death, about to respawn
****************************************************
* Custom Spawn Points Function - 20XX Spawn Points *
****************************************************
**NEW 20XX Spawn Points
- updated 7/18/15
- need to add in legal stages under the NEUTRAL SPAWNS flag check
- first 3 bits of the custom stage flag refer to the spawn points (so a max of 7 spawns)
- if first three bits = 0 then no custom spawns occur
- Nana and Popo spawn 10 meleemeters apart, offset 5 and -5 from xcoord spawn point
inject @ 67cf4
- r0 = 0xff at this point, will need to restore if written over
- r3 is good to use
lis r3,0x8048
lbz r3,-0x62D0(r3) #load menu controller major
cmpwi r3,0x1c # is this training mode?
beq- GO_SPAWN
lis r15,0x801a
ori r15,r15,0x4340 # load function: MenuController_CheckSinglePlayer
mtlr r15
blrl
cmpwi r3,1 # if in single player, skip all this
beq- END
GO_SPAWN:
lis r19,0x8040
lbz r17,-0x5d1b(r19)# load custom stage flag (ex. hyrule stage number)
cmpwi r17,0xff # ff is flag for ignore spawns even if stage is in custom spawn list
beq- END
rlwinm r17,r17,0,29,31 # extract out custom spawn bits (first 3 bits)
lis r16,0x8047
lwz r15,-0x493C(r16)# load match frame count @ 8046b6c4
cmpwi r15,0 # check if at beginning of match
bne- END
lhz r15,-0x248A(r16) # load stage ID from 8046DB76
##CUSTOM EXCEPTION FOR LAGLESS FOD###
#cmpwi r15,2 # is stage fountain of dreams?
#bne- CONTINUE_SPAWN
#lis r18,0x801d
#lhz r18,-0x4170(r18)
#cmpwi r18,0x4800 # if lagless, no plat FoD is on
#bne- CONTINUE_SPAWN
#li r17,1 # make second custom spawn happen
CONTINUE_SPAWN:
lis r18,0x8000
ori r18,r18,0x4224 # 8004224 = -0x8 from pointer table start
NEUTRAL_START_CHECK:
#neutral starts are first entries in spawn table
lwz r19,-0x5C6C(r19)# load neutral spawn points flag
cmpwi r19,0
bne- POINTER_REPEAT
# if neutral start off...
cmpwi r17,0 # are spawn bits present?
bne- POINTER_REPEAT # if so, make spawns happen
addi r18,r18,0x30 # skip first 6 stages in list (legal stages, no pokemon)
POINTER_REPEAT:
lwzu r19,8(r18) # load custom spawn stage ID
cmpwi r19,0 # if null, end check loop
beq- END
cmpw r19,r15 # compare current stage to custom spawn stage flag
bne- POINTER_REPEAT
subi r16,r16,0x4925 # get r16 to P1's spawn ID byte (8046b6db, players are 0xe apart)
lwz r18,4(r18) # load specific stage spawn custom offsets address
mulli r17,r17,0x20 # stage spawn values are 0x20 apart
add r18,r18,r17 # get to this spawn
SPAWN_EXECUTE:
lbz r15,0xc(r27) # load player port number
lis r17,0x8048
lbz r17,-0x62D0(r17)#load menu controller major
cmpwi r17,0x1c # is this training mode?
beq- SPAWN_EXECUTE_FOR_REAL
mulli r17,r15,0xe # spawn IDs are 0xE apart
lbzx r15,r17,r16 # load spawn ID
cmpwi r15,0xFF # is default spawn point?
beq- END # skip if so, for safety
SPAWN_EXECUTE_FOR_REAL:
mulli r16,r15,0x8 # player [custom] spawns are 0x8 apart (X & Y coord = 0x8 length)
add r16,r16,r18
SPAWN_END:
FACING_DIRECTION:
lis r18,0x3f80 # default face right
cmpwi r15,1 # is this P2 spawn location?
beq- FACE_LEFT
cmpwi r15,2 # is this P3 spawn location?
bne- END_FACING
FACE_LEFT:
lis r18,0xbf80
END_FACING:
stw r18,0x2c(r27) #store facing direction
lfs f0,0x2c(r27) # load facing directio
lfs f1,-0x10f0(r2) # load float 5 (for ice climbers)
fmuls f1,f1,f0
lwz r18,0x4(r27) # load internal char ID
lfs f0,4(r16) # load custom y coord spawn point
stfs f0,0x10(sp) # store custom y coord spawn point
lfs f0,0(r16) # load custom X coord spawn point
cmpwi r18,0xa # Popo?
bne- NANA_CHECK
fadds f0,f0,f1
NANA_CHECK:
cmpwi r18,0xb # Nana?
bne- STORE_X
fneg f1,f1
fadds f0,f0,f1
STORE_X:
stfs f0,0xc(sp) # store custom X coord
END:
li r0,0xff # default register value at function start
lfs f0,0xc(sp) # default code line
***********************************************
* Neutral Start Spawn Points for Legal Stages *
***********************************************
Fountain of Dreams = 3fa600 in DOL (contains two, second is for no plats)
P1:
X = -41.25 = c2250000
Y = 21 = 41a80000
P2:
X = 41.25 = 42250000
Y = 27 = 41d80000
P3:
X = 60 = 42700000
Y = 5 = 40a00000
P4:
X = -60 = c2700000
Y = 5 = 40a00000
Pokemon Stadium
- none needed. spawns are good as long as P1&P4 are on a team
Yoshi's Story = 0x3fa640 in DOL
P1:
X = -42 = c2280000
Y = 27.453487 = 41dba0be
P2:
X = 42 = 42280000
Y = 28 = 41e00000
P3:
X = 42 = 42280000
Y = 5 = 40a00000
P4:
X = -42 = c2280000
Y = 5 = 40a00000
Battlefield = 0x3fa5c0 in DOL (contains 2 spawns, second is for custom plats)
P1:
X = -38.799999 = c21b3333
Y = 35.200001 = 420ccccd
P2:
X = 38.799999 = 421b3333
Y = 35.200001 = 420ccccd
P3:
X = 38.799999 = 421b3333
Y = 5 = 40a00000
P4:
X = -38.799999 = c21b3333
Y = 5 = 40a00000
Dreamland 64 = 3fa580 in DOL (contains 2 spawns, second is for hacked DL)
P1:
X = -46.599998 = c23a6666
Y = 37.221500 = 4214e2d1
P2:
X = 47.389099 = 423d8e70
Y = 37.321503 = 42154938
P3:
X = 47.389099 = 423d8e70
Y = 5 = 40a00000
P4:
X = -46.599998 = c23a6666
Y = 5 = 40a00000
Final Destination = 0x3fa660 in DOL
P1:
X = -60 = c2700000
Y = 10 = 41200000
P2:
X = 60 = 42700000
Y = 10 = 41200000
P3:
X = 35 = 420c0000
Y = 10 = 41200000
P4:
X = -35 = c20c0000
Y = 10 = 41200000
Kongo Jungle 64 = 3fa560 in DOL
P1:
X = -58 = c2680000
Y = 7 = 40e00000
P2:
X = 58 = 42680000
Y = 7 = 40e00000
P3:
X = 21 = 41a80000
Y = 0 = 00000000
P4:
X = -21 = c1a80000
Y = 0 = 00000000
---------------------------------------
Hyrule Maze 20XX Spawn Points:
NOTE: These have changed after increasing the scale of the stage by 1.25
(0) TOP LEFT [reverse battlefield]
P1
X: -101 = c2ca0000
Y: 96 = 42c00000
P2
X: -32 = c2000000
y: 96 = 42c00000
P3
X: -32 = c2000000
Y: 155 = 431b0000
P4
X: -101 = c2ca0000
Y: 155 = 431b0000
(1) BOT LEFT [angled down]
P1
X: -119 = c2ee0000
Y: -195 = c3430000
P2
X: -58 = c2680000
y: -195 = c3430000
P3
X: -54 = c2580000
Y: -226 = c3620000
P4
X: -123 = c2f60000
Y: -226 = c3620000
(2) BOT RIGHT [single mid platform]
P1
X: 467 = 43e98000
Y: -333 = c3a68000
P2
X: 534 = 44058000
y: -333 = c3a68000
P3
X: 548 = 44090000
Y: -333 = c3a68000
P4
X: 450 = 43e10000
Y: -333 = c3a68000
(3) MID BOT RIGHT [two flat platforms]
P1
X: 678 = 44298000
Y: -63 = c27c0000
P2
X: 745 = 443a4000
y: -63 = c27c0000
P3
X: 745 = 443a4000
Y: -95 = c2be0000
P4
X: 678 = 44298000
Y: -95 = c2be0000
(4) TOP BOT RIGHT [angled up]
P1
X: 567 = 440dc000
Y: 128 = 43000000
P2
X: 635 = 441ec000
y: 128 = 43000000
P3
X: 635 = 441ec000
Y: 96 = 42c00000
P4
X: 567 = 440dc000
Y: 96 = 42c00000
(5) TOP RIGHT [battlefield style]
P1
X: 526 = 44038000
Y: 269 = 43868000
P2
X: 594 = 44148000
y: 269 = 43868000
P3
X: 594 = 44148000
Y: 239 = 436f0000
P4
X: 526 = 44038000
Y: 239 = 436f0000
-----------------
Mushroom Kingdom Adventure 20XX Spawn Points
P1
X: 542 = 44078000
Y: 190 = 433e0000
P2
X: 608 = 44180000
Y: 190 = 433e0000
P3
X: 608 = 44180000
Y: 164 = 43240000
P4
X: 542 = 44078000
Y: 164 = 43240000
Camera Stuff:
camera left = -150 = c3160000
camera right = 150 = 43160000
camera top = 87.5 = 42af0000
camera bottom = -100 = c2c80000
Good Zoom value?: 43160000 = 150
left blastzone = -200 = c3480000
right blastzone = 200 = 43480000
Top Blastzone: 160 = 43200000
(inbetween battlefield and Yoshi's Story)
Bottom Blastzone: -160 = c3200000
inject @ 80207abc
- gets executed when Yoshi's are about to spawn
lis r15,0x8047
ori r15,r15,0x9d30
lbz r15,0(r15)
cmpwi r15,2
bne- END
lis r15,0x8049
ori r15,r15,0xe6c8
lis r16,0xc316 #camera left limit
stw r16,0(r15)
lis r16,0x4316 #camera right limit
stw r16,4(r15)
stw r16,0x34(r15) #zoom
lis r16,0x42af #camera upper limit
stw r16,8(r15)
lis r16,0xc2c8 #camera bottom limit
stw r16,0xc(r15)
lis r16,0x3d4c
stw r16,0x20(r15)
lis r16,0x3e20
stw r16,0x24(r15)
lis r16,0x3f80
stw r16,0x28(r15)
stw r16,0x2c(r15)
lis r16,0x3fa0
stw r16,0x30(r15) #camera speed
lis r16,0xc348 #left blastzone
stw r16,0x74(r15)
lis r16,0x4348 #right blastzone
stw r16,0x78(r15)
lis r16,0x4320 #top blastzone
stw r16,0x7c(r15)
lis r16,0xc320 #bottom blastzone
stw r16,0x80(r15)
END:
lwz r0,0xc(sp)
-------------------------
Random
209528 - gets executed when hyrule maze stage is switching. part of huge function
209018 comparison for starting stage transf?
P1
X: -119 = c2ee0000
Y: -196 = c3440000
----------------------------------
Hyrule Maze BlastZone Camera Fix
Inject @ 209020
- injected at function that gets executed when stage transf is happening
lis r15,0x8047
ori r15,r15,0x9d30
lbz r15,0(r15)
cmpwi r15,2
bne- END
lis r15,0x8049
ori r15,r15,0xe6c8
lis r16,0xc320 #camera left limit
stw r16,0(r15)
lis r16,0x4320 #camera right limit
stw r16,4(r15)
lis r16,0x42c8 #camera upper limit
stw r16,8(r15)
lis r16,0xc2a4 #camera bottom limit
stw r16,0xc(r15)
lis r16,0x3f80
stw r16,0x30(r15) #lower camera speed
lis r16,0xc360 #left blastzone
stw r16,0x74(r15)
lis r16,0x4360 #right blastzone
stw r16,0x78(r15)
lis r16,0x4324 #top blastzone
stw r16,0x7c(r15)
lis r16,0xc310 #bottom blastzone
stw r16,0x80(r15)
END:
subi r26,r29,189
------------------------------
Auto Restart Hyrule Maze if Necessary
inject @ 801a4164
#load match frame counter
lis r15,0x8046
ori r15,r15,0xb6c4
lwz r15,0(r15)
cmpwi r15,0
bne- END
lis r15,0x8048
lhz r15,0x0686(r15)
#is stage hyrule maze?
cmpwi r15,0x3f
bne- END
li r15,2
stb r15,3(r31)
END:
li r0,0
---------------------
Fix Hyrule Camera Jerk During Respawn
04167210 60000000
04167214 60000000
For DOL mod,
Inject @ 8016720C
#default code line
lfs f2,0x20(sp)
lis r15,0x8047
ori r15,r15,0x9d30
lbz r15,0(r15)
cmpwi r15,2
bne- END
#branch to 80167218
nop
END:
#branch back to 80167210
nop
Nah, nvm. Let's just put it in MnSlChr
****************************
* In-Game Random Function? *
****************************
8025fb50 Executed when opening a CPU slot (to get random character)
0x80380580
- r3 input is max random value (like 1+max)?
- r13 = 4db6a0
- outputs random value in r3, that is between 0x0000 and input r3 value
******************************
* Trophy Stage Custom Spawns *
******************************
P1
X = -44.904125 = c2339dd3
Y = -27.298401 = c1da6320
P2
X = 44.904125 = 42339dd3
Y = -27.298401 = c1da6320
P3
X = 44.904125 = 42339dd3
Y = -54.486713 = c259f265
P4
X = -44.904125 = c2339dd3
Y = -54.486713 = c259f265
******************************
* Pokemon No Transform Logic *
******************************
Function 801d4548 controls Pokemon stadium transformations.
Have it look at custom stage flag and if not zero, don't transform.
Inject @ 801d4548
lis r15,0x803f
ori r15,r15,0xa2e5
lbz r15,0(r15)
cmpwi r15,0
beq- END_NORMAL
NO_TRANSFORM:
blr
END_NORMAL:
mflr r0
*******************
* Invisible Items *
*******************
80268b48 - lwz r0,28(r1)
r31 open for use
li r31,0
cmpwi r3,0
beq- END
stw r31,0x1c(r3)
END:
lwz r0,28(r1)
-works.-
For 20XX, flag @ 3fa224 = invisible items
lis r31,0x803f
ori r31,r31,0xa224
lwz r31,0(r31)
cmpwi r31,0
beq- INVISIBLE_OFF
li r31,0
cmpwi r3,0
beq- INVISIBLE_OFF
stw r31,0x1c(r3)
INVISIBLE_OFF:
lwz r0,28(r1)
------------------
*********************************************
* No Single Player Spawns if in Multiplayer *
*********************************************
No Link/Yoshi Team Spawns - keeps these levels from freezing
0416a4c8 4e800020
Now, let's have it check the multiplayer yes/no bit and only "blr" if in multiplayer.
inject @ 8016a4c8
lis r15,0x8047
ori r15,r15,0x9d30
lbz r15,0(r15)
cmpwi r15,2
bne- END
blr
END:
#Default code line
mflr r0
Works.
******************************
* Doraki Edge Angle Limit *
******************************
(-94.09, -54.4985)
(-89.9821,-100)
Testing coords. Gives angle of 84.84 degrees.
Basically,
--------------------
\ x)
\
\
\
\
if x > 85 degrees then Doraki will take effect.
******************
* Button Presses *
******************
P1 - 4c1fac
0x0 = all buttons being pressed
0x4 = buttons on last frames?
0x8 = new buttons pressed this frame, else 0
Each player is 0x44 apart!
XXXXYYYY
0xXXXX = analog joystick/c-stick -> digital values
-ignore for now, holding opposite cardinal directions cancel each other out?
0xYYYY -> what buttons are pressed?