Commit Graph

2675 Commits

Author SHA1 Message Date
Edênis Freindorfer Azevedo 994726dd8d Do not pause while opening configuration windows.
The only configuration that we cannot change while playing is the sound
driver. All the others should be changeable without any major issues.
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo 54335dc67c [WINDOWS] Fix weird WX errors messages.
XRC error: 131: vertical alignment flag `wxALIGN_BOTTOM` has no effect
inside a vertical box sizer, remove it and consider inserting a spacer
instead.

- Fix #517.
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo 7bac34eda4 Remove duplicate variable `winFlashSize`.
We already had `optFlashSize` for both SDL and WX ports. We assigned
this variable to replace all ocurrences of `winFlashSize`.

As a side note, this entire scope could/should be replaced by a better
auto-detect system for saving types. At the moment, it is only really
useful for the SDL port, since we have overrides for the WX port.

- Fix #585.
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo 8d62a790e3 Change default options for GB.
We set to automatically display borders on SGB games, as well as
setting the default emulation system to `automatic`.
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo 99b66e1326 Expose LCD filter for GBA and GB color saturation.
We offer a way to control the color saturation for GBA games such as
Fire Emblem Tactics Advance.

It will be enabled by default for GBA games and disabled for GB.
The user will be able to toggle both of them and these options
will be persistent by saving to `vbam.ini`.

- Fix #131.
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo c789020e93 Fix `Save` button on OAM Viewer for GB and GBA.
No idea why this was not implemented yet...
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo dcaa1b9abc Fix `Save` button on Tile Viewer for GB and GBA.
For some reason this was not implemented yet.
2020-03-18 00:48:43 +00:00
Edênis Freindorfer Azevedo d05e8fc141 Make AGBPrint output to our Logging.
We also output using `dbgOutput`, hence the behaviour will not change
for users relying on this.
2020-03-18 00:12:27 +00:00
Rafael Kitover 60f05cedc2
cmake: Add ZIP_SUFFIX option, for build configs.
Add a ZIP_SUFFIX option defaulting to "" that is added to the generated
.zip file with UPSTREAM_RELEASE before the .zip extension.

For example, for an experimental feature you could pass
-DZIP_SUFFIX=-timer_loop and the resulting .zip file would be
visualboyadvance-m-Win-64bit-timer_loop.zip or
visualboyadvance-m-Win-64bit-debug-timer_loop.zip for a debug build.

Also add a modeline to this cmake file because vim-sleuth always gets
the settings wrong. Or it could be the cmake filetype plugins.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-17 03:24:43 +00:00
Rafael Kitover abb8234174
Allow binding specific server IP. (#633)
For the netlink dialog, leave the server IP text field enabled when the
server radio button is selected and bind it to the new option
gopts.server_ip which defaults to "*" for binding on all addresses,
which was the previous behavior.

Copy this value to the new GBALink global IP_LINK_BIND_ADDRESS and use
it when creating a listening socket.

SFML supports creating sf:IpAddress values from hostnames, consequently
no additional code is needed to support hostnames in the netlink dialog.

Change GetLinkServerHost to return the primary local address when the
value is "*", which was the previous behavior, and the set value
otherwise.

Remove the min/max macros from GBALink as they are unnecessary and
conflict with std headers.

Require at least SFML 2.4 instead of 2.x for the IP binding
functionality in cmake.

- Fix #632

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-16 13:37:01 -03:00
Rafael Kitover 4f49c89a98
Update README.md for current project status.
- Remove forum link until it's back up.

- Add nightly builds link.

- Use ninja for build instructions instead of make.

- Note that wx 2.8 and non-stl builds are no longer supported.

- Mention fprintf(stderr, ...) in the debug messages section.

- Misc. minor edits.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-16 12:13:25 +00:00
Rafael Kitover a462904c58
Merge remote-tracking branch 'vbam-libretro/master'
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-16 11:48:19 +00:00
Rafael Kitover 7ab7bc3a9d
cmake: Add -debug suffix to windows debug zips.
For the zip file containing the executable (and symbols for debug builds
on msvc) add the -debug suffix to the basename of the zip file for debug
builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-15 20:44:22 +00:00
Rafael Kitover 57bc8f9e40
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-15 02:19:42 +00:00
Rafael Kitover 571025da66
cmake: Do not use gpg if user has no keys.
When UPSTREAM_RELEASE is set, only use gpg to make detached signatures
if the output of gpg -k is not blank. If it is not, the user has likely
installed a private key to sign with.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-14 13:28:36 +00:00
Rafael Kitover 7b04c4ceec
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-14 01:55:08 +00:00
Rafael Kitover 8ede756fb0
Gettext pot regen and transifex push.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-13 14:41:14 +00:00
Rafael Kitover 6c64db0794
cmake: Windows codesigning refactor.
Quote variables containing the HOME or USERPROFILE, as they may have
spaces.

Check for both osslsigncode and signtool regardless of platform, and
prefer osslsigncode.

The reason for this being that osslsigncode is more reliable and does
not depend on system configuration in any way, while signtool can fail
under more conditions.

The other reason being that you can use either program on both windows
and linux. E.g. the mingw version of osslsigncode or the signtool from
mono distributions on linux.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-13 00:30:26 +00:00
Rafael Kitover 7a4a7d148c
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-12 23:45:45 +00:00
Edênis Freindorfer Azevedo 4f1a351d4a Try to configure vsync for multiple options.
When we have a notebook with intel+nvidia, OpenGL sets both
`glXSwapIntervalSGI` (nvidia) and `glXSwapIntervalMESA` (intel) for
usage. That means that if the display is controlled by one, we may
disable vsync for the other card, therefore having no actual effect
on gameplay. With this, we check for all available functions and try
them all.

This may lead to some false warnings, but useful for debugging
purposes.
2020-03-11 14:00:24 +00:00
Edênis Freindorfer Azevedo ed8a9af250 Use proper functions and checks for OpenGL VSYNC.
The vsync has to be {dis,en}abled before a ROM is loaded or we need to
restart the output module to apply it.

We also support MESA based installations (Intel HD Graphics, AMD/ATI and
Nouveau) on Linux.
2020-03-11 14:00:24 +00:00
hizzlekizzle 29dffc0120
Merge pull request #86 from negativeExponent/patch-1
Fix Save Failed error for Super Monkey Ball Jr.
2020-03-10 18:43:54 -05:00
negativeExponent 6092082e04
Fix Save Failed error for Super Monkey Ball Jr. 2020-03-11 06:47:25 +08:00
Rafael Kitover 2ba0d316cd
cmake: Include .pdb in zips of debug builds.
Include the visualboyadvance-m.pdb file alongside the .exe for Visual
Studio debug builds.

Visual Studio generates this file with the debug symbols for debug
builds. The file is not generated for release builds. It is also
generated for RelWithDebInfo builds.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-09 04:28:52 +00:00
Rafael Kitover 2fe84053e1
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-09 02:36:26 +00:00
Rafael Kitover f1099a213a
Check return value of soundInit().
soundInit() returns a bool to indicate success, and failure inevitably
leads to crashes as the emulator tries to use a NULL soundDriver.

On false, popup an error dialog saying that the sound driver failed to
initialize, this is at least better than crashes, which will also need
to be fixed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-07 13:30:28 +00:00
Mystro256 410ede543c
Check for null pointer in soundReset().
Check that soundDriver is defined.
2020-03-07 13:08:44 +00:00
negativeExponent 9d1d707c01
Limit ROM size to 32 MiB.
Limit the utilLoad() function in src/Util.cpp to 32 MiB.

This function loads a file from disk and returns a memory image of it.

This is only used to load ROMs currently.
2020-03-07 11:45:19 +00:00
negativeExponent fd319d2184
GB: Check header for a valid ROM file.
Check some magic numbers in the ROM header to detect Game Genie and Game
Shark ROMs, and check for the Nintendo logo in the header in normal
ROMs.
2020-03-07 11:43:00 +00:00
Rafael Kitover 2f23467245
cmake: When replacing old tags, use origin.
Fetch new set of tags from the origin remote explicitly rather than
whatever remote is associated with the current branch.

In this way, old tags on other remotes get overwritten as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-07 11:36:40 +00:00
Rafael Kitover 20f57587e2
cmake: Replace old git tags if found.
Detect old badly formatted git tags we used in the user's git clone, and
if found delete all tags and fetch them from the origin.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-05 15:04:19 +00:00
Rafael Kitover e220c9bc91
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-04 15:29:57 +00:00
Rafael Kitover c258f6c1c8
Remove libpng from dependencies in README.md.
Followup on 05bd2a95 and 513af13d.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-02 19:15:38 +00:00
Rafael Kitover 995c2cb706
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-01 14:03:10 +00:00
Rafael Kitover 05bd2a95cd
Remove libpng direct dependency.
Followup on 513af13d which replaces the use of libpng with the stb_image
headers.

- Remove the use of libpng in cmake.

- Remove libpng from list of vcpkg dependencies.

- Add libpng to list of wxwidgets link libraries when using vcpkg, since
  it is no longer linked directly. This is necessary for static builds.

- Remove libpng from all package lists in installdeps.

- Remove libpng-dev from the debian control file.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-01 13:56:29 +00:00
Rafael Kitover f2e81b8e4b
Clarify direct commit policy in manual.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-03-01 12:50:52 +00:00
Edênis Freindorfer Azevedo 513af13ddc Replace `libpng` code for `stb_image` one.
It is a very straightforward replacement calls.
2020-03-01 09:54:43 +00:00
Edênis Freindorfer Azevedo 8f48c1f01d Fix weird `wxWidgets>=3.0` error message.
ASSERT INFO:
/usr/include/wx-3.0/wx/object.h(160): assert "wxDynamicCast(ptr, T)"
failed in wxCheckCast(): wxStaticCast() used incorrectly
2020-03-01 09:54:43 +00:00
Edênis Freindorfer Azevedo 7f1a3a932c Add stb_image headers to cmake. 2020-03-01 09:54:43 +00:00
Edênis Freindorfer Azevedo 4da422d02b Update stb_image headers to latest version.
We are going to remove our libpng for stb_image.
2020-03-01 09:54:43 +00:00
Rafael Kitover 3ca35d9ca6
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-29 02:31:11 +00:00
Rafael Kitover 0a451d11d3
Tranisfex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-27 00:12:03 +00:00
Rafael Kitover 229bf815e0
Revert f1abbc5f, vcpkg upgrade is fixed.
vcpkg upgrade is fixed via:

f6d52648ec

Use upgrade --no-dry-run again to install the first package to upgrade.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-25 20:40:22 +00:00
Rafael Kitover 5c0903d651
Add developer manual.
Start a developer manual for the project where we will keep policies,
guides and processes for the project in DEVELOPER-MANUAL.md.

Describe the policies for receiving and resolving github issues.

Describe the policy for git commit messages on pull requests and add git
notes for collaborating on a branch.

Describe the policy for commits from maintainers.

Describe how to set up a native windows powershell development
environment and some powershell tips.

Describe the requirements and steps for the current release process.

Replace the CONTRIBUTING section of the README.md with a link to this
manual.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-25 19:51:53 +00:00
Rafael Kitover 32e7c69726
Gettext pot update improvements.
Extract strings from all wx sources, not just the enabled ones.

Ignore comments in the generated pot when checking if it was updated, we
don't care about just changes in line numbers.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 21:06:23 +00:00
Rafael Kitover 2f0653824e
Enable XAudio2 for Windows vcpkg build.
Add necessary headers to the dependencies submodule and default the
cmake option to on.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 20:49:01 +00:00
Rafael Kitover ba14cadba1
Fix 0e8e46f0 for gcc.
gcc (mingw) does not allow converting a const char*[] to a char**
without -fpermissive. Make some adjustments to the string handling to
execute the cmd.exe command to delete the temp file.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 19:46:50 +00:00
Rafael Kitover 0e8e46f0b7
Windows: Fix deleting tempfile for winsparkle dll.
Trying to delete the temp file for the winsparkle dll after unloading
the dll would still produce an access denied error, presumably because
for whatever reason not all resources used by the dll were freed.

Instead of trying to immediately delete the file, start an asynchronous
cmd.exe process to sleep for 2 seconds and delete the file. This gives
the app time to exit, after which the file can be deleted.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-24 13:17:32 +00:00
Rafael Kitover 89d378eb71
cmake: Fix gettext pot update check.
When the feature was added in d93f6350, I did not adequately test for
the normal case when the pot is not updated.

This does not work because the pot has a timestamp in the
POT-Creation-Date: field.

Fix check-pot-update.cmake to ignore the pot timestamp and not report
the pot as changed when it has not been.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-20 23:46:09 +00:00
Rafael Kitover 2504596140
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-02-19 23:55:25 +00:00