Well, I worked as much as I could on this last night and this morning and got somewhere. If someone else wants to use the code, here it is:
Code.headersize 0x80245000
; notes about the spaces to put code in
; there is space in rom from 0x7cc6c0 to 0x800000
; there is space in ram from 0x80367500 to 0x80378700 (can fit in 17536 lines)
.definelabel code_rom, 0x7cc6c0; where your code goes in the rom
.definelabel code_ram, 0x80367500; where your code goes in the ram
.orga 0x396c; here it copies code into the ram at start up
li a0, code_ram
li a1, code_rom
li.u a2, code_end_copy
jal 0x80278504
li.l a2, code_end_copy
jal execonce
nop
.orga 0xfd354
jal execeveryframe
nop
.orga 0xde270; responsible for running every VI frames
b 0x803232a4
sw t4, 0x7110(at)
.skip 28
lw ra, 0x1c(sp)
lw s0, 0x18(sp)
jr ra
addiu sp, sp, 0x38
lb s7, code_ram
nop
beqz s7, @@skip_vi_frames
nop
add s5, r0, ra
jal execviframes
nop
@@skip_vi_frames:
b 0x80323278
lui at, 0x8036
.headersize (code_ram - code_rom)
.orga code_rom
execonce:
addiu sp, sp, 0xffec; don't get rid of those extra things. they are needed
sw a0, 0x4(sp)
sw a1, 0x8(sp)
sw ra, 0xc(sp)
NOP
; executes once here at start up
lw a0, 0x4(sp); don't get rid of those extra things. they are needed
lw a1, 0x8(sp)
or a0, r0, r0
jal 0x80277ee0
lui a1, 0x8000
lui a0, 0x8034
lui a1, 0x8034
addiu a1, a1, 0xb044
addiu a0, a0, 0xb028
jal 0x803225a0
addiu a2, r0, 0x1
lw ra, 0xc(sp)
jr ra
addiu sp, sp, 0x14
execeveryframe:
addiu sp, sp, 0xffe8; don't get rid of those extra things. they are needed
sw ra, 0x14(sp)
LH T2, 0x8033B21A //sets T2 to current star count
LW T6, 0x8033B17C //sets T6 to mario's current behavior
punch:
LI T0, 1 //sets T0 to needed stars
LI T3, 0x00800380 //sets T3 to punch behavior
BEQ T6, T3, act
NOP
LI T3, 0x00800457 //sets T3 to running punch behavior
BEQ T6, T3, act
NOP
jump:
LI T0, 2 //sets T0 to needed stars
LI T3, 0x03000880 //sets T3 to jump behavior
BEQ T6, T3, act
NOP
longJump:
LI T0, 3 //sets T0 to needed stars
LI T3, 0x03000888 //sets T3 to long jump behavior
BEQ T6, T3, act
NOP
sideJump:
LI T0, 4 //sets T0 to needed stars
LI T3, 0x01000887 //sets T3 to side jump behavior
BEQ T6, T3, act
NOP
doubleJump:
LI T0, 5 //sets T0 to needed stars
LI T3, 0x04000472 //sets T3 to double jump behavior
BEQ T6, T3, act
NOP
dive:
LI T0, 6 //sets T0 to needed stars
LI T3, 0x0188088A //sets T3 to dive behavior
BEQ T6, T3, act
NOP
LI T3, 0x018008AA //sets T3 to sliding kick behavior
BEQ T6, T3, act
NOP
groundPound:
LI T0, 7 //sets T0 to needed stars
LI T3, 0x008008A9 //sets T3 to groundPound behavior
BEQ T6, T3, act
NOP
hitWall:
LI T0, 8 //sets T0 to needed stars
LI T3, 0x010208B6 //sets T3 to wall hit behavior
BEQ T6, T3, act
NOP
b noAct
NOP
act:
BLT T2, T0, stop
NOP
BEQ T3, 0x00800380, jump
NOP
BEQ T3, 0x03000880, longJump
NOP
BEQ T3, 0x03000888, sideJump
NOP
BEQ T3, 0x01000887, doubleJump
NOP
BEQ T3, 0x04000472, dive
NOP
BEQ T3, 0x0188088A, groundPound
NOP
BEQ T3, 0x008008A9, hitWall
NOP
stop:
LUI T3, 0x8034
LW T4, 0xB17C(T3) //T4 = mario's current state
LI T5, 0x00020463 // T5 = mario knocked down behavior
SW T5, 0xB17C(T3)
NOP
BEQ T3, 0x00800380, jump
NOP
BEQ T3, 0x03000880, longJump
NOP
BEQ T3, 0x03000888, sideJump
NOP
BEQ T3, 0x01000887, doubleJump
NOP
BEQ T3, 0x04000472, dive
NOP
BEQ T3, 0x0188088A, groundPound
NOP
BEQ T3, 0x008008A9, hitWall
NOP
noAct:
NOP
addiu t6, r0, 0x1; don't get rid of those extra things. they are needed
lui at, 0x8039
lw ra, 0x14(sp)
jr ra
addiu sp, sp, 0x18
execviframes:
addiu sp, sp, 0xffe8
sw ra, 0x18(sp)
sw s5, 0x14(sp)
NOP
; your code that runs every vi frame here
lw ra, 0x18(sp)
addiu sp, sp, 0x18
jr ra
lw ra, 0x14(sp)
code_end:
.definelabel code_end_copy, (code_end - (code_ram - code_rom))
my main issues were the size of my code, but the worlds largest wrapper fixed that. Everything below "execeveryframe:" and above "addiu t6, r0, 0x1" are my custom code, everything else is a hook that actually allows the code to run without breaking the memory of the game. Changing the behaviors and needed stars is pretty simple, anything else and you're on your own, but hopefully this helps someone and they don't have to work for eight hours for such a simple change.