diff options
Diffstat (limited to '')
| -rw-r--r-- | project/src/ui/tab-wlect.inc | 24 | ||||
| -rw-r--r-- | project/src/ui/ui-wlect.c | 134 | ||||
| -rw-r--r-- | project/src/ui/ui-wlect.h | 9 | ||||
| -rw-r--r-- | project/src/ui/ui.def | 159 |
4 files changed, 300 insertions, 26 deletions
diff --git a/project/src/ui/tab-wlect.inc b/project/src/ui/tab-wlect.inc index 5a8fbfe..0604c3d 100644 --- a/project/src/ui/tab-wlect.inc +++ b/project/src/ui/tab-wlect.inc @@ -127,6 +127,10 @@ "Print an information dump for each source file." " LE-CODE binaries and LEX binaries are accepted as input." }, + { T_DEF_CMD, "DB", "DB" + "wlect DL [source]...", + "Short cut for {DUMP --brief}." }, + { T_DEF_CMD, "DL", "DL", "wlect DL [source]...", "Short cut for {DUMP --long}." }, @@ -135,6 +139,10 @@ "wlect DLL [source]...", "Short cut for {DUMP --long --long}." }, + { T_DEF_CMD, "DLLL", "DLLL", + "wlect DLL [source]...", + "Short cut for {DUMP --long --long --long}." }, + { T_DEF_CMD, "BIN_DIFF", "BIN-DIFF|BINDIFF|BD", "wlect BIN-DIFF settings binary1 binary2", "Compare parts of 2 different LECODE binary files." @@ -854,21 +862,30 @@ { T_COPY_GRP, "PATCH", 0,0,0 }, { T_SEP_OPT, 0,0,0,0 }, + { T_COPT, "BRIEF", 0,0, + "For LE-CODE binaries:" + " If set, print infos about file header only." }, { T_COPT, "LONG", 0,0, "For LE-CODE binaries:" " If set, print cups with tracks or arenas." " For each track, property and music slot is printed in brackets." " If set twice, print a track list too." + " If set 3 times, print a track slot usage map too (same as -v)." "\n " " For LEX binaries:" " If set, print a hex dump of max 16 bytes (1 line) of the element data." " If set twice, print a hex dump of max 64 bytes (4 lines)." " If set 3 times ore more, print a complete hex dump." }, { T_COPT, "VERBOSE", 0,0, - "For LE-CODE binaries: If set, print a track slot usage table." }, + "For LE-CODE binaries: If set, print a track slot usage map." }, { T_COPY_GRP, "PATCH", 0,0,0 }, { T_COPT, "CREATE_DISTRIB",0,0,0 }, + //---------- COMMAND wlect DB ---------- + + { T_CMD_BEG, "DB", 0,0,0 }, + { T_COPY_CMD, "DUMP", 0,0,0 }, + //---------- COMMAND wlect DL ---------- { T_CMD_BEG, "DL", 0,0,0 }, @@ -879,6 +896,11 @@ { T_CMD_BEG, "DLL", 0,0,0 }, { T_COPY_CMD, "DUMP", 0,0,0 }, + //---------- COMMAND wlect DLLL ---------- + + { T_CMD_BEG, "DLLL", 0,0,0 }, + { T_COPY_CMD, "DUMP", 0,0,0 }, + //---------- COMMAND wlect BIN-DIFF ---------- { T_CMD_BEG, "BIN_DIFF", 0,0,0 }, diff --git a/project/src/ui/ui-wlect.c b/project/src/ui/ui-wlect.c index bac603a..f6f0aa9 100644 --- a/project/src/ui/ui-wlect.c +++ b/project/src/ui/ui-wlect.c @@ -761,12 +761,19 @@ static const InfoOption_t option_cmd_FUNCTIONS_LONG = " --long is set, the descriptions are compared too." }; +static const InfoOption_t option_cmd_DUMP_BRIEF = + { OPT_BRIEF, false, false, false, false, false, 'B', "brief", + 0, + "For LE-CODE binaries: If set, print infos about file header only." + }; + static const InfoOption_t option_cmd_DUMP_LONG = { OPT_LONG, false, false, false, false, false, 'l', "long", 0, "For LE-CODE binaries: If set, print cups with tracks or arenas. For" " each track, property and music slot is printed in brackets. If set" - " twice, print a track list too.\n" + " twice, print a track list too. If set 3 times, print a track slot" + " usage map too (same as -v).\n" " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" " of the element data. If set twice, print a hex dump of max 64 bytes" " (4 lines). If set 3 times ore more, print a complete hex dump." @@ -775,7 +782,7 @@ static const InfoOption_t option_cmd_DUMP_LONG = static const InfoOption_t option_cmd_DUMP_VERBOSE = { OPT_VERBOSE, false, false, false, false, false, 'v', "verbose", 0, - "For LE-CODE binaries: If set, print a track slot usage table." + "For LE-CODE binaries: If set, print a track slot usage map." }; static const InfoOption_t option_cmd_BIN_DIFF_QUIET = @@ -816,8 +823,10 @@ static const KeywordTab_t CommandTab[] = { CMD_EXPORT, "_EXPORT", 0, 0 }, { CMD_DPAD, "_DPAD", 0, 0 }, { CMD_DUMP, "DUMP", "D", 0 }, + { CMD_DB, "DBwlect DL [source]...",0, 0 }, { CMD_DL, "DL", 0, 0 }, { CMD_DLL, "DLL", 0, 0 }, + { CMD_DLLL, "DLLL", 0, 0 }, { CMD_BIN_DIFF, "BIN-DIFF", "BINDIFF", 0 }, { CMD_BIN_DIFF, "BD", 0, 0 }, { CMD_PATCH, "PATCH", "P", 0 }, @@ -1212,65 +1221,77 @@ static u8 option_allowed_cmd_DPAD[47] = // cmd #16 static u8 option_allowed_cmd_DUMP[47] = // cmd #17 { - 0,0,0,1,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, + 0,0,0,1,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, + 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0 +}; + +static u8 option_allowed_cmd_DB[47] = // cmd #18 +{ + 0,0,0,1,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0 }; -static u8 option_allowed_cmd_DL[47] = // cmd #18 +static u8 option_allowed_cmd_DL[47] = // cmd #19 { - 0,0,0,1,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, + 0,0,0,1,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0 }; -static u8 option_allowed_cmd_DLL[47] = // cmd #19 +static u8 option_allowed_cmd_DLL[47] = // cmd #20 { - 0,0,0,1,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, + 0,0,0,1,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0 }; -static u8 option_allowed_cmd_BIN_DIFF[47] = // cmd #20 +static u8 option_allowed_cmd_DLLL[47] = // cmd #21 +{ + 0,0,0,1,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, + 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0 +}; + +static u8 option_allowed_cmd_BIN_DIFF[47] = // cmd #22 { 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0 }; -static u8 option_allowed_cmd_PATCH[47] = // cmd #21 +static u8 option_allowed_cmd_PATCH[47] = // cmd #23 { 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,0 }; -static u8 option_allowed_cmd_LPAR[47] = // cmd #22 +static u8 option_allowed_cmd_LPAR[47] = // cmd #24 { 0,0,0,0,1, 1,1,0,0,0, 0,0,0,1,1, 1,1,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,0 }; -static u8 option_allowed_cmd_CREATE[47] = // cmd #23 +static u8 option_allowed_cmd_CREATE[47] = // cmd #25 { 0,0,0,0,1, 1,1,0,1,1, 1,1,0,1,0, 1,0,1,1,1, 1,1,1,1,0, 0,0,0,0,0, 0,1,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,0 }; -static u8 option_allowed_cmd_DISTRIBUTION[47] = // cmd #24 +static u8 option_allowed_cmd_DISTRIBUTION[47] = // cmd #26 { 0,1,0,0,1, 1,1,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,1, 1,1,1,1,1, 0,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,0 }; -static u8 option_allowed_cmd_CAT[47] = // cmd #25 +static u8 option_allowed_cmd_CAT[47] = // cmd #27 { 0,0,0,0,1, 1,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0 }; -static u8 option_allowed_cmd_DECODE[47] = // cmd #26 +static u8 option_allowed_cmd_DECODE[47] = // cmd #28 { 0,0,0,0,1, 1,1,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,0 }; -static u8 option_allowed_cmd_ENCODE[47] = // cmd #27 +static u8 option_allowed_cmd_ENCODE[47] = // cmd #29 { 0,0,0,0,0, 0,0,0,1,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 1,0,0,0,0, 0,0,1,1,1, 1,1,1,1,1, 1,0 @@ -1464,6 +1485,30 @@ static const InfoOption_t * option_tab_cmd_DUMP[] = OptionInfo + OPT_NONE, // separator + &option_cmd_DUMP_BRIEF, + &option_cmd_DUMP_LONG, + &option_cmd_DUMP_VERBOSE, + OptionInfo + OPT_CREATE_DISTRIB, + + 0 +}; + +static const InfoOption_t * option_tab_cmd_DB[] = +{ + OptionInfo + OPT_LE_DEFINE, + OptionInfo + OPT_LPAR, + OptionInfo + OPT_ALIAS, + OptionInfo + OPT_ENGINE, + OptionInfo + OPT_200CC, + OptionInfo + OPT_PERFMON, + OptionInfo + OPT_CUSTOM_TT, + OptionInfo + OPT_XPFLAGS, + OptionInfo + OPT_SPEEDOMETER, + OptionInfo + OPT_DEBUG, + + OptionInfo + OPT_NONE, // separator + + &option_cmd_DUMP_BRIEF, &option_cmd_DUMP_LONG, &option_cmd_DUMP_VERBOSE, OptionInfo + OPT_CREATE_DISTRIB, @@ -1486,6 +1531,7 @@ static const InfoOption_t * option_tab_cmd_DL[] = OptionInfo + OPT_NONE, // separator + &option_cmd_DUMP_BRIEF, &option_cmd_DUMP_LONG, &option_cmd_DUMP_VERBOSE, OptionInfo + OPT_CREATE_DISTRIB, @@ -1508,6 +1554,30 @@ static const InfoOption_t * option_tab_cmd_DLL[] = OptionInfo + OPT_NONE, // separator + &option_cmd_DUMP_BRIEF, + &option_cmd_DUMP_LONG, + &option_cmd_DUMP_VERBOSE, + OptionInfo + OPT_CREATE_DISTRIB, + + 0 +}; + +static const InfoOption_t * option_tab_cmd_DLLL[] = +{ + OptionInfo + OPT_LE_DEFINE, + OptionInfo + OPT_LPAR, + OptionInfo + OPT_ALIAS, + OptionInfo + OPT_ENGINE, + OptionInfo + OPT_200CC, + OptionInfo + OPT_PERFMON, + OptionInfo + OPT_CUSTOM_TT, + OptionInfo + OPT_XPFLAGS, + OptionInfo + OPT_SPEEDOMETER, + OptionInfo + OPT_DEBUG, + + OptionInfo + OPT_NONE, // separator + + &option_cmd_DUMP_BRIEF, &option_cmd_DUMP_LONG, &option_cmd_DUMP_VERBOSE, OptionInfo + OPT_CREATE_DISTRIB, @@ -2028,11 +2098,25 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "Print an information dump for each source file. LE-CODE binaries and" " LEX binaries are accepted as input.", 0, - 13, + 14, option_tab_cmd_DUMP, option_allowed_cmd_DUMP }, + { CMD_DB, + false, + false, + false, + "DBwlect DL [source]...", + 0, + "Short cut for 'DUMP --brief'.", + "", + 0, + 14, + option_tab_cmd_DB, + option_allowed_cmd_DB + }, + { CMD_DL, false, false, @@ -2042,7 +2126,7 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "wlect DL [source]...", "Short cut for 'DUMP --long'.", 0, - 13, + 14, option_tab_cmd_DL, option_allowed_cmd_DL }, @@ -2056,11 +2140,25 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "wlect DLL [source]...", "Short cut for 'DUMP --long --long'.", 0, - 13, + 14, option_tab_cmd_DLL, option_allowed_cmd_DLL }, + { CMD_DLLL, + false, + false, + false, + "DLLL", + 0, + "wlect DLL [source]...", + "Short cut for 'DUMP --long --long --long'.", + 0, + 14, + option_tab_cmd_DLLL, + option_allowed_cmd_DLLL + }, + { CMD_BIN_DIFF, false, false, diff --git a/project/src/ui/ui-wlect.h b/project/src/ui/ui-wlect.h index c44cd3f..c98d091 100644 --- a/project/src/ui/ui-wlect.h +++ b/project/src/ui/ui-wlect.h @@ -291,14 +291,19 @@ typedef enum enumOptions // OB_CMD_DPAD = 0, // // OB_CMD_DUMP = OB_GRP_PATCH +// | OB_BRIEF // | OB_LONG // | OB_GRP_PATCH // | OB_CREATE_DISTRIB, // +// OB_CMD_DB = OB_CMD_DUMP, +// // OB_CMD_DL = OB_CMD_DUMP, // // OB_CMD_DLL = OB_CMD_DUMP, // +// OB_CMD_DLLL = OB_CMD_DUMP, +// // OB_CMD_BIN_DIFF = 0, // // OB_CMD_PATCH = OB_GRP_PATCH @@ -373,8 +378,10 @@ typedef enum enumCommands CMD_DPAD, CMD_DUMP, + CMD_DB, CMD_DL, CMD_DLL, + CMD_DLLL, CMD_BIN_DIFF, CMD_PATCH, CMD_LPAR, @@ -386,7 +393,7 @@ typedef enum enumCommands CMD_ENCODE, - CMD__N // == 28 + CMD__N // == 30 } enumCommands; diff --git a/project/src/ui/ui.def b/project/src/ui/ui.def index 8ed8fc1..9492806 100644 --- a/project/src/ui/ui.def +++ b/project/src/ui/ui.def @@ -20137,6 +20137,10 @@ "Print an information dump for each source file. LE-CODE binaries and" \ " LEX binaries are accepted as input." ) +#:def_cmd( "DB", "DBwlect DL [source]...", \ + "Short cut for {DUMP --brief}.", \ + "" ) + #:def_cmd( "DL", "DL", \ "wlect DL [source]...", \ "Short cut for {DUMP --long}." ) @@ -20145,6 +20149,10 @@ "wlect DLL [source]...", \ "Short cut for {DUMP --long --long}." ) +#:def_cmd( "DLLL", "DLLL", \ + "wlect DLL [source]...", \ + "Short cut for {DUMP --long --long --long}." ) + #:def_cmd( "BIN_DIFF", "BIN-DIFF|BINDIFF|BD", \ "wlect BIN-DIFF settings binary1 binary2", \ "Compare parts of 2 different LECODE binary files. @SETTINGS@ is a" \ @@ -20848,23 +20856,90 @@ "", \ "" ) +#:def_cmd_opt( "DUMP", "BRIEF", \ + "", \ + "For LE-CODE binaries: If set, print infos about file header only." ) + #:def_cmd_opt( "DUMP", "LONG", \ "", \ "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \ " each track, property and music slot is printed in brackets. If set" \ - " twice, print a track list too.\n" \ + " twice, print a track list too. If set 3 times, print a track slot" \ + " usage map too (same as -v).\n" \ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \ " of the element data. If set twice, print a hex dump of max 64 bytes" \ " (4 lines). If set 3 times ore more, print a complete hex dump." ) #:def_cmd_opt( "DUMP", "VERBOSE", \ "", \ - "For LE-CODE binaries: If set, print a track slot usage table." ) + "For LE-CODE binaries: If set, print a track slot usage map." ) #:def_cmd_opt( "DUMP", "CREATE_DISTRIB", \ "", \ "" ) +#:def_cmd_opt( "DB", "LE_DEFINE", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "LPAR", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "ALIAS", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "ENGINE", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "200CC", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "PERFMON", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "CUSTOM_TT", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "XPFLAGS", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "SPEEDOMETER", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "DEBUG", \ + "", \ + "" ) + +#:def_cmd_opt( "DB", "BRIEF", \ + "", \ + "For LE-CODE binaries: If set, print infos about file header only." ) + +#:def_cmd_opt( "DB", "LONG", \ + "", \ + "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \ + " each track, property and music slot is printed in brackets. If set" \ + " twice, print a track list too. If set 3 times, print a track slot" \ + " usage map too (same as -v).\n" \ + " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \ + " of the element data. If set twice, print a hex dump of max 64 bytes" \ + " (4 lines). If set 3 times ore more, print a complete hex dump." ) + +#:def_cmd_opt( "DB", "VERBOSE", \ + "", \ + "For LE-CODE binaries: If set, print a track slot usage map." ) + +#:def_cmd_opt( "DB", "CREATE_DISTRIB", \ + "", \ + "" ) + #:def_cmd_opt( "DL", "LE_DEFINE", \ "", \ "" ) @@ -20905,18 +20980,23 @@ "", \ "" ) +#:def_cmd_opt( "DL", "BRIEF", \ + "", \ + "For LE-CODE binaries: If set, print infos about file header only." ) + #:def_cmd_opt( "DL", "LONG", \ "", \ "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \ " each track, property and music slot is printed in brackets. If set" \ - " twice, print a track list too.\n" \ + " twice, print a track list too. If set 3 times, print a track slot" \ + " usage map too (same as -v).\n" \ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \ " of the element data. If set twice, print a hex dump of max 64 bytes" \ " (4 lines). If set 3 times ore more, print a complete hex dump." ) #:def_cmd_opt( "DL", "VERBOSE", \ "", \ - "For LE-CODE binaries: If set, print a track slot usage table." ) + "For LE-CODE binaries: If set, print a track slot usage map." ) #:def_cmd_opt( "DL", "CREATE_DISTRIB", \ "", \ @@ -20962,23 +21042,90 @@ "", \ "" ) +#:def_cmd_opt( "DLL", "BRIEF", \ + "", \ + "For LE-CODE binaries: If set, print infos about file header only." ) + #:def_cmd_opt( "DLL", "LONG", \ "", \ "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \ " each track, property and music slot is printed in brackets. If set" \ - " twice, print a track list too.\n" \ + " twice, print a track list too. If set 3 times, print a track slot" \ + " usage map too (same as -v).\n" \ " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \ " of the element data. If set twice, print a hex dump of max 64 bytes" \ " (4 lines). If set 3 times ore more, print a complete hex dump." ) #:def_cmd_opt( "DLL", "VERBOSE", \ "", \ - "For LE-CODE binaries: If set, print a track slot usage table." ) + "For LE-CODE binaries: If set, print a track slot usage map." ) #:def_cmd_opt( "DLL", "CREATE_DISTRIB", \ "", \ "" ) +#:def_cmd_opt( "DLLL", "LE_DEFINE", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "LPAR", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "ALIAS", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "ENGINE", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "200CC", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "PERFMON", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "CUSTOM_TT", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "XPFLAGS", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "SPEEDOMETER", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "DEBUG", \ + "", \ + "" ) + +#:def_cmd_opt( "DLLL", "BRIEF", \ + "", \ + "For LE-CODE binaries: If set, print infos about file header only." ) + +#:def_cmd_opt( "DLLL", "LONG", \ + "", \ + "For LE-CODE binaries: If set, print cups with tracks or arenas. For" \ + " each track, property and music slot is printed in brackets. If set" \ + " twice, print a track list too. If set 3 times, print a track slot" \ + " usage map too (same as -v).\n" \ + " For LEX binaries: If set, print a hex dump of max 16 bytes (1 line)" \ + " of the element data. If set twice, print a hex dump of max 64 bytes" \ + " (4 lines). If set 3 times ore more, print a complete hex dump." ) + +#:def_cmd_opt( "DLLL", "VERBOSE", \ + "", \ + "For LE-CODE binaries: If set, print a track slot usage map." ) + +#:def_cmd_opt( "DLLL", "CREATE_DISTRIB", \ + "", \ + "" ) + #:def_cmd_opt( "BIN_DIFF", "QUIET", \ "", \ "Suppress all messages and tell result as exit status only." ) |
