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@004BCE
    temp1=maincpu.rb@00B848
    temp2=maincpu.rb@00B874
    temp3=maincpu.rb@00B8B8
run:
    maincpu.rb@004BCE=$60
    maincpu.rb@00B848=$60
    maincpu.rb@00B874=$60
    maincpu.rb@00B8B8=$60
off:
    maincpu.rb@004BCE=temp0
    maincpu.rb@00B848=temp1
    maincpu.rb@00B874=temp2
    maincpu.rb@00B8B8=temp3
script "Invincibility [Master Code]"  
on:
    temp0=maincpu.rd@00265E
    temp1=maincpu.rd@002662
    temp2=maincpu.rd@054030
    temp3=maincpu.rd@054034
    temp4=maincpu.rd@054038
    temp5=maincpu.rd@05403C
    temp6=maincpu.rd@054040
    temp7=maincpu.rd@00A8AE
    temp8=maincpu.rw@00A8B2
    temp9=maincpu.rd@054044
    temp10=maincpu.rd@054048
    temp11=maincpu.rd@05404C
    temp12=maincpu.rd@054050
    temp13=maincpu.rd@054054
    temp14=maincpu.rd@01041C
    temp15=maincpu.rd@010420
    temp16=maincpu.rd@011880
    temp17=maincpu.rd@011884
    temp18=maincpu.rd@011BD6
    temp19=maincpu.rd@011BDA
    temp20=maincpu.rd@0123EA
    temp21=maincpu.rd@0123EE
    temp22=maincpu.rd@01B154
    temp23=maincpu.rd@01B158
    temp24=maincpu.rd@01BE3A
    temp25=maincpu.rd@01BE3E
    temp26=maincpu.rd@01CED8
    temp27=maincpu.rd@01CEDC
    temp28=maincpu.rd@02EA5E
    temp29=maincpu.rd@02EA62
    temp30=maincpu.rd@02EE16
    temp31=maincpu.rd@02EE1A
    temp32=maincpu.rd@0307C4
    temp33=maincpu.rd@0307C8
    temp34=maincpu.rd@030B16
    temp35=maincpu.rd@030B1A
    temp36=maincpu.rd@054058
    temp37=maincpu.rd@05405C
    temp38=maincpu.rd@054060
    temp39=maincpu.rd@054064
    temp40=maincpu.rd@054068
    temp41=maincpu.rd@00EB1C
    temp42=maincpu.rw@00EB20
    temp43=maincpu.rd@05406C
    temp44=maincpu.rd@054070
    temp45=maincpu.rw@054074
    temp46=maincpu.rd@054076
    temp47=maincpu.rd@05407A
    temp48=maincpu.rd@01AFCE
    temp49=maincpu.rw@01AFD2
    temp50=maincpu.rd@05407E
    temp51=maincpu.rw@054082
    temp52=maincpu.rd@054084
    temp53=maincpu.rd@054088
    temp54=maincpu.rd@05408C
run:
    maincpu.rd@00265E=$4EB90005
    maincpu.rd@002662=$40304E71
    maincpu.rd@054030=$2C6D27A0
    maincpu.rd@054034=$4A2E01F0
    maincpu.rd@054038=$6606052E
    maincpu.rd@05403C=$007C4E75
    maincpu.rd@054040=$74004E75
    maincpu.rd@00A8AE=$4EB90005
    maincpu.rw@00A8B2=$4044
    maincpu.rd@054044=$48411210
    maincpu.rd@054048=$4A2B01F0
    maincpu.rd@05404C=$6604C207
    maincpu.rd@054050=$4E75323C
    maincpu.rd@054054=$00004E75
    maincpu.rd@01041C=$4EB90005
    maincpu.rd@010420=$40584E71
    maincpu.rd@011880=$4EB90005
    maincpu.rd@011884=$40584E71
    maincpu.rd@011BD6=$4EB90005
    maincpu.rd@011BDA=$40584E71
    maincpu.rd@0123EA=$4EB90005
    maincpu.rd@0123EE=$40584E71
    maincpu.rd@01B154=$4EB90005
    maincpu.rd@01B158=$40584E71
    maincpu.rd@01BE3A=$4EB90005
    maincpu.rd@01BE3E=$40584E71
    maincpu.rd@01CED8=$4EB90005
    maincpu.rd@01CEDC=$40584E71
    maincpu.rd@02EA5E=$4EB90005
    maincpu.rd@02EA62=$40584E71
    maincpu.rd@02EE16=$4EB90005
    maincpu.rd@02EE1A=$40584E71
    maincpu.rd@0307C4=$4EB90005
    maincpu.rd@0307C8=$40584E71
    maincpu.rd@030B16=$4EB90005
    maincpu.rd@030B1A=$40584E71
    maincpu.rd@054058=$4A2B01F0
    maincpu.rd@05405C=$660A302C
    maincpu.rd@054060=$0018906B
    maincpu.rd@054064=$00184E75
    maincpu.rd@054068=$707F4E75
    maincpu.rd@00EB1C=$4EB90005
    maincpu.rw@00EB20=$406C
    maincpu.rd@05406C=$3210E249
    maincpu.rd@054070=$4A2B01F0
    maincpu.rw@054074=$6604
    maincpu.rd@054076=$90414E75
    maincpu.rd@05407A=$707F4E75
    maincpu.rd@01AFCE=$4EB90005
    maincpu.rw@01AFD2=$407E
    maincpu.rd@05407E=$4A2B01F0
    maincpu.rw@054082=$6608
    maincpu.rd@054084=$082B0005
    maincpu.rd@054088=$00E34E75
    maincpu.rd@05408C=$707F4E75
off:
    maincpu.rd@00265E=temp0
    maincpu.rd@002662=temp1
    maincpu.rd@054030=temp2
    maincpu.rd@054034=temp3
    maincpu.rd@054038=temp4
    maincpu.rd@05403C=temp5
    maincpu.rd@054040=temp6
    maincpu.rd@00A8AE=temp7
    maincpu.rw@00A8B2=temp8
    maincpu.rd@054044=temp9
    maincpu.rd@054048=temp10
    maincpu.rd@05404C=temp11
    maincpu.rd@054050=temp12
    maincpu.rd@054054=temp13
    maincpu.rd@01041C=temp14
    maincpu.rd@010420=temp15
    maincpu.rd@011880=temp16
    maincpu.rd@011884=temp17
    maincpu.rd@011BD6=temp18
    maincpu.rd@011BDA=temp19
    maincpu.rd@0123EA=temp20
    maincpu.rd@0123EE=temp21
    maincpu.rd@01B154=temp22
    maincpu.rd@01B158=temp23
    maincpu.rd@01BE3A=temp24
    maincpu.rd@01BE3E=temp25
    maincpu.rd@01CED8=temp26
    maincpu.rd@01CEDC=temp27
    maincpu.rd@02EA5E=temp28
    maincpu.rd@02EA62=temp29
    maincpu.rd@02EE16=temp30
    maincpu.rd@02EE1A=temp31
    maincpu.rd@0307C4=temp32
    maincpu.rd@0307C8=temp33
    maincpu.rd@030B16=temp34
    maincpu.rd@030B1A=temp35
    maincpu.rd@054058=temp36
    maincpu.rd@05405C=temp37
    maincpu.rd@054060=temp38
    maincpu.rd@054064=temp39
    maincpu.rd@054068=temp40
    maincpu.rd@00EB1C=temp41
    maincpu.rw@00EB20=temp42
    maincpu.rd@05406C=temp43
    maincpu.rd@054070=temp44
    maincpu.rw@054074=temp45
    maincpu.rd@054076=temp46
    maincpu.rd@05407A=temp47
    maincpu.rd@01AFCE=temp48
    maincpu.rw@01AFD2=temp49
    maincpu.rd@05407E=temp50
    maincpu.rw@054082=temp51
    maincpu.rd@054084=temp52
    maincpu.rd@054088=temp53
    maincpu.rd@05408C=temp54
script "Hit Anywhere (Both Players)"  
on:
    temp0=maincpu.rw@0026D0
run:
    maincpu.rw@0026D0=$4E71
off:
    maincpu.rw@0026D0=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 "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
