diff --git a/tools/datmagic/datmagic.c b/tools/datmagic/datmagic.c new file mode 100644 index 00000000..5991ded6 --- /dev/null +++ b/tools/datmagic/datmagic.c @@ -0,0 +1,169 @@ +/* + + Beta version 1 - Jan. 9th 2021 + by: mahoneyt944 - MAME 2003-Plus Team. + + notes: - currently writes to a log, will work on writing to a html table next. + - one issue is present so far, parent roms that use samples are listed as nosampleof + because we scan the game tag for the sample name and parents do not list this here. + Will probably have to scan for the actual sample.wav lines if sampleof is not found + first and end if it reaches a closing tag. + +*/ + +#include +#include +#include + +#define MAXCHAR 200 + +void banner(void) +{ + printf("\n'########:::::'###::::'########:\n"); + printf(" ##.... ##:::'## ##:::... ##..::\n"); + printf(" ##:::: ##::'##:. ##::::: ##::::\n"); + printf(" ##:::: ##:'##:::. ##:::: ##::::\n"); + printf(" ##:::: ##: #########:::: ##::::\n"); + printf(" ##:::: ##: ##.... ##:::: ##::::\n"); + printf(" ########:: ##:::: ##:::: ##::::\n"); + printf("........:::..:::::..:::::..:::::\n"); + printf("'##::::'##::::'###:::::'######:::'####::'######::\n"); + printf(" ###::'###:::'## ##:::'##... ##::. ##::'##... ##:\n"); + printf(" ####'####::'##:. ##:: ##:::..:::: ##:: ##:::..::\n"); + printf(" ## ### ##:'##:::. ##: ##::'####:: ##:: ##:::::::\n"); + printf(" ##. #: ##: #########: ##::: ##::: ##:: ##:::::::\n"); + printf(" ##:.:: ##: ##.... ##: ##::: ##::: ##:: ##::: ##:\n"); + printf(" ##:::: ##: ##:::: ##:. ######:::'####:. ######::\n"); + printf("..:::::..::..:::::..:::......::::....:::......:::\n"); +} + +int main() +{ + banner(); + char* dat = "mame2003-plus.xml"; + FILE *read; + FILE *write; + char readline[MAXCHAR]; + + char game_id[] = "