.
This commit is contained in:
62
main.c
62
main.c
@@ -40,17 +40,17 @@
|
||||
|
||||
const char* szErrorMsg[] =
|
||||
{
|
||||
"No Error", // E_ERROR__NO_ERROR
|
||||
"Unknown Error", // E_ERROR__UNKNOWN_ERROR
|
||||
"Unknown argument found in command line", // E_ERROR__UNKNOWN_ARGUMENT
|
||||
"Wrong argument value", // E_ERROR__BAD_ARGUMENT_VALUE
|
||||
"E_ERROR__SST1_INIT", //E_ERROR__SST1_INIT,
|
||||
"E_ERROR__SST1_GET_INFO", //E_ERROR__SST1_GET_INFO,
|
||||
"E_ERROR__NOT_ENOUGH_FBI_RAM", //E_ERROR__NOT_ENOUGH_FBI_RAM,
|
||||
"No Error", // E_ERROR__NO_ERROR
|
||||
"Unknown Error", // E_ERROR__UNKNOWN_ERROR
|
||||
"Unknown argument found in command line", // E_ERROR__UNKNOWN_ARGUMENT
|
||||
"Wrong argument value", // E_ERROR__BAD_ARGUMENT_VALUE
|
||||
"Error initializing Voodoo² Board", // E_ERROR__SST1_INIT,
|
||||
"Error getting Voodoo² Board informations.", // E_ERROR__SST1_GET_INFO,
|
||||
"Not enough FBI RAM to process TMU tests", // E_ERROR__NOT_ENOUGH_FBI_RAM,
|
||||
};
|
||||
|
||||
const char szTitle[] =
|
||||
"V2MemTest-%d.%d.%d - A CLI Tool to test & fix Voodoo² TMU System\n"
|
||||
"v2-tmu-memtester-%d.%d.%d - A CLI Tool to test & fix Voodoo² TMU System\n"
|
||||
"Copyright (C) 2026 ChaCha\n";
|
||||
|
||||
const char szLicence[] =
|
||||
@@ -61,22 +61,37 @@ const char szLicence[] =
|
||||
"WARRANTY !\n";
|
||||
|
||||
const char szHelp[] =
|
||||
"Usage ./v2memtest <options>\n"
|
||||
"Usage: ./v2-tmu-memtester [options]\n"
|
||||
"\n"
|
||||
"options:\n"
|
||||
"\t--help:\n"
|
||||
"\t-h :\tthis output\n"
|
||||
"General options:\n"
|
||||
" -h, --help Show this help and exit.\n"
|
||||
" --version Print version (MAJOR.MINOR.PATCH) and exit.\n"
|
||||
" -n, --num <N> Number of loops (default: 1).\n"
|
||||
" -l, --log <file> Log file path.\n"
|
||||
" --silent Silent mode (suppress normal output).\n"
|
||||
" -t, --tsv <file> TSV output file path.\n"
|
||||
"\n"
|
||||
"\t-v <level> :\tset log level to the specified value.\n"
|
||||
"\t\t 0: ERR, 1: INFO, 2: WARN, 3: DEBUG, 4: TRACE\n"
|
||||
"Verbosity:\n"
|
||||
" -v Increase log level by one step (repeatable).\n"
|
||||
" Levels: 0=ERR, 1=INFO, 2=WARN, 3=DEBUG, 4=TRACE\n"
|
||||
" Default: 0 (ERR). Example: -vvv -> DEBUG.\n"
|
||||
"\n"
|
||||
"\t-fl <file> :\tset a log file path & name.\n"
|
||||
"Target selection:\n"
|
||||
" --tmu0 Enable only tests for TMU0.\n"
|
||||
" --tmu1 Enable only tests for TMU1.\n"
|
||||
"\n"
|
||||
"\t-fd <file> :\tset a failure report path & base name.\n"
|
||||
"\t\t Note that the test name will be appended to the file name.\n"
|
||||
"\t\t eg: file name is 'foo' running 'data-bitmove' :\n"
|
||||
"\t\t foo_data-bitmove.tsv\n";
|
||||
|
||||
"Test selection [ all if none set ] :\n"
|
||||
" --address Run address tests.\n"
|
||||
" --data Run data tests.\n"
|
||||
" --data-huge Run large/extended data tests.\n"
|
||||
"\n"
|
||||
"TMU RAM limit override:\n"
|
||||
" --tmu0-ram <MB> Force TMU0 RAM size: -1=auto, 1..4=MB.\n"
|
||||
" --tmu1-ram <MB> Force TMU1 RAM size: -1=auto, 1..4=MB.\n"
|
||||
"\n"
|
||||
"Examples:\n"
|
||||
" ./v2memtest --tmu0 --address -vv --tsv out.tsv\n"
|
||||
" ./v2memtest --tmu0 --tmu1 --data --tmu0-ram 2 --tmu1-ram -1 -n 10\n";
|
||||
|
||||
def_sOptions sOptions = {
|
||||
.eLogLevel = E_LOGLEVEL__ERROR,
|
||||
@@ -106,7 +121,7 @@ static struct option long_args[] = {
|
||||
{"data", no_argument, &sOptions.bTestTMUData, true},
|
||||
{"data-huge", no_argument, &sOptions.bTestTMUDataHuge, true},
|
||||
{"tmu0-ram", required_argument, NULL, 0},
|
||||
{"tmu0-ram", required_argument, NULL, 1},
|
||||
{"tmu1-ram", required_argument, NULL, 1},
|
||||
{"version", no_argument, NULL, 2},
|
||||
};
|
||||
|
||||
@@ -281,10 +296,7 @@ int main(int argc, char **argv)
|
||||
ISET(sstregs->fbzColorPath, SST_RGBSEL_TREXOUT | SST_CC_PASS | SST_ENTEXTUREMAP);
|
||||
ISET(sstregs->textureMode, SST_RGB565 | SST_TC_REPLACE | SST_TCA_REPLACE);
|
||||
ISET(sstregs->tLOD, 0);
|
||||
|
||||
//if(devInfo.tmuMemSize[1]==1) continue;
|
||||
//devInfo.numberTmus=1;
|
||||
//devInfo.tmuMemSize[1]==1;
|
||||
|
||||
for (int tmu = 0; tmu < devInfo.numberTmus; tmu++)
|
||||
{
|
||||
printf("Testing Board %d, TMU %d, %luMB \n\n",boardNum,tmu,devInfo.tmuMemSize[tmu]);
|
||||
|
||||
Reference in New Issue
Block a user