---------------------------------------------------------------------
                     Input Macro driver  v0.4a

                         written by Gangta
                       gangtakun@hotmail.com
---------------------------------------------------------------------

 Credits:

  HyperYagami: External file support is based on his cheat engine

        Jyaku: For online/offline testing and reporting bugs

 Mr K aka MHz: Ideas of input macro came from Kawaks input macro

---------------------------------------------------------------------

 Version History:

  v0.1  - Primitive input macro
          Each macro is hard coded into the game driver
  v0.2  - Intput macro can be disabled or enabled
        - Added more input macro types (normal, auto, block)
  v0.3  - External macro support based on HyerYagami's cheat engine.
          Write your own intput macro for each game:)
  v0.4  - Added some shortcut moves and ~xx for holding xx frames
          Switched the style similar to Kawaks macro
  v0.4a - Fixed weird crash bug (thanks to Jyaku for testing)

---------------------------------------------------------------------

 How to define input macro:  // 怎样设定组合键

  Edit the fbcombo.dat with Notepad. //编辑combo目录下的fbacombo.dat文件
  fbcombo.dat must be in the /combo/ directory under
  the FBA direcotry.

---------------------------------------------------------------------

 Rules for input macro  // 编写规则：

  combo type : game zip name : combo move : combo name
    宏类型  ： 主ROM名字    ：   宏指令 ：    指令名称

---------------------------------------------------------------------

 valid combo types:

   a - autofire // 连发
   b - block other input until combo finishes // 阻止其它按键
   n - normal // 通用   

--------------------------------------------------------------------

 valid short cut moves: // 简化指令

  (+360) -         clockwise 270 motion      // 相当与 "F,FD,D,DB,B,BU,U,"
  (-360) - counter clockwise 270 motion      // 相当与 "B,BD,D,DF,F,FU,U,"
  (+720) -         clockwise 630 motion      // 相当与 "F,FD,D,DB,B,BU,U,UF,F,FD,D,DB,B,BU,U,"
  (-720) - counter clockwise 630 motion      // 相当与 "B,BD,D,DF,F,FU,U,UB,B,BD,D,DF,F,FU,U,"
  (+DRG) - forward dragon punch motion       // 相当与 "F,D,DF,"
  (-DRG) - reverse dragon punch motion       // 相当与 "B,D,DB,"
  (HCF)  - half circle forward motion        // 相当与 "B,BD,D,DF,F,"
  (HCB)  - half circle back motion           // 相当与 "F,FD,D,DB,B,"

--------------------------------------------------------------------

 valid keys

   U   - up                      // 上
   D   - down                    // 下
   L   - left                    // 左
   R   - right                   // 右
   F   - left                    // 前
   D   - right                   // 后
   ,   - next frame              // 下一指令
   1   - button 1                // 按键1
   2   - button 2                // 按键2
   3   - button 3                // 按键3
   4   - button 4                // 按键4
   5   - button 5                // 按键5
   6   - button 6                // 按键6

   ~xx - hold this for xx frames // 保持某一指令帧

-------------------------------------------------------------------- 

 Examples: // 例子

 // forward dragon motion, weak punch
 b:sfa:F,D,DF,1:whatever               // 升龙拳
 或者
 b:sfa:(+DRG),1:whatever               <--- alternative

 // reverse dragon motion, strong punch
 b:sfa:L,D,DL:2:whatever
 b:sfa:(-DRG):2:whatever               <--- alternative

 // clockwise 360, fierce punch
 b:sfa:R,RD,D,DL,L,LU,U,2:whatever
 b:sfa:(+360),3:whatever               <--- alternative

 // counter clockwise 360, all three punch
 b:sfa:L,LD,D,DR,R,RU,U,123:whatever
 b:sfa:(-360),123:whatever             <--- alternative

 // clockwise 720, fierce punch
 b:sfa:R,RD,D,DL,L,LU,U,UR,R,RD,D,DL,L,LU,U,3:whatever
 b:sfa:(+720),3:whatever               <--- alternative

 // hold left for 60 frames(1 second), right, high punch
 b:sfa:L~60,R,3:whatever

 // weak punch, wait for 10 frames, fierce punch
 b:sfa:1,~10,3:whatever

 // fierce punch, forward dragon motion, high punch
 b:sfa:3,R,D,DR,3:whatever
 b:sfa:3,(+DRG),3:whatever             <--- alternative

 // forward dragon punch, wait 60 frames, forward dragon punch
 b:sfa:R,D,DR,1,~10,R,D,DR,1:whatever
 b:sfa:(+DRG),1,~10,(+DRG),1:whatever  <--- alternative

 // hold down for 4 frames, hold up for 4 frames, attack
 b:wof:D~4,U~4,1:whatever

 // Xmen Vs SF Wolvarine 9 hit combo (dash towards right before this)
 b:xmvsf:1,D~10,D4,D~15,D2,~10,6,RU~30,1,~10,4,~10,2,~10,5,~10,3:whatever

 // Xmen Vs SF Wolvarine 9 hit combo (dash towards left before this)
 b:xmvsf:1,D~10,D4,D~15,D2,~10,6,LU~30,1,~10,4,~10,2,~10,5,~10,3:whatever
--------------------------------------------------------------------

 Important Facts:

 Maximum of 254 characters can be used for each input macro. //每个宏的编写最长为254字节

 Each input macro can be named by maximum of 20 characters.  //宏名字最长20个字节

 Input macro can be enabled or disabled from FBA->Misc menu,
 or by directly editing fba-combo.ini in the /cfg/ directory. //你可以通过选择"Misc"菜单下的"Enable Input Macro"选项或者编辑fba的ini文件来是决定否使用宏命令

 Input macro can only be enabled or disabled before you start
 a game and after unloading(F6) a game.                       //你必须在游戏开始前选择是否使用宏命令

 ************* Game will desync if: **************

   1.  You are playing someone with official build,
       and you have input macro enabled.

   2.  You are playing someone with this build,
       but one has macro enabled; the other, disabled.

   3.  Both have macro enabled, but they do not
       have the same macro for the game

   * If you are not comfortable with this, don't
     use macro on Netplay, it will most likely desync
     if you don't know what you are doing.

--------------------------------------------------------------------