Skip to content

Commit

Permalink
[MSXtk] Harmonized the help display using the -help option
Browse files Browse the repository at this point in the history
  • Loading branch information
aoineko-fr committed Jan 28, 2025
1 parent d0f25c8 commit 3487b22
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 14 deletions.
Binary file modified tools/MSXtk/bin/MSXbin.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions tools/MSXtk/bin/MSXbin.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Error: No enough parameters!
MSXbin 1.4.1 - Convert binary to text file
MSXbin 1.4.2 - Convert binary to text file
Usage: msxbin <inputfile> [options]
Options:
-o output Filename of the output file (default: use input filename with .h/.asm extension)
Expand All @@ -25,4 +25,4 @@ Options:
-def Add define before data structure (only for C language. default: false)
-size Add size define after data structure (only for C language. default: false)
-nodeco Don't display header decoration (default: false)
-h Display this help
-help Display this help
Binary file modified tools/MSXtk/bin/MSXhex.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion tools/MSXtk/bin/MSXhex.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSXhex 0.1.11 - Convert Intel HEX file to binary
MSXhex 0.1.12 - Convert Intel HEX file to binary
--------------------------------------------------------------------------------
Usage: msxhex <inputfile> [options]

Expand All @@ -16,6 +16,7 @@ Options:
--segexcept num Don't report oversize for this segment (can be use more than once)
--segaddr seg addr Base address of the given segment (can be use more than once)
If no base address is supplied, autodetection is used.
-help Display this help

All integers can be decimal or hexadecimal starting with '0x'.
One of the following named values can also be used:
Expand Down
Binary file modified tools/MSXtk/bin/MSXimg.exe
Binary file not shown.
15 changes: 14 additions & 1 deletion tools/MSXtk/bin/MSXimg.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MSXimg (v1.20.0)
MSXimg (v1.20.2)
Usage: MSXimg <filename> [options]

General options:
Expand Down Expand Up @@ -115,6 +115,7 @@ Exporter options:
Can be character (like: &) or hexadecimal value (0xFF format)
-at x Data starting address (can be decimal or hexadecimal starting with '0x')
-def Add defines for each table
-ret0 Program return 0 for success instead of data size (default: data size)

GM1 & GM2 specific options:
-offset x Offset of layout index for GM1 et GM2 mode (default: 0)
Expand All @@ -123,3 +124,15 @@ GM1 & GM2 specific options:
--noTilesName Exclude name table (default: false)
--noTilesPattern Exclude pattern table (default: false)
--noTilesColor Exclude color table (default: false)

MGLV options:
-mglvHead x File header
full Full data header (default)
short Short data header without image information
none No header
-mglvSeg x Segment size (default: 8)
-mglvFreq x Movie frequency (default: 60)
-mglvTime x Duration of image in screen frames (default: 5, for 12 fps at 60 Hz)
-mglvLoop
-mglvMinSkip x Minimal size of skip chunk (default: 8)
-mglvMinFill x Minimal size of fill chunk (default: 60)
Binary file modified tools/MSXtk/bin/MSXmath.exe
Binary file not shown.
8 changes: 6 additions & 2 deletions tools/MSXtk/bin/MSXmath.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Error: No enough parameters!
MSXmath 1.7.0 - Math Table Generator
MSXmath 1.7.1 - Math Table Generator
Usage: MSXmath [options] [tables]
Options:
-o <filename> Filename of the output file (default: use input filename with .h/.asm/.bin extension)
Expand Down Expand Up @@ -30,8 +30,12 @@ Tables:
log10 Common logarithm (to the base 10)
hdx Hypotenuse length when dX=1 [0:Pi*2]
hdy Hypotenuse length when dY=1 [0:Pi*2]
proj W H 3d projection tables (W/H: screen width/height)
proj N F 3d projection tables (N/F: near/far scale)
rot Rotation vector table
equa A B C D E Equation of type y=A+B*(C+x*D)^E
map A B Map [0:num[ values to [A:B] space
muls Full 8-bit signed integer multiplication table (bytes should be 2
mulu Full 8-bit unsigned integer multiplication table (bytes should be 2)
divs Full 8-bit signed integer division table
divu Full 8-bit unsigned integer division table
Note: All number can be decimal or hexadecimal starting with '0x', '$' or '#'.
6 changes: 3 additions & 3 deletions tools/MSXtk/src/MSXbin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//-----------------------------------------------------------------------------
// DEFINES

const char* VERSION = "1.4.1";
const char* VERSION = "1.4.2";

#define BUFFER_SIZE 1024

Expand Down Expand Up @@ -504,7 +504,7 @@ void PrintHelp()
printf(" -def Add define before data structure (only for C language. default: false)\n");
printf(" -size Add size define after data structure (only for C language. default: false)\n");
printf(" -nodeco Don't display header decoration (default: false)\n");
printf(" -h Display this help\n");
printf(" -help Display this help\n");
}

//const char* ARGV[] = { "", "testcases/pt3/Beg!nsum.pt3", "-n", "16", "-skip", "0", "100", "-ascii", "-ax" };
Expand Down Expand Up @@ -532,7 +532,7 @@ int main(int argc, const char* argv[])
for (i32 i = 2; i < argc; ++i)
{
// Display help
if (MSX::StrEqual(argv[i], "-h"))
if (MSX::StrEqual(argv[i], "-help"))
{
PrintHelp();
return 0;
Expand Down
11 changes: 9 additions & 2 deletions tools/MSXtk/src/MSXhex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// DEFINES
//=============================================================================

const char* VERSION = "0.1.11";
const char* VERSION = "0.1.12";

#define BUFFER_SIZE 1024
#define INVALID_ADDR 0xFFFF
Expand Down Expand Up @@ -471,6 +471,7 @@ void PrintHelp()
printf(" --segexcept num Don't report oversize for this segment (can be use more than once)\n");
printf(" --segaddr seg addr Base address of the given segment (can be use more than once)\n");
printf(" If no base address is supplied, autodetection is used.\n");
printf(" -help Display this help\n");
printf("\n");
printf(" All integers can be decimal or hexadecimal starting with '0x'.\n");
printf(" One of the following named values can also be used:\n ");
Expand Down Expand Up @@ -508,8 +509,14 @@ int main(int argc, const char* argv[])
// Parse command line parameters
for (i32 i = 2; i < argc; ++i)
{
// Display help
if (MSX::StrEqual(argv[i], "-help"))
{
PrintHelp();
return 0;
}
// Output filename
if (MSX::StrEqual(argv[i], "-o"))
else if (MSX::StrEqual(argv[i], "-o"))
{
g_OutputFile = argv[++i];
}
Expand Down
6 changes: 3 additions & 3 deletions tools/MSXtk/src/MSXzip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// DEFINES
//=============================================================================

const char* VERSION = "1.4.1";
const char* VERSION = "1.4.2";

/// Compressor enum
enum COMPRESSOR
Expand Down Expand Up @@ -108,7 +108,7 @@ void PrintHelp()
printf(" -asm Assembler data format\n");
printf(" -bin Binary data format\n");
printf(" -no No compression (default)\n");
printf(" -h Display this help\n");
printf(" -help Display this help\n");
printf("RLEp options:\n");
printf(" -rlep RLEp compression\n");
printf(" --def auto|X Default value for type 0 chunk (default: 0)\n");
Expand Down Expand Up @@ -186,7 +186,7 @@ int main(int argc, const char* argv[])
for (i32 i = 2; i < argc; ++i)
{
// Display help
if (MSX::StrEqual(argv[i], "-h"))
if (MSX::StrEqual(argv[i], "-help"))
{
PrintHelp();
return 0;
Expand Down

0 comments on commit 3487b22

Please sign in to comment.