Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .ps2
  2. .loadelf "SLPM_657.97"
  3.  
  4. .org 0x233608
  5.     jal Vwf_drop_blank
  6.     move a0, v0
  7.     nop
  8. .org 0x233850
  9.     jal Vwf_add_width
  10.    
  11. .org 0x3CCEB0
  12. .area 96
  13. Vwf_drop_blank:         ; move current x to the left
  14.     sh a0, @backup
  15.     la v0, width_table          ; get spacing on the left
  16.     addu v0, a0
  17.     lbu v0, -0x20(v0)
  18.     nop
  19.     andi v0, 0xf
  20.     mtc1 v0, $f0
  21.     nop
  22.     cvt.s.w $f0, $f0            ; convert int to float value
  23.     mul.s $f0, $f28             ; apply scaling
  24.     neg.s $f0, $f0              ; make negative
  25.     add.s $f27, $f0             ; subtract to current x
  26.     la v0, 0x334F40             ; **old code
  27.     jr ra
  28.     sll v1, a0, 1               ; **old code
  29.  
  30. @backup:
  31.     .dw 0
  32. .endarea
  33.  
  34. .org 0x3CCFA4
  35. .area 134
  36. Vwf_add_width:          ; increment current x with character width
  37.     lhu a0, @backup
  38.     la v0, width_table          ; get width
  39.     addu v0, a0
  40.     lbu v0, -0x20(v0)
  41.     nop
  42.     andi v1, v0, 0xf            ; left padding
  43.     sra v0, 4                   ; width
  44.     addu v0, v1
  45.     mtc1 v0, $f0
  46.     nop
  47.     cvt.s.w $f0, $f0            ; convert int to float value
  48.     mul.s $f0, $f28             ; apply scaling
  49.     jr ra
  50.     add.s $f27, $f0             ; current x += scaled width
  51. .endarea
  52.    
  53. .org 0x3CCF14
  54. .macro ch,left,width
  55.     .db left | (width << 4)
  56. .endmacro
  57.  
  58. width_table:
  59. .include "wtbl.s"
  60.  
  61. .close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement