script "Infinite Time"  
on:
    temp0=peek($10A836)
run:
    if (frame%300==$0)&&(peek($10A836)!=temp0)
      poke $10A836 $60
    endif
script "Finish Round Now!"  
on:
    poke $10A836 $00
script "Boss code + Timer stop"  
run:
    poke $100000 $04
script "Enable hidden characters" \
 "comm:Adds the extra two hidden characters to the selection screen"  
run:
    poke $10E79A $01
script "Always Ready Special Move"  
on:
    temp0=maincpu.rb@00492E
    temp1=maincpu.rb@00B5A8
    temp2=maincpu.rb@00B5D4
    temp3=maincpu.rb@00B618
run:
    maincpu.rb@00492E=$60
    maincpu.rb@00B5A8=$60
    maincpu.rb@00B5D4=$60
    maincpu.rb@00B618=$60
off:
    maincpu.rb@00492E=temp0
    maincpu.rb@00B5A8=temp1
    maincpu.rb@00B5D4=temp2
    maincpu.rb@00B618=temp3
script "Invincibility [Master Code]"  
on:
    temp0=maincpu.rd@0023BE
    temp1=maincpu.rd@0023C2
    temp2=maincpu.rd@080150
    temp3=maincpu.rd@080154
    temp4=maincpu.rd@080158
    temp5=maincpu.rd@08015C
    temp6=maincpu.rd@080160
    temp7=maincpu.rd@00A60E
    temp8=maincpu.rw@00A612
    temp9=maincpu.rd@080164
    temp10=maincpu.rd@080168
    temp11=maincpu.rd@08016C
    temp12=maincpu.rd@080170
    temp13=maincpu.rd@080174
    temp14=maincpu.rd@01017C
    temp15=maincpu.rd@010180
    temp16=maincpu.rd@0115DC
    temp17=maincpu.rd@0115E0
    temp18=maincpu.rd@011936
    temp19=maincpu.rd@01193A
    temp20=maincpu.rd@01214A
    temp21=maincpu.rd@01214E
    temp22=maincpu.rd@01AEB4
    temp23=maincpu.rd@01AEB8
    temp24=maincpu.rd@01BB9A
    temp25=maincpu.rd@01BB9E
    temp26=maincpu.rd@01CC38
    temp27=maincpu.rd@01CC3C
    temp28=maincpu.rd@02E7BA
    temp29=maincpu.rd@02E7BE
    temp30=maincpu.rd@02EB76
    temp31=maincpu.rd@02EB7A
    temp32=maincpu.rd@030524
    temp33=maincpu.rd@030528
    temp34=maincpu.rd@030876
    temp35=maincpu.rd@03087A
    temp36=maincpu.rd@080178
    temp37=maincpu.rd@08017C
    temp38=maincpu.rd@080180
    temp39=maincpu.rd@080184
    temp40=maincpu.rd@080188
    temp41=maincpu.rd@00E87C
    temp42=maincpu.rw@00E880
    temp43=maincpu.rd@08018C
    temp44=maincpu.rd@080190
    temp45=maincpu.rw@080194
    temp46=maincpu.rd@080196
    temp47=maincpu.rd@08019A
    temp48=maincpu.rd@01AD2E
    temp49=maincpu.rw@01AD32
    temp50=maincpu.rd@08019E
    temp51=maincpu.rw@0801A2
    temp52=maincpu.rd@0801A4
    temp53=maincpu.rd@0801A8
    temp54=maincpu.rd@0801AC
run:
    maincpu.rd@0023BE=$4EB90008
    maincpu.rd@0023C2=$01504E71
    maincpu.rd@080150=$2C6D27A0
    maincpu.rd@080154=$4A2E01F0
    maincpu.rd@080158=$6606052E
    maincpu.rd@08015C=$007C4E75
    maincpu.rd@080160=$74004E75
    maincpu.rd@00A60E=$4EB90008
    maincpu.rw@00A612=$0164
    maincpu.rd@080164=$48411210
    maincpu.rd@080168=$4A2B01F0
    maincpu.rd@08016C=$6604C207
    maincpu.rd@080170=$4E75323C
    maincpu.rd@080174=$00004E75
    maincpu.rd@01017C=$4EB90008
    maincpu.rd@010180=$01784E71
    maincpu.rd@0115DC=$4EB90008
    maincpu.rd@0115E0=$01784E71
    maincpu.rd@011936=$4EB90008
    maincpu.rd@01193A=$01784E71
    maincpu.rd@01214A=$4EB90008
    maincpu.rd@01214E=$01784E71
    maincpu.rd@01AEB4=$4EB90008
    maincpu.rd@01AEB8=$01784E71
    maincpu.rd@01BB9A=$4EB90008
    maincpu.rd@01BB9E=$01784E71
    maincpu.rd@01CC38=$4EB90008
    maincpu.rd@01CC3C=$01784E71
    maincpu.rd@02E7BA=$4EB90008
    maincpu.rd@02E7BE=$01784E71
    maincpu.rd@02EB76=$4EB90008
    maincpu.rd@02EB7A=$01784E71
    maincpu.rd@030524=$4EB90008
    maincpu.rd@030528=$01784E71
    maincpu.rd@030876=$4EB90008
    maincpu.rd@03087A=$01784E71
    maincpu.rd@080178=$4A2B01F0
    maincpu.rd@08017C=$660A302C
    maincpu.rd@080180=$0018906B
    maincpu.rd@080184=$00184E75
    maincpu.rd@080188=$707F4E75
    maincpu.rd@00E87C=$4EB90008
    maincpu.rw@00E880=$018C
    maincpu.rd@08018C=$3210E249
    maincpu.rd@080190=$4A2B01F0
    maincpu.rw@080194=$6604
    maincpu.rd@080196=$90414E75
    maincpu.rd@08019A=$707F4E75
    maincpu.rd@01AD2E=$4EB90008
    maincpu.rw@01AD32=$019E
    maincpu.rd@08019E=$4A2B01F0
    maincpu.rw@0801A2=$6608
    maincpu.rd@0801A4=$082B0005
    maincpu.rd@0801A8=$00E34E75
    maincpu.rd@0801AC=$707F4E75
off:
    maincpu.rd@0023BE=temp0
    maincpu.rd@0023C2=temp1
    maincpu.rd@080150=temp2
    maincpu.rd@080154=temp3
    maincpu.rd@080158=temp4
    maincpu.rd@08015C=temp5
    maincpu.rd@080160=temp6
    maincpu.rd@00A60E=temp7
    maincpu.rw@00A612=temp8
    maincpu.rd@080164=temp9
    maincpu.rd@080168=temp10
    maincpu.rd@08016C=temp11
    maincpu.rd@080170=temp12
    maincpu.rd@080174=temp13
    maincpu.rd@01017C=temp14
    maincpu.rd@010180=temp15
    maincpu.rd@0115DC=temp16
    maincpu.rd@0115E0=temp17
    maincpu.rd@011936=temp18
    maincpu.rd@01193A=temp19
    maincpu.rd@01214A=temp20
    maincpu.rd@01214E=temp21
    maincpu.rd@01AEB4=temp22
    maincpu.rd@01AEB8=temp23
    maincpu.rd@01BB9A=temp24
    maincpu.rd@01BB9E=temp25
    maincpu.rd@01CC38=temp26
    maincpu.rd@01CC3C=temp27
    maincpu.rd@02E7BA=temp28
    maincpu.rd@02E7BE=temp29
    maincpu.rd@02EB76=temp30
    maincpu.rd@02EB7A=temp31
    maincpu.rd@030524=temp32
    maincpu.rd@030528=temp33
    maincpu.rd@030876=temp34
    maincpu.rd@03087A=temp35
    maincpu.rd@080178=temp36
    maincpu.rd@08017C=temp37
    maincpu.rd@080180=temp38
    maincpu.rd@080184=temp39
    maincpu.rd@080188=temp40
    maincpu.rd@00E87C=temp41
    maincpu.rw@00E880=temp42
    maincpu.rd@08018C=temp43
    maincpu.rd@080190=temp44
    maincpu.rw@080194=temp45
    maincpu.rd@080196=temp46
    maincpu.rd@08019A=temp47
    maincpu.rd@01AD2E=temp48
    maincpu.rw@01AD32=temp49
    maincpu.rd@08019E=temp50
    maincpu.rw@0801A2=temp51
    maincpu.rd@0801A4=temp52
    maincpu.rd@0801A8=temp53
    maincpu.rd@0801AC=temp54
script "Hit Anywhere (Both Players)"  
on:
    temp0=maincpu.rw@002430
run:
    maincpu.rw@002430=$4E71
off:
    maincpu.rw@002430=temp0
script " "  
script "P1 Infinite Energy"  
run:
    poke $108221 $CF
script "P1 Drain all Energy Now!"  
on:
    poke $108221 $00
script "P1 Invincibility" \
 "comm:Works after you've enabled 'Invincibility [Master Code]'"  
on:
    temp0=peek($1082F0)
run:
    poke $1082F0 $01
off:
    poke $1082F0 temp0
script "P1 Always have Max POW"  
run:
    poke $108219 $7F
script "P1 Get Max POW Now!"  
on:
    poke $108219 $7F
script "P1 Select 1st Character" \
 "comm:Free player selection - Use just after character selection. If used in-game the character will only change when a new round starts (both teams)." \
 "0x00/Heidern"\
 "0x01/Ralf"\
 "0x02/Clark"\
 "0x03/Athena"\
 "0x04/Kensou"\
 "0x05/Chin"\
 "0x06/Kyo"\
 "0x07/Benimaru"\
 "0x08/Daimon"\
 "0x09/Iori"\
 "0x0A/Eiji"\
 "0x0B/Billy"\
 "0x0C/Kim"\
 "0x0D/Chang"\
 "0x0E/Choi"\
 "0x0F/Terry"\
 "0x10/Andy"\
 "0x11/Joe"\
 "0x12/Ryo"\
 "0x13/Robert"\
 "0x14/Takuma"\
 "0x15/Yuri"\
 "0x16/Mai"\
 "0x17/King"\
 "0x18/Saisyu Kusanagi"\
 "0x19/Omega Rugal" 
run:
    poke $10A843 param
script "P1 Select 2nd Character" \
 "comm:Free player selection - Use just after character selection. If used in-game the character will only change when a new round starts (both teams)." \
 "0x00/Heidern"\
 "0x01/Ralf"\
 "0x02/Clark"\
 "0x03/Athena"\
 "0x04/Kensou"\
 "0x05/Chin"\
 "0x06/Kyo"\
 "0x07/Benimaru"\
 "0x08/Daimon"\
 "0x09/Iori"\
 "0x0A/Eiji"\
 "0x0B/Billy"\
 "0x0C/Kim"\
 "0x0D/Chang"\
 "0x0E/Choi"\
 "0x0F/Terry"\
 "0x10/Andy"\
 "0x11/Joe"\
 "0x12/Ryo"\
 "0x13/Robert"\
 "0x14/Takuma"\
 "0x15/Yuri"\
 "0x16/Mai"\
 "0x17/King"\
 "0x18/Saisyu Kusanagi"\
 "0x19/Omega Rugal" 
run:
    poke $10A844 param
script "P1 Select 3rd Character" \
 "comm:Free player selection - Use just after character selection. If used in-game the character will only change when a new round starts (both teams)." \
 "0x00/Heidern"\
 "0x01/Ralf"\
 "0x02/Clark"\
 "0x03/Athena"\
 "0x04/Kensou"\
 "0x05/Chin"\
 "0x06/Kyo"\
 "0x07/Benimaru"\
 "0x08/Daimon"\
 "0x09/Iori"\
 "0x0A/Eiji"\
 "0x0B/Billy"\
 "0x0C/Kim"\
 "0x0D/Chang"\
 "0x0E/Choi"\
 "0x0F/Terry"\
 "0x10/Andy"\
 "0x11/Joe"\
 "0x12/Ryo"\
 "0x13/Robert"\
 "0x14/Takuma"\
 "0x15/Yuri"\
 "0x16/Mai"\
 "0x17/King"\
 "0x18/Saisyu Kusanagi"\
 "0x19/Omega Rugal" 
run:
    poke $10A845 param
script " "  
script "P2 Infinite Energy"  
run:
    poke $108421 $CF
script "P2 Drain all Energy Now!"  
on:
    poke $108421 $00
script "P2 Invincibility" \
 "comm:Works after you've enabled 'Invincibility [Master Code]'"  
on:
    temp0=peek($1084F0)
run:
    poke $1084F0 $01
off:
    poke $1084F0 temp0
script "P2 Always have Max POW"  
run:
    poke $108419 $7F
script "P2 Get Max POW Now!"  
on:
    poke $108419 $7F
script "P2 Select 1st Character" \
 "comm:Free player selection - Use just after character selection. If used in-game the character will only change when a new round starts (both teams)." \
 "0x00/Heidern"\
 "0x01/Ralf"\
 "0x02/Clark"\
 "0x03/Athena"\
 "0x04/Kensou"\
 "0x05/Chin"\
 "0x06/Kyo"\
 "0x07/Benimaru"\
 "0x08/Daimon"\
 "0x09/Iori"\
 "0x0A/Eiji"\
 "0x0B/Billy"\
 "0x0C/Kim"\
 "0x0D/Chang"\
 "0x0E/Choi"\
 "0x0F/Terry"\
 "0x10/Andy"\
 "0x11/Joe"\
 "0x12/Ryo"\
 "0x13/Robert"\
 "0x14/Takuma"\
 "0x15/Yuri"\
 "0x16/Mai"\
 "0x17/King"\
 "0x18/Saisyu Kusanagi"\
 "0x19/Omega Rugal" 
run:
    poke $10A853 param
script "P2 Select 2nd Character" \
 "comm:Free player selection - Use just after character selection. If used in-game the character will only change when a new round starts (both teams)." \
 "0x00/Heidern"\
 "0x01/Ralf"\
 "0x02/Clark"\
 "0x03/Athena"\
 "0x04/Kensou"\
 "0x05/Chin"\
 "0x06/Kyo"\
 "0x07/Benimaru"\
 "0x08/Daimon"\
 "0x09/Iori"\
 "0x0A/Eiji"\
 "0x0B/Billy"\
 "0x0C/Kim"\
 "0x0D/Chang"\
 "0x0E/Choi"\
 "0x0F/Terry"\
 "0x10/Andy"\
 "0x11/Joe"\
 "0x12/Ryo"\
 "0x13/Robert"\
 "0x14/Takuma"\
 "0x15/Yuri"\
 "0x16/Mai"\
 "0x17/King"\
 "0x18/Saisyu Kusanagi"\
 "0x19/Omega Rugal" 
run:
    poke $10A854 param
script "P2 Select 3rd Character" \
 "comm:Free player selection - Use just after character selection. If used in-game the character will only change when a new round starts (both teams)." \
 "0x00/Heidern"\
 "0x01/Ralf"\
 "0x02/Clark"\
 "0x03/Athena"\
 "0x04/Kensou"\
 "0x05/Chin"\
 "0x06/Kyo"\
 "0x07/Benimaru"\
 "0x08/Daimon"\
 "0x09/Iori"\
 "0x0A/Eiji"\
 "0x0B/Billy"\
 "0x0C/Kim"\
 "0x0D/Chang"\
 "0x0E/Choi"\
 "0x0F/Terry"\
 "0x10/Andy"\
 "0x11/Joe"\
 "0x12/Ryo"\
 "0x13/Robert"\
 "0x14/Takuma"\
 "0x15/Yuri"\
 "0x16/Mai"\
 "0x17/King"\
 "0x18/Saisyu Kusanagi"\
 "0x19/Omega Rugal" 
run:
    poke $10A855 param
script " "  
script "No Background Music"  
run:
    cpu audio
    poke $FE1A $00
    cpu main
script "Hide Background" \
 "comm:Activate before match start; makes match uncompletable"  
on:
    temp0=peek($10A785)
    temp1=maincpu.rd@0009C6
    temp2=maincpu.rd@009412
    temp3=maincpu.rw@009418
run:
    if (peek($10A782)==$1A)
      poke $10A785 temp0bor20
      maincpu.rd@0009C6=$60244E71
      maincpu.rd@009412=$4E714E71
      maincpu.rw@009418=$00FF
      dpoke $10D6AC $8F8F
    endif
off:
    poke $10A785 temp0
    maincpu.rd@0009C6=temp1
    maincpu.rd@009412=temp2
    maincpu.rw@009418=temp3
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=maincpu.rd@C1315C
    temp1=maincpu.rd@C1314E
    temp2=maincpu.rd@C131E8
    temp3=maincpu.rd@C13184
    temp4=maincpu.rd@C1212E
    temp5=maincpu.rd@C134FA
run:
    if (maincpu.rd@C1315C==$51CFFFF2)
      maincpu.rd@C1315C=$6000EB08
    endif
    if (maincpu.rd@C1314E==$51CFFFF2)
      maincpu.rd@C1314E=$6000EB16
    endif
    if (maincpu.rd@C131E8==$51CFFFF2)
      maincpu.rd@C131E8=$6000EA52
    endif
    if (maincpu.rd@C13184==$51CFFFF2)
      maincpu.rd@C13184=$6000EAB6
    endif
    if (maincpu.rd@C1212E==$51CFFFF2)
      maincpu.rd@C1212E=$6000EB36
    endif
    if (maincpu.rd@C134FA==$51CFFFF2)
      maincpu.rd@C134FA=$6000E892
    endif
off:
    maincpu.rd@C1315C=temp0
    maincpu.rd@C1314E=temp1
    maincpu.rd@C131E8=temp2
    maincpu.rd@C13184=temp3
    maincpu.rd@C1212E=temp4
    maincpu.rd@C134FA=temp5
script "Infinite Credits" \
 "comm:Alternatively just set Free Play to ON in the Dip Switches menu"  
run:
    maincpu.rb@D00034=$99
