Commit Graph

2565 Commits

Author SHA1 Message Date
Rafael Kitover 3052eb33a5
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-19 09:42:02 +00:00
Rafael Kitover fb9e7e2059
Fix expat lib name for vcpkg.
It is now installed as `libexpatMD.lib` for release and
`libexpatdMD.lib` for debug and not `expat.lib`.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-17 22:05:01 +00:00
Rafael Kitover 375daf99cb
Only build ffmpeg with vcpkg if installs < 30m.
Fix the problem with vcpkg installs including both wxWidgets and ffmpeg
overrunning the one hour time limit, by making ffmpeg optional and only
building it if the other builds are under 30 minutes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-17 18:38:58 +00:00
Rafael Kitover dfec0b3d99
Transifex push/pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-17 18:37:36 +00:00
Rafael Kitover b23d463652
Use vcpkg installed wxrc, support mingw triplet.
Use the vcpkg installed wxrc, from a tools subdirectory, instead of
copying it out of the build tree.

Except when running on appveyor, for some reason the vcpkg wxrc does not
work there, so use our own from the dependencies submodule.

Support vcpkg mingw triplets, they don't work yet however.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-14 13:16:37 +00:00
Rafael Kitover 08b5685049
Merge remote-tracking branch 'libretro/master'
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-14 11:00:06 +00:00
hizzlekizzle 6b70aa5de5
Merge pull request #90 from negativeExponent/input_updates
Move main input polling at the beginning of retro_run()
2020-08-13 08:44:40 -05:00
hizzlekizzle 2f1439c5bd
Merge pull request #89 from negativeExponent/add_color_and_interframe_options
Add color and interframe options
2020-08-13 07:59:14 -05:00
hizzlekizzle 640e93cd97
Merge pull request #91 from negativeExponent/hle_bios_fixes
GBA BIOS: ArcTan/ArcTan2 fixes for HLE bios
2020-08-13 07:55:59 -05:00
negativeExponent 2f9933ae49 GBA BIOS: ArcTan/ArcTan2 fixes for HLE bios
Fix ArcTan and ArcTan2 based on mgba's hle bios fixes
- References:
- 14dc01409c (diff-8f06a143a9fd912c83209f935d3aca25)
- b154457857 (diff-8f06a143a9fd912c83209f935d3aca25)
2020-08-12 22:44:43 +08:00
negativeExponent 5d5dc1b39b Move main input polling at the beginning of retro_run()
- This is done so we can poll inputs from one place all at once for all
  player ports instead of calling the function multiple times for each player port.
2020-08-12 22:30:22 +08:00
negativeExponent e58332c03a Add interframe blending core options
- Adds 'smart' and 'motion blur' interframe methods as core options for
both 16bit and 32bit color depths
2020-08-12 10:25:52 +08:00
negativeExponent 54399dffea Add LCD Color Filter core options 2020-08-12 07:43:21 +08:00
hizzlekizzle 364a182968
Merge pull request #88 from negativeExponent/backport
Backport
2020-08-11 09:35:33 -05:00
negativeExponent 97637f16d6 Buildfix 2020-08-11 21:22:07 +08:00
negativeExponent d9732f68db Fix clock cycle count for MUL, MLA instructions... (b91f39c787)
- backport Fix clock cycle count for some arm/thumb instructions (5243b2d806)
- backport Fix base cycle count for MUL, MLA series (b91f39c787)
2020-08-11 21:17:25 +08:00
negativeExponent c07d5b658b Fix vram 16/32 bit unaligned reads(backport 7f18771165) 2020-08-11 20:29:28 +08:00
negativeExponent f4891b6504 Update .gitignore 2020-08-11 19:34:36 +08:00
Brian Searls 18c2ea61c6 Further fixing Multi Buffer formatting. 2020-08-10 21:44:01 +00:00
Brian Searls 1e5693009c Addressing audio plugin crash
Stereo buffer is not remade in the case of audio plugin
switch (only affects GBA, not GB).  This results in a crash.
We need to remake the stereo buffer and reinit the pointers
in Gba_Pcm.output or they will be dangling, and lead to a
crash.  Also, cleaning up the Multi_Buffer class a bit.
2020-08-10 21:44:01 +00:00
Edênis Freindorfer Azevedo 9c314a155d
Use proper string `"wglGetExtensionsStringEXT"`.
`"wglGetExtensionsString"` is not valid on Windows.
2020-08-09 07:01:34 +00:00
Zach Bacon 7c8ba1e7c5
This should fix building edge packages,
as well as fix building on arm platforms and ppc64 platforms,
quite possibly s390x, but can't guarantee how it will perform.
2020-08-08 09:14:07 -04:00
Rafael Kitover 9495dc84f8
Prefer upgrading zlib before other vcpkg deps.
Just a hack to fix a problem with vcpkg upgrades, in this case the
version of the zlib port being too old breaks another upgrade, so we
will check if zlib is in the list of packages to upgrade and upgrade it
before anything else.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-31 09:32:42 +00:00
Rafael Kitover 299362b3cf
Refactor cmake ccache support and support MSVC.
Don't disable ccache for msys+ninja anymore, since the mingw ccache
works now and there is no reason to use the msys ccache anymore.

Use RULE_LAUNCH_COMPILE only on cmake versions < 3.4.0, because this
currently breaks resource compilation with visual studio and the windows
native ccache from chocolatey, this needs to be fixed in ccache.

On cmake 3.4.0 and greater, set the variables
CMAKE_<LANG>_COMPILER_LAUNCHER instead. This has the effect of using
ccache for C, C++ and nasm, but not for the resource file, avoiding the
problem with visual studio, which has a more recent cmake. This must be
done before the project() call.

TODO: Currently the Visual Studio build with ccache from chocolatey
works correctly, ccache is being invoked from ninja, but no cache files
are being created. This is being followed up with the chocolatey package
maintainer and upstream if necessary. The resource compiler issue also
needs to be fixed upstream.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-31 09:30:23 +00:00
Rafael Kitover 2fe1c5711b
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-17 02:49:32 +00:00
Rafael Kitover 81c88227fa Add Catch2 unit testing framework + some tests.
Add the Catch2 headers to third_party/include/catch2.

Add Catch.cmake and CatchAddTests.cmake to cmake/.

Add unit tests src/wx/tests/strutils.cpp using Catch2 to test
src/wx/strutils.cpp.

Make some code changes to strutils.cpp to make the tests pass.

See src/wx/tests/CMakeLists.txt for how to set up unit test files; they
plug into the normal CTest mechanism in cmake.

The test binaries are written to the tests/ subdirectory of the build
directory.

Building the tests and enabling the CTest support can be turned off by
passing -DBUILD_TESTING=OFF to cmake, the default is ON, this is the
standard mechanism.

Start running ctest on travis and appveyor.

Move stb to third_party/include where Catch2 is now as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-10 13:43:48 +00:00
Edênis Freindorfer Azevedo 3ba0529585 Improve BIOS Math tests score from 425 to 625.
Without using BIOS file.
2020-07-10 00:25:38 -03:00
Edênis Freindorfer Azevedo 6f2e320d59 Improve clock cycle count for THUMB operations. 2020-07-10 00:25:38 -03:00
Edênis Freindorfer Azevedo 9e537a8fe3 Improve cycle count for MUL, MLA.
Improves Timing score from 679 to 905.
2020-07-10 00:25:38 -03:00
Rafael Kitover 7fbb017cd5
Update macOS/Xcode version to latest for travis.
Use "osx_image: xcode12" which is Xcode 12.0 and macOS 10.15.5, the
latest available for travis.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-09 09:52:54 +00:00
Rafael Kitover a5f863f390
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-08 13:28:31 +00:00
Rafael Kitover 36e61d765a
Test with utf8 and nostl variants of wx on Travis.
Build on bionic with downloaded stow packages in /usr/local.

f51e1ee4 is actually a fix for a wx with --enable-utf8 and NOT for a wx
with --disable-stl, as it turns out.

FreeBSD uses --enable-utf8, while Linux distributions generally don't.

Tested by reverting f51e1ee4.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-30 00:52:20 +00:00
Rafael Kitover 306f92f5d7 Check game kbd input with wxGetKeyState() again.
Followup on baa0341b.

Reintroduce checking if a key is actually pressed in the panel OnKeyDown
event with wxGetKeyState(key_code).

Introduced in b0ec846 and removed in baa0341b.

wxGetKeyState() does not work on Wayland and does not work for Unicode
keys, support for which was introduced in baa0341b, which is why the
call was removed.

Add two static functions is_key_pressed(ev) and is_key_released(ev) that
return true under Wayland or if the key is Unicode, and call
wxGetKeyState() otherwise.

The reason this call was introduced in b0ec846 was to work around a bug
in some Linux distributions that caused spurious keyboard events to be
generated. The bug apparently still persists, see #689.

Because the two additional checks were necessarily added, the bug may
persist on Wayland, if it exists there, and for Unicode keys, but will
be fixed in the more common case of Latin keys under Xorg.

Tested on Linux with both Latin and Unicode game input keyboard keys.

- Fix #689.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-29 01:24:40 +00:00
Rafael Kitover 8e88363163
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-28 00:27:41 +00:00
Rafael Kitover f51e1ee4ec Fix for non-stl wx builds.
Followup on baa0341b.

Use ToStdWstring() instead of wc_str() to look up strings in the map,
the key for the map is std::wstring.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-26 06:51:27 +00:00
Rafael Kitover 047cc29787
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-23 06:45:12 +00:00
Rafael Kitover 3a2b97fd08
Transifex pull.
New complete translation by @Ds886 for he_IL.

New locale en_PL.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-21 20:12:55 +00:00
Rafael Kitover 121013c534
Transifex push + fix for a couple of strings.
Fix a couple of strings noted by @Ds886.

Generate new pot and push to transifex.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-21 19:42:52 +00:00
Edênis Freindorfer Azevedo 91a6b53e02
Input followup (#687)
- Allow some control chars to be used as input.

This is actually a regression, since our default config uses some of
these chars.

- Allow default keys bindings to be used elsewhere.

If we try to use keys such as `KP_ADD`, `KP_ENTER` as game input, we
actually execute a `NOOP` command accelerator (nothing done), as we
associate the key with it to disable the accel.
Due to this, we do not allow any further processing of this key, such
as game input.
2020-06-20 19:36:24 -03:00
Edênis Freindorfer Azevedo de93330125
Merge pull request #671 from visualboyadvance-m/turbo-gba
Input refactoring.
2020-06-18 23:01:32 -03:00
Edênis Freindorfer Azevedo baa0341bd5
Input refactor.
- Allow key shortcuts to run with loaded game.

For example, when we set `CTRL+A` for `load most recent save state` and
use `A` for some input command, holding `CTRL` and then pressing `A`
will not execute the shortcut. Instead, the key press `A` will be used
only as the input and nothing else.

With this, we use both the input and shortcut key.

- Isolate function to get keyboard key codes.

As explained on [1]:

"Using `GetUnicodeKey()` is in general the right thing to do if you are
interested in the characters typed by the user, `GetKeyCode()` should
be only used for special keys (for which `GetUnicodeKey()` returns
`WXK_NONE`)."

We also allow special keys to be mapped, hence the requirement of using
both functions.

[1] https://docs.wxwidgets.org/3.1/classwx_key_event.html

- Allow use of unicode keys for input and shortcut.

Use format `KeyCode:Modifier` for saving/loading unicode keys.

`WxWidgets=3.{0,1}` does not create an accelerator from strings with
unicode keys such as `ç` (`FromString` function). It fails with an
assertion error and stops execution. At the same time, we use the keys'
strings that are known for WxWidgets, such as `A`, `CTRL+O`,
`PAGEUP` etc.

Use both `EVT_KEY_DOWN` and `EVT_CHAR`.

`EVT_CHAR` is better than `EVT_KEY_DOWN` here because it is where the
raw key events will have been cooked using whatever recipes are in
effect from the os, locale, international keyboard settings, etc.

- Enable SDL joysticks input as key shortcuts.

Start/Stop polling joysticks on Unload/load game.

Our main loop already polls the joystick, we don't need the timer
while a game is running.

- Create function `str_split_with_sep` and use it.

For when we parse strings that may include the sep string, such as
game input and key shortcuts.
2020-06-18 20:47:47 -03:00
Edênis Freindorfer Azevedo 6b257d52f2
Avoid override of variable `throttle` for turbo.
It is not needed to set `throttle` on neither case. There is actually a
bug when using turbo/speedup and closing the emulator. The test case
is the following:

https://github.com/visualboyadvance-m/visualboyadvance-m/issues/627

On Windows:

1. use opengl;
2. load GBA game;
3. set throttle to `100%`;
4. set turbo throttle to `200%`;
5. enable turbo on menu;
6. save game;
7. close emulator && open emulator;
8. load GBA game;

==>

throttle is `200%`.

This is definitely not expected.
2020-06-17 13:23:14 -03:00
Edênis Freindorfer Azevedo bd2483cae7
Allow changing connection type without restart.
Before, if we tried changing the connection type without closing vbam,
we would get an error about a connection already existing. We needed
to restart vbam to change it.
2020-06-17 13:23:14 -03:00
Rafael Kitover d379a076df Decrease mouse sensitivity for menu hiding.
Ignore mouse movements of less than 11 pixels, to avoid spurious events
from mice in high DPI mode etc..

- Fix #675.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-15 19:32:33 +00:00
Rafael Kitover 0b7f11018d
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-14 19:08:41 +00:00
Edênis Freindorfer Azevedo 0c5ee9941b Fix PNG capture screen.
- Fix #680.
2020-06-07 18:06:04 +00:00
Rafael Kitover 3d83590774
Remove 32 bit mac binary, builder updates.
We are not going to release 32 bit mac builds anymore, because any mac
sold after 2007 will run a 64 bit binary. And since we are building for
10.7, which requires a 64 bit mac, and will run 64 bit binaries even on
a 32 bit kernel, the 32 bit binary was always pointless.

More on this here:

https://apple.stackexchange.com/questions/99640/how-old-are-macs-that-cannot-run-64-bit-applications/99644#99644

https://apple.stackexchange.com/a/261793/206363

Remove references to 32 bit mac binary from the dev manual.

Builder updates:

- Bump cmake 3.13.0-rc1 -> 3.17.3. This is needed for the new
  FetchContent feature in cmake, which we use for Sparkle (online
  updates for mac.)

- Bump sfml to newer master commit.

- Add pre-build hook for libvpx on mac to set
  -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET in CFLAGS.

- Force C locale in all builder scripts, homebrew bash was erroring due
  to some kind of locale bug with a non-English locale.

- Remove .app in build_project() before building, rebuilds were failing
  due to reinstallation of frameworks (Sparkle.)

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-07 12:38:48 +00:00
Rafael Kitover d8da93897a
Minor improvements for mac dyld linker.
Minor code improvements.

Do not suppress output of sudo invocation, this may cause it hang on an
invisible password prompt.

- Fix #676.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-05 03:36:59 -07:00
Rafael Kitover 7c0c53a332
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-04 22:38:36 +00:00
Rafael Kitover c294b86635
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-06-01 18:20:56 +00:00