Commit Graph

2743 Commits

Author SHA1 Message Date
Rafael Kitover c0bab40e9f
WIP
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-02-03 22:20:00 +00:00
Rafael Kitover 8bd09c9012
Revert "Use MSVC intrinsic sqrt() on x86 for XBRZ"
This reverts commit 55a0a52a39.

Does not make any difference, the performance issue is elsewhere.
2022-02-03 07:57:51 +00:00
Rafael Kitover 55a0a52a39
Use MSVC intrinsic sqrt() on x86 for XBRZ too.
Instead of the inline asm fsqrt instruction.
Already being used on x64.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-02-03 07:22:05 +00:00
Rafael Kitover 4af78f6482
Fix MSVC VCPKG build and Debug build type checks.
Use jpeg.lib instead of jpegd.lib for jpeg debug lib, it no longer has
the "d" suffix.

Fix all CMAKE_BUILD_TYPE checks for debug builds to either also check
for RelWithDebInfo or match "Debug" exactly.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-02-03 00:18:08 +00:00
Rafael Kitover 7d454e054a
Fix MSVC compiler/linker flags.
Turn off ccache for vcpkg builds (this is only relevant to MSVC, where
ccache does not work yet.)

Throw an error if CMAKE_BUILD_TYPE is not valid or does not match case
exactly (to make comparisons simple.)

Add SetCompilerLinkerFlags.cmake lib with the functions:

add_compiler_flags()

For each flag passed in, add it to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS if
not already present. Also clears all build-specific flag variables on
every call, if using this functions you must set build-specific flags
yourself.

add_linker_flags()

For each flag passed in, add it to
CMAKE_(EXE|SHARED|MODULE|STATIC)_LINKER_FLAGS if not already present.

Add remove_dupes() function to VbamFunctions.cmake from:

https://stackoverflow.com/a/41416298/262458

This is used to remove duplicate flags in SetCompilerLinkerFlags.cmake
described above.

Use the new functions to set compiler and linker flags for MSVC.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-02-02 22:27:39 +00:00
Zach Bacon 5ed544aad3 [Workflow] Ensure checkout is autocrlf for github actions 2022-02-02 09:43:52 -05:00
Rafael Kitover 9ba5645964
Fix Win32 build regression in fa562426.
Move list of media libs ffmpeg depends on to the right cmake file.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-02-02 00:44:41 +00:00
Rafael Kitover fa56242669
Add MSYS2 CLANG64/32 support.
Update installdeps to support CLANG64/CLANG32 MSYS2 targets.

cmake:

Set POLICY CMP0060 to NEW to not convert full lib paths, this is the
default.
Stop disabling ffmpeg on WIN32+i686.
On MSYS2+clang add windows import libs to CMAKE_PREFIX_PATH.
For static builds on MSYS2 append full paths for static libs for tiff,
jbig and lzma to FFMPEG_LIBRARIES.
Add -Wno-unused-command-line-argument to all CFLAGS/CXXFLAGS so that
clang does not warn about gcc-specific options.
Enable -march/-mtune optimizations by default instead of only for
UPSTREAM_RELEASE.
Update find_wx_util() to search suffixes for WIN32 and add the "static"
suffix for static builds.
Remove all linker flags from wxWidgets_LIBRARIES and translate all wx*
libs as well as jpeg, tiff, jbig lzma and expat to full .a paths for
static builds.
Disable strutil tests on MSYS2+clang, currently does not build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-01-31 03:26:52 +00:00
Rafael Kitover 65b5affe7d
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-01-30 02:39:02 +00:00
Rafael Kitover c4733bcf03
Fix x86 build, tweak MSVC opt flags.
Use:

/Ot /Oy /Ob3 /GF /Gy

, instead of /O2 for x86, this makes it not crash on ROM load for the
OpenGL renderer.

Supposedly /O2 is equivalent to:

/Og /Oi /Ot /Oy /Ob2 /GF /Gy

, but the documentation states that /Og is automatically enabled when
any other optimizations are enabled automatically. So this should make
absolutely no difference, yet it does.

For x64 use:

/O2 /Ob3

, this overrides /Ob2 from /O2 to use more aggressive inlining, VS 2019
is required for this.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-01-18 03:01:13 +00:00
Rafael Kitover 73223445d6
MSVC opt /fp:fast /Oi, intrinsic sqrt() w/ XBRZ.
For MSVC, add the optimization flags:

/fp:fast /Oi

, to favor speed for floating point operations and use intrinsic
operations where possible.

For release builds also add:

/O2

. Use sqrt() instead of std::sqrt() in XBRZ for MSVC x64 just in case to
make sure it uses the intrinsic version.

Test build is reported to run much faster.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-01-16 15:55:02 +00:00
Rafael Kitover 2eb45cd967
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-12-22 15:02:48 +00:00
Rafael Kitover a5b2d070dc
Add cmake TRANSLATIONS_ONLY for translations.zip.
Builds translations.zip and nothing else.

This is for the nightly builder when only translations are changed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-12-19 13:57:05 +00:00
Rafael Kitover ea9d95dfa0
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-12-19 12:26:39 +00:00
Rafael Kitover 21ccbcb120
Minor fix in builder script.
Delete build directories prior to build in build_project().

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-12-19 12:04:18 +00:00
Zach Bacon a33695cd55 Update the snapcraft yaml to core20
Signed-off-by: Zach Bacon <zachbacon@vba-m.com>
2021-12-16 07:51:37 -05:00
Rafael Kitover 94b4a7982c
Update nightly builds URL in README.md.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-12-14 08:55:48 +00:00
Squall Leonhart 972f151310
Enable GB colorization hack support in GUI.
This is used by some hacked ROMs like Metroid II DX.

Add a config variable to enable the already existent core support for
this.

This conflicts with using a GB BIOS file, add checks and error dialogs
for this.

Also move including "ConfigManager.h" into "wxvbam.h".

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-11-24 21:30:37 +00:00
Rafael Kitover 89028de852
Regenerate dev guide TOC.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-11-10 23:08:25 +00:00
Rafael Kitover b9fb76043e
Move Windows dev guide to its own repository.
It is now at:

https://github.com/rkitover/windows-dev-guide

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-11-10 22:37:15 +00:00
Rafael Kitover 35d4d44a9b
Update Windows Terminal settings in dev guide.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-11-10 18:56:15 +00:00
Rafael Kitover b3cc663344
Minor architecture/optimization improvements.
Use the X86_64 variable instead of AMD64 for this architecture in cmake.

For our upstream binary builds, use -march=core2 -mtune=rocketlake for
X86_64 on macOS, -march=core2 -mtune=znver3 for X86_64 on non-macOS (not
currently used) and -march=pentium-mmx -mtune=core2 for the future
Windows XP 32 bit MinGW build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-31 18:23:34 -07:00
Rafael Kitover b6837cea05
Support Debug builds for mac.
Allow codesigning frameworks to fail.

Use ninja to build project in the builder instead of make.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-31 17:10:22 -07:00
Rafael Kitover 414cacbf28
Suffix zip files with arch + minor cmake fixes.
Instead of suffixing release zip files with 32bit or 64bit, add an
architecture suffix, which would be one of:

x86_32
x86_64
arm32
arm64

Allow codesign to fail on mac without aborting.

Disable the interactive pause for gpg signing because there is no
passphrase anymore.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-31 08:55:48 -07:00
Rafael Kitover a45d8214c1
Update builder for mac build.
m4: 1.4.18 -> 1.4.19, remove patches.
libxml2: 2.9.12
wxwidgets: master (3.0.5.1 on mac for 10.7)

Run script with brew bash.

Unlink brew wxwidgets before build and relink after because it conflicts
with the built version, this needs to be fixed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-30 22:24:40 -07:00
Rafael Kitover 173512f65a
Revert DMA:Linger last DMA on bus ...
Pulled in from merge of libretro fork, causes a regression in Croket 2.

This reverts commit a9f35645b7.
2021-10-23 22:34:35 +00:00
Rafael Kitover c37c472996
Fix merge in b3153dcf breaking build.
The merge conflict was resolved incorrectly, replace with source file
from the libretro fork.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-20 13:08:38 +00:00
Rafael Kitover 3f571fb930
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-20 05:49:36 +00:00
Rafael Kitover b3153dcf35
Merge remote-tracking branch 'libretro/master'
Includes some GB and GBA fixes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-20 05:42:27 +00:00
Rafael Kitover 2ecfe09c6a
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-10-05 20:16:53 +00:00
Zach Bacon 4223c39c4c
disable online updates for github workflow 2021-10-03 16:38:43 -04:00
Zach Bacon 459de4ba78
aaaand I forgot to append the -D to enable the sdl static stuff 2021-10-03 16:24:54 -04:00
Zach Bacon 9a5406f824
enable several configuration options, the static I'm sure won't work though 2021-10-03 16:18:46 -04:00
Zach Bacon 859359e5ef
Add ffmpeg to the build 2021-10-03 16:05:26 -04:00
Zach Bacon ab1ff4191d
add zip to the build process 2021-10-03 16:02:59 -04:00
Zach Bacon e8383447a8
This should fix the basic build, I'll add proper configure options later 2021-10-03 15:56:31 -04:00
Zach Bacon bdc79bbe20
I'm still learning github actions it seems 2021-10-03 17:08:07 -04:00
Zach Bacon 227c1d69b3
add git 2021-10-03 17:01:51 -04:00
Zach Bacon 2011a5cc9c
Let's run the git submodule command 2021-10-03 16:57:32 -04:00
Zach Bacon 24ecb82fb1
let's try this bit for the workflow 2021-10-03 16:52:35 -04:00
Zach Bacon dd2e837310
let's set the build environment for github actions 2021-10-03 16:45:22 -04:00
Zach Bacon 0db7eab66c
add github actions workflow 2021-10-03 16:37:11 -04:00
Zach Bacon dc24eac896
Merge pull request #877 from Squall-Leonhart/master
Fix autosaveloadcheats and rename pref to autosaveloadcheats
2021-09-23 22:21:57 -04:00
Squall Leonhart 1741fa32db Fix autosaveloadcheat and rename pref 2021-09-23 18:56:32 +10:00
Rafael Kitover c503c9adb8
Transifex pull.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-09-07 23:10:12 +00:00
Rafael Kitover 7a550f4348
Update default.nix.
Add indirect dependencies that cmake complains about and remove ccache
because it currently fails to build on NixOS unstable.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2021-09-07 23:05:31 +00:00
Zach Bacon 3529826bcc
begin the support of arm64 support in the m1 mac variants,
not sure if this will work however, but I'll keep tweaking
until it is ready
2021-09-05 13:25:11 -04:00
Zach Bacon 0ea8ce8dd9
Merge pull request #855 from laqieer/fix/flash_erase
Fix Flash chip's erase operation
2021-08-30 23:51:53 -04:00
Zach Bacon 59fd820e7a
homebrew moved from /usr/local to /opt/homebrew, adjust accordingly 2021-08-23 23:47:40 -04:00
Zach Bacon 1426358da4
Merge pull request #866 from Squall-Leonhart/master
in Wx, the Option is Enable MMX, make the variable also enableMMX and…
2021-08-19 09:44:30 -04:00