luascript "Console Mode [lua]" \
"comm:In training mode, press select and then start to select character.
Shin Akuma/Gouki is unlockable by start button in all modes."
run:
-- Start up --
if (peek(0xFF8076)==0x00) then
   if (peek(0xFF0000)~=0x06) then -- Restore original values at start in case of reset --
       poke(0x185A4,0x04)
       poke(0x185B2,0x08)
       p1win=0X00
       p2win=0X00
       lpoke(0x1426,0x2B400060)
       lpoke(0x143C,0x1B410060)
       lpoke(0x1430,0x2B400064)
       lpoke(0x1448,0x1B400064)
       dpoke(0x1394C,0x13FC)
       lpoke(0x13960,0x0061801F)
       dpoke(0x920FC,0x3B40)
       lpoke(0x7F92A,0x1D6C0082)
       dpoke(0x7F92E,0x0003)
   end
   if (peek(0xFF8001)>=0x0C) then -- Start button start --
       if (peek(0x804020)<0xFF) then
         poke(0xFF8076,0x09)
       end
   end
   poke(0xE5D7,"PRESS START")
end
-- Title screen --
if (peek(0xFFB31E)==0x9A) then
   if (peek(0xFF8076)>0x00) and (peek(0xFF80A8)==0x00) and (peek(0xFF8024)==0x01) then -- Disable original start & service button --
       lpoke(0x1426,0x00000000)
       lpoke(0x143C,0x00000000)
       lpoke(0xFF8060,0x00000000)
       lpoke(0x1430,0x00000000)
       lpoke(0x1448,0x00000000)
       region=peek(0xFF8091)
       if (peek(0xFF0000)~=0x06) then
         poke(0xFF0000,0x00) -- Set Arcade Mode as default --
       end
       if (peek(0x804020)==0xFF) and (peek(0xFF0000)~=0x06) then
         poke(0xFF0010,0x01)
       end
   end
   if peek(0xFF0010)==0x01 then -- Leaving title screen --
       if (peek(0x804020)==0xFE) or (peek(0x804020)==0xFD) then
          poke(0x618001,0x00) -- sound effect --
          poke(0x618003,0x8B)
          poke(0x61801F,0x00)
          poke(0xFF0010,0x02)
       end
   end
   -- Menu screen --
    if (peek(0xFF80A8)==0x00) and (peek(0xFF0010)==0x02) then
       if (peek(0x1394C)==0x00) then -- Restore sound effect when return from Option --
         dpoke(0x1394C,0x13FC)
         lpoke(0x13960,0x0061801F)
       end
       -- Text display in menu --
       dpoke(0xFF8012,0x0000) -- Stop flashing --
       poke(0xFF8024,0x00) -- Text and Logo shift --
       poke(0xFF803C,0xFE)
       lpoke(0x90C820,0xF422F523) -- Green color --
       lpoke(0x90C824,0xFFEEF6D5)
       lpoke(0x90C828,0xF4B5F3B5)
       lpoke(0x90C82C,0xF295F185)
       lpoke(0x90C860,0xF422F523) -- Orange color --
       lpoke(0x90C864,0xFFE9FFE9)
       lpoke(0x90C868,0xFFD5FE91)
       lpoke(0x90C86C,0xFD81FD81)
       lpoke(0x90C8E0,0xF555F948) -- White color --
       lpoke(0x90C8E4,0xFDDEFCCD)
       lpoke(0x90C8E8,0xFBBCFAAB)
       lpoke(0x90C8EC,0xF99AF889)
       lpoke(0x904188,0xA5A60001) -- Mode Select --
       lpoke(0x9041C8,0xA5A80001)
       lpoke(0x904208,0xA59D0001)
       lpoke(0x904248,0xA59E0001)
       lpoke(0x9042C8,0xA5AC0001)
       lpoke(0x904308,0xA59E0001)
       lpoke(0x904348,0xA5A50001)
       lpoke(0x904388,0xA59E0001)
       lpoke(0x9043C8,0xA59C0001)
       lpoke(0x904408,0xA5AD0001)
       lpoke(0x904190,0xA59A0000+peek(0xFF0020)) -- Arcade Mode --
       lpoke(0x9041D0,0xA5AB0000+peek(0xFF0020))
       lpoke(0x904210,0xA59C0000+peek(0xFF0020))
       lpoke(0x904250,0xA59A0000+peek(0xFF0020))
       lpoke(0x904290,0xA59D0000+peek(0xFF0020))
       lpoke(0x9042D0,0xA59E0000+peek(0xFF0020))
       lpoke(0x904350,0xA5A60000+peek(0xFF0020))
       lpoke(0x904390,0xA5A80000+peek(0xFF0020))
       lpoke(0x9043D0,0xA59D0000+peek(0xFF0020))
       lpoke(0x904410,0xA59E0000+peek(0xFF0020))
       lpoke(0x904194,0xA5AF0000+peek(0xFF0021)) -- Versus Mode --
       lpoke(0x9041D4,0xA59E0000+peek(0xFF0021))
       lpoke(0x904214,0xA5AB0000+peek(0xFF0021))
       lpoke(0x904254,0xA5AC0000+peek(0xFF0021))
       lpoke(0x904294,0xA5AE0000+peek(0xFF0021))
       lpoke(0x9042D4,0xA5AC0000+peek(0xFF0021))
       lpoke(0x904354,0xA5A60000+peek(0xFF0021))
       lpoke(0x904394,0xA5A80000+peek(0xFF0021))
       lpoke(0x9043D4,0xA59D0000+peek(0xFF0021))
       lpoke(0x904414,0xA59E0000+peek(0xFF0021))
       lpoke(0x904158,0xA5AD0000+peek(0xFF0022)) -- Training Mode --
       lpoke(0x904198,0xA5AB0000+peek(0xFF0022))
       lpoke(0x9041D8,0xA59A0000+peek(0xFF0022))
       lpoke(0x904218,0xA5A20000+peek(0xFF0022))
       lpoke(0x904258,0xA5A70000+peek(0xFF0022))
       lpoke(0x904298,0xA5A20000+peek(0xFF0022))
       lpoke(0x9042D8,0xA5A70000+peek(0xFF0022))
       lpoke(0x904318,0xA5A00000+peek(0xFF0022))
       lpoke(0x904398,0xA5A60000+peek(0xFF0022))
       lpoke(0x9043D8,0xA5A80000+peek(0xFF0022))
       lpoke(0x904418,0xA59D0000+peek(0xFF0022))
       lpoke(0x904458,0xA59E0000+peek(0xFF0022))
       lpoke(0x904160,0xA5AC0000+peek(0xFF0023)) -- Survival Mode --
       lpoke(0x9041A0,0xA5AE0000+peek(0xFF0023))
       lpoke(0x9041E0,0xA5AB0000+peek(0xFF0023))
       lpoke(0x904220,0xA5AF0000+peek(0xFF0023))
       lpoke(0x904260,0xA5A20000+peek(0xFF0023))
       lpoke(0x9042A0,0xA5AF0000+peek(0xFF0023))
       lpoke(0x9042E0,0xA59A0000+peek(0xFF0023))
       lpoke(0x904320,0xA5A50000+peek(0xFF0023))
       lpoke(0x9043A0,0xA5A60000+peek(0xFF0023))
       lpoke(0x904420,0xA59D0000+peek(0xFF0023))
       lpoke(0x904460,0xA59E0000+peek(0xFF0023))
       lpoke(0x9043E0,0xA5A80000+peek(0xFF0023))
       if (peek(0xFF8091)>=0x02) then -- Akuma Mode --
         lpoke(0x9041A4,0xA59A0000+peek(0xFF0024))
         lpoke(0x9041E4,0xA5A40000+peek(0xFF0024))
         lpoke(0x904224,0xA5AE0000+peek(0xFF0024))
         lpoke(0x904264,0xA5A60000+peek(0xFF0024))
         lpoke(0x9042A4,0xA59A0000+peek(0xFF0024))
         lpoke(0x904324,0xA5A60000+peek(0xFF0024))
         lpoke(0x904364,0xA5A80000+peek(0xFF0024))
         lpoke(0x9043A4,0xA59D0000+peek(0xFF0024))
         lpoke(0x9043E4,0xA59E0000+peek(0xFF0024))
       elseif (peek(0xFF8091)==0x00) then -- Gouki Mode --
         lpoke(0x9041A4,0xA5A00000+peek(0xFF0024))
         lpoke(0x9041E4,0xA5A80000+peek(0xFF0024))
         lpoke(0x904224,0xA5AE0000+peek(0xFF0024))
         lpoke(0x904264,0xA5A40000+peek(0xFF0024))
         lpoke(0x9042A4,0xA5A20000+peek(0xFF0024))
         lpoke(0x904324,0xA5A60000+peek(0xFF0024))
         lpoke(0x904364,0xA5A80000+peek(0xFF0024))
         lpoke(0x9043A4,0xA59D0000+peek(0xFF0024))
         lpoke(0x9043E4,0xA59E0000+peek(0xFF0024))
       end
       lpoke(0x904128,0xA59D0000+peek(0xFF0025)) -- Dramatic Battle --
       lpoke(0x904168,0xA5AB0000+peek(0xFF0025))
       lpoke(0x9041A8,0xA59A0000+peek(0xFF0025))
       lpoke(0x9041E8,0xA5A60000+peek(0xFF0025))
       lpoke(0x904228,0xA59A0000+peek(0xFF0025))
       lpoke(0x904268,0xA5AD0000+peek(0xFF0025))
       lpoke(0x9042A8,0xA5A20000+peek(0xFF0025))
       lpoke(0x9042E8,0xA59C0000+peek(0xFF0025))
       lpoke(0x904368,0xA59B0000+peek(0xFF0025))
       lpoke(0x9043A8,0xA59A0000+peek(0xFF0025))
       lpoke(0x9043E8,0xA5AD0000+peek(0xFF0025))
       lpoke(0x904428,0xA5AD0000+peek(0xFF0025))
       lpoke(0x904468,0xA5A50000+peek(0xFF0025))
       lpoke(0x9044A8,0xA59E0000+peek(0xFF0025))
       lpoke(0x904230,0xA5A80000+peek(0xFF0026)) -- Option --
       lpoke(0x904270,0xA5A90000+peek(0xFF0026))
       lpoke(0x9042B0,0xA5AD0000+peek(0xFF0026))
       lpoke(0x9042F0,0xA5A20000+peek(0xFF0026))
       lpoke(0x904330,0xA5A80000+peek(0xFF0026))
       lpoke(0x904370,0xA5A70000+peek(0xFF0026))
       mode=peek(0xFF0000)
       if mode==0x00 then -- Arcade Mode pointer --
          poke(0xFF0020,0x03)
          poke(0xFF0021,0x07)
          poke(0xFF0022,0x07)
          poke(0xFF0023,0x07)
          poke(0xFF0024,0x07)
          poke(0xFF0025,0x07)
          poke(0xFF0026,0x07)
       elseif mode==0x01 then -- Versus Mode pointer --
          poke(0xFF0020,0x07)
          poke(0xFF0021,0x03)
          poke(0xFF0022,0x07)
          poke(0xFF0023,0x07)
          poke(0xFF0024,0x07)
          poke(0xFF0025,0x07)
          poke(0xFF0026,0x07)
       elseif mode==0x02 then -- Training Mode pointer --
          poke(0xFF0020,0x07)
          poke(0xFF0021,0x07)
          poke(0xFF0022,0x03)
          poke(0xFF0023,0x07)
          poke(0xFF0024,0x07)
          poke(0xFF0025,0x07)
          poke(0xFF0026,0x07)
       elseif mode==0x03 then -- Survival Mode pointer --
          poke(0xFF0020,0x07)
          poke(0xFF0021,0x07)
          poke(0xFF0022,0x07)
          poke(0xFF0023,0x03)
          poke(0xFF0024,0x07)
          poke(0xFF0025,0x07)
          poke(0xFF0026,0x07)
       elseif mode==0x04 then -- Akuma Mode pointer --
          poke(0xFF0020,0x07)
          poke(0xFF0021,0x07)
          poke(0xFF0022,0x07)
          poke(0xFF0023,0x07)
          poke(0xFF0024,0x03)
          poke(0xFF0025,0x07)
          poke(0xFF0026,0x07)
       elseif mode==0x05 then -- Dramatic Battle pointer --
          poke(0xFF0020,0x07)
          poke(0xFF0021,0x07)
          poke(0xFF0022,0x07)
          poke(0xFF0023,0x07)
          poke(0xFF0024,0x07)
          poke(0xFF0025,0x03)
          poke(0xFF0026,0x07)
       elseif mode==0x06 then -- Option pointer --
          poke(0xFF0020,0x07)
          poke(0xFF0021,0x07)
          poke(0xFF0022,0x07)
          poke(0xFF0023,0x07)
          poke(0xFF0024,0x07)
          poke(0xFF0025,0x07)
          poke(0xFF0026,0x03)
       end
       -- Control in the Menu screen --
       if ((peek(0x804001)==0xFF) and (peek(0x804000)==0xFF)) and (peek(0xFF0001)==0xFF) then
          poke(0xFF0001,0x00) -- Act as button 'stopper' --
          poke(0xFF0011,0x00) -- Act as music 'stopper' --
       end
       if (peek(0x804001)==0xFB) or (peek(0x804000)==0xFB) then
          if peek(0xFF0011)==0x00 then -- Sound effect --
            poke(0x618001,0x00)
            poke(0x618003,0x82)
            poke(0x61801F,0x00)
            poke(0xFF0011,0xFF)
          end
          if (dpeek(0xFF0000)==0x0000) then
            dpoke(0xFF0000,0x01FF)
          elseif (dpeek(0xFF0000)==0x0100) then
            dpoke(0xFF0000,0x02FF)
          elseif (dpeek(0xFF0000)==0x0200) then
    	      dpoke(0xFF0000,0x03FF)
          elseif (dpeek(0xFF0000)==0x0300) then
            dpoke(0xFF0000,0x04FF)
          elseif (dpeek(0xFF0000)==0x0400) then
            dpoke(0xFF0000,0x05FF)
          elseif (dpeek(0xFF0000)==0x0500) then
            dpoke(0xFF0000,0x06FF)
          elseif (dpeek(0xFF0000)==0x0600) then
            dpoke(0xFF0000,0x00FF)
          end
       end
       if (peek(0x804001)==0xF7) or (peek(0x804000)==0xF7) then
          if peek(0xFF0011)==0x00 then -- Sound effect --
            poke(0x618001,0x00)
            poke(0x618003,0x82)
            poke(0x61801F,0x00)
            poke(0xFF0011,0xFF)
          end
          if (dpeek(0xFF0000)==0x0000) then
            dpoke(0xFF0000,0x06FF)
          elseif (dpeek(0xFF0000)==0x0600) then
            dpoke(0xFF0000,0x05FF)
          elseif (dpeek(0xFF0000)==0x0500) then
            dpoke(0xFF0000,0x04FF)
          elseif (dpeek(0xFF0000)==0x0400) then
            dpoke(0xFF0000,0x03FF)
          elseif (dpeek(0xFF0000)==0x0300) then
            dpoke(0xFF0000,0x02FF)
          elseif (dpeek(0xFF0000)==0x0200) then
            dpoke(0xFF0000,0x01FF)
          elseif (dpeek(0xFF0000)==0x0100) then
           dpoke(0xFF0000,0x00FF)
          end
       end
       -- Start game --
       if (peek(0xFF8058)>0x00) then -- P1 start game --
          poke(0xFF8060,0x01) -- start --
          poke(0x618001,0x00) -- sound effect --
          poke(0x618003,0xFA)
          poke(0x61801F,0x00)
       end
       if (peek(0xFF805C)>0x00) then -- P2 start game --
          poke(0xFF8060,0x02) -- start --
          poke(0x618001,0x00) -- sound effect --
          poke(0x618003,0xFA)
          poke(0x61801F,0x00)
       end
    end
   if (peek(0xFF8001)==0x00) and (peek(0xFF80A8)>0x00) and (peek(0xFF0000)~=0x06) then -- Restore value after start --
       poke(0xFF8024,0x01)
       poke(0xFF803C,0x00)
       poke(0xFF0010,0x00)
       lpoke(0x1426,0x2B400060)
       lpoke(0x143C,0x1B410060)
       lpoke(0x1430,0x2B400064)
       lpoke(0x1448,0x1B400064)
       -- #poke(0xFF0005,0x00) #restore counter used in option## --
   end
end
-- Infinity Credits --
if (peek(0xFF8076)>0x00) then
    poke(0xFF8076,0x09)
end
-- VS Mode Script --
if (peek(0xFF0000)==0x01) then
    if (peek(0xFFB31E)==0x9A) and (peek(0xFF80A8)>0x00) then
    poke(0xFF8076,0x09)
    poke(0xFF80A8,0x03)
    end
    if (dpeek(0xFF8020)==0x92A0) and ((peek(0xFF848C)==0x09) or (peek(0xFF888C)==0x09)) then
    p1win=peek(0xFF84B0) -- Memorizes the P1 win point --
    p2win=peek(0xFF88B0) -- Memorizes the P2 win point --
    poke(0xFF8480,0x00)
    poke(0xFF8880,0x00)
    poke(0xFF80AC,0x00)
    poke(0xFF808D,0x03)
    poke(0xFF8484,0x04)
    poke(0xFF8884,0x04)
    end
    if (dpeek(0xFFB31E)==0x7AAC) then
    poke(0xFF84B0,p1win) -- Load the P1 win point --
    poke(0xFF88B0,p2win) -- Load the P2 win point --
    end
end
-- Training Mode Script --
if (peek(0xFF0000)==0x02) then
    if (peek(0xFFB31E)==0x9A) and (peek(0xFF80A8)>0x00) then
    poke(0xFF80A8,0x03)
    end
    if (dpeek(0xFFB31E)==0x7AAC) and (((peek(0xFFB10E)==0x00) and (peek(0xFF80AC)==0x01)) or ((peek(0xFFAF0E)==0x00) and (peek(0xFF80AC)==0x02))) then
    poke(0x185A4,0x08)
    poke(0x185B2,0x04)
    end
    if (dpeek(0xFFB31E)==0x99C2) and (peek(0xFF80AC)==0x03) then
    poke(0x185A4,0x04)
    poke(0x185B2,0x08)
    end
    if (peek(0xFF8109)>=0x62) then
       poke(0xFF810A,0x30)
       poke(0xFF8451,0x90)
       poke(0xFF8453,0x90)
       poke(0xFF8851,0x90)
       poke(0xFF8853,0x90)
       poke(0xFF849F,0x90)
       poke(0xFF889F,0x90)
    end
    if (peek(0xFF8009)==0x04) and (peek(0xFF800D)==0x02) then
       if (peek(0xFF8000)==0x01) and ((peek(0xFF849C)==0x80) or (peek(0xFF889C)==0x80)) then
       poke(0xFF8480,0x00)
       poke(0xFF8880,0x00)
       end
       if (peek(0xFF8000)==0x01) and (peek(0xFF8885)==0x02) then
       poke(0xFF8484,0x04)
       poke(0xFF8884,0x04)
       poke(0xFF80AC,0x00)
       poke(0xFF8109,0x00)
       end
    end
end
-- Survival Mode Script --
if (peek(0xFF0000)==0x03) then
    poke(0xFF84CB,0xFF)
    poke(0xFF816D,0x00)
end
-- Akuma/Gouki Mode Script --
if (peek(0xFF0000)==0x04) then
    poke(0xFF8148,0x01)
end
-- Dramatic Mode Plus Script --
if (peek(0xFF0000)==0x05) then
    if (dpeek(0xFF802A)==0x0040) then -- Character Screen background --
       poke(0xFF8052,0x04)
    end
    if (dpeek(0xFFB31E)==0x7AAC) then
       if (peek(0xFF80A8)==0x03) and (peek(0xFF80AC)<0x03) then -- 2P game, switch to ori. char screen --
         poke(0xFF816C,0x00)
       end
       if (peek(0xFF80A8)==0x03) and (peek(0xFF80AC)==0x03) then -- 2P game, switch to dramatic char screen --
         poke(0xFF816C,0x01)
         poke(0xFF815F,0x03)
       end
       if (peek(0xFF80A8)<0x03) and (peek(0xFF80AC)==0x00) then -- 1P game, switch to ori. char screen --
         poke(0xFF816C,0x00)
       end
       if (peek(0xFF80A8)<0x03) and ((peek(0xFF80AC)==0x01) or (peek(0xFF80AC)==0x02)) then -- 1P game, switch to dramatic char screen --
         poke(0xFF816C,0x01)
         poke(0xFF815F,0x03)
       end
       if (peek(0xFF816D)==0x01) and (peek(0xFF88CA)==0x00) and (peek(0xFF84CA)==0x00) then -- Enable Evil Ryu for CPU. --
          poke(0xFF816D,0x00)
          poke(0xFF0005,0x01) -- Prpare for Shin Akuma --
       end
       if (peek(0xFF8009)==0x08) then -- Restoration --
          poke(0xFF0005,0x00)
          poke(0xFF80A8,0x00)
       end
    end
    if (peek(0xFF8009)==0x0A) then -- Case for here come a new challenger --
       poke(0xFF80A8,0x03)
    end
end
-- Option Mode Script --
if (peek(0xFF0000)==0x06) then
    if (peek(0xFF8083)==0x00) and (peek(0xFFB31E)==0x9A) then -- Step 1 --
       poke(0xFF8091,0x02) -- English menu --
       dpoke(0x1394C,0x0000) -- No announcer's voice later & prevent cut of sound effect --
       lpoke(0x13960,0x00000000)
       poke(0xFF8064,0x02)
       poke(0xFF0006,0x01)
    end
    if (peek(0xFF8001)==0x02) and (peek(0xFF0006)==0x01) then -- step 2 --
       lpoke(0x1430,0x2B400064)
       lpoke(0x1448,0x1B400064)
       poke(0x920FC,0x0000) -- skip some part in startup --
       poke(0xFF0006,0x02)
    end
    if (peek(0xFF8001)==0x06) and (peek(0xFF0006)==0x02) then -- step 3 --
       poke(0xFF8091,region)
       poke(0xFF8003,0x00)
       poke(0xFF8024,0x00) -- Hide warning text --
       poke(0xFF8076,0x09)
       dpoke(0x920FC,0x3B40)
       poke(0xFF0010,0x02) -- Return to menu --
       poke(0xFF0006,0x00)
    end
end
-- Pause Function Script. --
    if (peek(0xFF8009)==0x04) and (peek(0xFF800D)==0x02) then
       if (peek(0x804020)==0xFF) then
       poke(0xFF0002,0x00)
       end
       if (peek(0xFF8000)==0x00) and ((peek(0x804020)==0xEF) or (peek(0x804020)==0xDF)) and (peek(0xFF0002)==0x00) then
       poke(0xFF8000,0x01)
       poke(0xFF0002,0xFF)
       end
       if (peek(0xFF8000)==0x01) and ((peek(0x804020)==0xEF) or (peek(0x804020)==0xDF)) and (peek(0xFF0002)==0x00) then
       poke(0xFF8000,0x00)
       poke(0xFF0002,0xFF)
       end
    end
-- Enable Shin Akuma Script. --
if (peek(0xFF0005)==0x00) then -- Normal case --
    if (dpeek(0xFFB31E)==0x7AAC) and ((peek(0xFF80AC)==0x00) or (peek(0xFF80AC)==0x02)) then -- P1 --
       if (peek(0xFF8482)==0x02) and (peek(0xFF849A)==0x80) and (peek(0xFF0003)==0x00) then
       poke(0xFF8482,0x14)
       end
       if (peek(0xFF8482)==0x14) and (peek(0xFF849A)==0x00) then
       poke(0xFF0003,0x01)
       end
       if (peek(0xFF8482)==0x14) and (peek(0xFF849A)==0x80) and (peek(0xFF0003)==0x01) then
       poke(0xFF8482,0x02)
       end
       if (peek(0xFF8482)==0x02) and (peek(0xFF849A)==0x00) then
       poke(0xFF0003,0x00)
       end
     end
    if (dpeek(0xFFB31E)==0x7AAC) and ((peek(0xFF80AC)==0x00) or (peek(0xFF80AC)==0x01)) then -- P2 --
       if (peek(0xFF8882)==0x02) and (peek(0xFF889A)==0x80) and (peek(0xFF0004)==0x00) then
       poke(0xFF8882,0x14)
       end
       if (peek(0xFF8882)==0x14) and (peek(0xFF889A)==0x00) then
       poke(0xFF0004,0x01)
       end
       if (peek(0xFF8882)==0x14) and (peek(0xFF889A)==0x80) and (peek(0xFF0004)==0x01) then
       poke(0xFF8882,0x02)
       end
       if (peek(0xFF8882)==0x02) and (peek(0xFF889A)==0x00) then
       poke(0xFF0004,0x00)
       end
     end
end
if (peek(0xFF0000)==0x05) and (peek(0xFF0005)==0x01) then
    if (dpeek(0xFFB31E)==0x7AAC) and (peek(0xFF80A8)==0x01) then -- P1's partner in Dramatic Battle --
       if (peek(0xFF8882)==0x02) and (peek(0xFF849A)==0x80) and (peek(0xFF0004)==0x00) then
         lpoke(0x7F92A,0x00000000)
         dpoke(0x7F92E,0x0000)
         poke(0xFFAE03,0x02)
         poke(0xFF8882,0x14)
       end
       if (peek(0xFF8882)==0x14) and (peek(0xFF849A)==0x00) then
         poke(0xFF0004,0x01)
       end
       if (peek(0xFF8882)==0x14) and (peek(0xFF849A)==0x80) and (peek(0xFF0004)==0x01) then
         poke(0xFF8882,0x02)
       end
       if (peek(0xFF8882)==0x02) and (peek(0xFF849A)==0x00) then
         poke(0xFF0004,0x00)
       end
       if (peek(0xFF8882)~=0x14) or (peek(0xFF8009)==0x08) then
         lpoke(0x7F92A,0x1D6C0082)
         dpoke(0x7F92E,0x0003)
       end
     end
    if (dpeek(0xFFB31E)==0x7AAC) and (peek(0xFF80A8)==0x02) then -- P2's partner in Dramatic Battle --
       if (peek(0xFF8482)==0x02) and (peek(0xFF889A)==0x80) and (peek(0xFF0003)==0x00) then
         lpoke(0x7F92A,0x00000000)
         dpoke(0x7F92E,0x0000)
         poke(0xFFAE03,0x02)
         poke(0xFF8482,0x14)
       end
       if (peek(0xFF8482)==0x14) and (peek(0xFF889A)==0x00) then
         poke(0xFF0003,0x01)
       end
       if (peek(0xFF8482)==0x14) and (peek(0xFF889A)==0x80) and (peek(0xFF0003)==0x01) then
         poke(0xFF8482,0x02)
       end
       if (peek(0xFF8482)==0x02) and (peek(0xFF889A)==0x00) then
         poke(0xFF0003,0x00)
       end
       if (peek(0xFF8482)~=0x14) or (peek(0xFF8009)==0x08) then
         lpoke(0x7F92A,0x1D6C0082)
         dpoke(0x7F92E,0x0003)
       end
     end
end
off:
    poke(0xE5D7,"INSERT COIN")
    poke(0x185A4,0x04)
    poke(0x185B2,0x08)
    lpoke(0x1426,0x2B400060)
    lpoke(0x143C,0x1B410060)
    lpoke(0x1430,0x2B400064)
    lpoke(0x1448,0x1B400064)
    dpoke(0x1394C,0x13FC)
    lpoke(0x13960,0x0061801F)
    dpoke(0x920FC,0x3B40)
    lpoke(0x7F92A,0x1D6C0082)
    dpoke(0x7F92E,0x0003)

script "Green Player Select Screen" \
"comm:Activiate and then close it. The effect will be lasting until the emulator is closed.
This work on the modes that originally have yellow Player Select Screen.
Effect can be overrided by 'Blue Player Select Screen' or 'Special Player Select Screen'."
on:
if (peek($2A6112)!=$02)
    lpoke $2A6112 $02C304D2
    lpoke $2A6116 $06E108F0
    lpoke $2A611A $0AF00CF0
    lpoke $2A611E $0DF002C3
    lpoke $2A6122 $04D206E1
    lpoke $2A6126 $08F00AF0
    lpoke $2A612A $0CF00DF0
    lpoke $2A6132 $02B402C3
    lpoke $2A6136 $04D206E1
    lpoke $2A613A $08F00AF0
    lpoke $2A613E $0CF002C3
    lpoke $2A6142 $04D206E1
    lpoke $2A6146 $08F00FF0
    lpoke $2A614A $0CF00DF0
    lpoke $2A6152 $02A502B4
    lpoke $2A6156 $02C304D2
    lpoke $2A615A $06E108F0
    lpoke $2A615E $0AF002B4
    lpoke $2A6162 $02C304D2
    lpoke $2A6166 $06E108F0
    lpoke $2A616A $0AF00CF0
    lpoke $2A6172 $029602A5
    lpoke $2A6176 $02B402C3
    lpoke $2A617A $04D206E1
    lpoke $2A617E $08F002A5
    lpoke $2A6182 $02B402C3
    lpoke $2A6186 $04D206E1
    lpoke $2A618A $08F00AF0
    lpoke $2A6192 $02870296
    lpoke $2A6196 $02A502B4
    lpoke $2A619A $02C304D2
    lpoke $2A619E $06E10296
    lpoke $2A61A2 $02A502B4
    lpoke $2A61A6 $02C304D2
    lpoke $2A61AA $06E108F0
    lpoke $2A61B2 $02780287
    lpoke $2A61B6 $029602A5
    lpoke $2A61BA $02B402C3
    lpoke $2A61BE $04D20287
    lpoke $2A61C2 $029602A5
    lpoke $2A61C6 $02B402C3
    lpoke $2A61CA $04D206E1
    lpoke $2A61D2 $02790278
    lpoke $2A61D6 $02870296
    lpoke $2A61DA $02A502B4
    lpoke $2A61DE $02C30278
    lpoke $2A61E2 $02870296
    lpoke $2A61E6 $02A502B4
    lpoke $2A61EA $02C304D2
    lpoke $2A61F2 $027A0279
    lpoke $2A61F6 $02780287
    lpoke $2A61FA $029602A5
    lpoke $2A61FE $02B40279
    lpoke $2A6202 $02780287
    lpoke $2A6206 $029602A5
    lpoke $2A620A $02B402C3
endif

script "Blue Player Select Screen" \
"comm:Not work on hidden modes."
run:
    if (dpeek($FF802A)==$0040)
    poke $FF8052 $06
    endif

script "Special Player Select Screen" \
"comm:Not work on hidden modes."
run:
    if (dpeek($FF802A)==$0040)or(dpeek($FF802A)==$0640)
    poke $FF8052 $04
    endif

script "Brown Title Screen" \
"comm:Activiate before Title screen and then close it. The effect will be lasting until the emulator is closed."
on:
if (peek($28E3F0)!=$02)
    lpoke $28E3F0 $02100210
    lpoke $28E3F4 $02100210
    lpoke $28E3F8 $02100420
    lpoke $28E3FC $06310853
    lpoke $28E400 $09740CA7
    lpoke $28E404 $02100210
endif

script "Light Blue Title Screen" \
"comm:Activiate before Title screen and then close it. The effect will be lasting until the emulator is closed."
on:
if (peek($28E3F0)!=$04)
    lpoke $28E3F0 $048D048D
    lpoke $28E3F4 $048D048D
    lpoke $28E3F8 $048D03AB
    lpoke $28E3FC $03BA03C9
    lpoke $28E400 $03D804F6
    lpoke $28E404 $048D048D
endif

script "Stop Flashing on Title Screen"
run:
    if (peek($FFB31E)==$9A)
    dpoke $FF8012 $0000
    endif

script "Free Play Mode 'ON'"
run:
    poke $FF809C $01
script "Infinite Time"
run:
    poke $FF8109 $63
script "Finish this Round Now!" \
 "comm:Disable Infinite Time before activating this cheat"
on:
    poke $FF8109 $00
script "Change to Normal Mode Now!"
on:
    poke $FF816C $00
    poke $FF84CB $00
script "Change to Dramatic Battle Now!"
on:
    poke $FF816C $01
    poke $FF84CB $00
script "Change to Survival Mode Now!"
on:
    poke $FF84CB $FF
    poke $FF816C $00
script "Next fight is last fight Now! (Normal)"
on:
    poke $FF8115 $07
script "Next fight is last fight Now! (Dramatic)"
on:
    poke $FF8115 $03
script "Next fight is last fight Now! (Survival)"
on:
    poke $FF8115 $11
script "Select Next Stage Now!" \
 "comm:Use this after you have won a stage and 'WINNER' is displayed. However, when you finish the game it will finish as if you where on Akuma's Island regardless of stage chosen." \
 "0x00/Japan (Snow)"\
 "0x02/USA (Boat)"\
 "0x04/Japan (Akuma's Island)"\
 "0x06/USA (Plane)"\
 "0x08/China (Bikes)"\
 "0x0A/Thailand (Lakeside)"\
 "0x0C/USA (Truck)"\
 "0x0E/USA (Alley)"\
 "0x10/England (Toilets)"\
 "0x12/Italy (Venice)"\
 "0x14/Brazil (Plane)"\
 "0x16/Thailand (Buddha)"\
 "0x18/Hong Kong (Market)"\
 "0x1A/Japan (Outside House)"\
 "0x1C/USA (Yard)"\
 "0x1E/India (Elephants)"\
 "0x20/USSR (Factory)"\
 "0x22/China (Alley)"\
 "0x24/Australia (Crop Field)"\
 "0x26/Venezuela (Waterfall)"
change:
    poke $FF8101 param
script " "
script "P1 Infinite Energy"
run:
    poke $FF8451 $90
    poke $FF8453 $90
script "P1 Drain All Energy Now!"
on:
    poke $FF8451 $00
    poke $FF8453 $00
script "P1 Always have Maximum POW"
run:
    poke $FF849F $90
script "P1 Always have Minimum POW"
run:
    poke $FF849F $00
script "P1 Get Maximum POW Now!"
on:
    poke $FF849F $90
script "P1 Get Minimum POW Now!"
on:
    poke $FF849F $00
script "P1 Infinite Custom Combo"
run:
    poke $FF8699 $B0
    poke $FF869A $00
script "P1 Never Faint"
run:
    poke $FF8537 $00
script "P1 Select Colour Scheme" \
 "comm:Use after picking character" \
 inter=0,5,1
change:
    poke $FF84A8 (param)
script "P1 Enable Rival Character"
run:
    poke $FF84C6 $05
script "P1 Enable CPU Shin Gouki"
run:
    poke $FF84C8 $03
script "P1 Disable Rival Character"
run:
    poke $FF84C6 $00
script "P1 Disable CPU Shin Gouki"
run:
    poke $FF84C8 $00
script "P1 Select Character" \
 "comm:Free player selection - Use on level VS screen" \
 "0x00/Ryu"\
 "0x01/Ken"\
 "0x02/Akuma"\
 "0x03/Charlie"\
 "0x04/Chun-Li"\
 "0x05/Adon"\
 "0x06/Sodom"\
 "0x07/Guy"\
 "0x08/Birdie"\
 "0x09/Rose"\
 "0x0A/M. Bison"\
 "0x0B/Sagat"\
 "0x0C/Dan"\
 "0x0D/Sakura"\
 "0x0E/Rolento"\
 "0x0F/Dhalsim"\
 "0x10/Zangief"\
 "0x11/Gen"\
 "0x12/Chun-Li (SF2)"\
 "0x14/Akuma (Blue)"\
 "0x17/Evil Ryu"
change:
    poke $FF8482 param
script " "
script "P2 Infinite Energy"
run:
    poke $FF8851 $90
    poke $FF8853 $90
script "P2 Drain All Energy Now!"
on:
    poke $FF8851 $00
    poke $FF8853 $00
script "P2 Always have Maximum POW"
run:
    poke $FF889F $90
script "P2 Always have Minimum POW"
run:
    poke $FF889F $00
script "P2 Get Maximum POW Now!"
on:
    poke $FF889F $90
script "P2 Get Minimum POW Now!"
on:
    poke $FF889F $00
script "P2 Infinite Custom Combo"
run:
    poke $FF8A99 $B0
    poke $FF8A9A $00
script "P2 Never Faint"
run:
    poke $FF8937 $00
script "P2 Select Colour Scheme" \
 "comm:Use after picking character" \
 inter=0,5,1
change:
    poke $FF88A8 (param)
script "P2 Enable Rival Character"
run:
    poke $FF88C6 $05
script "P2 Enable CPU Shin Gouki"
run:
    poke $FF88C8 $03
script "P2 Disable Rival Character"
run:
    poke $FF88C6 $00
script "P2 Disable CPU Shin Gouki"
run:
    poke $FF88C8 $00
script "P2 Select Character" \
 "comm:Free player selection - Use on level VS screen" \
 "0x00/Ryu"\
 "0x01/Ken"\
 "0x02/Akuma"\
 "0x03/Charlie"\
 "0x04/Chun-Li"\
 "0x05/Adon"\
 "0x06/Sodom"\
 "0x07/Guy"\
 "0x08/Birdie"\
 "0x09/Rose"\
 "0x0A/M. Bison"\
 "0x0B/Sagat"\
 "0x0C/Dan"\
 "0x0D/Sakura"\
 "0x0E/Rolento"\
 "0x0F/Dhalsim"\
 "0x10/Zangief"\
 "0x11/Gen"\
 "0x12/Chun-Li (SF2)"\
 "0x14/Akuma (Blue)"\
 "0x17/Evil Ryu"
change:
    poke $FF8882 param
script " "
script "P3 Infinite Energy"
run:
    poke $FF8C51 $90
    poke $FF8C53 $90
script "P3 Drain All Energy Now!"
on:
    poke $FF8C51 $00
    poke $FF8C53 $00
script "P3 Always have Maximum POW"
run:
    poke $FF8C9F $90
script "P3 Always have Minimum POW"
run:
    poke $FF8C9F $00
script "P3 Get Maximum POW Now!"
on:
    poke $FF8C9F $90
script "P3 Get Minimum POW Now!"
on:
    poke $FF8C9F $00
script "P3 Infinite Custom Combo"
run:
    poke $FF8E99 $B0
    poke $FF8E9A $00
script "P3 Never Faint"
run:
    poke $FF8D37 $00
script "P3 Select Colour Scheme" \
 "comm:Use after picking character" \
 inter=0,5,1
change:
    poke $FF8CA8 (param)
script "P3 Enable Rival Character"
run:
    poke $FF8CC6 $05
script "P3 Enable CPU Shin Gouki"
run:
    poke $FF8CC8 $03
script "P3 Disable Rival Character"
run:
    poke $FF8CC6 $00
script "P3 Disable CPU Shin Gouki"
run:
    poke $FF8CC8 $00
script "P3 Select Character" \
 "comm:Free player selection - Use on level VS screen" \
 "0x00/Ryu"\
 "0x01/Ken"\
 "0x02/Akuma"\
 "0x03/Charlie"\
 "0x04/Chun-Li"\
 "0x05/Adon"\
 "0x06/Sodom"\
 "0x07/Guy"\
 "0x08/Birdie"\
 "0x09/Rose"\
 "0x0A/M. Bison"\
 "0x0B/Sagat"\
 "0x0C/Dan"\
 "0x0D/Sakura"\
 "0x0E/Rolento"\
 "0x0F/Dhalsim"\
 "0x10/Zangief"\
 "0x11/Gen"\
 "0x12/Chun-Li (SF2)"\
 "0x14/Akuma (Blue)"\
 "0x17/Evil Ryu"
change:
    poke $FF8C82 param
script " "
script "No Background Music"
run:
    cpu audio
    dpoke $F018 $0000
    cpu main