diff --git a/src/emu/info.c b/src/emu/info.c index d40e786dd17..63602465a1b 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -518,10 +518,14 @@ static void print_game_rom(FILE *out, const game_driver *game, const machine_con /* for non-disk entries, print offset */ if (!is_disk) fprintf(out, " offset=\"%x\"", offset); - /* for disk entries, add the disk index */ else fprintf(out, " index=\"%x\"", DISK_GETINDEX(rom)); + + /* add optional flag */ + if ((!is_disk && ROM_ISOPTIONAL(rom)) || (is_disk && DISK_ISOPTIONAL(rom))) + fprintf(out, " optional=\"yes\""); + fprintf(out, "/>\n"); } } @@ -948,7 +952,7 @@ void print_mame_xml(FILE *out, const game_driver *const games[], const char *gam "\t\t\t\n" "\t\t\t\n" "\t\t\t\n" - "\t\t\t\n" + "\t\t\t\n" "\t\t\n" "\t\t\t\n" "\t\t\t\n" @@ -957,6 +961,7 @@ void print_mame_xml(FILE *out, const game_driver *const games[], const char *gam "\t\t\t\n" "\t\t\t\n" "\t\t\t\n" + "\t\t\t\n" "\t\t\n" "\t\t\t\n" "\t\t\n"