r57shell

WWF Wrestlemania Arcade hack

Sep 22nd, 2013
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ASM68k /p mania.asm,mania_new.bin
  2.  org $0
  3.  incbin mania.bin
  4.  
  5.  org ($400000-$332)
  6.  
  7.  ; custom code
  8. tournament_check:
  9.  bpl.s   loc_1193C
  10. do_tournament_again:
  11.  move.l  #$FFABEA,($FFFFABFA).w
  12.  jmp $11920
  13.  
  14. loc_1193C:
  15.  cmp.b   #3,($FFFFA8AF)
  16.  bne.s   tournament_check_solo
  17.  cmp.w   #2,($FFFFAB2A)
  18.  bcs.s   tournament_end
  19.  jmp     $1193C
  20.  
  21. tournament_check_solo:
  22.  cmp.w   #3,($FFFFAB2A)
  23.  bcs.s   tournament_end
  24.  jmp     $1193C
  25.  
  26. tournament_end:
  27.  jmp $1198C
  28.  
  29. tournament_dec:
  30.  move.w  d0,-(sp)
  31.  subq.w  #1,d7
  32.  move.w  d7,d0
  33.  andi.w  #$F,d0
  34.  cmp.w   #$F,d0
  35.  bne.s   tournament_dec_skip
  36.  sub.w   #($F-$9),d7
  37. tournament_dec_skip:
  38.  move.w  (sp)+,d0
  39.  
  40.  move.w  d7,($FFFFAB2A).w
  41.  rts
  42.  
  43. skip_credits:
  44.  moveq   #0,d7
  45.  addq.w  #1,$24(a5)
  46.  move.w  $24(a5),d7
  47.  btst.b  #7,($FFF4A9)
  48.  bne.s   do_skip_credits
  49.  btst.b  #7,($FFF4AB)
  50.  bne.s   do_skip_credits
  51.  jmp $28298
  52.  
  53. do_skip_credits:
  54.  jmp $28338
  55.  
  56. draw_tournament_setting:
  57.  jsr $1053E
  58.  cmpi.w #0,$20(a5) ; player?
  59.  bne.s  draw_tournament_setting_pl2
  60.  move.l #$61900003,($C00006)
  61.  bra.s  draw_tournament_setting_dig
  62.  
  63. draw_tournament_setting_pl2:
  64.  move.l #$61B80003,($C00006)
  65.  
  66. draw_tournament_setting_dig:
  67.  ; high
  68.  clr.w  d7
  69.  move.b ($FF5FF0),d7
  70.  lsr.w  #4,d7
  71.  add.w  #$8780,d7
  72.  move.w d7,($C00000)
  73.  ; low
  74.  clr.w  d7
  75.  move.b ($FF5FF0),d7
  76.  and.w  #$F,d7
  77.  add.w  #$8780,d7
  78.  move.w d7,($C00000)
  79.  
  80.  cmpi.w #0,$20(a5) ; player?
  81.  bne.s  draw_tournament_setting_joy2
  82.  move.w ($FFFFF4BA).w,d7
  83.  bra.s  draw_tournament_setting_joy
  84.  
  85. draw_tournament_setting_joy2:
  86.  move.w   ($FFFFF4BC).w,d7
  87.  
  88. draw_tournament_setting_joy:
  89.  btst   #10,d7
  90.  bne    change_left
  91.  btst   #8,d7
  92.  bne    change_right
  93. draw_tournament_setting_ret
  94.  jmp $26C7E
  95.  
  96. change_left:
  97.  cmp.b #3,($FF5FF0)
  98.  beq draw_tournament_setting_ret
  99.  sub.b #1,($FF5FF0)
  100.  move.b ($FF5FF0),d7
  101.  and.b  #$F,d7
  102.  cmp.b  #$F,d7
  103.  bne draw_tournament_setting_ret
  104.  sub.b  #$6,($FF5FF0)
  105.  bra.s draw_tournament_setting_ret
  106.  
  107. change_right:
  108.  cmp.b  #$99,($FF5FF0)
  109.  beq draw_tournament_setting_ret
  110.  add.b  #1,($FF5FF0)
  111.  move.b ($FF5FF0),d7
  112.  and.b  #$F,d7
  113.  cmp.b  #$A,d7
  114.  bne draw_tournament_setting_ret
  115.  add.b  #$6,($FF5FF0)
  116.  bra draw_tournament_setting_ret
  117.  
  118. ; tournament_setup:
  119.  ; move.l  ($FFFFABE2).w,($FFFFABEA).w ; init 8 players tournament
  120.  ; move.l  ($FFFFABE6).w,($FFFFABEE).w
  121.  ; move.w  #$FFFF,($FFFFABF2).w
  122.  ; rts
  123.  
  124. tournament_setup_counter:
  125.  move.l  d0,-(sp)
  126.  clr.l   d0
  127.  move.b ($FF5FF0),d0
  128.  bne.s  tournament_setup_default_counter_skip
  129.  moveq  #8,d0
  130.  move.b d0,($FF5FF0)
  131.  
  132. tournament_setup_default_counter_skip:
  133.  move.l  d0,a1
  134.  move.l  (sp)+,d0
  135.  move.w  a1,($FFFFAB2A).w
  136.  jmp $15B20
  137.  
  138. digits:
  139.  incbin 'wwf digits.bin'
  140.  
  141. load_digits:
  142.  adda.w  #4,sp
  143.  
  144.  cmp.b   #0,($FF5FF0)
  145.  bne.s   load_digits_skip_default
  146.  move.b  #8,($FF5FF0)
  147.  
  148. load_digits_skip_default:
  149.  
  150.  move.l #$70000003,($C00006)
  151.  lea     digits,a0
  152.  move.w  #(320/4-1),d0
  153. load_digits_loop:
  154.  move.l  (a0)+,($C00000)
  155.  dbf.w   d0,load_digits_loop
  156.  
  157.  movem.l (sp)+,d0/a0
  158.  
  159.  jmp $25EBC
  160.  
  161. reset_fix:
  162.  move.b  ($FF5FF0),8(a1)
  163.  movem.l (a1)+,d2-d4
  164.  move.w  #$3FFF,d0
  165.  moveq   #0,d1
  166.  lea     ($FF0000).l,a0
  167.  
  168. loc_7D0:
  169.  move.l  d1,(a0)+
  170.  dbf     d0,loc_7D0
  171.  movem.l d2-d4,-(a1)
  172.  move.b  8(a1),($FF5FF0)
  173.  clr.b   8(a1)
  174.  jmp $7DA
  175.  
  176.  ; fixes
  177.  org $1192A
  178.  jmp tournament_check
  179.  
  180.  ; counter
  181.  org $15B1A
  182.  dc.w $16
  183.  
  184.  ; counter dec
  185.  org $3F700
  186.  jsr tournament_dec
  187.  
  188.  ; skip credits
  189.  org $2828E
  190.  jmp skip_credits
  191.  
  192.  ; draw tour setting
  193.  org $26C78
  194.  jmp draw_tournament_setting
  195.  
  196.  ; select mask
  197.  ; org $25AAA
  198.  ; andi.w  #$F0,d0 ; remove x,y,z
  199.  
  200.  ; org $25B0A
  201.  ; andi.w  #$F0,d0 ; remove x,y,z
  202.  
  203.  ; org $261BE
  204.  ; andi.w  #$070,d0 ; turn off x,y,z selection character
  205.  
  206.  ; turn off x,y,z in options pl1
  207.  org $26A02
  208.  andi.w  #$F0,d7
  209.  
  210.  ; turn off x,y,z in options pl2
  211.  org $26A9A
  212.  andi.w  #$F0,d7
  213.  
  214. ; org $23A8E
  215. ; jmp tournament_setup
  216.  
  217.  org $15B18
  218.  jmp tournament_setup_counter
  219.  
  220.  org $25EB4
  221.  jmp load_digits
  222.  
  223.  org $7C0
  224.  jmp reset_fix
  225.  
  226.  ; max difficulty pl1
  227.  org $26CFC
  228.  dc.w $10
  229.  
  230.  ; max difficulty pl2
  231.  org $26D9E
  232.  dc.w $10
Add Comment
Please, Sign In to add comment