Skip to content

Commit

Permalink
add asm src
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Reder committed Jan 7, 2019
1 parent 12e131c commit a3455d3
Show file tree
Hide file tree
Showing 6 changed files with 4,668 additions and 0 deletions.
117 changes: 117 additions & 0 deletions src/asm/909000.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
.org 0x7f00
!main:
addiu sp, sp, $ffe4
sw ra, $14 (SP)
lui t0, $8039
lw t2, $be28 (T0)
beq t2, r0, !end
nop
lw t3, $0004 (T2)
lui at, $8016
ori at, at, $f5b0
bne t3, at, !end
nop
lui t0, $80ff
lbu t2, $5ff4 (T0)
addiu at, r0, $8
bne t2, at, !end
nop
ori t1, t0, $1b00
or a3, r0, r0
or t4, r0, r0
!Loopcheck:
lbu t3, $771a (T0)
slt at, t3, a3
bne at, r0, !endofloop
nop
lbu t4, $7700 (T0)
or a3, t3, r0
!endofloop:
addiu t0, t0, $0100
bne t0, t1, !Loopcheck
nop
or t5, a3, r0
sw a3, $0018 (SP)
or a3, t4, r0
lui t0, $8091
lbu t0, $02ff (T0)
bne t5, t0, !noplayerwin
nop
addiu a0, r0, $0020
addiu a1, r0, $00d1
lui a2, $8091
jal $2d62d8
ori a2, a2, $02a0
beq r0, r0, !reunition
nop


!noplayerwin:
addiu a0, r0, $0020
addiu a1, r0, $00d1
lui a2, $8091
jal $2d62d8
ori a2, a2, $0260


lw a3, $0018 (SP)
addiu a0, r0, $0020
addiu a1, r0, $00b9
lui a2, $8091
jal $2d62d8
ori a2, a2, $0280
!reunition:
lui t0, $80ff
lbu t1, $7714 (T0)
lui at, $8033
sh t1, $ddf8 (AT)

lui t1, $8034
sw r0, $afa0 (T1)
jal $ffa000
nop
jal $910d00
lui t0, $801a
!end:
lw ra, $14 (SP)
jr ra
addiu sp, sp, $1c

.org 0x7d00
!nops:
sb r0, $7860 (T0)
sb r0, $7870 (T0)
sb r0, $7880 (T0)
sb r0, $7890 (T0)
sb r0, $78a0 (T0)
sb r0, $78b0 (T0)
sb r0, $78c0 (T0)
sb r0, $78d0 (T0)
sb r0, $78e0 (T0)
sb r0, $78f0 (T0)
sb r0, $7900 (T0)
sb r0, $7910 (T0)
sb r0, $7920 (T0)
sb r0, $7930 (T0)
sb r0, $7940 (T0)
sb r0, $7950 (T0)
sb r0, $7960 (T0)
sb r0, $7970 (T0)
sb r0, $7980 (T0)
sb r0, $7990 (T0)
sb r0, $79a0 (T0)
sb r0, $79b0 (T0)
sb r0, $79c0 (T0)
sb r0, $79d0 (T0)
sb r0, $79e0 (T0)
sb r0, $79f0 (T0)
sb r0, $7a00 (T0)
sb r0, $7a10 (T0)
sb r0, $7a20 (T0)
sb r0, $7a30 (T0)
sb r0, $7a40 (T0)
sb r0, $7a50 (T0)
sb r0, $7a60 (T0)
sb r0, $7c40 (T0)
jr ra
sb r0, $7c50 (T0)
182 changes: 182 additions & 0 deletions src/asm/characterconverter.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
//yoshi is at 80570000 to 80590E00 model size 2ac0

.org 0x861c0
!hook:
addiu sp, sp, $ffe8
sw ra, $14 (SP)
jal $2ca6d0
nop
!endhook:
lw ra, $14 (SP)
jr ra
addiu sp, sp, $0018

.org 0x856d0
!main:
addiu sp, sp, $ffe8
sw ra, $14 (SP)
lui a2, $8040
ori a2, a2, $0000 //RAM location, update 369F40 to write this in for your own characters
lui t0, $800f
ori t0, t0, $0860
sub a3, a2, t0

lui t0, $8033
lw t0, $DDC4 (T0)
lw t3, $0008 (T0)
bne t3, r0, !nonewmodelset
nop
lw t1, $0004 (T0)
or at, a2, r0
addiu t9, at, $7ce8 //model size
!loop:
lw t2, $0000 (T1)
lui t3, $ffff
and t3, t2, t3
lui t4, $800f
bne t3, t4, !skipthisasbiufbau9sif
nop
add t2, t2, a3
!skipthisasbiufbau9sif:
sw t2, $0000 (AT)
addiu at, at, $4
addiu t1, t1, $4
bne t9, at, !loop
nop
lui at, $8033
lw at, $ddc4 (AT)
or t0, a2, r0
sw t0, $0008 (at)
nop
jal $277f50
lui a0, $0400
addiu a3, a2, $2000
//addiu a3, a3, $4000
lui at, $0003
ori at, at, $6000 //bank 04 size
add a1, a3, at
!copyloop:
lw t2, $0000 (v0)
sw t2, $0000 (A3)
addiu a3, a3, $4
addiu v0, v0, $4
bne a1, a3, !copyloop
nop
or a0, a2, r0
addiu a1, a2, $3000 //model size again
!loppsaf:
lw t2, $0000 (A0)
lui at, $ffff
and at, at, t2
lui t3, $0400
beq t3, at, !fixthispointer
nop
lui t3, $0401
beq t3, at, !fixthispointer
nop
lui t3, $0403
beq t3, at, !fixthispointer
nop
lui t3, $0402
bne t3, at, !dontfix
nop
!fixthispointer:
jal $30FFF8
nop
!dontfix:
addiu a0, a0, $4
bne a0, a1, !loppsaf
nop

!nonewmodelset:
lui a0, $8034
lhu a0, $afa0 (A0)
andi a0, a0, $0020
beq a0, r0, !end
nop
addiu a1, r0, $0002
lui a0, $8036
lw a0, $1158 (A0)
lui a2, $1300
jal $29edcc
addiu a2, a2, $2a48
!end:
lw ra, $14 (SP)
jr ra
addiu sp, sp, $018

//803e92b0
.org 0xCAFF8
!fixDL:
addiu sp, sp, $ffe8
sw ra, $14 (SP)
addiu a3, a2, $2000
//addiu a3, a3, $4000
lui at, $00ff
ori at, at, $ffff
and a3, a3, at
lui at, $0400
sub a3, a3, at
add t2, t2, a3
sw t2, $0000 (A0)
lui t3, $8000
or t3, t3, t2
jal $3145D4
nop
lw ra, $14 (SP)
jr ra
addiu sp, sp, $0018


.org 0xCF5D4
!dasfihasbuf:
addiu sp, sp, $ffe8
sw ra, $14 (SP)
!loopfixDL:

lw t4, $0000 (T3)
lui at, $ff00
and at, at, t4
lui t5, $0300
beq t5, at, !fixpointer
nop
lui t5, $0400
beq t5, at, !fixpointer
nop
lui t5, $fd00
bne t5, at, !Notexturefix
nop
!fixpointer:
lw t7, $0004 (t3)
lui at, $ff00
and at, at, t7
beq at, r0, !Notexturefix
nop
add t7, t7, a3
sw t7, $0004 (T3)
!Notexturefix:
sw t3, $0010 (SP)
lui t5, $0600
bne t5, at, !nosubcall
nop
lw t2, $0004 (t3)
lui at, $ff00
and at, at, t2
beq at, r0, !nosubcall
nop
add t2, t2, a3
sw t2, $0004 (T3)
lui t3, $8000
jal $3145D4
or t3, t3, t2
!nosubcall:
lw t3, $0010 (SP)
!endoftextureloop:
lw t2, $0008 (T3)
lui at, $b800
addiu t3, t3, $0008
bne t2, at, !loopfixDL
nop
lw ra, $14 (SP)
jr ra
addiu sp, sp, $0018
Loading

0 comments on commit a3455d3

Please sign in to comment.