diff options
author | Couriersud <couriersud@users.noreply.github.com> | 2008-02-23 12:04:52 +0000 |
---|---|---|
committer | Couriersud <couriersud@users.noreply.github.com> | 2008-02-23 12:04:52 +0000 |
commit | 1a18371edc716e4333728be838ea20a98162e538 (patch) | |
tree | 19d21cf6fd89ba1ef4182e86d7d234a5943862f2 /src | |
parent | 2d9094c05ca6cb6d8e1f444a26b6cbda161f47fc (diff) |
* output raw video parameters pixclock, htotal, hbend, hbstart, vtotal, vbend, vbstart if they have been given.
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/info.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/emu/info.c b/src/emu/info.c index 671a94354c1..737f96d6194 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -732,12 +732,29 @@ static void print_game_display(FILE *out, const game_driver *game, const machine { int dx = scrconfig->defstate.visarea.max_x - scrconfig->defstate.visarea.min_x + 1; int dy = scrconfig->defstate.visarea.max_y - scrconfig->defstate.visarea.min_y + 1; + fprintf(out, " width=\"%d\"", dx); fprintf(out, " height=\"%d\"", dy); } /* output refresh rate */ fprintf(out, " refresh=\"%f\"", ATTOSECONDS_TO_HZ(scrconfig->defstate.refresh)); + + /* output raw video parameters only for games that are not vector */ + /* and had raw parameters specified */ + if ((scrconfig->type != SCREEN_TYPE_VECTOR) && !scrconfig->defstate.oldstyle_vblank_supplied) + { + int pixclock = scrconfig->defstate.width * scrconfig->defstate.height + * ATTOSECONDS_TO_HZ(scrconfig->defstate.refresh); + + fprintf(out, " pixclock=\"%d\"", pixclock); + fprintf(out, " htotal=\"%d\"", scrconfig->defstate.width); + fprintf(out, " hbend=\"%d\"", scrconfig->defstate.visarea.min_x); + fprintf(out, " hbstart=\"%d\"", scrconfig->defstate.visarea.max_x+1); + fprintf(out, " vtotal=\"%d\"", scrconfig->defstate.height); + fprintf(out, " vbend=\"%d\"", scrconfig->defstate.visarea.min_y); + fprintf(out, " vbstart=\"%d\"", scrconfig->defstate.visarea.max_y+1); + } fprintf(out, " />\n"); } } @@ -989,6 +1006,13 @@ void print_mame_xml(FILE *out, const game_driver *const games[], const char *gam "\t\t\t<!ATTLIST display width CDATA #IMPLIED>\n" "\t\t\t<!ATTLIST display height CDATA #IMPLIED>\n" "\t\t\t<!ATTLIST display refresh CDATA #REQUIRED>\n" + "\t\t\t<!ATTLIST display pixclock CDATA #IMPLIED>\n" + "\t\t\t<!ATTLIST display htotal CDATA #IMPLIED>\n" + "\t\t\t<!ATTLIST display hbend CDATA #IMPLIED>\n" + "\t\t\t<!ATTLIST display hbstart CDATA #IMPLIED>\n" + "\t\t\t<!ATTLIST display vtotal CDATA #IMPLIED>\n" + "\t\t\t<!ATTLIST display vbend CDATA #IMPLIED>\n" + "\t\t\t<!ATTLIST display vbstart CDATA #IMPLIED>\n" "\t\t<!ELEMENT sound EMPTY>\n" "\t\t\t<!ATTLIST sound channels CDATA #REQUIRED>\n" "\t\t<!ELEMENT input (control*)>\n" |