script "Console Mode Plus" \
"comm:In practice mode, start button can restore HP, pause the game and then press start to select character."
run:
#Menu Screen Script#
if (peek($100034)==$00) #Before player activation#
   poke $1467 $96 #Restore control#
   poke $1477 $9C
   poke $8E59 $01 #Restore for character screen#
   poke $8F2B $01
   lpoke $28DE2 $650003F0 #Restore HP function#
   lpoke $28FA8 $65000240
   if (dpeek($100002)==$2EF8)and(peek($10FDAC)==$00)
      poke $10FDB6 $0101 #Prevent proceed normally#
      poke $100041 $01
   endif
   if (peek($100041)==$01)and(peek($10FDAC)>$00) #When pressing start#
      dpoke $33A0 $71FF #Shift original text#
      dpoke $33BA $71FF
      dpoke $64CE $71FF
      dpoke $9B6E $71FF
      dpoke $9B8E $71FF
      dpoke $9BCA $71FF
      dpoke $9BEA $71FF
      dpoke $9C26 $71FF
      dpoke $9C46 $71FF
      poke $10FDB6 $0000 #Restore proceed normally#
      poke $10FDAE $03 #Prepare to jump to MVS title screen#
      dpoke $100002 $0122 #Jump#
   endif
endif
if (dpeek($100002)==$338C) #At MVS title screen#
 #Add New Text#
   dpoke $3C0000 $71F8 # address
       dpoke $3c0004 $20   # modulo
   dpoke $3C0002 $7347 # value
   dpoke $3C0002 $7341
   dpoke $3C0002 $734D
   dpoke $3C0002 $7345
   dpoke $3C0002 $7320
   dpoke $3C0002 $7353
   dpoke $3C0002 $7354
   dpoke $3C0002 $7341
   dpoke $3C0002 $7352
   dpoke $3C0002 $7354
   dpoke $3C0000 $71FA # address
       dpoke $3c0004 $20   # modulo
   dpoke $3C0002 $7356 # value
   dpoke $3C0002 $7353
   dpoke $3C0002 $7320
   dpoke $3C0002 $734D
   dpoke $3C0002 $734F
   dpoke $3C0002 $7344
   dpoke $3C0002 $7345
   dpoke $3C0000 $71FC # address
       dpoke $3c0004 $20   # modulo
   dpoke $3C0002 $7350 # value
   dpoke $3C0002 $7352
   dpoke $3C0002 $7341
   dpoke $3C0002 $7343
   dpoke $3C0002 $7354
   dpoke $3C0002 $7349
   dpoke $3C0002 $7343
   dpoke $3C0002 $7345
 #Control in menu#
   if (peek($100041)==$FF)and((peek($10FD95)==$00)and(peek($10FD9B)==$00))
      poke $100041 $00
   endif
   if (dpeek($100040)==$0000)and((peek($10FD95)==$02)or(peek($10FD9B)==$02))
      dpoke $100040 $01FF
      poke $320000 $60
   endif
   if (dpeek($100040)==$0100)and((peek($10FD95)==$02)or(peek($10FD9B)==$02))
      dpoke $100040 $02FF
      poke $320000 $60
   endif
   if (dpeek($100040)==$0200)and((peek($10FD95)==$02)or(peek($10FD9B)==$02))
      dpoke $100040 $00FF
      poke $320000 $60
   endif
   if (dpeek($100040)==$0000)and((peek($10FD95)==$01)or(peek($10FD9B)==$01))
      dpoke $100040 $02FF
      poke $320000 $60
   endif
   if (dpeek($100040)==$0200)and((peek($10FD95)==$01)or(peek($10FD9B)==$01))
      dpoke $100040 $01FF
      poke $320000 $60
   endif
   if (dpeek($100040)==$0100)and((peek($10FD95)==$01)or(peek($10FD9B)==$01))
      dpoke $100040 $00FF
      poke $320000 $60
   endif
 #Arrow display for highlighted mode#
   if (peek($100040)==$00) #Arcade#
      poke $380000 peek($380000)&$8F #Restore memory card#
      dpoke $3C0000 $71DA
      dpoke $3C0002 $5320
      dpoke $3C0000 $71DC
      dpoke $3C0002 $5320
      dpoke $3C0000 $71D8
      dpoke $3C0002 $533E
   endif
   if (peek($100040)==$01) #VS#
      poke $380000 peek($380000)|$70 #Disable memory card#
      dpoke $3C0000 $71D8
      dpoke $3C0002 $5320
      dpoke $3C0000 $71DC
      dpoke $3C0002 $5320
      dpoke $3C0000 $71DA
      dpoke $3C0002 $533E
   endif
   if (peek($100040)==$02) #Practice#
      poke $380000 peek($380000)|$70 #Disable memory card#
      dpoke $3C0000 $71D8
      dpoke $3C0002 $5320
      dpoke $3C0000 $71DA
      dpoke $3C0002 $5320
      dpoke $3C0000 $71DC
      dpoke $3C0002 $533E
   endif
endif
if (dpeek($100002)==$3806) #After selected a mode part 1#
   poke $320000 $04 #Cut title music#
   poke $320000 $07
   poke $320000 $61 #Sound effect#
   dpoke $3806 $0000 #Prevent sound cut#
   lpoke $3808 $00000000
endif
if (dpeek($100002)==$3842) #After selected a mode part 2#
   if (peek($100040)>=01) #For non-arcade modes#
      dpoke $100002 $3954 #Skip level select#
      poke $320000 $3D #Menu music#
   endif
   poke $10FDAE $02 #Restore value#
   dpoke $33A0 $7277 #Restore rom for text in MVS mode#
   dpoke $33BA $7256
   dpoke $64CE $71D8
   dpoke $9B6E $707A
   dpoke $9B8E $71DB
   dpoke $9BCA $707A
   dpoke $9BEA $71DB
   dpoke $9C26 $7059
   dpoke $9C46 $709C
   dpoke $3806 $4EB9 #Restore sound related code#
   lpoke $3808 $00016068
endif
#VS Mode Script#
if (peek($100040)==$01)
    if (dpeek($100002)==$3D2E)
      poke $100034 $03
      poke $10003B $03
      poke $10FDB6 $01
      poke $10FDB7 $01
      if (peek($100037)==$01)
        poke $100036 $02
      endif
      if (peek($100037)==$02)
        poke $100036 $01
      endif
    endif
    if (dpeek($100002)==$45A8)and((peek($100058)==$02)or(peek($100059)==$02))
      dpoke $100002 $3C8C
      poke $100037 $00
      poke $8E59 peek($10419B)
      poke $8F2B peek($10419D)
    endif
    if (dpeek($100002)==$3E98)and((peek($100058)==$02)or(peek($100059)==$02))
      poke $100058 $00
      poke $100059 $00
      poke $8E59 $01
      poke $8F2B $01
    endif
endif
#Practice Mode Script#
if (peek($100040)==$02)
    if (dpeek($100002)==$3D2E)
      lpoke $28DE2 $00000000 #Change HP function#
      lpoke $28FA8 $00000000
      poke $7000 $68 #HP bar fix#
      poke $7316 $68
      poke $6FF7 $68
      poke $7191 $68
      poke $100034 $03
      poke $10003B $03
      poke $10FDB6 $01
      poke $10FDB7 $01
    endif
    if (dpeek($100002)==$3DC8)
      if (peek($100037)==$01)
       poke $100036 $01
       poke $1477 $96
      endif
      if (peek($100037)==$02)
       poke $100036 $02
       poke $1467 $9C
      endif
    endif
    if (dpeek($100002)==$3E98)
      poke $1467 $96
      poke $1477 $9C
    endif
    if (peek($10418E)==$FF)and((peek($10FDAC)==$01)or(peek($10FDAC)==$04))
      poke $10418E $00
      poke $100037 $00
      poke $8E59 peek($10419B)
      poke $8F2B peek($10419D)
      dpoke $100002 $453A
    endif
    if (dpeek($100002)==$45A8)
      dpoke $100002 $3C8C
    endif
    if (dpeek($100002)==$3E98)
      poke $8E59 $01
      poke $8F2B $01
    endif
    poke $10092A $91 #Timer#
    if (peek($100036)==$01) #P1 as main player#
       poke $1003CB $1F #P1 red blood#
       if (dpeek($1004CA)>=$F000)
          lpoke $1004CA $00000000 #Prevent -ve HP#
       endif
       if ((peek($1004CB)==$00)and(dpeek($100402)==$6A40))or(peek($10FDAC)==$01)
          poke $1004CB $5F #HP recover#
       endif
       if (dpeek($1004CB)==$5F5F)
          dpoke $1004CB $6060 #HP recover part 2#
       endif
    endif
    if (peek($100036)==$02) #P2 as main player#
       poke $1004CB $1F #P2 red blood#
       if (dpeek($1003CA)>=$F000)
          lpoke $1003CA $00000000 #Prevent -ve HP#
       endif
       if ((peek($1003CB)==$00)and(dpeek($100302)==$6A40))or(peek($10FDAC)==$04)
          poke $1003CB $5F #HP recover#
       endif
       if (dpeek($1003CB)==$5F5F)
          dpoke $1003CB $6060 #HP recover part 2#
       endif
    endif
endif
off:
   poke $1467 $96 #Restore control#
   poke $1477 $9C
   poke $8E59 $01 #Restore for character screen#
   poke $8F2B $01
   lpoke $28DE2 $650003F0 #Restore HP function#
   lpoke $28FA8 $65000240
   dpoke $33A0 $7277 #Restore rom for text in MVS mode#
   dpoke $33BA $7256
   dpoke $64CE $71D8
   dpoke $9B6E $707A
   dpoke $9B8E $71DB
   dpoke $9BCA $707A
   dpoke $9BEA $71DB
   dpoke $9C26 $7059
   dpoke $9C46 $709C
   dpoke $3806 $4EB9 #Restore sound related code#
   lpoke $3808 $00016068

script "Infinite Time"
run:
    poke $10092A $99
script "Finish Round Now!"
on:
    poke $10092A $00
script "Always Enable Special Move"
on:
    temp0=peek($01A3F7)
run:
    poke $01A3F7 $02
off:
    poke $01A3F7 temp0
script "Select Stage (Background)" \
 "comm:The background will not change until you disable it or change it. If you change it mid-round the background won't update till the next round." \
 "0x01/Terry (U.S.A.)"\
 "0x02/Andy (Italy)"\
 "0x03/Joe (Thailand)"\
 "0x04/Big Bear (Australia)"\
 "0x05/Jubei (Japan)"\
 "0x06/Cheng (Hong Kong)"\
 "0x07/Kim (Korea)"\
 "0x08/Mai (Japan)"\
 "0x09/Billy (Great Britain)"\
 "0x0A/Axel (U.S.A.)"\
 "0x0B/Laurence (Spain)"\
 "0x0C/Krauser (Germany)"
run:
    poke $10AAD5 param
script "Walk Through Stage Boundaries"
run:
    dpoke $018FF6 $6000
    dpoke $019020 $6000
    dpoke $012CCE $6000
    dpoke $012CDE $6000
off:
    dpoke $018FF6 $6E00
    dpoke $019020 $6D00
    dpoke $012CCE $6C00
    dpoke $012CDE $6F00
script " "
script "P1 Infinite Energy"
run:
    poke $1003CB $60
script "P1 Drain all Energy Now!"
on:
    poke $1003CB $00
script "P1 Select Character" \
 "comm:If you enable it mid-round the character won't update till the next round" \
 "0x01/Terry"\
 "0x02/Andy"\
 "0x03/Joe"\
 "0x04/Big Bear"\
 "0x05/Jubei"\
 "0x06/Cheng"\
 "0x07/Kim"\
 "0x08/Mai"\
 "0x09/Billy"\
 "0x0A/Axel"\
 "0x0B/Laurence"\
 "0x0C/Krauser"
run:
    poke $10419B param
script " "
script "P2 Infinite Energy"
run:
    poke $1004CB $60
script "P2 Drain all Energy Now!"
on:
    poke $1004CB $00
script "P2 Select Character" \
 "comm:If you enable it mid-round the character won't update till the next round" \
 "0x01/Terry"\
 "0x02/Andy"\
 "0x03/Joe"\
 "0x04/Big Bear"\
 "0x05/Jubei"\
 "0x06/Cheng"\
 "0x07/Kim"\
 "0x08/Mai"\
 "0x09/Billy"\
 "0x0A/Axel"\
 "0x0B/Laurence"\
 "0x0C/Krauser"
run:
    poke $10419D param
script " "
script "No Background Music"
run:
    cpu audio
    poke $FE2D $00
    cpu main
script "Hide Background" \
 "comm:Activate before match start"
run:
    poke $1051C9 peek($1051C8)&7F|10
    dpoke $401FFE $0000
    if (peek($100002)==$43)
      poke $100920 $20
      poke $10092B $3C
    endif
    if ((peek($100002)==$43)and((peek($100003)&$80)!=$00))
      poke $1051C9 $10
      poke $1041C1 $40
      dpoke $1041C3 $00
      dpoke $401FFE $8F8F
    endif
off:
    poke $100920 $40
    poke $1051C9 peek($1051C8)&7F|10
    dpoke $401FFE $0000
script "Select Cartridge/NeoGeo Type" \
 "comm:Use in conjunction with the 'Skip RAM/ROM Checks' cheat for the best effect, then enable it and reset. The Home (NEOGEO) setting may open up other aspects of the game or it may even make the game unplayable." \
 "0x80/Arcade (MVS)"\
 "0x00/Home (NEOGEO)"
run:
    poke $10FD82 param
script "Skip RAM/ROM Checks" \
 "comm:Also allows a quicker start-up without the green screens."
on:
    temp0=lpeek($C1315C)
    temp1=lpeek($C1314E)
    temp2=lpeek($C131E8)
    temp3=lpeek($C13184)
    temp4=lpeek($C1212E)
    temp5=lpeek($C134FA)
run:
    if (lpeek($C1315C)==$51CFFFF2)
      lpoke $C1315C $6000EB08
    endif
    if (lpeek($C1314E)==$51CFFFF2)
      lpoke $C1314E $6000EB16
    endif
    if (lpeek($C131E8)==$51CFFFF2)
      lpoke $C131E8 $6000EA52
    endif
    if (lpeek($C13184)==$51CFFFF2)
      lpoke $C13184 $6000EAB6
    endif
    if (lpeek($C1212E)==$51CFFFF2)
      lpoke $C1212E $6000EB36
    endif
    if (lpeek($C134FA)==$51CFFFF2)
      lpoke $C134FA $6000E892
    endif
off:
    lpoke $C1315C temp0
    lpoke $C1314E temp1
    lpoke $C131E8 temp2
    lpoke $C13184 temp3
    lpoke $C1212E temp4
    lpoke $C134FA temp5
script "Infinite Credits" \
 "comm:Alternatively just set Free Play to ON in the Dip Switches menu"
run:
    poke $D00034 $99
