03-27-2018, 10:22 PM (This post was last modified: 03-27-2018, 10:26 PM by shygoo.)
ceiling invis walls fix
//walls on no trianlge grounded 80255B9C
//walls on invis wall grounded 80255c44
//251708 writes new values for speed and rotation
//8026B5F4
//80256b24 returns 2 for invis walls and 0 if its fine?
//802560ac stores 2 on sü+0x18 which gets returned above, modfy this?
//8025634C decides that v0 is dead
//80380E8C seems to move mario, somehow resets his pos if hes above a ceiling
//802563D8 actually moves mario
//80256278 needs to be changed to branch if its a false alarm
//(make ceilings push mario outwards)
.org 0x112a0
!test:
jal $29BF64 //adds RA by AC if no ceiling available
nop
lw t0, $0050 (SP)
mtc1 r0, f18
lwc1 f16, $004c (T0)
c.le.s f18, f16
nop
bc1f $11308
nop
swc1 f18, $004c (T0)
03-30-2018, 09:01 PM (This post was last modified: 04-04-2018, 05:56 PM by Eddio 0141.
Edit Reason: mistakes mistakes a proof that i'm a human
)
code hook thing for armips
for compressed ROM (8mb one)
Code:
.headersize 0x80245000
; replaces segment 02 loader with code loader
.orga 0x3ac0
lui a0, 0x8037; copy to ram (80370000 [8703 line of codes free or 34812 bytes])
addiu a0, a0, 0x0000
lui t0, 0x007c ; rom address copy from (0x7cc6c0 for this)
ori a1, t0, 0xc6c0
jal 0x80278504
ori a2, t0, 0xc700 ; rom addresss copy to
jal execmycodeonce
nop
.orga 0x15F4
jal execeveryframe
nop
.headersize 0x7FBA3940
.orga 0x7cc6c0
execmycodeonce:
ADDIU SP, SP, 0xFFE8
SW RA, 0x14(SP)
lui t0, 0x0011; seg02 loader (NEED THIS OR GAME WON'T WORK)
addiu a1, t0, 0x8a40
addiu a2, t0, 0x4750
jal 0x802787d8
addiu a0, r0, 0x0002
; your code here that runs once at start up
LW RA, 0x14(SP)
JR RA
ADDIU SP, SP, 0x18
execeveryframe:
ADDIU SP, SP, 0xFFE4
SW RA, 0x14(SP)
; your code that runs everyframe here
lui t6, 0x8033; do not delete this
lw t6, 0xd568(t6); do not delete this as well
LW RA, 0x14(SP)
JR RA
ADDIU SP, SP, 0x1c
for extended rom (uncompressed)
Code:
.headersize 0x80245000
; replaces segment 02 loader with code loader
.orga 0x3ac0
lui a0, 0x8037; copy to ram (80370000 [8703 line of codes free or 34812 bytes])
addiu a0, a0, 0x0000
lui t0, 0x007c ; rom address copy from (0x7cc6c0 for this)
ori a1, t0, 0xc6c0
jal 0x80278504
ori a2, t0, 0xc700 ; rom addresss copy to
jal execmycodeonce
nop
.orga 0x15F4
jal execeveryframe
nop
.headersize 0x7FBA3940
.orga 0x7cc6c0
execmycodeonce:
ADDIU SP, SP, 0xFFE8
SW RA, 0x14(SP)
lui a1, 0x0080; seg02 loader (NEED THIS OR GAME WON'T WORK)
lui a2, 0x0082
ori a2, a2, 0xbb64
jal 0x802787d8
addiu a0, r0, 0x0002
; your code here that runs once at start up
LW RA, 0x14(SP)
JR RA
ADDIU SP, SP, 0x18
execeveryframe:
ADDIU SP, SP, 0xFFE4
SW RA, 0x14(SP)
; your code that runs everyframe here
lui t6, 0x8033; do not delete this
lw t6, 0xd568(t6); do not delete this as well
LW RA, 0x14(SP)
JR RA
ADDIU SP, SP, 0x1c
04-01-2018, 07:21 PM (This post was last modified: 04-02-2018, 04:58 AM by David.)
Always have "Exit Course" option available in the pause menu
Code:
// Modify part of function 0x802DCA88 to allow the "Exit course" option to always be avaliable in pause menu, no matter what action Mario is currently doing.
.orga 0x97B60
.fill 4*6, 0 // Replace 6 asm instructions with NOPs.
I converted a couple of Kaze's patches to armips earlier and thought they might be useful to others. I also fixed his collision optimization patch so that it doesn't rely on extended boundaries.
here i've revisited my code hooker and changed it into something much more better
code
Code:
.headersize 0x80245000
.orga 0x396c; here it hooks code copy to ram
lui a0, 0x8036
ori a0, a0, 0x7500; 0x7cc6c0 - end of all codes into 0x80367500
lui t0, 0x7c
ori a1, t0, 0xc6c0
ori a2, t0, endcopy
jal 0x80278504
nop
jal execonce
nop
(03-27-2018, 11:32 PM)bacon_consumes_all Wrote: I made the checkpoints into star coins. There are a bunch of NOPs at the end because Nintendo sucks at optimizing.
wenis
//only 3 checkpoints to spawn star
.orga 0xAE0CC
ADDIU T0, R0, 0x03 // hiddenstarinit
(03-27-2018, 11:32 PM)bacon_consumes_all Wrote: I made the checkpoints into star coins. There are a bunch of NOPs at the end because Nintendo sucks at optimizing.
wenis
//only 3 checkpoints to spawn star
.orga 0xAE0CC
ADDIU T0, R0, 0x03 // hiddenstarinit
1. It's called .ppf, not .pff
2. You can easily assemble this code with Armips GUI, you can find it here: https://github.com/DavidSM64/SimpleArmipsGui/releases
All you have to do is load the rom and code, and press assemble.
Currently Making:
Super Mario Adrift - A mini hack of Super Mario 64 which I am making with the SM64 ROM Manager. Four 7 star levels are planned, and it will feature an improved camera, expanded soundbank, and at least 28 stars.
10-18-2018, 12:41 PM (This post was last modified: 10-18-2018, 12:59 PM by David.)
Code:
// Increases max draw distance by making the far value from the geo layout 0xA command an unsigned value.
// The max value you can use is 0xFF9C, since a higher value seems to create a weird visual glitch on console.
gs code that allows you to preview any music track in file select or the demo screen. A to go up a track, B to go down a track. L to play the music. Sound will die if you switch between two tracks that the game doesn't like
asm version attached
edit: original version only worked without ext boundaries, I have since made a new version for ext boundaries but I am not sure that all editor/rom manager versions use the same offset, so if it doesn't work you will have to go into your rom with debugger and look around 80381710 in ram. You will want to set the offset for the second .orga in the ext boundaries to match the line after the two add.s commands that appear in a row.