script "Invincibility"  
on:
    temp0=maincpu.rd@01DBC0
    temp1=maincpu.rd@01DBC4
    temp2=maincpu.rd@01DBC8
    temp3=maincpu.rd@01DBCC
    temp4=maincpu.rd@01DFC6
    temp5=maincpu.rd@01E030
run:
    maincpu.rd@01DBC0=$B1FC0010
    maincpu.rd@01DBC4=$40806304
    maincpu.rd@01DBC8=$70014E75
    maincpu.rd@01DBCC=$70004E75
    maincpu.rd@01DFC6=$6000FBF8
    maincpu.rd@01E030=$6000FB8E
off:
    maincpu.rd@01DBC0=temp0
    maincpu.rd@01DBC4=temp1
    maincpu.rd@01DBC8=temp2
    maincpu.rd@01DBCC=temp3
    maincpu.rd@01DFC6=temp4
    maincpu.rd@01E030=temp5
script " "  
script "P1 Infinite Continues"  
run:
    poke $106023 $64
script "P1 Infinite Energy"  
run:
    poke $10405B $32
script "P1 Maximum weapon power"  
run:
    poke $104052 $FF
script "P1 Infinite Magic"  
run:
    poke $10405C $63
script "P1 Infinite Money"  
run:
    poke $104066 $FF
    poke $104067 $FF
script "P1 Rapid Fire"  
run:
    poke $10FD96 $00|(peek($10FD96)&~10)
script " "  
script "P2 Infinite Continues"  
run:
    poke $106043 $64
script "P2 Infinite Energy"  
run:
    poke $1040DB $32
script "P2 Maximum weapon power"  
run:
    poke $1040D2 $FF
script "P2 Infinite Magic"  
run:
    poke $1040DC $63
script "P2 Infinite Money"  
run:
    poke $1040E6 $FF
    poke $1040E7 $FF
script "P2 Rapid Fire"  
run:
    poke $10FD9C $00|(peek($10FD9C)&~10)
script " "  
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
script "Sound Test" \
 inter=1,255,1 
change:
    dpoke $1002A2 $A702
    dpoke $1002A4 $A702
    poke $1002A6 param
    poke $1002A7 $FF
    poke $1002A8 param
    dpoke $1002A2 $A902
    dpoke $1002A4 $A902
script "Mute All Music" \
 "comm:Fully mutes all music, including BIOS music"  
on:
    if peek($0109)==$03
      temp0=$04AC
    endif
    if peek($0109)==$05
      temp0=$D2A4
    endif
    if peek($0109)==$09
      temp0=$CEBD
    endif
    if peek($0109)==$12
      temp0=$04AC
    endif
    if peek($0109)==$17
      temp0=$04AC
    endif
    if peek($0109)==$22
      temp0=$CEC0
    endif
    if peek($0109)==$24
      temp0=$04C2
    endif
    if peek($0109)==$37
      temp0=$03ED
    endif
    if peek($0109)==$38
      temp0=$03ED
    endif
    if peek($0109)==$50
      temp0=$03ED
    endif
    if peek($0109)==$53
      temp0=$03FE
    endif
    if peek($0109)==$54
      temp0=$03ED
    endif
    if peek($0109)==$57
      temp0=$040D
    endif
    if peek($0109)==$64
      temp0=$0408
    endif
    if peek($0109)==$74
      temp0=$0408
    endif
    if peek($0109)==$90
      temp0=$04AC
    endif
run:
    if audiocpu.rb@temp0==$32
      audiocpu.rb@temp0=$C9
    endif
off:
    if audiocpu.rb@temp0==$C9
      audiocpu.rb@temp0=$32
    endif
