script "Infinite Time"  
on:
    temp0=peek($10882E)
run:
    if (frame%120==$0)&&(peek($10882E)!=temp0)
      poke $10882E $60
    endif
script "Finish Round Now!"  
on:
    poke $10882E $00
script "Select Mai's Boobs" \
 "0x00/Always Bounce"\
 "0x01/Never Bounce" 
run:
    poke $10C6E2 param
script "Always Enable Special Move" \
 "comm:It is enabled even with maximum energy and no power."  
on:
    temp0=maincpu.rb@004C24
    temp1=maincpu.rb@00B1BE
    temp2=maincpu.rb@00B1EA
    temp3=maincpu.rb@00B22E
run:
    maincpu.rb@004C24=$60
    maincpu.rb@00B1BE=$60
    maincpu.rb@00B1EA=$60
    maincpu.rb@00B22E=$60
off:
    maincpu.rb@004C24=temp0
    maincpu.rb@00B1BE=temp1
    maincpu.rb@00B1EA=temp2
    maincpu.rb@00B22E=temp3
script "Invincibility [Master Code]"  
on:
    temp0=maincpu.rd@002B5E
    temp1=maincpu.rw@002B62
    temp2=maincpu.rd@0FF040
    temp3=maincpu.rd@0FF044
    temp4=maincpu.rd@0FF048
    temp5=maincpu.rd@0FF04C
    temp6=maincpu.rd@0FF050
    temp7=maincpu.rw@0FF054
    temp8=maincpu.rd@00A3BE
    temp9=maincpu.rw@00A3C2
    temp10=maincpu.rd@0FF056
    temp11=maincpu.rd@0FF05A
    temp12=maincpu.rd@0FF05E
    temp13=maincpu.rd@0FF062
    temp14=maincpu.rd@0FF066
    temp15=maincpu.rd@00DD72
    temp16=maincpu.rd@00DD76
    temp17=maincpu.rd@00F548
    temp18=maincpu.rd@00F54C
    temp19=maincpu.rd@010736
    temp20=maincpu.rd@01073A
    temp21=maincpu.rd@010F94
    temp22=maincpu.rd@010F98
    temp23=maincpu.rd@0188D2
    temp24=maincpu.rd@0188D6
    temp25=maincpu.rd@019590
    temp26=maincpu.rd@019594
    temp27=maincpu.rd@019F00
    temp28=maincpu.rd@019F04
    temp29=maincpu.rd@029174
    temp30=maincpu.rd@029178
    temp31=maincpu.rd@02AD22
    temp32=maincpu.rd@02AD26
    temp33=maincpu.rd@0FF06A
    temp34=maincpu.rw@0FF06E
    temp35=maincpu.rd@0FF070
    temp36=maincpu.rd@0FF074
    temp37=maincpu.rw@0FF078
    temp38=maincpu.rd@0FF07A
    temp39=maincpu.rd@01874A
    temp40=maincpu.rd@01874E
    temp41=maincpu.rd@0FF07E
    temp42=maincpu.rw@0FF082
    temp43=maincpu.rd@0FF084
    temp44=maincpu.rd@0FF088
    temp45=maincpu.rw@0FF08C
    temp46=maincpu.rd@0FF08E
run:
    maincpu.rd@002B5E=$4EB9000F
    maincpu.rw@002B62=$F040
    maincpu.rd@0FF040=$660C4A2E
    maincpu.rd@0FF044=$01F06606
    maincpu.rd@0FF048=$2C6D0792
    maincpu.rd@0FF04C=$4E75046F
    maincpu.rd@0FF050=$00760002
    maincpu.rw@0FF054=$4E75
    maincpu.rd@00A3BE=$4EB9000F
    maincpu.rw@00A3C2=$F056
    maincpu.rd@0FF056=$48411210
    maincpu.rd@0FF05A=$4A2B01F0
    maincpu.rd@0FF05E=$6604C207
    maincpu.rd@0FF062=$4E75323C
    maincpu.rd@0FF066=$00004E75
    maincpu.rd@00DD72=$4EB9000F
    maincpu.rd@00DD76=$F06A4E71
    maincpu.rd@00F548=$4EB9000F
    maincpu.rd@00F54C=$F06A4E71
    maincpu.rd@010736=$4EB9000F
    maincpu.rd@01073A=$F06A4E71
    maincpu.rd@010F94=$4EB9000F
    maincpu.rd@010F98=$F06A4E71
    maincpu.rd@0188D2=$4EB9000F
    maincpu.rd@0188D6=$F06A4E71
    maincpu.rd@019590=$4EB9000F
    maincpu.rd@019594=$F06A4E71
    maincpu.rd@019F00=$4EB9000F
    maincpu.rd@019F04=$F06A4E71
    maincpu.rd@029174=$4EB9000F
    maincpu.rd@029178=$F06A4E71
    maincpu.rd@02AD22=$4EB9000F
    maincpu.rd@02AD26=$F06A4E71
    maincpu.rd@0FF06A=$4A2B01F0
    maincpu.rw@0FF06E=$660A
    maincpu.rd@0FF070=$302C0018
    maincpu.rd@0FF074=$906B0018
    maincpu.rw@0FF078=$4E75
    maincpu.rd@0FF07A=$707F4E75
    maincpu.rd@01874A=$4EB9000F
    maincpu.rd@01874E=$F07E4E71
    maincpu.rd@0FF07E=$4A2B01F0
    maincpu.rw@0FF082=$660A
    maincpu.rd@0FF084=$302B00E0
    maincpu.rd@0FF088=$08000000
    maincpu.rw@0FF08C=$4E75
    maincpu.rd@0FF08E=$707F4E75
off:
    maincpu.rd@002B5E=temp0
    maincpu.rw@002B62=temp1
    maincpu.rd@0FF040=temp2
    maincpu.rd@0FF044=temp3
    maincpu.rd@0FF048=temp4
    maincpu.rd@0FF04C=temp5
    maincpu.rd@0FF050=temp6
    maincpu.rw@0FF054=temp7
    maincpu.rd@00A3BE=temp8
    maincpu.rw@00A3C2=temp9
    maincpu.rd@0FF056=temp10
    maincpu.rd@0FF05A=temp11
    maincpu.rd@0FF05E=temp12
    maincpu.rd@0FF062=temp13
    maincpu.rd@0FF066=temp14
    maincpu.rd@00DD72=temp15
    maincpu.rd@00DD76=temp16
    maincpu.rd@00F548=temp17
    maincpu.rd@00F54C=temp18
    maincpu.rd@010736=temp19
    maincpu.rd@01073A=temp20
    maincpu.rd@010F94=temp21
    maincpu.rd@010F98=temp22
    maincpu.rd@0188D2=temp23
    maincpu.rd@0188D6=temp24
    maincpu.rd@019590=temp25
    maincpu.rd@019594=temp26
    maincpu.rd@019F00=temp27
    maincpu.rd@019F04=temp28
    maincpu.rd@029174=temp29
    maincpu.rd@029178=temp30
    maincpu.rd@02AD22=temp31
    maincpu.rd@02AD26=temp32
    maincpu.rd@0FF06A=temp33
    maincpu.rw@0FF06E=temp34
    maincpu.rd@0FF070=temp35
    maincpu.rd@0FF074=temp36
    maincpu.rw@0FF078=temp37
    maincpu.rd@0FF07A=temp38
    maincpu.rd@01874A=temp39
    maincpu.rd@01874E=temp40
    maincpu.rd@0FF07E=temp41
    maincpu.rw@0FF082=temp42
    maincpu.rd@0FF084=temp43
    maincpu.rd@0FF088=temp44
    maincpu.rw@0FF08C=temp45
    maincpu.rd@0FF08E=temp46
script "Hit Anywhere (Both Players)"  
on:
    temp0=maincpu.rw@002B5E
run:
    maincpu.rw@002B5E=$4E71
off:
    maincpu.rw@002B5E=temp0
script " "  
script "P1 Infinite Energy"  
run:
    poke $108221 $CF
script "P1 Drain all Energy Now!"  
on:
    poke $108221 $00
script "P1 Always have Max POW"  
run:
    poke $108219 $7F
script "P1 Get Max POW Now!"  
on:
    poke $108219 $7F
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 Play with Rugal" \
 "comm:Use these on the character selection screen"  
on:
    poke $108231 $08
script " "  
script "P2 Infinite Energy"  
run:
    poke $108421 $CF
script "P2 Drain all Energy Now!"  
on:
    poke $108421 $00
script "P2 Always have Max POW"  
run:
    poke $108419 $7F
script "P2 Get Max POW Now!"  
on:
    poke $108419 $7F
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 Play with Rugal" \
 "comm:Use these on the character selection screen"  
on:
    poke $108431 $08
script " "  
script "No Background Music"  
run:
    cpu audio
    poke $FE2D $00
    cpu main
script "Hide Background" \
 "comm:Activate before match start"  
on:
    temp0=peek($108785)
    temp1=maincpu.rd@0009B6
    temp2=maincpu.rd@009218
    temp3=maincpu.rw@0093E6
    temp4=maincpu.rw@0340F4
    temp5=maincpu.rw@02F126
    temp6=maincpu.rw@00C39E
run:
    poke $108785 temp0bor20
    poke $10968E $0
    maincpu.rd@0009B6=$60244E71
    maincpu.rd@009218=$4E714E71
    maincpu.rw@0093E6=$6006
    maincpu.rw@0340F4=$6000
    maincpu.rw@02F126=$4E71
    maincpu.rw@00C39E=$4E71
    dpoke $10B8BA $8F8F
off:
    poke $108785 temp0
    maincpu.rd@0009B6=temp1
    maincpu.rd@009218=temp2
    maincpu.rw@0093E6=temp3
    maincpu.rw@0340F4=temp4
    maincpu.rw@02F126=temp5
    maincpu.rw@00C39E=temp6
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
