Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .psp
- .open "EBOOT.BIN", 0x8804000
- .headersize 0x8803F40
- //"Detective" menuitem on triangle menu
- .org 0x0881C660
- addiu v0,v1,-0xB4D4 ;relocation fix, real operand is -0x74D4
- addiu a1,sp,0x10
- @@branch2:
- lb a0,0x0(v0)
- addiu v0,v0,0x1
- sb a0,-0x4000(a1) ;relocation fix, real operand is 0x0
- bne a0,zero,@@branch2
- addiu a1,a1,0x1
- nop
- nop
- addiu s4,sp,0x10
- addiu s3,sp,0x14
- li s2,-0x1
- nop
- j 0x0881C140-0x08804000 ;relocation fix- armips arithmetic parser example
- nop
- //Casino fix
- .org 0x0898A4CC
- swl a1, 0x7(sp)
- //VWF
- .org 0x089E8200
- lui v1, 0x406 ;change to rectangle draw (from triangle_strip)
- //Rewrite vertex routine to accomodate rectangles
- .org 0x0898B2F4
- swc1 f5,0x4(t0); texcoord_y-origin
- .org 0x0898B330
- swc1 f4,0x4(a2); texcoord_y-dest
- .org 0x0898B338
- swc1 f6,0x0(a2); texcood_x-dest
- .org 0x0898B2C4
- sh a1,0x0(s5); position x-dest
- .org 0x0898B2E0
- sh ra,0xE(t0); position y-origin
- .org 0x0898B300
- sh v0,0x0(s4); position y-dest
- //VWF insert point
- .org 0x0898B2A4
- j 0x08A5E420
- nop
- //VWF routine
- .org 0x08A5E420
- li a0,0x08A661D0 ;Load memory addr 0x08A661D0
- sw a1,0x0(a0) ;Save value
- lbu k1,0x0(a3) ;Load current character
- addiu a1,a0,0x10 ;Points to start of lookup table
- @@vwf_loop:
- lbu a2,0x0(a1) ;Load lookup table char
- beq a2,zero,@@vwf_exit ;Exit if dropped off the lookup table
- nop
- bnel k1,a2,@@vwf_loop ;Exit loop if match
- addiu a1,a1,0x2 ;Go to next char in lookup table
- lbu a2,0x1(a1) ;Load spacing value from lookup table
- nop
- seb a2,a2 ;For negative values
- addu a2,a2,s7 ;Adjust spacing
- sw a2,0x8(sp) ;Store spacing adjustment
- @@vwf_exit:
- lw a1,0x0(a0) ;Restore original a1 value
- addu a2,fp,s6 ;Replace insert point instruction
- j 0x0898B2AC ;Return
- mfc1 fp,f0 ;Replace insert point instruction
- //VWF lookup table
- .org 0x8A661E0
- .ascii " "
- .byte 0xFC
- .ascii "b"
- .byte 0x01
- .ascii "f"
- .byte 0xFE
- .ascii "l"
- .byte 0xFD
- .ascii "m"
- .byte 0x02
- .ascii "i"
- .byte 0xFD
- .ascii "j"
- .byte 0xFD
- .ascii "r"
- .byte 0xFF
- .ascii "t"
- .byte 0xFF
- .ascii ","
- .byte 0xFD
- .ascii "."
- .byte 0xFD
- .ascii "'"
- .byte 0xFC
- .ascii "!"
- .byte 0xFC
- .ascii "C"
- .byte 0x01
- .ascii "H"
- .byte 0x01
- .ascii "I"
- .byte 0xFC
- .ascii "M"
- .byte 0x02
- .ascii "O"
- .byte 0x01
- .ascii "<"
- .byte 0xFF
- .ascii ">"
- .byte 0xFF
- .ascii "("
- .byte 0xFF
- .ascii ")"
- .byte 0xFF
- .ascii "["
- .byte 0xFE
- .ascii "]"
- .byte 0xFE
- .ascii "-"
- .byte 0x01
- .close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement