~korth/gens-gs-ii.git
8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Minor formatting fixes. gens-qt4-CtrlConfigWindow-v2
David Korth [Mon, 7 Mar 2011 16:51:01 +0000 (11:51 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Minor formatting fixes.

8 years ago[gens-qt4] GensCtrlKeyWidgetPrivate::updateShortcutDisplay(): Use LibGens::DevManager...
David Korth [Mon, 7 Mar 2011 16:50:10 +0000 (11:50 -0500)] 
[gens-qt4] GensCtrlKeyWidgetPrivate::updateShortcutDisplay(): Use LibGens::DevManager::KeyName(): to get the key name.

TODO: Move LibGens::DevManager::KeyName to the UI.

8 years ago[libgens] GensInput/DevManager.hpp: Marked the inline function definitions as inline.
David Korth [Mon, 7 Mar 2011 16:47:44 +0000 (11:47 -0500)] 
[libgens] GensInput/DevManager.hpp: Marked the inline function definitions as inline.

I forgot to do this in commit fab8fc39bcdc71d0c8553f5d606e61a0581a7085.
([libgens] GensInput/DevManager.hpp: Moved inline functions to outside of the class definition.)

8 years ago[libgens] GensInput::KeyName(): New function to get the name of a given Gens keycode.
David Korth [Mon, 7 Mar 2011 16:45:27 +0000 (11:45 -0500)] 
[libgens] GensInput::KeyName(): New function to get the name of a given Gens keycode.

TODO: Move to the UI for key name translation.

8 years ago[libgens] GensInput/DevManager.hpp: Moved inline functions to outside of the class...
David Korth [Mon, 7 Mar 2011 16:42:34 +0000 (11:42 -0500)] 
[libgens] GensInput/DevManager.hpp: Moved inline functions to outside of the class definition.

8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::~GensCtrlCfgWidgetPrivate(): Minor reordering...
David Korth [Mon, 7 Mar 2011 16:38:39 +0000 (11:38 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::~GensCtrlCfgWidgetPrivate(): Minor reordering change.

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Make sure the display label widget is unref...
David Korth [Mon, 7 Mar 2011 16:37:59 +0000 (11:37 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Make sure the display label widget is unreferenced if it's destroyed.

Connect lblDisplay's destroyed() signal to a new slot, labelDestroyed().
This slot simply clears the d->lblDisplay variable.

8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Specify the display label in the GensCtr...
David Korth [Mon, 7 Mar 2011 16:33:08 +0000 (11:33 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Specify the display label in the GensCtrlKeyWidget constructor.

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Added a QLabel parameter to the constructor.
David Korth [Mon, 7 Mar 2011 16:32:43 +0000 (11:32 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: Added a QLabel parameter to the constructor.

8 years ago[libgens] DevManager::ms_KeyNames[]: Changed 0x00 from "Unknown" to "None".
David Korth [Mon, 7 Mar 2011 16:31:25 +0000 (11:31 -0500)] 
[libgens] DevManager::ms_KeyNames[]: Changed 0x00 from "Unknown" to "None".

TODO: Qt refers to Windows keys as "Meta",
but X11 refers to Windows keys as "Super".

8 years ago[gens-qt4] widgets/GensCtrlKeyWidget.cpp: New widget GensCtrlKeyWidget.
David Korth [Mon, 7 Mar 2011 16:27:31 +0000 (11:27 -0500)] 
[gens-qt4] widgets/GensCtrlKeyWidget.cpp: New widget GensCtrlKeyWidget.

This widget allows for single-key configuration, which is useful for
configuring controller buttons. In the future, it will also allow for
gamepad configuration.

This control requires a companion label in order to to display its status.

TODO: Display the actual key names instead of the key values.

Input/KeyHandlerQt.hpp: Changed QKeyEventToKeyVal and NativeModifierToKeyVal
from protected functions to public functions. GensCtrlKeyWidget makes
use of these functions.

widgets/GensCtrlCfgWidget.cpp: Use GensCtrlKeyWidget instead of
GensKeySequenceWidget.

8 years ago[gens-qt4] translations/*.ts: Updated translations for disambiguation changes.
David Korth [Sun, 6 Mar 2011 21:37:21 +0000 (16:37 -0500)] 
[gens-qt4] translations/*.ts: Updated translations for disambiguation changes.

8 years ago[gens-qt4] GeneralConfigWindow.ui: Added disambiguation comments for the Color Scale...
David Korth [Sun, 6 Mar 2011 21:35:09 +0000 (16:35 -0500)] 
[gens-qt4] GeneralConfigWindow.ui: Added disambiguation comments for the Color Scale Method items.

8 years ago[gens-qt4] Marked OSD strings as OSD to disambiguate them from "regular" strings.
David Korth [Sun, 6 Mar 2011 21:28:58 +0000 (16:28 -0500)] 
[gens-qt4] Marked OSD strings as OSD to disambiguate them from "regular" strings.

The OSD currently only supports Unicode characters U+0000-U+00FF.

VBackend/VBackend.cpp: Translate the Fast Blur and Stretch Mode messages.

8 years ago[gens-qt4] translations/*.ts: Minor translation updates.
David Korth [Sun, 6 Mar 2011 21:08:55 +0000 (16:08 -0500)] 
[gens-qt4] translations/*.ts: Minor translation updates.

- Marked all strings in en and en_GB as completed.

- CtrlConfigWindow: Renamed Team Player buttons to MP-1A, MP-1B, etc.
  (Team Player is known as Multiplayer in Europe.)

- ja: Fixed punctuation warnings. (Colons should be after the
  accelerator key, not before.)

8 years ago[gens-qt4] translations/*.ts: Updated translations for UI namespace changes.
David Korth [Sun, 6 Mar 2011 20:54:15 +0000 (15:54 -0500)] 
[gens-qt4] translations/*.ts: Updated translations for UI namespace changes.

See commit 5ee52c324199effbaae97b5e1c4dbc04b4b48e59 for more information.
([gens-qt4] ui/*.ui: Moved all UI files to within the GensQt4 namespace.)

8 years ago[gens-qt4] ui/*.ui: Moved all UI files to within the GensQt4 namespace.
David Korth [Sun, 6 Mar 2011 20:25:03 +0000 (15:25 -0500)] 
[gens-qt4] ui/*.ui: Moved all UI files to within the GensQt4 namespace.

This will make it easier to handle translations, since both the UI file
and the C++ file(s) will show up under the same name in Qt Linguist.
Also, it means that strings used in both the UI file and the C++ file(s)
can be de-duplicated, saving disk space, memory, and translation time.

8 years ago[gens-qt4] McdControlWindow::McdControlWindow(): Uncomment the query() call.
David Korth [Sun, 6 Mar 2011 20:00:49 +0000 (15:00 -0500)] 
[gens-qt4] McdControlWindow::McdControlWindow(): Uncomment the query() call.

I commented this out while testing runtime language changes, but accidentally
committed the commented-out line in commit dfd230f2b3861910c1979b9b62a5fe4889e04efc.
([gens-qt4] Added changeEvent() functions to all windows to allow changing the language at runtime.)

8 years ago[gens-qt4] translations/gens-qt4_ja.ts: Removed a stray obsolete string.
David Korth [Sun, 6 Mar 2011 20:00:37 +0000 (15:00 -0500)] 
[gens-qt4] translations/gens-qt4_ja.ts: Removed a stray obsolete string.

8 years agoMerge branch 'initial-i18n'
David Korth [Sun, 6 Mar 2011 19:54:35 +0000 (14:54 -0500)] 
Merge branch 'initial-i18n'

Currently, three languages are available:

- en: US English (default)
- en_GB: British English (provided by Overlord)
- ja: Japanese (provided by Scarred Sun)

Note that strings are still subject to change, so these translations
are not to be considered final at this point.

8 years ago[gens-qt4] translations/gens-qt4_es.ts: Removed the empty Spanish translation file. initial-i18n github/initial-i18n
David Korth [Sun, 6 Mar 2011 19:53:34 +0000 (14:53 -0500)] 
[gens-qt4] translations/gens-qt4_es.ts: Removed the empty Spanish translation file.

I'll recreate the file once I get someone to start the Spanish translations.

8 years ago[gens-qt4] translations/gens-qt4_ja.ts: Updated obsolete strings.
David Korth [Sun, 6 Mar 2011 19:49:32 +0000 (14:49 -0500)] 
[gens-qt4] translations/gens-qt4_ja.ts: Updated obsolete strings.

- Removed colons from strings that no longer have them.

- Removed console names that don't have disambiguating strings.

- "Development Build" is still left in, even though it's now obtained
  from LibGens. I'll figure out how to translate it later.

8 years ago[gens-qt4] translations/: ja_JP -> ja
David Korth [Sun, 6 Mar 2011 19:39:31 +0000 (14:39 -0500)] 
[gens-qt4] translations/: ja_JP -> ja

Other programs use "ja" for Japanese, and there's no point in specifying a
specific region for a language that's primarily used in a single country.

8 years ago[gens-qt4] translations/: Updated translation files with the latest strings.
David Korth [Sun, 6 Mar 2011 19:38:37 +0000 (14:38 -0500)] 
[gens-qt4] translations/: Updated translation files with the latest strings.

8 years agoja-JP translation
Scarred Sun [Sun, 6 Mar 2011 19:37:30 +0000 (14:37 -0500)] 
ja-JP translation

approximately 2/3rds through

Signed-off-by: David Korth <gerbilsoft@verizon.net>
8 years ago[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Added a vertical spacer at the bottom...
David Korth [Sun, 6 Mar 2011 17:46:00 +0000 (12:46 -0500)] 
[gens-qt4] GensCtrlCfgWidgetPrivate::init(): Added a vertical spacer at the bottom of the QGridLayout.

This ensures that the widgets are all placed together regardless of
controller type changes and/or window size changes.

8 years ago[gens-qt4] widgets/GensCtrlCfgWidget.cpp: New function GensCtrlCfgWidgetPrivate:...
David Korth [Sun, 6 Mar 2011 17:40:52 +0000 (12:40 -0500)] 
[gens-qt4] widgets/GensCtrlCfgWidget.cpp: New function GensCtrlCfgWidgetPrivate::ButtonName_l().

This function returns the localized version of a LibGens::IoBase::ButtonName_t.

GensCtrlCfgWidgetPrivate::setIoType(): Updated to use ButtonName_l().

8 years ago[libgens] IoBase::buttonName(): Return an enum value instead of a string.
David Korth [Sun, 6 Mar 2011 17:29:10 +0000 (12:29 -0500)] 
[libgens] IoBase::buttonName(): Return an enum value instead of a string.

This will make it easier to localize button names in the UI.

Updated all IoBase devices to return the correct values in buttonName().

Removed button functions from the TeamPlayer and 4WP devices,
since the devices themselves don't have any buttons.

TODO: Figure out a way to configure the TeamPlayer and 4WP devices later.

8 years ago[gens-qt4] Added changeEvent() functions to all windows to allow changing the languag...
David Korth [Sun, 6 Mar 2011 08:09:29 +0000 (03:09 -0500)] 
[gens-qt4] Added changeEvent() functions to all windows to allow changing the language at runtime.

The changeEvent() functions call retranslateUi(). Some windows have additonal
text that needs to be translated in addition to the text specified in the
UI files, so that text is also retranslated in the changeEvent() function.

actions/GensMenuBar.cpp: Added a retranslate() function to retranslate
all of the menu items. This function is called by GensWindow::changeEvent().

gqt4_main.cpp: gqt4_qtTranslator and gqt4_gensTranslator are now available
outside of the gqt4_main.cpp file. The UI language can be changed by calling
the load() function on both translators.

TODO:
- Write a wrapper function to change the language on both translators.
- Add a UI to change the current language. (maybe in GeneralConfigWindow?)

8 years ago[gens-qt4] EmuManager::loadRom_int(): Use RomFormat() to get the ROM format strings.
David Korth [Sun, 6 Mar 2011 04:17:24 +0000 (23:17 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Use RomFormat() to get the ROM format strings.

8 years ago[gens-qt4] EmuManager::RomFormat(): New function to get a string identifying a ROM...
David Korth [Sun, 6 Mar 2011 04:14:23 +0000 (23:14 -0500)] 
[gens-qt4] EmuManager::RomFormat(): New function to get a string identifying a ROM format.

8 years ago[gens-qt4] EmuManager_str.cpp: Split the translatable string functions from EmuManage...
David Korth [Sun, 6 Mar 2011 04:08:23 +0000 (23:08 -0500)] 
[gens-qt4] EmuManager_str.cpp: Split the translatable string functions from EmuManager.cpp into a separate file.

They're still part of the EmuManager class, though I may create
another class for them later.

8 years ago[gens-qt4] EmuManager::loadRom_int(): Don't set m_rom = rom until emulation is fully...
David Korth [Sat, 5 Mar 2011 22:52:48 +0000 (17:52 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Don't set m_rom = rom until emulation is fully initialized.

This simplifies some of the code a bit.

8 years ago[gens-qt4] EmuManager::loadRom_int(): Use errRomFormat, since m_rom is deleted at...
David Korth [Sat, 5 Mar 2011 22:51:07 +0000 (17:51 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Use errRomFormat, since m_rom is deleted at this point.

8 years ago[libgens] Rom.hpp: Fixed incorrect 2048/2352-byte sector comments.
David Korth [Sat, 5 Mar 2011 22:48:27 +0000 (17:48 -0500)] 
[libgens] Rom.hpp: Fixed incorrect 2048/2352-byte sector comments.

8 years ago[libgens] Rom.hpp: s/Multi-Game-Doctor/Multi Game Doctor/
David Korth [Sat, 5 Mar 2011 22:23:41 +0000 (17:23 -0500)] 
[libgens] Rom.hpp: s/Multi-Game-Doctor/Multi Game Doctor/

8 years ago[gens-qt4] EmuManager::loadRom_int(): s/Multi-Game-Doctor/Multi Game Doctor/
David Korth [Sat, 5 Mar 2011 22:23:16 +0000 (17:23 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): s/Multi-Game-Doctor/Multi Game Doctor/

8 years ago[libgens] Rom.cpp: Added detection for Multi Game Doctor ROM images.
David Korth [Sat, 5 Mar 2011 22:22:26 +0000 (17:22 -0500)] 
[libgens] Rom.cpp: Added detection for Multi Game Doctor ROM images.

8 years ago[libgens] Rom::DetectSystem(): Fixed the 32X SMD check.
David Korth [Sat, 5 Mar 2011 22:20:27 +0000 (17:20 -0500)] 
[libgens] Rom::DetectSystem(): Fixed the 32X SMD check.

The addresses of '3' and 'X' were off by two.

8 years ago[gens-qt4] EmuManager::loadRom_int(): Improved the wording of the unsupported ROM...
David Korth [Sat, 5 Mar 2011 22:09:27 +0000 (17:09 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Improved the wording of the unsupported ROM format error message.

8 years ago[libgens] Rom::loadRom(): Abort if the ROM format isn't supported.
David Korth [Sat, 5 Mar 2011 22:08:17 +0000 (17:08 -0500)] 
[libgens] Rom::loadRom(): Abort if the ROM format isn't supported.

SMD-format and MGD-format ROMs should be deinterleaved on load.

TODO: Figure out how to handle Sega CD disc images.

8 years ago[gens-qt4] EmuManager::loadRom_int(): Display error messages using QMessageBox.
David Korth [Sat, 5 Mar 2011 22:07:06 +0000 (17:07 -0500)] 
[gens-qt4] EmuManager::loadRom_int(): Display error messages using QMessageBox.

TODO:
- Specify GensWindow as parent window.
- Move this out of EmuManager and simply use return codes?
- Split the ROM format strings into another function.

8 years ago[gens-qt4] EmuManager::doRegionCode(): Update the system name in the GensWindow title...
David Korth [Sat, 5 Mar 2011 21:41:20 +0000 (16:41 -0500)] 
[gens-qt4] EmuManager::doRegionCode(): Update the system name in the GensWindow title bar.

The system name may change if the region code is changed, so make sure the
GensWindow title bar is updated by emitting the stateChanged() signal.

8 years ago[gens-qt4] EmuManager.cpp: Added static functions to get a system name based on ROM...
David Korth [Sat, 5 Mar 2011 21:38:37 +0000 (16:38 -0500)] 
[gens-qt4] EmuManager.cpp: Added static functions to get a system name based on ROM region or local region.

SysName() gets a system name based on ROM region.
SysName_l() gets a system name based on local region.

sysName(), which is used to get the system name of the active ROM,
is now a wrapper around SysName().

8 years ago[gens-qt4] CtrlConfigWindow::GetPortName(): Don't specify "EA" in "4-Way Play".
David Korth [Sat, 5 Mar 2011 21:22:57 +0000 (16:22 -0500)] 
[gens-qt4] CtrlConfigWindow::GetPortName(): Don't specify "EA" in "4-Way Play".

Short device names should be used, e.g. "Team Player"
instead of "Sega Team Player".

8 years ago[gens-qt4] CtrlConfigWindow.cpp: IoBase::devName() doesn't exist anymore.
David Korth [Sat, 5 Mar 2011 21:21:51 +0000 (16:21 -0500)] 
[gens-qt4] CtrlConfigWindow.cpp: IoBase::devName() doesn't exist anymore.

This virtual function was removed in commit d6c1131b080fd57c8d596926cd44fe122918a0bf.
([libgens] IO/IoBase.hpp: Removed IoBase::devName().)

8 years ago[gens-qt4] AboutWindow::GetDebugInfo(): Print "(none)" if no CPU flags were found...
David Korth [Sat, 5 Mar 2011 21:20:36 +0000 (16:20 -0500)] 
[gens-qt4] AboutWindow::GetDebugInfo(): Print "(none)" if no CPU flags were found on i386 or amd64.

This is unlikely, but it could happen.

8 years ago[gens-qt4] Replaced QString::fromLatin1() with QLatin1String(), where possible.
David Korth [Sat, 5 Mar 2011 17:57:54 +0000 (12:57 -0500)] 
[gens-qt4] Replaced QString::fromLatin1() with QLatin1String(), where possible.

Updated the GPL headers in the modified files.

8 years ago[libgens] lg_main.cpp::Init(): Added a reference to the archive.org version of the...
David Korth [Fri, 4 Mar 2011 23:04:30 +0000 (18:04 -0500)] 
[libgens] lg_main.cpp::Init(): Added a reference to the archive.org version of the GNU GPL HOWTO.

I couldn't find the properly-formatted version of the GPLv2 header on
the current FSF website, so I had to use the version from archive.org.

8 years ago[libgens] lg_main.cpp::Init(): putchar() outputs to stdout. Use fputc() to output...
David Korth [Fri, 4 Mar 2011 22:50:06 +0000 (17:50 -0500)] 
[libgens] lg_main.cpp::Init(): putchar() outputs to stdout. Use fputc() to output to stderr.

8 years ago[libgens] lg_main.cpp::Init(): Use version_desc instead of hard-coding "Development...
David Korth [Fri, 4 Mar 2011 22:49:22 +0000 (17:49 -0500)] 
[libgens] lg_main.cpp::Init(): Use version_desc instead of hard-coding "Development Build".

8 years ago[libgens] lg_main.cpp::Init(): Use the original GNU GPLv2 notice formatting.
David Korth [Fri, 4 Mar 2011 22:23:46 +0000 (17:23 -0500)] 
[libgens] lg_main.cpp::Init(): Use the original GNU GPLv2 notice formatting.

This notice uses the original formatting from the FSF website as opposed
to the modified version I've been using for the file headers.

TODO: Update file headers to reflect the changes. This will be done
one at a time as I come across them. (Same with copyright dates.)

8 years ago[gens-qt4] AboutWindow::initAboutWindowText(): Added support for credit subtitles.
David Korth [Fri, 4 Mar 2011 18:51:53 +0000 (13:51 -0500)] 
[gens-qt4] AboutWindow::initAboutWindowText(): Added support for credit subtitles.

This adds support for credit subtitles, introduced in commit effd663d268a3b35be112fd56073896b9cf45299.
([libgens] credits.c::GensGS_credits[]: Added credits for translations.)

8 years ago[libgens] credits.c::GensGS_credits[]: Added credits for translations.
David Korth [Fri, 4 Mar 2011 18:50:51 +0000 (13:50 -0500)] 
[libgens] credits.c::GensGS_credits[]: Added credits for translations.

en_GB: Overlord
ja_JP: Scarred Sun

These credits use a new format for subtitles. The subtitle is in the
credit_title field, and it starts with a '*'. This indicates that
the credit should be handled as a subtitle to the previous title,
and shouldn't be handled as an entirely new credit title.

8 years ago[gens-qt4] AboutWindow.cpp: Added translation metadata.
David Korth [Fri, 4 Mar 2011 18:38:19 +0000 (13:38 -0500)] 
[gens-qt4] AboutWindow.cpp: Added translation metadata.

Scarred Sun reported some issues with translating a few strings to Japanese.
In particular, "Save directory" was confusing, since it could either be
a prompt for the user to save a selected directory or indicating a path
for a savestate directory. (In this case, it's the latter.)

Also, fixed QT ASCII cast issues in GetCodePageInfo(). I'm not sure why
this didn't break the Win32 build, since I disabled casting ASCII strings
to QString...

8 years ago[libgens] credits.c::GensGS_credits[]: Sorted Gens/GS contributors alphabetically.
David Korth [Fri, 4 Mar 2011 18:05:55 +0000 (13:05 -0500)] 
[libgens] credits.c::GensGS_credits[]: Sorted Gens/GS contributors alphabetically.

"Software Testing" is still at the end of the credits, since
it has the most contributors.

8 years ago[libgens] credits.c::GensGS_credits[]: Moved "Software Testing" to the end.
David Korth [Fri, 4 Mar 2011 18:03:32 +0000 (13:03 -0500)] 
[libgens] credits.c::GensGS_credits[]: Moved "Software Testing" to the end.

"Software Testing" has the most entries, so it should be last.

8 years ago[gens-qt4] Moved region code string functions out of LibGens::Rom and into GensQt4...
David Korth [Fri, 4 Mar 2011 17:58:59 +0000 (12:58 -0500)] 
[gens-qt4] Moved region code string functions out of LibGens::Rom and into GensQt4::EmuManager.

This allows the strings to be translated.

This essentially reverts commits 024b82da..1a031e74.

EmuManager: Added a new function GcRegionCodeStr(), which converts a
GensConfig::ConfRegion_t to a string.

TODO: Combine GensConfig::ConfRegion_t and LibGens::SysVersion::RegionCode_t.

8 years ago[gens-qt4] EmuManager::doCtrlChange(): Don't use IoBase::devName().
David Korth [Fri, 4 Mar 2011 17:32:09 +0000 (12:32 -0500)] 
[gens-qt4] EmuManager::doCtrlChange(): Don't use IoBase::devName().

This function was removed in commit d6c1131b080fd57c8d596926cd44fe122918a0bf.
([libgens] IO/IoBase.hpp: Removed IoBase::devName().)

Use local strings instead.

Note that these strings are *not* obtained using tr(), since doCtrlChange()
is a test function only. This function will be removed once the
Controller Configuration window is functional.

8 years ago[libgens] IO/IoBase.hpp: Removed IoBase::devName().
David Korth [Fri, 4 Mar 2011 17:32:02 +0000 (12:32 -0500)] 
[libgens] IO/IoBase.hpp: Removed IoBase::devName().

IoBase::devName() isn't translatable, since the strings are in LibGens
instead of GensQt4, and it's only used by one function in GensQt4,
EmuManager::doCtrlChange(). This function is a test function only,
and will be removed later.

8 years ago[gens-qt4] KeyHandlerQt::NativeModifierToKeyVal(): Updated the comment about Win32...
David Korth [Fri, 4 Mar 2011 05:22:15 +0000 (00:22 -0500)] 
[gens-qt4] KeyHandlerQt::NativeModifierToKeyVal(): Updated the comment about Win32 modifier key testing.

The GetAsyncKeyState() call was moved from the defunct LibGens::KeyManager
to KeyHandlerQt in commit 03ebd4ce5b4a439e4d3aca9a412e0b48a7943d1e
(Reworked input device handling such that the actual input code is located in the UI.),
and parts were removed from GensWindow sometime between that commit
and commit fcd74c175b0b570aabdb5e995380617455aaf1d4.
(gens-qt4/Input/KeyHandlerQt.cpp: Added Win32 L/R modifier key support.)

8 years ago[gens-qt4] Input/KeyHandlerQt.cpp: Handle numeric keypad keys correctly.
David Korth [Fri, 4 Mar 2011 05:17:57 +0000 (00:17 -0500)] 
[gens-qt4] Input/KeyHandlerQt.cpp: Handle numeric keypad keys correctly.

Numeric keypad keys should be converted to the appropriate KEYV_KP*
keys, regardless of whether or not Num Lock is enabled.

TODO: Verify Mac OS X-specific aspects, e.g. the "Clear" key (which
is mapped to 5 when Num Lock is off on Linux) and the '=' key.

TODO: Verify numeric keypad modifiers on actions that are present
in menus. (Alternatively, just don't allow numeric keypad keys
to be used for actions at all, and reserve them exclusively for
controller configuration.)

8 years agoMerge branch 'M68K_Mem-dispatch'
David Korth [Fri, 4 Mar 2011 01:00:33 +0000 (20:00 -0500)] 
Merge branch 'M68K_Mem-dispatch'

This should hopefully improve performance, reliability, accuracy,
and readability a bit while not causing any breakage.

8 years ago[libgens] mdZ80/mdZ80.c::mdZ80_init(): Initialize the instruction fetch area to HLT... M68K_Mem-dispatch github/M68K_Mem-dispatch
David Korth [Fri, 4 Mar 2011 00:57:29 +0000 (19:57 -0500)] 
[libgens] mdZ80/mdZ80.c::mdZ80_init(): Initialize the instruction fetch area to HLT instructions.

It's better to simply halt the Z80 if it hits an area we don't support
yet than it is to crash the emulator.

8 years ago[libgens] cpu/Z80_MD_Mem.cpp: Use switch/case for VDP read/write functions.
David Korth [Fri, 4 Mar 2011 00:48:05 +0000 (19:48 -0500)] 
[libgens] cpu/Z80_MD_Mem.cpp: Use switch/case for VDP read/write functions.

switch/case can be optimized into a jump table by gcc, whereas gcc may have
problems with if/then/else. Also, it makes the code cleaner.

8 years ago[libgens] cpu/M68K_Mem.cpp: Use switch/case for VDP read/write functions.
David Korth [Fri, 4 Mar 2011 00:32:42 +0000 (19:32 -0500)] 
[libgens] cpu/M68K_Mem.cpp: Use switch/case for VDP read/write functions.

switch/case can be optimized into a jump table by gcc, whereas gcc may have
problems with if/then/else. Also, it makes the code cleaner.

8 years ago[libgens] Rom::initSRam(): Added a hack for Psy-O-Blade.
David Korth [Thu, 3 Mar 2011 19:31:37 +0000 (14:31 -0500)] 
[libgens] Rom::initSRam(): Added a hack for Psy-O-Blade.

Psy-O-Blade has an incorrect SRAM header that causes Gens/GS II to think
SRAM starts at $000000 and ends at $00FFFF. (It seems like they left out
a few bytes in the addresses.)

This hack fixes the SRAM addresses for Psy-O-Blade by adjusting them to
$200000 and $203FFF.

This bug was reported by andlabs on the Gens/GS Bugzilla:
http://gs_server.gerbilsoft.ddns.info/bugs/show_bug.cgi?id=41

8 years ago[libgens] Rom::initSRam(): Disable SRAM for Puggsy.
David Korth [Thu, 3 Mar 2011 19:23:27 +0000 (14:23 -0500)] 
[libgens] Rom::initSRam(): Disable SRAM for Puggsy.

Puggsy will show an anti-piracy message after the third level
if SRAM is detected.

I also added some code for two more hacks I'm going to test later.
They're currently disabled via #if 0 / #endif.

Hacks:
- Psy-O-Blade: Incorrect SRAM header.
- Xin Qi Gai Wangzi (Beggar Prince): No header; non-standard location.

8 years ago[WTF] [libgens] SRam::writeWord(): Fixed word writes to SRAM.
David Korth [Thu, 3 Mar 2011 19:18:41 +0000 (14:18 -0500)] 
[WTF] [libgens] SRam::writeWord(): Fixed word writes to SRAM.

We were writing both halves of the data word to the low byte, which ended
up breaking Puggsy's copy-protection system.

Puggsy writes a word to SRAM a few times to check if it's running on a copier.
If the written word is read back correctly, it assumes it is and prevents
progression past the third level.

TODO: Add a hack to disable SRAM for Puggsy.

8 years ago[gens-qt4] GensMenuBar::MenuItem: Added a field for the Mac OS X menu role.
David Korth [Thu, 3 Mar 2011 03:13:25 +0000 (22:13 -0500)] 
[gens-qt4] GensMenuBar::MenuItem: Added a field for the Mac OS X menu role.

This allows us to explicitly state which menu items we want to be
used for specific menu items in the Application menu.

Qt's heuristic method (QAction::TextHeuristicRole) won't work properly
if the menu items get translated, so we have to explicitly mark which
menu items are Preferences, Quit, About, etc.

actions/GensMenuBar_menus.cpp: Added menu role fields for each menu item.

This change was suggested by FraGag in #GensGS.

8 years ago[gens-qt4] ui/CtrlConfigWindow.ui: Removed the toolbar's windowTitle property.
David Korth [Thu, 3 Mar 2011 02:40:08 +0000 (21:40 -0500)] 
[gens-qt4] ui/CtrlConfigWindow.ui: Removed the toolbar's windowTitle property.

I'm not sure why it was set in the first place, but it's completely
unnecessary and causes confusion in the translation files.

8 years agoCommitted British localisation (en-GB)
Overlord [Thu, 3 Mar 2011 02:35:06 +0000 (21:35 -0500)] 
Committed British localisation (en-GB)

Added the British English (en-GB) localisation for Gens/GS II on request.
Not too much different, but it's nice to know that there's at least one
Mega Drive emulator out there with all the text spelt right =P

[David Korth: Updated patch to apply to current initial-i18n HEAD.]

Signed-off-by: David Korth <gerbilsoft@verizon.net>
8 years ago[gens-qt4] EmuManager::sysName(): Added disambiguating comments for localized system...
David Korth [Thu, 3 Mar 2011 02:08:52 +0000 (21:08 -0500)] 
[gens-qt4] EmuManager::sysName(): Added disambiguating comments for localized system names.

The system names should only be translated. For example, "Mega Drive" should
be converted to the appropriate katakana for ja_JP. However, "Genesis" should
not be changed to "Mega Drive" for non-US regions, since this string is based
on the ROM region, not the system locale.

translations/*.ts: Updated translation files for EmuManager::sysName() changes.

8 years ago[gens-qt4] translations/*.ts: Source string fixes.
David Korth [Thu, 3 Mar 2011 01:49:36 +0000 (20:49 -0500)] 
[gens-qt4] translations/*.ts: Source string fixes.

- Removed the "0" strings.

- Fixed the window title for CtrlConfigWindow.

8 years ago[gens-qt4] ui/CtrlConfigWindow.ui: This is the Controller Configuration window, not...
David Korth [Thu, 3 Mar 2011 01:46:49 +0000 (20:46 -0500)] 
[gens-qt4] ui/CtrlConfigWindow.ui: This is the Controller Configuration window, not the General Configuration window.

This is a copypasta error from commit 0e0bac4f54143e6526a438a74fd74aa445a38ca9.
([gens-qt4] CtrlConfigWindow: Reworked the window layout to use a toolbar.)

8 years ago[gens-qt4] ui/GeneralConfigWindow.ui: Marked the default values for contrast and...
David Korth [Thu, 3 Mar 2011 01:43:53 +0000 (20:43 -0500)] 
[gens-qt4] ui/GeneralConfigWindow.ui: Marked the default values for contrast and brightness as not translatable.

How do you translate "0", anyway?

8 years ago[gens-qt4] GensWindow: Replaced m_vBackend->osd_printf() calls with m_vBackend->osd_p...
David Korth [Thu, 3 Mar 2011 00:06:48 +0000 (19:06 -0500)] 
[gens-qt4] GensWindow: Replaced m_vBackend->osd_printf() calls with m_vBackend->osd_printqs().

8 years ago[gens-qt4] VBackend::osd_printqs(): New OSD print function that accepts a QString...
David Korth [Thu, 3 Mar 2011 00:04:19 +0000 (19:04 -0500)] 
[gens-qt4] VBackend::osd_printqs(): New OSD print function that accepts a QString as a message.

osd_vprintf() is now a wrapper function for osd_printqs().

OsdMessage: Changed the constructor to accept a const QString&
instead of a const char*.

Use const utf8_str* instead of const char* for all other instances
in the osd_*() functions.

8 years ago[gens-qt4] translations/gens-qt4_en.ts: This translation file is for "en", not "en_US".
David Korth [Wed, 2 Mar 2011 23:22:52 +0000 (18:22 -0500)] 
[gens-qt4] translations/gens-qt4_en.ts: This translation file is for "en", not "en_US".

8 years ago[gens-qt4] translations/gens-qt4_ja_JP.ts: Initial translation file for Japanese.
David Korth [Wed, 2 Mar 2011 23:17:28 +0000 (18:17 -0500)] 
[gens-qt4] translations/gens-qt4_ja_JP.ts: Initial translation file for Japanese.

I've received an offer in IRC to translate Gens/GS II into Japanese,
so let's try that out and see how well it works.

8 years ago[gens-qt4] translations/: Added translations for the LibGens OSD messages.
David Korth [Wed, 2 Mar 2011 23:12:17 +0000 (18:12 -0500)] 
[gens-qt4] translations/: Added translations for the LibGens OSD messages.

Since the OSD messages use plural forms, I had to add a fallback English
translation, gens-qt4_en.ts. Otherwise, it would show the default "byte(s)"
for all English localizations other than en_GB.

The "en" translation is used for English localizations other than en_GB.

8 years ago[gens-qt4] translations/: Updated the translation files for source code changes.
David Korth [Wed, 2 Mar 2011 21:27:09 +0000 (16:27 -0500)] 
[gens-qt4] translations/: Updated the translation files for source code changes.

No new translations have been added.

8 years ago[gens-qt4] GensWindow::osd(): Translate the OSD strings.
David Korth [Wed, 2 Mar 2011 21:24:25 +0000 (16:24 -0500)] 
[gens-qt4] GensWindow::osd(): Translate the OSD strings.

TODO: Add an OSD Print QString function, so we don't have to
convert the QString to UTF-8 for use in VBackend::osd_printf(),
and then back to QString for internal storage.

8 years ago[gens-qt4] translations/: Initial translations.
David Korth [Wed, 2 Mar 2011 21:20:20 +0000 (16:20 -0500)] 
[gens-qt4] translations/: Initial translations.

gens-qt4_en_GB.ts: British English translations.
Some basic stuff has been done, e.g. "color" -> "colour" and
"Sega CD" -> "Mega CD", but not much else.

gens-qt4_es.ts: Spanish translations.
This translation file is currently empty.

8 years ago[gens-qt4] gqt4_main.cpp::gens_main(): Initialize the Qt translation system.
David Korth [Wed, 2 Mar 2011 21:19:42 +0000 (16:19 -0500)] 
[gens-qt4] gqt4_main.cpp::gens_main(): Initialize the Qt translation system.

The translations are initialized with the current system locale.

On Linux, this can be overridden with the LANG and LC_ALL
environment variables. I'm not sure about other platforms.

TODO: Allow switching languages on the fly?
TODO: Translations subdirectory.

8 years ago[gens-qt4] GeneralConfigWindow: Translation improvements.
David Korth [Wed, 2 Mar 2011 21:02:16 +0000 (16:02 -0500)] 
[gens-qt4] GeneralConfigWindow: Translation improvements.

GeneralConfigWindow::on_btnOsdMsgColor_clicked(): Use "messages" instead of "Messages".

GeneralConfigWindow::setupUi_mac(): Use QT_TR_NOOP() for translating strings.

TODO: GeneralConfigWindow::reload(): Translate RegionCodeStrMD() somehow.

8 years ago[gens-qt4] actions/GensMenuBar_menus.cpp: Enable translation for menu items.
David Korth [Wed, 2 Mar 2011 20:57:48 +0000 (15:57 -0500)] 
[gens-qt4] actions/GensMenuBar_menus.cpp: Enable translation for menu items.

Wrap the menu item strings in QT_TR_NOOP().

This macro effectively does nothing in the program itself, but it tells
Qt's lupdate that this string should be translated.

8 years ago[gens-qt4] GeneralConfigWindow: Don't split the OSD color strings into label and...
David Korth [Wed, 2 Mar 2011 20:55:18 +0000 (15:55 -0500)] 
[gens-qt4] GeneralConfigWindow: Don't split the OSD color strings into label and button.

The button should show the color value.

Move "this color" to the label. This makes it easier to translate the strings.

8 years ago[gens-qt4] Initial Qt4 translation infrastructure.
David Korth [Wed, 2 Mar 2011 18:48:44 +0000 (13:48 -0500)] 
[gens-qt4] Initial Qt4 translation infrastructure.

Based on http://www.vtk.org/Wiki/CMake:How_To_Build_Qt4_Software .

translations/gens-qt4_en_GB.ts, translations/gens-qt4_es.ts:
Empty translation archives with all strings currently implemented in
gens-qt4. I will target en_GB and es first.

gqt4_main.cpp, widgets/GensKeySequenceWidget.cpp: Fixed incorrect
usage of tr() as pointed out by lupdate.

8 years ago[libgens] Rom::initSRam(): Increased SRAM limit from 16 KB to 64 KB.
David Korth [Wed, 2 Mar 2011 16:46:57 +0000 (11:46 -0500)] 
[libgens] Rom::initSRam(): Increased SRAM limit from 16 KB to 64 KB.

The SRAM addresses were being masked by 0x3FFF, which effectively
limited SRAM to 16 KB. Increase the mask to 0xFFFF, which allows
for the full 64 KB to be used.

Also, adjusted some comments and moved some stuff around in preparation
for the addition of a few game-specific SRAM hacks.

8 years ago[libgens] Save/SRam.hpp: Moved inline functions outside of the class definition.
David Korth [Wed, 2 Mar 2011 16:27:32 +0000 (11:27 -0500)] 
[libgens] Save/SRam.hpp: Moved inline functions outside of the class definition.

Changed most protected members to private. setDirty() and clearDirty()
are still marked as protected.

8 years ago[WTF] [gens-qt4] GensMenuBar::ms_gmiGraphicsRes[]: s/41x/4x/
David Korth [Wed, 2 Mar 2011 04:48:38 +0000 (23:48 -0500)] 
[WTF] [gens-qt4] GensMenuBar::ms_gmiGraphicsRes[]: s/41x/4x/

This typo was reported by FraGag in #techies.

8 years ago[gens-qt4] AboutWindow::GetIncLibraries(): Use a single string for "zlib-" ZLIB_VERSION.
David Korth [Wed, 2 Mar 2011 04:46:53 +0000 (23:46 -0500)] 
[gens-qt4] AboutWindow::GetIncLibraries(): Use a single string for "zlib-" ZLIB_VERSION.

8 years ago[gens-qt4] AboutWindow::GetIncLibraries(): Prepend "zlib-" to the zlib version.
David Korth [Wed, 2 Mar 2011 04:42:20 +0000 (23:42 -0500)] 
[gens-qt4] AboutWindow::GetIncLibraries(): Prepend "zlib-" to the zlib version.

This bug was reported by FraGag in #techies.

8 years ago[gens-qt4] CtrlConfigWindow::keyPressEvent(): Ported keyPressEvent() from GeneralConf...
David Korth [Tue, 1 Mar 2011 21:33:04 +0000 (16:33 -0500)] 
[gens-qt4] CtrlConfigWindow::keyPressEvent(): Ported keyPressEvent() from GeneralConfigWindow.

GeneralConfigWindow is a QMainWindow, so we need to reimplement QDialog's
keyPressEvent() in order to handle for standard dialog keypresses.

8 years ago[gens-qt4] CtrlConfigWindow::selectPort(): Reduce flicker when switching from a base...
David Korth [Tue, 1 Mar 2011 19:47:27 +0000 (14:47 -0500)] 
[gens-qt4] CtrlConfigWindow::selectPort(): Reduce flicker when switching from a base port to a Team Player port.

Make sure the dropdown index will be valid before updating the dropdown
for Team Player device availability.

8 years ago[gens-qt4] CtrlConfigWindow::CtrlConfigWindow(): Initialize all port buttons, not...
David Korth [Tue, 1 Mar 2011 19:47:04 +0000 (14:47 -0500)] 
[gens-qt4] CtrlConfigWindow::CtrlConfigWindow(): Initialize all port buttons, not just ports 1 and 2.

8 years ago[gens-qt4] ui/CtrlConfigWindow.ui: Added a vertical spacer below ctrlCfgWidget.
David Korth [Tue, 1 Mar 2011 18:46:20 +0000 (13:46 -0500)] 
[gens-qt4] ui/CtrlConfigWindow.ui: Added a vertical spacer below ctrlCfgWidget.

TODO: This causes flickering on Mac OS X when switching from a controller
with more buttons to a controller with fewer buttons. Figure out how to
prevent the QGridLayout from expanding the height of rows without using
a QSpacerItem.

8 years ago[gens-qt4] ui/GeneralConfigWindow.ui: Disable the default context menu.
David Korth [Tue, 1 Mar 2011 18:42:52 +0000 (13:42 -0500)] 
[gens-qt4] ui/GeneralConfigWindow.ui: Disable the default context menu.

This prevents a context menu from being activated on the toolbar.

8 years ago[gens-qt4] GeneralConfigWindow::setupUi_mac(): Added the "System" tab.
David Korth [Tue, 1 Mar 2011 18:41:25 +0000 (13:41 -0500)] 
[gens-qt4] GeneralConfigWindow::setupUi_mac(): Added the "System" tab.

ui/resources/oxygen/: Imported the "applications-system" icon from
KDE's Oxygen icon set. This icon is used for the "System" tab in
the General Configuration window on Mac OS X.