diff --git a/po/wxvbam/wxvbam.pot b/po/wxvbam/wxvbam.pot index 9869372d..083ad5a4 100644 --- a/po/wxvbam/wxvbam.pot +++ b/po/wxvbam/wxvbam.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-11 16:43-0700\n" +"POT-Creation-Date: 2023-05-23 14:26-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,60 +17,60 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: wxvbam.cpp:283 +#: wxvbam.cpp:309 msgid "visualboyadvance-m" msgstr "" -#: wxvbam.cpp:354 wxvbam.cpp:371 +#: wxvbam.cpp:380 wxvbam.cpp:397 #, c-format msgid "Invalid configuration file provided: %s" msgstr "" -#: wxvbam.cpp:510 +#: wxvbam.cpp:536 msgid "Could not create main window" msgstr "" -#: wxvbam.cpp:591 +#: wxvbam.cpp:617 msgid "Save built-in XRC file and exit" msgstr "" -#: wxvbam.cpp:594 +#: wxvbam.cpp:620 msgid "Save built-in vba-over.ini and exit" msgstr "" -#: wxvbam.cpp:597 +#: wxvbam.cpp:623 msgid "Print configuration path and exit" msgstr "" -#: wxvbam.cpp:600 +#: wxvbam.cpp:626 msgid "Start in full-screen mode" msgstr "" -#: wxvbam.cpp:603 +#: wxvbam.cpp:629 msgid "Set a configuration file" msgstr "" -#: wxvbam.cpp:607 +#: wxvbam.cpp:633 msgid "Delete shared link state first, if it exists" msgstr "" -#: wxvbam.cpp:614 +#: wxvbam.cpp:640 msgid "List all settable options and exit" msgstr "" -#: wxvbam.cpp:617 +#: wxvbam.cpp:643 msgid "ROM file" msgstr "" -#: wxvbam.cpp:619 +#: wxvbam.cpp:645 msgid "=" msgstr "" -#: wxvbam.cpp:650 +#: wxvbam.cpp:676 msgid "Configuration / build error: can't find built-in xrc" msgstr "" -#: wxvbam.cpp:658 +#: wxvbam.cpp:684 #, c-format msgid "" "Wrote built-in configuration to %s.\n" @@ -79,11 +79,11 @@ msgid "" "built-in:" msgstr "" -#: wxvbam.cpp:672 +#: wxvbam.cpp:698 msgid "Configuration is read from, in order:" msgstr "" -#: wxvbam.cpp:686 +#: wxvbam.cpp:712 #, c-format msgid "" "Wrote built-in override file to %s\n" @@ -91,13 +91,13 @@ msgid "" "from search path:" msgstr "" -#: wxvbam.cpp:692 +#: wxvbam.cpp:718 msgid "" "\n" "\tbuilt-in" msgstr "" -#: wxvbam.cpp:707 +#: wxvbam.cpp:733 msgid "" "Options set from the command line are saved if any configuration changes are " "made in the user interface.\n" @@ -106,187 +106,187 @@ msgid "" "\n" msgstr "" -#: wxvbam.cpp:715 +#: wxvbam.cpp:741 msgid "" "The commands available for the Keyboard/* option are:\n" "\n" msgstr "" -#: wxvbam.cpp:726 +#: wxvbam.cpp:752 msgid "Configuration file not found." msgstr "" -#: wxvbam.cpp:757 +#: wxvbam.cpp:783 msgid "Bad configuration option or multiple ROM files given:\n" msgstr "" -#: guiinit.cpp:102 +#: guiinit.cpp:103 msgid "Start!" msgstr "" -#: guiinit.cpp:121 xrc/NetLink.xrc:99 +#: guiinit.cpp:122 xrc/NetLink.xrc:99 msgid "Connect" msgstr "" -#: guiinit.cpp:138 +#: guiinit.cpp:139 msgid "You must enter a valid host name" msgstr "" -#: guiinit.cpp:139 +#: guiinit.cpp:140 msgid "Host name invalid" msgstr "" -#: guiinit.cpp:157 +#: guiinit.cpp:158 msgid "Waiting for clients..." msgstr "" -#: guiinit.cpp:158 +#: guiinit.cpp:159 #, c-format msgid "Server IP address is: %s\n" msgstr "" -#: guiinit.cpp:160 +#: guiinit.cpp:161 msgid "Waiting for connection..." msgstr "" -#: guiinit.cpp:161 +#: guiinit.cpp:162 #, c-format msgid "Connecting to %s\n" msgstr "" -#: guiinit.cpp:194 +#: guiinit.cpp:195 msgid "" "Error occurred.\n" "Please try again." msgstr "" -#: guiinit.cpp:261 guiinit.cpp:314 +#: guiinit.cpp:262 guiinit.cpp:315 msgid "Select cheat file" msgstr "" -#: guiinit.cpp:262 +#: guiinit.cpp:263 msgid "VBA cheat lists (*.clt)|*.clt|CHT cheat lists (*.cht)|*.cht" msgstr "" -#: guiinit.cpp:281 panel.cpp:516 +#: guiinit.cpp:282 panel.cpp:517 msgid "Loaded cheats" msgstr "" -#: guiinit.cpp:315 +#: guiinit.cpp:316 msgid "VBA cheat lists (*.clt)|*.clt" msgstr "" -#: guiinit.cpp:333 +#: guiinit.cpp:334 msgid "Saved cheats" msgstr "" -#: guiinit.cpp:364 guiinit.cpp:383 +#: guiinit.cpp:365 guiinit.cpp:384 msgid "Restore old values?" msgstr "" -#: guiinit.cpp:365 guiinit.cpp:384 +#: guiinit.cpp:366 guiinit.cpp:385 msgid "Removing cheats" msgstr "" -#: guiinit.cpp:775 xrc/JoyPanel.xrc:364 +#: guiinit.cpp:776 dialogs/gb-rom-info.cpp:60 xrc/JoyPanel.xrc:364 msgid "Game Shark" msgstr "" -#: guiinit.cpp:776 cmdevents.cpp:653 +#: guiinit.cpp:777 dialogs/gb-rom-info.cpp:57 msgid "Game Genie" msgstr "" -#: guiinit.cpp:778 +#: guiinit.cpp:779 msgid "Generic Code" msgstr "" -#: guiinit.cpp:779 +#: guiinit.cpp:780 msgid "Game Shark Advance" msgstr "" -#: guiinit.cpp:780 +#: guiinit.cpp:781 msgid "Code Breaker Advance" msgstr "" -#: guiinit.cpp:781 +#: guiinit.cpp:782 msgid "Flashcart CHT" msgstr "" -#: guiinit.cpp:849 guiinit.cpp:1104 +#: guiinit.cpp:850 guiinit.cpp:1105 msgid "Number cannot be empty" msgstr "" -#: guiinit.cpp:899 +#: guiinit.cpp:900 msgid "Search produced no results" msgstr "" -#: guiinit.cpp:1062 +#: guiinit.cpp:1063 msgid "8-bit " msgstr "" -#: guiinit.cpp:1066 +#: guiinit.cpp:1067 msgid "16-bit " msgstr "" -#: guiinit.cpp:1070 +#: guiinit.cpp:1071 msgid "32-bit " msgstr "" -#: guiinit.cpp:1076 +#: guiinit.cpp:1077 msgid "signed decimal" msgstr "" -#: guiinit.cpp:1080 +#: guiinit.cpp:1081 msgid "unsigned decimal" msgstr "" -#: guiinit.cpp:1084 +#: guiinit.cpp:1085 msgid "unsigned hexadecimal" msgstr "" -#: guiinit.cpp:1485 +#: guiinit.cpp:1486 #, c-format msgid "%d frames = %.2f ms" msgstr "" -#: guiinit.cpp:1497 +#: guiinit.cpp:1498 msgid "Default device" msgstr "" -#: guiinit.cpp:1950 +#: guiinit.cpp:1951 msgid "Main icon not found" msgstr "" -#: guiinit.cpp:1968 +#: guiinit.cpp:1969 msgid "Main display panel not found" msgstr "" -#: guiinit.cpp:2239 +#: guiinit.cpp:2228 #, c-format msgid "Invalid menu item %s; removing" msgstr "" -#: guiinit.cpp:2438 +#: guiinit.cpp:2413 msgid "Code" msgstr "" -#: guiinit.cpp:2447 +#: guiinit.cpp:2422 msgid "Description" msgstr "" -#: guiinit.cpp:2521 xrc/CheatAdd.xrc:31 +#: guiinit.cpp:2496 xrc/CheatAdd.xrc:31 msgid "Address" msgstr "" -#: guiinit.cpp:2522 +#: guiinit.cpp:2497 msgid "Old Value" msgstr "" -#: guiinit.cpp:2523 +#: guiinit.cpp:2498 msgid "New Value" msgstr "" -#: guiinit.cpp:2897 +#: guiinit.cpp:2872 msgid "JoyBus host invalid; disabling" msgstr "" @@ -295,7 +295,7 @@ msgid "Text files (*.txt;*.log)|*.txt;*.log|" msgstr "" #: viewers.cpp:563 viewers.cpp:773 gfxviewers.cpp:1603 gfxviewers.cpp:1746 -#: cmdevents.cpp:1124 cmdevents.cpp:1202 cmdevents.cpp:1272 cmdevents.cpp:1343 +#: cmdevents.cpp:670 cmdevents.cpp:748 cmdevents.cpp:818 cmdevents.cpp:889 #: viewsupt.cpp:1183 msgid "Select output file" msgstr "" @@ -382,7 +382,7 @@ msgid "" "Table (*.act)|*.act" msgstr "" -#: gfxviewers.cpp:1604 gfxviewers.cpp:1747 cmdevents.cpp:1125 viewsupt.cpp:1184 +#: gfxviewers.cpp:1604 gfxviewers.cpp:1747 cmdevents.cpp:671 viewsupt.cpp:1184 msgid "PNG images|*.png|BMP images|*.bmp" msgstr "" @@ -422,353 +422,238 @@ msgstr "" msgid "Open GBC ROM file" msgstr "" -#: cmdevents.cpp:561 cmdevents.cpp:677 cmdevents.cpp:716 cmdevents.cpp:777 -msgid "Unknown" -msgstr "" - -#: cmdevents.cpp:569 -msgid "ROM" -msgstr "" - -#: cmdevents.cpp:573 -msgid "ROM + MBC1" -msgstr "" - -#: cmdevents.cpp:577 -msgid "ROM + MBC1 + RAM" -msgstr "" - -#: cmdevents.cpp:581 -msgid "ROM + MBC1 + RAM + BATT" -msgstr "" - -#: cmdevents.cpp:585 -msgid "ROM + MBC2" -msgstr "" - -#: cmdevents.cpp:589 -msgid "ROM + MBC2 + BATT" -msgstr "" - -#: cmdevents.cpp:593 -msgid "ROM + MMM01" -msgstr "" - -#: cmdevents.cpp:597 -msgid "ROM + MMM01 + RAM" -msgstr "" - -#: cmdevents.cpp:601 -msgid "ROM + MMM01 + RAM + BATT" -msgstr "" - -#: cmdevents.cpp:605 -msgid "ROM + MBC3 + TIMER + BATT" -msgstr "" - -#: cmdevents.cpp:609 -msgid "ROM + MBC3 + TIMER + RAM + BATT" -msgstr "" - -#: cmdevents.cpp:613 -msgid "ROM + MBC3" -msgstr "" - -#: cmdevents.cpp:617 -msgid "ROM + MBC3 + RAM" -msgstr "" - -#: cmdevents.cpp:621 -msgid "ROM + MBC3 + RAM + BATT" -msgstr "" - -#: cmdevents.cpp:625 -msgid "ROM + MBC5" -msgstr "" - -#: cmdevents.cpp:629 -msgid "ROM + MBC5 + RAM" -msgstr "" - -#: cmdevents.cpp:633 -msgid "ROM + MBC5 + RAM + BATT" -msgstr "" - -#: cmdevents.cpp:637 -msgid "ROM + MBC5 + RUMBLE" -msgstr "" - -#: cmdevents.cpp:641 -msgid "ROM + MBC5 + RUMBLE + RAM" -msgstr "" - -#: cmdevents.cpp:645 -msgid "ROM + MBC5 + RUMBLE + RAM + BATT" -msgstr "" - -#: cmdevents.cpp:649 -msgid "ROM + MBC7 + BATT" -msgstr "" - -#: cmdevents.cpp:657 -msgid "Game Shark 3.0" -msgstr "" - -#: cmdevents.cpp:661 -msgid "ROM + POCKET CAMERA" -msgstr "" - -#: cmdevents.cpp:665 -msgid "ROM + BANDAI TAMA5" -msgstr "" - -#: cmdevents.cpp:669 -msgid "ROM + HuC-3" -msgstr "" - -#: cmdevents.cpp:673 -msgid "ROM + HuC-1" -msgstr "" - -#: cmdevents.cpp:723 dialogs/display-config.cpp:341 xrc/DisplayConfig.xrc:85 -#: xrc/DisplayConfig.xrc:135 xrc/DisplayConfig.xrc:221 -#: xrc/GameBoyAdvanceConfig.xrc:32 xrc/GameBoyAdvanceConfig.xrc:204 -#: xrc/SoundConfig.xrc:219 xrc/SoundConfig.xrc:309 -msgid "None" -msgstr "" - -#: cmdevents.cpp:813 cmdevents.cpp:835 +#: cmdevents.cpp:359 cmdevents.cpp:381 msgid "Select Dot Code file" msgstr "" -#: cmdevents.cpp:815 cmdevents.cpp:837 +#: cmdevents.cpp:361 cmdevents.cpp:383 msgid "e-Reader Dot Code (*.bin;*.raw)|*.bin;*.raw" msgstr "" -#: cmdevents.cpp:856 cmdevents.cpp:1051 +#: cmdevents.cpp:402 cmdevents.cpp:597 msgid "Select battery file" msgstr "" -#: cmdevents.cpp:857 cmdevents.cpp:1052 +#: cmdevents.cpp:403 cmdevents.cpp:598 msgid "Battery file (*.sav)|*.sav|Flash save (*.dat)|*.dat" msgstr "" -#: cmdevents.cpp:865 +#: cmdevents.cpp:411 msgid "" "Importing a battery file will erase any saved games (permanently after the " "next write). Do you want to continue?" msgstr "" -#: cmdevents.cpp:866 cmdevents.cpp:894 cmdevents.cpp:1014 +#: cmdevents.cpp:412 cmdevents.cpp:440 cmdevents.cpp:560 msgid "Confirm import" msgstr "" -#: cmdevents.cpp:872 panel.cpp:459 +#: cmdevents.cpp:418 panel.cpp:460 #, c-format msgid "Loaded battery %s" msgstr "" -#: cmdevents.cpp:874 +#: cmdevents.cpp:420 #, c-format msgid "Error loading battery %s" msgstr "" -#: cmdevents.cpp:883 +#: cmdevents.cpp:429 msgid "Select code file" msgstr "" -#: cmdevents.cpp:884 +#: cmdevents.cpp:430 msgid "Game Shark Code File (*.spc;*.xpc)|*.spc;*.xpc" msgstr "" -#: cmdevents.cpp:884 +#: cmdevents.cpp:430 msgid "Game Shark Code File (*.gcf)|*.gcf" msgstr "" -#: cmdevents.cpp:893 +#: cmdevents.cpp:439 msgid "" "Importing a code file will replace any loaded cheats. Do you want to " "continue?" msgstr "" -#: cmdevents.cpp:910 +#: cmdevents.cpp:456 #, c-format msgid "Cannot open file %s" msgstr "" -#: cmdevents.cpp:920 +#: cmdevents.cpp:466 #, c-format msgid "Unsupported code file %s" msgstr "" -#: cmdevents.cpp:990 +#: cmdevents.cpp:536 #, c-format msgid "Loaded code file %s" msgstr "" -#: cmdevents.cpp:992 +#: cmdevents.cpp:538 #, c-format msgid "Error loading code file %s" msgstr "" -#: cmdevents.cpp:1003 cmdevents.cpp:1079 +#: cmdevents.cpp:549 cmdevents.cpp:625 msgid "Select snapshot file" msgstr "" -#: cmdevents.cpp:1004 +#: cmdevents.cpp:550 msgid "" "Game Shark & PAC Snapshots (*.sps;*.xps)|*.sps;*.xps|Game Shark SP Snapshots " "(*.gsv)|*.gsv" msgstr "" -#: cmdevents.cpp:1004 +#: cmdevents.cpp:550 msgid "Game Boy Snapshot (*.gbs)|*.gbs" msgstr "" -#: cmdevents.cpp:1013 +#: cmdevents.cpp:559 msgid "" "Importing a snapshot file will erase any saved games (permanently after the " "next write). Do you want to continue?" msgstr "" -#: cmdevents.cpp:1038 +#: cmdevents.cpp:584 #, c-format msgid "Loaded snapshot file %s" msgstr "" -#: cmdevents.cpp:1040 +#: cmdevents.cpp:586 #, c-format msgid "Error loading snapshot file %s" msgstr "" -#: cmdevents.cpp:1063 +#: cmdevents.cpp:609 #, c-format msgid "Wrote battery %s" msgstr "" -#: cmdevents.cpp:1065 panel.cpp:771 +#: cmdevents.cpp:611 panel.cpp:772 #, c-format msgid "Error writing battery %s" msgstr "" -#: cmdevents.cpp:1073 +#: cmdevents.cpp:619 msgid "EEPROM saves cannot be exported" msgstr "" -#: cmdevents.cpp:1080 +#: cmdevents.cpp:626 msgid "Game Shark Snapshot (*.sps)|*.sps" msgstr "" -#: cmdevents.cpp:1094 +#: cmdevents.cpp:640 msgid "Exported from Visual Boy Advance-M" msgstr "" -#: cmdevents.cpp:1106 +#: cmdevents.cpp:652 #, c-format msgid "Saved snapshot file %s" msgstr "" -#: cmdevents.cpp:1108 +#: cmdevents.cpp:654 #, c-format msgid "Error saving snapshot file %s" msgstr "" -#: cmdevents.cpp:1149 sys.cpp:574 +#: cmdevents.cpp:695 sys.cpp:574 #, c-format msgid "Wrote snapshot %s" msgstr "" -#: cmdevents.cpp:1170 cmdevents.cpp:1240 cmdevents.cpp:1311 cmdevents.cpp:1377 +#: cmdevents.cpp:716 cmdevents.cpp:786 cmdevents.cpp:857 cmdevents.cpp:923 msgid " files (" msgstr "" -#: cmdevents.cpp:1410 +#: cmdevents.cpp:956 msgid "Select file" msgstr "" -#: cmdevents.cpp:1714 cmdevents.cpp:1807 +#: cmdevents.cpp:1260 cmdevents.cpp:1353 msgid "Select state file" msgstr "" -#: cmdevents.cpp:1715 cmdevents.cpp:1808 +#: cmdevents.cpp:1261 cmdevents.cpp:1354 msgid "Visual Boy Advance saved game files|*.sgm" msgstr "" -#: cmdevents.cpp:1838 cmdevents.cpp:1848 cmdevents.cpp:1859 +#: cmdevents.cpp:1384 cmdevents.cpp:1394 cmdevents.cpp:1405 #, c-format msgid "Current state slot #%d" msgstr "" -#: cmdevents.cpp:1924 +#: cmdevents.cpp:1470 msgid "Cannot use Colorizer Hack when Game Boy BIOS File is enabled." msgstr "" -#: cmdevents.cpp:2135 +#: cmdevents.cpp:1681 msgid "Sound enabled" msgstr "" -#: cmdevents.cpp:2135 +#: cmdevents.cpp:1681 msgid "Sound disabled" msgstr "" -#: cmdevents.cpp:2148 cmdevents.cpp:2162 +#: cmdevents.cpp:1694 cmdevents.cpp:1708 #, c-format msgid "Volume: %d %%" msgstr "" -#: cmdevents.cpp:2231 +#: cmdevents.cpp:1777 msgid "Set to 0 for pseudo tty" msgstr "" -#: cmdevents.cpp:2233 +#: cmdevents.cpp:1779 msgid "Port to wait for connection:" msgstr "" -#: cmdevents.cpp:2234 +#: cmdevents.cpp:1780 msgid "GDB Connection" msgstr "" -#: cmdevents.cpp:2286 +#: cmdevents.cpp:1832 #, c-format msgid "Waiting for connection at %s" msgstr "" -#: cmdevents.cpp:2293 +#: cmdevents.cpp:1839 #, c-format msgid "Waiting for connection on port %d" msgstr "" -#: cmdevents.cpp:2296 +#: cmdevents.cpp:1842 msgid "Waiting for GDB..." msgstr "" -#: cmdevents.cpp:2669 panel.cpp:259 panel.cpp:371 +#: cmdevents.cpp:2215 panel.cpp:260 panel.cpp:372 msgid "Could not initialize the sound driver!" msgstr "" -#: cmdevents.cpp:2734 +#: cmdevents.cpp:2280 msgid "" "YOUR CONFIGURATION WILL BE DELETED!\n" "\n" "Are you sure?" msgstr "" -#: cmdevents.cpp:2735 +#: cmdevents.cpp:2281 msgid "FACTORY RESET" msgstr "" -#: cmdevents.cpp:2770 +#: cmdevents.cpp:2316 msgid "Nintendo Game Boy / Color / Advance emulator." msgstr "" -#: cmdevents.cpp:2771 +#: cmdevents.cpp:2317 msgid "" "Copyright (C) 1999-2003 Forgotten\n" "Copyright (C) 2004-2006 VBA development team\n" "Copyright (C) 2007-2020 VBA-M development team" msgstr "" -#: cmdevents.cpp:2773 +#: cmdevents.cpp:2319 msgid "" "This program is free software: you can redistribute it and / or modify\n" "it under the terms of the GNU General Public License as published by\n" @@ -784,15 +669,15 @@ msgid "" "along with this program. If not, see http://www.gnu.org/licenses ." msgstr "" -#: cmdevents.cpp:2958 +#: cmdevents.cpp:2504 msgid "Cannot use Game Boy BIOS when Colorizer Hack is enabled." msgstr "" -#: cmdevents.cpp:3012 +#: cmdevents.cpp:2558 msgid "LAN link is already active. Disable link mode to disconnect." msgstr "" -#: cmdevents.cpp:3018 +#: cmdevents.cpp:2564 msgid "Network is not supported in local mode." msgstr "" @@ -830,17 +715,17 @@ msgid "" "values may have been reset." msgstr "" -#: opts.cpp:457 opts.cpp:477 opts.cpp:651 +#: opts.cpp:457 opts.cpp:477 opts.cpp:662 #, c-format msgid "Invalid key binding %s for %s" msgstr "" -#: opts.cpp:587 opts.cpp:596 opts.cpp:605 opts.cpp:614 config/option.cpp:492 +#: opts.cpp:598 opts.cpp:607 opts.cpp:616 opts.cpp:625 config/option.cpp:492 #, c-format msgid "Invalid value %s for option %s" msgstr "" -#: opts.cpp:673 +#: opts.cpp:684 #, c-format msgid "Unknown option %s with value %s" msgstr "" @@ -925,172 +810,172 @@ msgstr "" msgid "%s is not a valid ROM file" msgstr "" -#: panel.cpp:184 panel.cpp:244 panel.cpp:309 +#: panel.cpp:184 panel.cpp:245 panel.cpp:310 msgid "Problem loading file" msgstr "" -#: panel.cpp:243 +#: panel.cpp:244 #, c-format msgid "Unable to load Game Boy ROM %s" msgstr "" -#: panel.cpp:271 +#: panel.cpp:272 msgid "" "Cannot use Game Boy BIOS file when Colorizer Hack is enabled, disabling Game " "Boy BIOS file." msgstr "" -#: panel.cpp:285 panel.cpp:385 +#: panel.cpp:286 panel.cpp:386 #, c-format msgid "Could not load BIOS %s" msgstr "" -#: panel.cpp:308 +#: panel.cpp:309 #, c-format msgid "Unable to load Game Boy Advance ROM %s" msgstr "" -#: panel.cpp:553 +#: panel.cpp:554 msgid " player " msgstr "" -#: panel.cpp:719 +#: panel.cpp:720 #, c-format msgid "Loaded state %s" msgstr "" -#: panel.cpp:719 +#: panel.cpp:720 #, c-format msgid "Error loading state %s" msgstr "" -#: panel.cpp:743 +#: panel.cpp:744 #, c-format msgid "Saved state %s" msgstr "" -#: panel.cpp:743 +#: panel.cpp:744 #, c-format msgid "Error saving state %s" msgstr "" -#: panel.cpp:947 +#: panel.cpp:948 #, c-format msgid "Fullscreen mode %d x %d - %d @ %d not supported; looking for another" msgstr "" -#: panel.cpp:985 +#: panel.cpp:986 #, c-format msgid "Fullscreen mode %d x %d - %d @ %d not supported" msgstr "" -#: panel.cpp:990 +#: panel.cpp:991 #, c-format msgid "Valid mode: %d x %d - %d @ %d" msgstr "" -#: panel.cpp:998 +#: panel.cpp:999 #, c-format msgid "Chose mode %d x %d - %d @ %d" msgstr "" -#: panel.cpp:1002 +#: panel.cpp:1003 #, c-format msgid "Failed to change mode to %d x %d - %d @ %d" msgstr "" -#: panel.cpp:1093 +#: panel.cpp:1094 msgid "Not a valid Game Boy Advance cartridge" msgstr "" -#: panel.cpp:1256 +#: panel.cpp:1257 msgid "No memory for rewinding" msgstr "" -#: panel.cpp:1266 +#: panel.cpp:1267 msgid "Error writing rewind state" msgstr "" -#: panel.cpp:2284 +#: panel.cpp:2285 msgid "Enabling EGL VSync." msgstr "" -#: panel.cpp:2286 +#: panel.cpp:2287 msgid "Disabling EGL VSync." msgstr "" -#: panel.cpp:2293 +#: panel.cpp:2294 msgid "Enabling GLX VSync." msgstr "" -#: panel.cpp:2295 +#: panel.cpp:2296 msgid "Disabling GLX VSync." msgstr "" -#: panel.cpp:2313 +#: panel.cpp:2314 msgid "Failed to set glXSwapIntervalEXT" msgstr "" -#: panel.cpp:2322 +#: panel.cpp:2323 msgid "Failed to set glXSwapIntervalSGI" msgstr "" -#: panel.cpp:2331 +#: panel.cpp:2332 msgid "Failed to set glXSwapIntervalMESA" msgstr "" -#: panel.cpp:2338 +#: panel.cpp:2339 msgid "No support for wglGetExtensionsStringEXT" msgstr "" -#: panel.cpp:2341 +#: panel.cpp:2342 msgid "No support for WGL_EXT_swap_control" msgstr "" -#: panel.cpp:2350 +#: panel.cpp:2351 msgid "Failed to set wglSwapIntervalEXT" msgstr "" -#: panel.cpp:2356 +#: panel.cpp:2357 msgid "No VSYNC available on this platform" msgstr "" -#: panel.cpp:2456 +#: panel.cpp:2457 msgid "memory allocation error" msgstr "" -#: panel.cpp:2459 +#: panel.cpp:2460 msgid "error initializing codec" msgstr "" -#: panel.cpp:2462 +#: panel.cpp:2463 msgid "error writing to output file" msgstr "" -#: panel.cpp:2465 +#: panel.cpp:2466 msgid "can't guess output format from file name" msgstr "" -#: panel.cpp:2470 +#: panel.cpp:2471 msgid "programming error; aborting!" msgstr "" -#: panel.cpp:2482 panel.cpp:2511 +#: panel.cpp:2483 panel.cpp:2512 #, c-format msgid "Unable to begin recording to %s (%s)" msgstr "" -#: panel.cpp:2539 +#: panel.cpp:2540 #, c-format msgid "Error in audio / video recording (%s); aborting" msgstr "" -#: panel.cpp:2545 +#: panel.cpp:2546 #, c-format msgid "Error in audio recording (%s); aborting" msgstr "" -#: panel.cpp:2555 +#: panel.cpp:2556 #, c-format msgid "Error in video recording (%s); aborting" msgstr "" @@ -1725,15 +1610,15 @@ msgstr "" msgid "Menu commands" msgstr "" -#: dialogs/accel-config.cpp:269 +#: dialogs/accel-config.cpp:268 msgid "This will clear all user-defined accelerators. Are you sure?" msgstr "" -#: dialogs/accel-config.cpp:269 dialogs/accel-config.cpp:309 +#: dialogs/accel-config.cpp:268 dialogs/accel-config.cpp:305 msgid "Confirm" msgstr "" -#: dialogs/accel-config.cpp:306 +#: dialogs/accel-config.cpp:302 #, c-format msgid "This will unassign \"%s\" from \"%s\". Are you sure?" msgstr "" @@ -1746,6 +1631,13 @@ msgstr "" msgid "Invalid value for Default magnification." msgstr "" +#: dialogs/display-config.cpp:341 xrc/DisplayConfig.xrc:85 +#: xrc/DisplayConfig.xrc:135 xrc/DisplayConfig.xrc:221 +#: xrc/GameBoyAdvanceConfig.xrc:32 xrc/GameBoyAdvanceConfig.xrc:204 +#: xrc/SoundConfig.xrc:219 xrc/SoundConfig.xrc:309 +msgid "None" +msgstr "" + #: dialogs/display-config.cpp:371 #, c-format msgid "No usable rpi plugins found in %s" @@ -1771,6 +1663,193 @@ msgstr "" msgid "(None)" msgstr "" +#: dialogs/game-maker.cpp:234 dialogs/gb-rom-info.cpp:63 +msgid "Unknown" +msgstr "" + +#: dialogs/game-maker.cpp:235 +msgid "Invalid" +msgstr "" + +#: dialogs/gb-rom-info.cpp:21 +msgid "No mapper" +msgstr "" + +#: dialogs/gb-rom-info.cpp:24 +msgid "MBC1" +msgstr "" + +#: dialogs/gb-rom-info.cpp:27 +msgid "MBC2" +msgstr "" + +#: dialogs/gb-rom-info.cpp:30 +msgid "MBC3" +msgstr "" + +#: dialogs/gb-rom-info.cpp:33 +msgid "MBC5" +msgstr "" + +#: dialogs/gb-rom-info.cpp:36 +msgid "MBC6" +msgstr "" + +#: dialogs/gb-rom-info.cpp:39 +msgid "MBC7" +msgstr "" + +#: dialogs/gb-rom-info.cpp:42 +msgid "Pocket Camera" +msgstr "" + +#: dialogs/gb-rom-info.cpp:45 +msgid "MMM01" +msgstr "" + +#: dialogs/gb-rom-info.cpp:48 +msgid "HuC-1" +msgstr "" + +#: dialogs/gb-rom-info.cpp:51 +msgid "HuC-3" +msgstr "" + +#: dialogs/gb-rom-info.cpp:54 +msgid "Bandai TAMA5" +msgstr "" + +#: dialogs/gb-rom-info.cpp:67 +msgid " + RAM" +msgstr "" + +#: dialogs/gb-rom-info.cpp:68 +msgid " + RTC" +msgstr "" + +#: dialogs/gb-rom-info.cpp:69 +msgid " + Battery" +msgstr "" + +#: dialogs/gb-rom-info.cpp:70 +msgid " + Rumble" +msgstr "" + +#: dialogs/gb-rom-info.cpp:71 +msgid " + Motion Sensor" +msgstr "" + +#: dialogs/gb-rom-info.cpp:73 +#, c-format +msgid "%02X (%s%s%s%s%s%s)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:80 dialogs/gb-rom-info.cpp:92 +#, c-format +msgid "%02X (Supported)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:82 dialogs/gb-rom-info.cpp:90 +#, c-format +msgid "%02X (Not supported)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:94 +#, c-format +msgid "%02X (Required)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:106 dialogs/gb-rom-info.cpp:140 +#, c-format +msgid "%02X (32 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:108 dialogs/gb-rom-info.cpp:144 +#, c-format +msgid "%02X (64 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:110 dialogs/gb-rom-info.cpp:142 +#, c-format +msgid "%02X (128 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:112 +#, c-format +msgid "%02X (256 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:114 +#, c-format +msgid "%02X (512 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:116 +#, c-format +msgid "%02X (1 MiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:118 +#, c-format +msgid "%02X (2 MiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:120 +#, c-format +msgid "%02X (4 MiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:122 dialogs/gb-rom-info.cpp:146 +#: dialogs/gb-rom-info.cpp:158 +#, c-format +msgid "%02X (Unknown)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:130 +#, c-format +msgid "%02X (None)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:132 +#, c-format +msgid "%02X (256 B)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:134 +#, c-format +msgid "%02X (512 B)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:136 +#, c-format +msgid "%02X (2 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:138 +#, c-format +msgid "%02X (8 KiB)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:154 +#, c-format +msgid "%02X (Japan)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:156 +#, c-format +msgid "%02X (World)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:208 +#, c-format +msgid "%02X (Actual: %02X)" +msgstr "" + +#: dialogs/gb-rom-info.cpp:211 +#, c-format +msgid "%04X (Actual: %04X)" +msgstr "" + #: widgets/sdljoy.cpp:188 #, c-format msgid "Connected %s: %s" @@ -2469,11 +2548,11 @@ msgstr "" msgid "Device type:" msgstr "" -#: xrc/GBAROMInfo.xrc:131 xrc/GBROMInfo.xrc:72 +#: xrc/GBAROMInfo.xrc:131 xrc/GBROMInfo.xrc:132 msgid "ROM version:" msgstr "" -#: xrc/GBAROMInfo.xrc:143 xrc/GBROMInfo.xrc:84 +#: xrc/GBAROMInfo.xrc:143 msgid "CRC:" msgstr "" @@ -2721,35 +2800,39 @@ msgid "C&ontinue" msgstr "" #: xrc/GBROMInfo.xrc:48 -msgid "Unit code:" -msgstr "" - -#: xrc/GBROMInfo.xrc:60 msgid "Cartridge type:" msgstr "" -#: xrc/GBROMInfo.xrc:96 -msgid "Color:" +#: xrc/GBROMInfo.xrc:60 +msgid "SGB code:" msgstr "" -#: xrc/GBROMInfo.xrc:108 +#: xrc/GBROMInfo.xrc:72 +msgid "CGB code:" +msgstr "" + +#: xrc/GBROMInfo.xrc:84 msgid "ROM size:" msgstr "" -#: xrc/GBROMInfo.xrc:120 +#: xrc/GBROMInfo.xrc:96 msgid "RAM size:" msgstr "" -#: xrc/GBROMInfo.xrc:132 +#: xrc/GBROMInfo.xrc:108 msgid "Dest. code:" msgstr "" -#: xrc/GBROMInfo.xrc:144 +#: xrc/GBROMInfo.xrc:120 msgid "License code:" msgstr "" +#: xrc/GBROMInfo.xrc:144 +msgid "Header checksum:" +msgstr "" + #: xrc/GBROMInfo.xrc:156 -msgid "Checksum:" +msgid "Cartridge checksum:" msgstr "" #: xrc/GBTileViewer.xrc:14 diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index c05e6ddb..23a979a7 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -771,6 +771,8 @@ set( dialogs/directories-config.cpp dialogs/display-config.cpp dialogs/game-boy-config.cpp + dialogs/game-maker.cpp + dialogs/gb-rom-info.cpp widgets/group-check-box.cpp widgets/keep-on-top-styler.cpp widgets/option-validator.cpp @@ -822,6 +824,8 @@ set( dialogs/directories-config.h dialogs/display-config.h dialogs/game-boy-config.h + dialogs/game-maker.h + dialogs/gb-rom-info.h dialogs/validated-child.h widgets/dpi-support.h widgets/group-check-box.h diff --git a/src/wx/cmdevents.cpp b/src/wx/cmdevents.cpp index b46c1a0b..56ed9d1c 100644 --- a/src/wx/cmdevents.cpp +++ b/src/wx/cmdevents.cpp @@ -1,6 +1,7 @@ #include "wxvbam.h" #include + #include #include #include @@ -16,14 +17,10 @@ #include "../gba/agbprint.h" #include "config/option-proxy.h" #include "config/option.h" +#include "dialogs/game-maker.h" -#if (wxMAJOR_VERSION < 3) -#define GetXRCDialog(n) \ - wxStaticCast(wxGetApp().frame->FindWindow(XRCID(n)), wxDialog) -#else #define GetXRCDialog(n) \ wxStaticCast(wxGetApp().frame->FindWindowByName(n), wxDialog) -#endif bool cmditem_lt(const struct cmditem& cmd1, const struct cmditem& cmd2) { @@ -280,236 +277,6 @@ EVT_HANDLER(wxID_FILE10, "Load recent ROM 10") panel->LoadGame(gopts.recent->GetHistoryFile(9)); } -static const struct rom_maker { - const wxString code, name; -} makers[] = { - { wxT("01"), wxT("Nintendo") }, - { wxT("02"), wxT("Rocket Games") }, - { wxT("08"), wxT("Capcom") }, - { wxT("09"), wxT("Hot B Co.") }, - { wxT("0A"), wxT("Jaleco") }, - { wxT("0B"), wxT("Coconuts Japan") }, - { wxT("0C"), wxT("Coconuts Japan/G.X.Media") }, - { wxT("0H"), wxT("Starfish") }, - { wxT("0L"), wxT("Warashi Inc.") }, - { wxT("0N"), wxT("Nowpro") }, - { wxT("0P"), wxT("Game Village") }, - { wxT("13"), wxT("Electronic Arts Japan") }, - { wxT("18"), wxT("Hudson Soft Japan") }, - { wxT("19"), wxT("S.C.P.") }, - { wxT("1A"), wxT("Yonoman") }, - { wxT("1G"), wxT("SMDE") }, - { wxT("1P"), wxT("Creatures Inc.") }, - { wxT("1Q"), wxT("TDK Deep Impresion") }, - { wxT("20"), wxT("Destination Software") }, - { wxT("22"), wxT("VR 1 Japan") }, - { wxT("25"), wxT("San-X") }, - { wxT("28"), wxT("Kemco Japan") }, - { wxT("29"), wxT("Seta") }, - { wxT("2H"), wxT("Ubisoft Japan") }, - { wxT("2K"), wxT("NEC InterChannel") }, - { wxT("2L"), wxT("Tam") }, - { wxT("2M"), wxT("Jordan") }, - { wxT("2N"), wxT("Smilesoft") }, - { wxT("2Q"), wxT("Mediakite") }, - { wxT("36"), wxT("Codemasters") }, - { wxT("37"), wxT("GAGA Communications") }, - { wxT("38"), wxT("Laguna") }, - { wxT("39"), wxT("Telstar Fun and Games") }, - { wxT("41"), wxT("Ubi Soft Entertainment") }, - { wxT("42"), wxT("Sunsoft") }, - { wxT("47"), wxT("Spectrum Holobyte") }, - { wxT("49"), wxT("IREM") }, - { wxT("4D"), wxT("Malibu Games") }, - { wxT("4F"), wxT("Eidos/U.S. Gold") }, - { wxT("4J"), wxT("Fox Interactive") }, - { wxT("4K"), wxT("Time Warner Interactive") }, - { wxT("4Q"), wxT("Disney") }, - { wxT("4S"), wxT("Black Pearl") }, - { wxT("4X"), wxT("GT Interactive") }, - { wxT("4Y"), wxT("RARE") }, - { wxT("4Z"), wxT("Crave Entertainment") }, - { wxT("50"), wxT("Absolute Entertainment") }, - { wxT("51"), wxT("Acclaim") }, - { wxT("52"), wxT("Activision") }, - { wxT("53"), wxT("American Sammy Corp.") }, - { wxT("54"), wxT("Take 2 Interactive") }, - { wxT("55"), wxT("Hi Tech") }, - { wxT("56"), wxT("LJN LTD.") }, - { wxT("58"), wxT("Mattel") }, - { wxT("5A"), wxT("Mindscape/Red Orb Ent.") }, - { wxT("5C"), wxT("Taxan") }, - { wxT("5D"), wxT("Midway") }, - { wxT("5F"), wxT("American Softworks") }, - { wxT("5G"), wxT("Majesco Sales Inc") }, - { wxT("5H"), wxT("3DO") }, - { wxT("5K"), wxT("Hasbro") }, - { wxT("5L"), wxT("NewKidCo") }, - { wxT("5M"), wxT("Telegames") }, - { wxT("5N"), wxT("Metro3D") }, - { wxT("5P"), wxT("Vatical Entertainment") }, - { wxT("5Q"), wxT("LEGO Media") }, - { wxT("5S"), wxT("Xicat Interactive") }, - { wxT("5T"), wxT("Cryo Interactive") }, - { wxT("5W"), wxT("Red Storm Ent./BKN Ent.") }, - { wxT("5X"), wxT("Microids") }, - { wxT("5Z"), wxT("Conspiracy Entertainment Corp.") }, - { wxT("60"), wxT("Titus Interactive Studios") }, - { wxT("61"), wxT("Virgin Interactive") }, - { wxT("62"), wxT("Maxis") }, - { wxT("64"), wxT("LucasArts Entertainment") }, - { wxT("67"), wxT("Ocean") }, - { wxT("69"), wxT("Electronic Arts") }, - { wxT("6E"), wxT("Elite Systems Ltd.") }, - { wxT("6F"), wxT("Electro Brain") }, - { wxT("6G"), wxT("The Learning Company") }, - { wxT("6H"), wxT("BBC") }, - { wxT("6J"), wxT("Software 2000") }, - { wxT("6L"), wxT("BAM! Entertainment") }, - { wxT("6M"), wxT("Studio 3") }, - { wxT("6Q"), wxT("Classified Games") }, - { wxT("6S"), wxT("TDK Mediactive") }, - { wxT("6U"), wxT("DreamCatcher") }, - { wxT("6V"), wxT("JoWood Productions") }, - { wxT("6W"), wxT("SEGA") }, - { wxT("6X"), wxT("Wannado Edition") }, - { wxT("6Y"), wxT("LSP") }, - { wxT("6Z"), wxT("ITE Media") }, - { wxT("70"), wxT("Infogrames") }, - { wxT("71"), wxT("Interplay") }, - { wxT("72"), wxT("JVC Musical Industries Inc") }, - { wxT("73"), wxT("Parker Brothers") }, - { wxT("75"), wxT("SCI") }, - { wxT("78"), wxT("THQ") }, - { wxT("79"), wxT("Accolade") }, - { wxT("7A"), wxT("Triffix Ent. Inc.") }, - { wxT("7C"), wxT("Microprose Software") }, - { wxT("7D"), wxT("Universal Interactive Studios") }, - { wxT("7F"), wxT("Kemco") }, - { wxT("7G"), wxT("Rage Software") }, - { wxT("7H"), wxT("Encore") }, - { wxT("7J"), wxT("Zoo") }, - { wxT("7K"), wxT("BVM") }, - { wxT("7L"), wxT("Simon & Schuster Interactive") }, - { wxT("7M"), wxT("Asmik Ace Entertainment Inc./AIA") }, - { wxT("7N"), wxT("Empire Interactive") }, - { wxT("7Q"), wxT("Jester Interactive") }, - { wxT("7T"), wxT("Scholastic") }, - { wxT("7U"), wxT("Ignition Entertainment") }, - { wxT("7W"), wxT("Stadlbauer") }, - { wxT("80"), wxT("Misawa") }, - { wxT("83"), wxT("LOZC") }, - { wxT("8B"), wxT("Bulletproof Software") }, - { wxT("8C"), wxT("Vic Tokai Inc.") }, - { wxT("8J"), wxT("General Entertainment") }, - { wxT("8N"), wxT("Success") }, - { wxT("8P"), wxT("SEGA Japan") }, - { wxT("91"), wxT("Chun Soft") }, - { wxT("92"), wxT("Video System") }, - { wxT("93"), wxT("BEC") }, - { wxT("96"), wxT("Yonezawa/S'pal") }, - { wxT("97"), wxT("Kaneko") }, - { wxT("99"), wxT("Victor Interactive Software") }, - { wxT("9A"), wxT("Nichibutsu/Nihon Bussan") }, - { wxT("9B"), wxT("Tecmo") }, - { wxT("9C"), wxT("Imagineer") }, - { wxT("9F"), wxT("Nova") }, - { wxT("9H"), wxT("Bottom Up") }, - { wxT("9L"), wxT("Hasbro Japan") }, - { wxT("9N"), wxT("Marvelous Entertainment") }, - { wxT("9P"), wxT("Keynet Inc.") }, - { wxT("9Q"), wxT("Hands-On Entertainment") }, - { wxT("A0"), wxT("Telenet") }, - { wxT("A1"), wxT("Hori") }, - { wxT("A4"), wxT("Konami") }, - { wxT("A6"), wxT("Kawada") }, - { wxT("A7"), wxT("Takara") }, - { wxT("A9"), wxT("Technos Japan Corp.") }, - { wxT("AA"), wxT("JVC") }, - { wxT("AC"), wxT("Toei Animation") }, - { wxT("AD"), wxT("Toho") }, - { wxT("AF"), wxT("Namco") }, - { wxT("AG"), wxT("Media Rings Corporation") }, - { wxT("AH"), wxT("J-Wing") }, - { wxT("AK"), wxT("KID") }, - { wxT("AL"), wxT("MediaFactory") }, - { wxT("AP"), wxT("Infogrames Hudson") }, - { wxT("AQ"), wxT("Kiratto. Ludic Inc") }, - { wxT("B0"), wxT("Acclaim Japan") }, - { wxT("B1"), wxT("ASCII") }, - { wxT("B2"), wxT("Bandai") }, - { wxT("B4"), wxT("Enix") }, - { wxT("B6"), wxT("HAL Laboratory") }, - { wxT("B7"), wxT("SNK") }, - { wxT("B9"), wxT("Pony Canyon Hanbai") }, - { wxT("BA"), wxT("Culture Brain") }, - { wxT("BB"), wxT("Sunsoft") }, - { wxT("BD"), wxT("Sony Imagesoft") }, - { wxT("BF"), wxT("Sammy") }, - { wxT("BG"), wxT("Magical") }, - { wxT("BJ"), wxT("Compile") }, - { wxT("BL"), wxT("MTO Inc.") }, - { wxT("BN"), wxT("Sunrise Interactive") }, - { wxT("BP"), wxT("Global A Entertainment") }, - { wxT("BQ"), wxT("Fuuki") }, - { wxT("C0"), wxT("Taito") }, - { wxT("C2"), wxT("Kemco") }, - { wxT("C3"), wxT("Square Soft") }, - { wxT("C5"), wxT("Data East") }, - { wxT("C6"), wxT("Tonkin House") }, - { wxT("C8"), wxT("Koei") }, - { wxT("CA"), wxT("Konami/Palcom/Ultra") }, - { wxT("CB"), wxT("Vapinc/NTVIC") }, - { wxT("CC"), wxT("Use Co.,Ltd.") }, - { wxT("CD"), wxT("Meldac") }, - { wxT("CE"), wxT("FCI/Pony Canyon") }, - { wxT("CF"), wxT("Angel") }, - { wxT("CM"), wxT("Konami Computer Entertainment Osaka") }, - { wxT("CP"), wxT("Enterbrain") }, - { wxT("D1"), wxT("Sofel") }, - { wxT("D2"), wxT("Quest") }, - { wxT("D3"), wxT("Sigma Enterprises") }, - { wxT("D4"), wxT("Ask Kodansa") }, - { wxT("D6"), wxT("Naxat") }, - { wxT("D7"), wxT("Copya System") }, - { wxT("D9"), wxT("Banpresto") }, - { wxT("DA"), wxT("TOMY") }, - { wxT("DB"), wxT("LJN Japan") }, - { wxT("DD"), wxT("NCS") }, - { wxT("DF"), wxT("Altron Corporation") }, - { wxT("DH"), wxT("Gaps Inc.") }, - { wxT("DN"), wxT("ELF") }, - { wxT("E2"), wxT("Yutaka") }, - { wxT("E3"), wxT("Varie") }, - { wxT("E5"), wxT("Epoch") }, - { wxT("E7"), wxT("Athena") }, - { wxT("E8"), wxT("Asmik Ace Entertainment Inc.") }, - { wxT("E9"), wxT("Natsume") }, - { wxT("EA"), wxT("King Records") }, - { wxT("EB"), wxT("Atlus") }, - { wxT("EC"), wxT("Epic/Sony Records") }, - { wxT("EE"), wxT("IGS") }, - { wxT("EL"), wxT("Spike") }, - { wxT("EM"), wxT("Konami Computer Entertainment Tokyo") }, - { wxT("EN"), wxT("Alphadream Corporation") }, - { wxT("F0"), wxT("A Wave") }, - { wxT("G1"), wxT("PCCW") }, - { wxT("G4"), wxT("KiKi Co Ltd") }, - { wxT("G5"), wxT("Open Sesame Inc.") }, - { wxT("G6"), wxT("Sims") }, - { wxT("G7"), wxT("Broccoli") }, - { wxT("G8"), wxT("Avex") }, - { wxT("G9"), wxT("D3 Publisher") }, - { wxT("GB"), wxT("Konami Computer Entertainment Japan") }, - { wxT("GD"), wxT("Square-Enix") }, - { wxT("HY"), wxT("Sachen") } -}; -#define num_makers (sizeof(makers) / sizeof(makers[0])) -static bool maker_lt(const rom_maker& r1, const rom_maker& r2) -{ - return wxStrcmp(r1.code, r2.code) < 0; -} - void SetDialogLabel(wxDialog* dlg, const wxString& id, wxString ts, size_t l) { (void)l; // unused params @@ -532,11 +299,6 @@ EVT_HANDLER_MASK(RomInformation, "ROM information...", CMDEN_GB | CMDEN_GBA) s.Printf(wxT("%02x"), (unsigned int)b); \ setlab(id); \ } while (0) -#define setblabs(id, b, ts) \ - do { \ - s.Printf(wxT("%02x (%s)"), (unsigned int)b, ts.c_str()); \ - setlab(id); \ - } while (0) #define setlabs(id, ts, l) \ do { \ s = wxString((const char*)&(ts), wxConvLibc, l); \ @@ -544,221 +306,9 @@ EVT_HANDLER_MASK(RomInformation, "ROM information...", CMDEN_GB | CMDEN_GBA) } while (0) switch (panel->game_type()) { - case IMAGE_GB: { - wxDialog* dlg = GetXRCDialog("GBROMInfo"); - setlabs("Title", gbRom[0x134], 15); - setblab("Color", gbRom[0x143]); - - if (gbRom[0x14b] == 0x33) - s = wxString((const char*)&gbRom[0x144], wxConvUTF8, 2); - else - s.Printf(wxT("%02x"), gbRom[0x14b]); - - setlab("MakerCode"); - const rom_maker m = { s, wxString() }, *rm; - rm = std::lower_bound(&makers[0], &makers[num_makers], m, maker_lt); - - if (rm < &makers[num_makers] && !wxStrcmp(m.code, rm->code)) - s = rm->name; - else - s = _("Unknown"); - - setlab("MakerName"); - setblab("UnitCode", gbRom[0x146]); - wxString type; - - switch (gbRom[0x147]) { - case 0x00: - type = _("ROM"); - break; - - case 0x01: - type = _("ROM + MBC1"); - break; - - case 0x02: - type = _("ROM + MBC1 + RAM"); - break; - - case 0x03: - type = _("ROM + MBC1 + RAM + BATT"); - break; - - case 0x05: - type = _("ROM + MBC2"); - break; - - case 0x06: - type = _("ROM + MBC2 + BATT"); - break; - - case 0x0b: - type = _("ROM + MMM01"); - break; - - case 0x0c: - type = _("ROM + MMM01 + RAM"); - break; - - case 0x0d: - type = _("ROM + MMM01 + RAM + BATT"); - break; - - case 0x0f: - type = _("ROM + MBC3 + TIMER + BATT"); - break; - - case 0x10: - type = _("ROM + MBC3 + TIMER + RAM + BATT"); - break; - - case 0x11: - type = _("ROM + MBC3"); - break; - - case 0x12: - type = _("ROM + MBC3 + RAM"); - break; - - case 0x13: - type = _("ROM + MBC3 + RAM + BATT"); - break; - - case 0x19: - type = _("ROM + MBC5"); - break; - - case 0x1a: - type = _("ROM + MBC5 + RAM"); - break; - - case 0x1b: - type = _("ROM + MBC5 + RAM + BATT"); - break; - - case 0x1c: - type = _("ROM + MBC5 + RUMBLE"); - break; - - case 0x1d: - type = _("ROM + MBC5 + RUMBLE + RAM"); - break; - - case 0x1e: - type = _("ROM + MBC5 + RUMBLE + RAM + BATT"); - break; - - case 0x22: - type = _("ROM + MBC7 + BATT"); - break; - - case 0x55: - type = _("Game Genie"); - break; - - case 0x56: - type = _("Game Shark 3.0"); - break; - - case 0xfc: - type = _("ROM + POCKET CAMERA"); - break; - - case 0xfd: - type = _("ROM + BANDAI TAMA5"); - break; - - case 0xfe: - type = _("ROM + HuC-3"); - break; - - case 0xff: - type = _("ROM + HuC-1"); - break; - - default: - type = _("Unknown"); - } - - setblabs("DeviceType", gbRom[0x147], type); - - switch (gbRom[0x148]) { - case 0: - type = wxT("32K"); - break; - - case 1: - type = wxT("64K"); - break; - - case 2: - type = wxT("128K"); - break; - - case 3: - type = wxT("256K"); - break; - - case 4: - type = wxT("512K"); - break; - - case 5: - type = wxT("1M"); - break; - - case 6: - type = wxT("2M"); - break; - - case 7: - type = wxT("4M"); - break; - - default: - type = _("Unknown"); - } - - setblabs("ROMSize", gbRom[0x148], type); - - switch (gbRom[0x149]) { - case 0: - type = _("None"); - break; - - case 1: - type = wxT("2K"); - break; - - case 2: - type = wxT("8K"); - break; - - case 3: - type = wxT("32K"); - break; - - case 4: - type = wxT("128K"); - break; - - case 5: - type = wxT("64K"); - break; - } - - setblabs("RAMSize", gbRom[0x149], type); - setblab("DestCode", gbRom[0x14a]); - setblab("LicCode", gbRom[0x14b]); - setblab("Version", gbRom[0x14c]); - s.Printf(wxT("%02x (%02x)"), g_gbCartData.actual_header_checksum(), g_gbCartData.header_checksum()); - setlab("CRC"); - s.Printf(wxT("%04x (%04x)"), g_gbCartData.actual_global_checksum(), g_gbCartData.global_checksum()); - setlab("Checksum"); - dlg->Fit(); - ShowModal(dlg); - } break; - + case IMAGE_GB: + ShowModal(GetXRCDialog("GBROMInfo")); + break; case IMAGE_GBA: { IdentifyRom(); wxDialog* dlg = GetXRCDialog("GBAROMInfo"); @@ -771,14 +321,7 @@ EVT_HANDLER_MASK(RomInformation, "ROM information...", CMDEN_GB | CMDEN_GBA) SetDialogLabel(dlg, wxT("CRC32"), rom_crc32, 8); setlabs("GameCode", rom[0xac], 4); setlabs("MakerCode", rom[0xb0], 2); - const rom_maker m = { s, wxString() }, *rm; - rm = std::lower_bound(&makers[0], &makers[num_makers], m, maker_lt); - - if (rm < &makers[num_makers] && !wxStrcmp(m.code, rm->code)) - s = rm->name; - else - s = _("Unknown"); - + s = dialogs::GetGameMakerName(s.ToStdString()); setlab("MakerName"); setblab("UnitCode", rom[0xb3]); s.Printf(wxT("%02x"), (unsigned int)rom[0xb4]); diff --git a/src/wx/dialogs/game-maker.cpp b/src/wx/dialogs/game-maker.cpp new file mode 100644 index 00000000..07db17c6 --- /dev/null +++ b/src/wx/dialogs/game-maker.cpp @@ -0,0 +1,248 @@ +#include "game-maker.h" + +#include + +#include + +namespace dialogs { + +const wxString& GetGameMakerName(const std::string& makerCode) { + static const std::unordered_map kGameMakersMap = { + {"01", "Nintendo R&&D1"}, + {"02", "Rocket Games"}, + {"08", "Capcom"}, + {"09", "Hot B Co."}, + {"0A", "Jaleco"}, + {"0B", "Coconuts Japan"}, + {"0C", "Coconuts Japan/G.X.Media"}, + {"0H", "Starfish"}, + {"0L", "Warashi Inc."}, + {"0N", "Nowpro"}, + {"0P", "Game Village"}, + {"13", "Electronic Arts Japan"}, + {"18", "Hudson Soft Japan"}, + {"19", "S.C.P."}, + {"1A", "Yonoman"}, + {"1G", "SMDE"}, + {"1P", "Creatures Inc."}, + {"1Q", "TDK Deep Impresion"}, + {"20", "Destination Software"}, + {"22", "VR 1 Japan"}, + {"25", "San-X"}, + {"28", "Kemco Japan"}, + {"29", "Seta"}, + {"2H", "Ubisoft Japan"}, + {"2K", "NEC InterChannel"}, + {"2L", "Tam"}, + {"2M", "Jordan"}, + {"2N", "Smilesoft"}, + {"2Q", "Mediakite"}, + {"31", "Nintendo"}, + {"36", "Codemasters"}, + {"37", "GAGA Communications"}, + {"38", "Laguna"}, + {"39", "Telstar Fun and Games"}, + {"41", "Ubi Soft Entertainment"}, + {"42", "Sunsoft"}, + {"47", "Spectrum Holobyte"}, + {"49", "IREM"}, + {"4D", "Malibu Games"}, + {"4F", "Eidos/U.S. Gold"}, + {"4J", "Fox Interactive"}, + {"4K", "Time Warner Interactive"}, + {"4Q", "Disney"}, + {"4S", "Black Pearl"}, + {"4X", "GT Interactive"}, + {"4Y", "RARE"}, + {"4Z", "Crave Entertainment"}, + {"50", "Absolute Entertainment"}, + {"51", "Acclaim"}, + {"52", "Activision"}, + {"53", "American Sammy Corp."}, + {"54", "Take 2 Interactive"}, + {"55", "Hi Tech"}, + {"56", "LJN LTD."}, + {"58", "Mattel"}, + {"5A", "Mindscape/Red Orb Ent."}, + {"5C", "Taxan"}, + {"5D", "Midway"}, + {"5F", "American Softworks"}, + {"5G", "Majesco Sales Inc"}, + {"5H", "3DO"}, + {"5K", "Hasbro"}, + {"5L", "NewKidCo"}, + {"5M", "Telegames"}, + {"5N", "Metro3D"}, + {"5P", "Vatical Entertainment"}, + {"5Q", "LEGO Media"}, + {"5S", "Xicat Interactive"}, + {"5T", "Cryo Interactive"}, + {"5W", "Red Storm Ent./BKN Ent."}, + {"5X", "Microids"}, + {"5Z", "Conspiracy Entertainment Corp."}, + {"60", "Titus Interactive Studios"}, + {"61", "Virgin Interactive"}, + {"62", "Maxis"}, + {"64", "LucasArts Entertainment"}, + {"67", "Ocean"}, + {"69", "Electronic Arts"}, + {"6E", "Elite Systems Ltd."}, + {"6F", "Electro Brain"}, + {"6G", "The Learning Company"}, + {"6H", "BBC"}, + {"6J", "Software 2000"}, + {"6L", "BAM! Entertainment"}, + {"6M", "Studio 3"}, + {"6Q", "Classified Games"}, + {"6S", "TDK Mediactive"}, + {"6U", "DreamCatcher"}, + {"6V", "JoWood Productions"}, + {"6W", "SEGA"}, + {"6X", "Wannado Edition"}, + {"6Y", "LSP"}, + {"6Z", "ITE Media"}, + {"70", "Infogrames"}, + {"71", "Interplay"}, + {"72", "JVC Musical Industries Inc"}, + {"73", "Parker Brothers"}, + {"75", "SCI"}, + {"78", "THQ"}, + {"79", "Accolade"}, + {"7A", "Triffix Ent. Inc."}, + {"7C", "Microprose Software"}, + {"7D", "Universal Interactive Studios"}, + {"7F", "Kemco"}, + {"7G", "Rage Software"}, + {"7H", "Encore"}, + {"7J", "Zoo"}, + {"7K", "BVM"}, + {"7L", "Simon & Schuster Interactive"}, + {"7M", "Asmik Ace Entertainment Inc./AIA"}, + {"7N", "Empire Interactive"}, + {"7Q", "Jester Interactive"}, + {"7T", "Scholastic"}, + {"7U", "Ignition Entertainment"}, + {"7W", "Stadlbauer"}, + {"80", "Misawa"}, + {"83", "LOZC"}, + {"8B", "Bulletproof Software"}, + {"8C", "Vic Tokai Inc."}, + {"8J", "General Entertainment"}, + {"8N", "Success"}, + {"8P", "SEGA Japan"}, + {"91", "Chun Soft"}, + {"92", "Video System"}, + {"93", "BEC"}, + {"96", "Yonezawa/S'pal"}, + {"97", "Kaneko"}, + {"99", "Victor Interactive Software"}, + {"9A", "Nichibutsu/Nihon Bussan"}, + {"9B", "Tecmo"}, + {"9C", "Imagineer"}, + {"9F", "Nova"}, + {"9H", "Bottom Up"}, + {"9L", "Hasbro Japan"}, + {"9N", "Marvelous Entertainment"}, + {"9P", "Keynet Inc."}, + {"9Q", "Hands-On Entertainment"}, + {"A0", "Telenet"}, + {"A1", "Hori"}, + {"A4", "Konami"}, + {"A6", "Kawada"}, + {"A7", "Takara"}, + {"A9", "Technos Japan Corp."}, + {"AA", "JVC"}, + {"AC", "Toei Animation"}, + {"AD", "Toho"}, + {"AF", "Namco"}, + {"AG", "Media Rings Corporation"}, + {"AH", "J-Wing"}, + {"AK", "KID"}, + {"AL", "MediaFactory"}, + {"AP", "Infogrames Hudson"}, + {"AQ", "Kiratto. Ludic Inc"}, + {"B0", "Acclaim Japan"}, + {"B1", "ASCII"}, + {"B2", "Bandai"}, + {"B4", "Enix"}, + {"B6", "HAL Laboratory"}, + {"B7", "SNK"}, + {"B9", "Pony Canyon Hanbai"}, + {"BA", "Culture Brain"}, + {"BB", "Sunsoft"}, + {"BD", "Sony Imagesoft"}, + {"BF", "Sammy"}, + {"BG", "Magical"}, + {"BJ", "Compile"}, + {"BL", "MTO Inc."}, + {"BN", "Sunrise Interactive"}, + {"BP", "Global A Entertainment"}, + {"BQ", "Fuuki"}, + {"C0", "Taito"}, + {"C2", "Kemco"}, + {"C3", "Square Soft"}, + {"C5", "Data East"}, + {"C6", "Tonkin House"}, + {"C8", "Koei"}, + {"CA", "Konami/Palcom/Ultra"}, + {"CB", "Vapinc/NTVIC"}, + {"CC", "Use Co.,Ltd."}, + {"CD", "Meldac"}, + {"CE", "FCI/Pony Canyon"}, + {"CF", "Angel"}, + {"CM", "Konami Computer Entertainment Osaka"}, + {"CP", "Enterbrain"}, + {"D1", "Sofel"}, + {"D2", "Quest"}, + {"D3", "Sigma Enterprises"}, + {"D4", "Ask Kodansa"}, + {"D6", "Naxat"}, + {"D7", "Copya System"}, + {"D9", "Banpresto"}, + {"DA", "TOMY"}, + {"DB", "LJN Japan"}, + {"DD", "NCS"}, + {"DF", "Altron Corporation"}, + {"DH", "Gaps Inc."}, + {"DN", "ELF"}, + {"E2", "Yutaka"}, + {"E3", "Varie"}, + {"E5", "Epoch"}, + {"E7", "Athena"}, + {"E8", "Asmik Ace Entertainment Inc."}, + {"E9", "Natsume"}, + {"EA", "King Records"}, + {"EB", "Atlus"}, + {"EC", "Epic/Sony Records"}, + {"EE", "IGS"}, + {"EL", "Spike"}, + {"EM", "Konami Computer Entertainment Tokyo"}, + {"EN", "Alphadream Corporation"}, + {"F0", "A Wave"}, + {"G1", "PCCW"}, + {"G4", "KiKi Co Ltd"}, + {"G5", "Open Sesame Inc."}, + {"G6", "Sims"}, + {"G7", "Broccoli"}, + {"G8", "Avex"}, + {"G9", "D3 Publisher"}, + {"GB", "Konami Computer Entertainment Japan"}, + {"GD", "Square-Enix"}, + {"HY", "Sachen"}}; + + // Localized strings. + static const wxString kUnknownMakerCode = _("Unknown"); + static const wxString kInvalidMakerCode = _("Invalid"); + + if (makerCode.size() != 2) { + return kInvalidMakerCode; + } + + const auto iter = kGameMakersMap.find(makerCode); + if (iter == kGameMakersMap.end()) { + return kUnknownMakerCode; + } + return iter->second; +} + +} // namespace dialogs diff --git a/src/wx/dialogs/game-maker.h b/src/wx/dialogs/game-maker.h new file mode 100644 index 00000000..f965fa6c --- /dev/null +++ b/src/wx/dialogs/game-maker.h @@ -0,0 +1,18 @@ +#ifndef VBAM_WX_DIALOGS_GAME_MAKER_H_ +#define VBAM_WX_DIALOGS_GAME_MAKER_H_ + +#include + +#include + +namespace dialogs { + +// TODO: Move this file to an internal directory once GBARomInfo has been +// converted. + +// Returns the Game Maker as a string. +const wxString& GetGameMakerName(const std::string& makerCode); + +} // namespace dialogs + +#endif // VBAM_WX_DIALOGS_GAME_MAKER_H_ \ No newline at end of file diff --git a/src/wx/dialogs/gb-rom-info.cpp b/src/wx/dialogs/gb-rom-info.cpp new file mode 100644 index 00000000..912c5655 --- /dev/null +++ b/src/wx/dialogs/gb-rom-info.cpp @@ -0,0 +1,218 @@ +#include "dialogs/gb-rom-info.h" + +#include +#include + +#include "../common/sizes.h" +#include "../gb/gb.h" +#include "dialogs/game-maker.h" +#include "dialogs/validated-child.h" + +namespace dialogs { + +namespace { + +// Returns a localized string indicating the cartridge type (mapper) for the loaded GB/GBC +// cartridge. +wxString GetCartType() { + wxString mapper_type; + switch (g_gbCartData.mapper_type()) { + case gbCartData::MapperType::kNone: + mapper_type = _("No mapper"); + break; + case gbCartData::MapperType::kMbc1: + mapper_type = _("MBC1"); + break; + case gbCartData::MapperType::kMbc2: + mapper_type = _("MBC2"); + break; + case gbCartData::MapperType::kMbc3: + mapper_type = _("MBC3"); + break; + case gbCartData::MapperType::kMbc5: + mapper_type = _("MBC5"); + break; + case gbCartData::MapperType::kMbc6: + mapper_type = _("MBC6"); + break; + case gbCartData::MapperType::kMbc7: + mapper_type = _("MBC7"); + break; + case gbCartData::MapperType::kPocketCamera: + mapper_type = _("Pocket Camera"); + break; + case gbCartData::MapperType::kMmm01: + mapper_type = _("MMM01"); + break; + case gbCartData::MapperType::kHuC1: + mapper_type = _("HuC-1"); + break; + case gbCartData::MapperType::kHuC3: + mapper_type = _("HuC-3"); + break; + case gbCartData::MapperType::kTama5: + mapper_type = _("Bandai TAMA5"); + break; + case gbCartData::MapperType::kGameGenie: + mapper_type = _("Game Genie"); + break; + case gbCartData::MapperType::kGameShark: + mapper_type = _("Game Shark"); + break; + case gbCartData::MapperType::kUnknown: + mapper_type = _("Unknown"); + break; + } + + const wxString has_ram = g_gbCartData.HasRam() ? _(" + RAM") : ""; + const wxString has_rtc = g_gbCartData.has_rtc() ? _(" + RTC") : ""; + const wxString has_battery = g_gbCartData.has_battery() ? _(" + Battery") : ""; + const wxString has_rumble = g_gbCartData.has_rumble() ? _(" + Rumble") : ""; + const wxString has_motion = g_gbCartData.has_sensor() ? _(" + Motion Sensor") : ""; + + return wxString::Format(_("%02X (%s%s%s%s%s%s)"), g_gbCartData.mapper_flag(), mapper_type, + has_ram, has_rtc, has_battery, has_rumble, has_motion); +} + +// Returns a localized string indicating SGB support for the loaded GB/GBC cartridge. +wxString GetCartSGBFlag() { + if (g_gbCartData.sgb_support()) { + return wxString::Format(_("%02X (Supported)"), g_gbCartData.sgb_flag()); + } else { + return wxString::Format(_("%02X (Not supported)"), g_gbCartData.sgb_flag()); + } +} + +// Returns a localized string indicating CGB support for the loaded GB/GBC cartridge. +wxString GetCartCGBFlag() { + switch (g_gbCartData.cgb_support()) { + case gbCartData::CGBSupport::kNone: + return wxString::Format(_("%02X (Not supported)"), g_gbCartData.cgb_flag()); + case gbCartData::CGBSupport::kSupported: + return wxString::Format(_("%02X (Supported)"), g_gbCartData.cgb_flag()); + case gbCartData::CGBSupport::kRequired: + return wxString::Format(_("%02X (Required)"), g_gbCartData.cgb_flag()); + default: + // Unreachable. + assert(false); + return ""; + } +} + +// Returns a localized string indicating the ROM size of the loaded GB/GBC cartridge. +wxString GetCartRomSize() { + switch (g_gbCartData.rom_size()) { + case k32KiB: + return wxString::Format(_("%02X (32 KiB)"), g_gbCartData.rom_flag()); + case k64KiB: + return wxString::Format(_("%02X (64 KiB)"), g_gbCartData.rom_flag()); + case k128KiB: + return wxString::Format(_("%02X (128 KiB)"), g_gbCartData.rom_flag()); + case k256KiB: + return wxString::Format(_("%02X (256 KiB)"), g_gbCartData.rom_flag()); + case k512KiB: + return wxString::Format(_("%02X (512 KiB)"), g_gbCartData.rom_flag()); + case k1MiB: + return wxString::Format(_("%02X (1 MiB)"), g_gbCartData.rom_flag()); + case k2MiB: + return wxString::Format(_("%02X (2 MiB)"), g_gbCartData.rom_flag()); + case k4MiB: + return wxString::Format(_("%02X (4 MiB)"), g_gbCartData.rom_flag()); + default: + return wxString::Format(_("%02X (Unknown)"), g_gbCartData.rom_flag()); + } +} + +// Returns a localized string indicating the ROM size of the loaded GB/GBC cartridge. +wxString GetCartRamSize() { + switch (g_gbCartData.ram_size()) { + case 0: + return wxString::Format(_("%02X (None)"), g_gbCartData.ram_flag()); + case k256B: + return wxString::Format(_("%02X (256 B)"), g_gbCartData.ram_flag()); + case k512B: + return wxString::Format(_("%02X (512 B)"), g_gbCartData.ram_flag()); + case k2KiB: + return wxString::Format(_("%02X (2 KiB)"), g_gbCartData.ram_flag()); + case k8KiB: + return wxString::Format(_("%02X (8 KiB)"), g_gbCartData.ram_flag()); + case k32KiB: + return wxString::Format(_("%02X (32 KiB)"), g_gbCartData.ram_flag()); + case k128KiB: + return wxString::Format(_("%02X (128 KiB)"), g_gbCartData.ram_flag()); + case k64KiB: + return wxString::Format(_("%02X (64 KiB)"), g_gbCartData.ram_flag()); + default: + return wxString::Format(_("%02X (Unknown)"), g_gbCartData.ram_flag()); + } +} + +// Returns a localized string indicating the destination code of the loaded GB/GBC cartridge. +wxString GetCartDestinationCode() { + switch (g_gbCartData.destination_code()) { + case gbCartData::DestinationCode::kJapanese: + return wxString::Format(_("%02X (Japan)"), g_gbCartData.destination_code_flag()); + case gbCartData::DestinationCode::kWorldwide: + return wxString::Format(_("%02X (World)"), g_gbCartData.destination_code_flag()); + case gbCartData::DestinationCode::kUnknown: + return wxString::Format(_("%02X (Unknown)"), g_gbCartData.destination_code_flag()); + default: + // Unreachable. + assert(false); + return ""; + } +} + +} // namespace + +// static +GbRomInfo* GbRomInfo::NewInstance(wxWindow* parent) { + assert(parent); + return new GbRomInfo(parent); +} + +GbRomInfo::GbRomInfo(wxWindow* parent) : wxDialog(), keep_on_top_styler_(this) { +#if !wxCHECK_VERSION(3, 1, 0) + // This needs to be set before loading any element on the window. This also + // has no effect since wx 3.1.0, where it became the default. + this->SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY); +#endif + wxXmlResource::Get()->LoadDialog(this, parent, "GBROMInfo"); + + Bind(wxEVT_SHOW, &GbRomInfo::OnDialogShowEvent, this); +} + +void GbRomInfo::OnDialogShowEvent(wxShowEvent& event) { + // Let the event propagate. + event.Skip(); + + if (!event.IsShown()) { + return; + } + + // Populate the dialog. + GetValidatedChild(this, "Title")->SetLabel(g_gbCartData.title()); + GetValidatedChild(this, "MakerCode")->SetLabel(g_gbCartData.maker_code()); + GetValidatedChild(this, "MakerName")->SetLabel(GetGameMakerName(g_gbCartData.maker_code())); + GetValidatedChild(this, "CartridgeType")->SetLabel(GetCartType()); + GetValidatedChild(this, "SGBCode")->SetLabel(GetCartSGBFlag()); + GetValidatedChild(this, "CGBCode")->SetLabel(GetCartCGBFlag()); + GetValidatedChild(this, "ROMSize")->SetLabel(GetCartRomSize()); + GetValidatedChild(this, "RAMSize")->SetLabel(GetCartRamSize()); + GetValidatedChild(this, "DestCode")->SetLabel(GetCartDestinationCode()); + GetValidatedChild(this, "LicCode") + ->SetLabel(wxString::Format("%02X", g_gbCartData.old_licensee_code())); + GetValidatedChild(this, "Version") + ->SetLabel(wxString::Format("%02X", g_gbCartData.version_flag())); + GetValidatedChild(this, "HeaderChecksum") + ->SetLabel(wxString::Format(_("%02X (Actual: %02X)"), g_gbCartData.header_checksum(), + g_gbCartData.actual_header_checksum())); + GetValidatedChild(this, "CartridgeChecksum") + ->SetLabel(wxString::Format(_("%04X (Actual: %04X)"), g_gbCartData.global_checksum(), + g_gbCartData.actual_global_checksum())); + + // Re-fit everything. + Fit(); +} + +} // namespace dialogs diff --git a/src/wx/dialogs/gb-rom-info.h b/src/wx/dialogs/gb-rom-info.h new file mode 100644 index 00000000..ce471090 --- /dev/null +++ b/src/wx/dialogs/gb-rom-info.h @@ -0,0 +1,29 @@ +#ifndef VBAM_WX_DIALOGS_GB_ROM_INFO_H_ +#define VBAM_WX_DIALOGS_GB_ROM_INFO_H_ + +#include + +#include "widgets/keep-on-top-styler.h" + +namespace dialogs { + +class GbRomInfo : public wxDialog { +public: + static GbRomInfo* NewInstance(wxWindow* parent); + ~GbRomInfo() override = default; + +private: + // The constructor is private so initialization has to be done via the + // static method. This is because this class is destroyed when its + // owner, `parent` is destroyed. This prevents accidental deletion. + GbRomInfo(wxWindow* parent); + + // Handler for the wxEVT_SHOW event. + void OnDialogShowEvent(wxShowEvent& event); + + const widgets::KeepOnTopStyler keep_on_top_styler_; +}; + +} // namespace dialogs + +#endif // VBAM_WX_DIALOGS_GB_ROM_INFO_H_ diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 1d17257b..f8557191 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -42,6 +42,7 @@ #include "dialogs/directories-config.h" #include "dialogs/display-config.h" #include "dialogs/game-boy-config.h" +#include "dialogs/gb-rom-info.h" #include "opts.h" #include "widgets/option-validator.h" #include "widgets/user-input-ctrl.h" @@ -2267,22 +2268,7 @@ bool MainFrame::BindControls() getlab("Version"); getlab("CRC"); d->Fit(); - d = LoadXRCDialog("GBROMInfo"); - // just verify fields present - getlab("Title"); - getlab("MakerCode"); - getlab("MakerName"); - getlab("UnitCode"); - getlab("DeviceType"); - getlab("Version"); - getlab("CRC"); - getlab("Color"); - getlab("ROMSize"); - getlab("RAMSize"); - getlab("DestCode"); - getlab("LicCode"); - getlab("Checksum"); - d->Fit(); + dialogs::GbRomInfo::NewInstance(this); d = LoadXRCDialog("CodeSelect"); // just verify list present SafeXRCCTRL(d, "CodeList"); diff --git a/src/wx/xrc/GBROMInfo.xrc b/src/wx/xrc/GBROMInfo.xrc index 8d9c9b72..56c09bfa 100644 --- a/src/wx/xrc/GBROMInfo.xrc +++ b/src/wx/xrc/GBROMInfo.xrc @@ -43,18 +43,6 @@ wxALL 5 - - - - - wxALL - 5 - - - - wxALL - 5 - @@ -63,43 +51,31 @@ 5 - + wxALL 5 - + wxALL 5 - + wxALL 5 - + wxALL 5 - - wxALL - 5 - - - - - - wxALL - 5 - - - + wxALL 5 @@ -153,13 +129,37 @@ - + wxALL 5 - + + wxALL + 5 + + + + + + wxALL + 5 + + + + wxALL + 5 + + + + + + wxALL + 5 + + + wxALL 5