Commit Graph

1707 Commits

Author SHA1 Message Date
Zach Bacon 3a141be6c1 Added initial installer script to install either the 64bit or 32bit versions depending on platform. 2017-03-15 22:58:02 -04:00
Rafael Kitover 2e8bee117d cmake: use add_compile_options for ssp-buffer-size
In 82c8a1e3 I made "--param ssp-buffer-size=4" one argument instead of
two because when added to CMAKE_REQUIRED_LIBRARIES the ssp-buffer-size=4
part was being recognized as a library, breaking the compile tests.

This broke the build on mac, which I fixed in 915e2d1e by using ssp
flags for gcc only and not clang.

Now apparently it is breaking mxe, so instead of adding this particular
parameter to the MY_C_FLAGS variable which is then added to
CMAKE_REQUIRED_* variables for compile tests, add it directly via
ADD_COMPILE_OPTIONS().

This should hopefully resolve any remaining issues with this compiler
flag.
2017-03-14 10:33:24 -07:00
Rafael Kitover 915e2d1ec2 activate libssp compiler flags for gcc only
In 82c8a1e3 I made "--param ssp-buffer-size=4" one argument instead of
two to fix another problem when passing compiler flags to
CMAKE_REQUIRED_LIBRARIES, clang cannot deal with this and this breaks
the build on mac.

Enable libssp related flags for gcc only, because clang does not support
them anyway. This fixes the build issue on mac.
2017-03-11 19:19:47 -08:00
Rafael Kitover 82c8a1e3fa fix linux build broken in 687c08a
Stop saving and restoring the CMAKE_REQUIRED_* variables for the compile
test, because the subsequent Wx header symbol tests need them set up for
Wx support as well.

Also --param foo=bar needs to be a single string in the list of compiler
flags, or cmake can misinterpret the second part as a library when it is
passed to libraries/link-options.
2017-03-10 06:38:50 -08:00
Zach Bacon 145f6d433c Some debian stuff, I honestly don't like debian packaging... but it's important for some people 2017-03-09 04:06:25 -05:00
Zach Bacon 015e0af857 Start removing ancient history of gvbam, may it rest in peace 2017-03-09 03:58:00 -05:00
Rafael Kitover 7b0baadbaa fix 32bit intel detection for 32bit mxe target
mxe leaves CMAKE_SYSTEM_PROCESSOR empty, so detect if mxe is being used
and set the variable based on CMAKE_TOOLCHAIN_FILE, this allows the
32bit asm to compile under mxe.

Also if no toolchain file is being used and CMAKE_SYSTEM_PROCESSOR is
empty, fall back to CMAKE_HOST_SYSTEM_PROCESSOR.
2017-03-08 15:49:00 -08:00
Rafael Kitover 687c08a051 pass all compiler/linker flags for compile test
When determining gcc/clang flags, save resulting C flags as MY_C_FLAGS,
C++ flags as MY_CXX_FLAGS, and linker flags as MY_C_LINKER_FLAGS, then
use them in the Wx OpenGL compile test.

This fixes the test erroneously failing on git mxe on mac.

Also, don't use -fPIC on Win32, set Wx defines separately from the test,
and save all CMAKE_REQUIRED_* variables before the test and restore them
afterwards.
2017-03-07 16:15:02 -08:00
Zach Bacon 78cd223827 changed the throttle for sdl config example 2017-03-07 06:48:41 -05:00
Rafael Kitover d1b4abc85a fix sound in SDL port/ConfigManager
Since we are using sound frequency to control game speed, not quality,
change ConfigManager to default to a frequency of 44100 instead of
22050.

This also fixes trace.log files showing up with "unknown sound quality"
warnings.
2017-03-06 04:26:33 -08:00
Rafael Kitover f2bfc549ea fix Ubuntu PPA link
Also add a note that it's easy to build from source.
2017-03-06 02:10:06 -08:00
Rafael Kitover 9dc740156b minor doc tweaks
- Add Ubuntu daily PPA link.

- Add link to releases tab for win/mac builds.

- Advise `make -j8` instead of `make -j10`.

- Clarify which dependencies are optional and which are required.

- Add ENABLE_ASM cmake option to the table.

- Replace wxLogDebug with wxString example to use .utf8_str() instead of
  concatenation, this is more correct.
2017-03-06 02:03:15 -08:00
Rafael Kitover fef71439fc add ENABLE_ASM cmake option
Add the ENABLE_ASM flag for cmake which turns ON or OFF the
ENABLE_ASM_CORE, ENABLE_ASM_SCALERS and the ENABLE_MMX options at once.
2017-03-06 01:40:55 -08:00
Zach Bacon eb7dab6272 ws2_32 is needed for the SDL binary on windows 2017-03-05 20:06:22 -05:00
Rafael Kitover 05610d84f6 fix linking OpenAL statically on Win32/MXE
Add the necessary AL_LIBTYPE_STATIC define for MXE and non-msys2 win32
builds so that OpenAL can be linked statically without errors.
2017-03-05 11:47:32 -08:00
Rafael Kitover 7b85964eb6 full throttle support + snd driver improvements
Support throttle in all sound drivers: SDL, openal, dsound and xaudio.

Link OpenAL at compile time instead of runtime.

Minor improvement on 891f17d6, which added throttle support to SoundSDL
and made it actually work more often and crash less: check that throttle
is non-zero before scaling the frequency.

For dsound, add the CTRLFREQUENCY capability to buffers and call
SetFrequency on the secondary buffer in setThrottle().

For OpenAL, set AL_PITCH on the source to throttle / 100.0 in
setThrottle() and remove all dynamic library loading stuff.

For xaudio, 441e6c9e allows throttle to work, and is also necessary for
these changes to dsound and openal.
2017-03-05 08:43:25 -08:00
Mystro256 891f17d62f Fixes for SDL throttle
- Throttle should be set on init
- SDL auido device was not being correctly closed on throttle change
2017-03-05 05:32:34 -08:00
Zach Bacon 8fcc32eeeb Merge pull request #93 from Mystro256/master
Fix incorrect bug tracker link
2017-03-05 03:16:53 -05:00
Mystro256 093bc40074 Fix incorrect bug tracker link
Clicking "Report Bugs" goes to SF instead of github
2017-03-05 01:56:31 -05:00
Rafael Kitover 441e6c9e0e fix setting throttle on LoadGame()
Move the soundSetThrottle() calls after the soundSetSampleRate() calls
in LoadGame(), because the core calls soundInit() again after
soundSetSampleRate() wiping out the throttle value. This allows the
throttle setting to work with xaudio on startup and game loads.

TODO: the throttle config setting only works correctly for the xaudio
driver at the moment, it needs to be implemented for other sound drivers
and eventually moved out of the sound drivers altogether.
2017-03-04 21:53:35 -08:00
Rafael Kitover 88d15c6ec8 partial fix for disabling pausing when linked #83
Check if link mode is active in GameArea::Pause() and refuse to pause if
it is.

Remove the check for the app not having focus with pauseWhenInactive
enabled in GameArea::OnIdle() as this is now handled in
MainFrame::OnActivate() (which receives focus events) since f10e2e99.

Revert 13f5afa9 which tried to check for link status in
MainFrame::MenuPopped() because it was completely wrong and the link
check is better done in GameArea::Pause().
2017-03-04 21:16:14 -08:00
Rafael Kitover d1918c12f4 fix clipped game area in GL fullscreen #89
Trigger OnSize in the drawing panel after setting the geometry and
calling Layout(). I'm not sure what exactly broke but this seems to fix
the issue for the time being.

Also do a bit of very minor refactoring, change some calls to GetSize()
to GetClientSize() and simplify GLDrawingPanel::OnSize(ev&), tested to
work fine in wx 2.8.
2017-02-28 17:16:46 -08:00
Mystro256 fa1e13e606 Use prefix add operator for non-prim types
Typically yields better or equal performance. Sometimes compilers don't
optimizer out keeping the previous values (not needed for only adding 1)
2017-02-28 15:04:56 -08:00
Mystro256 7c06968557 Typo, only 10 recent accels 2017-02-28 15:04:56 -08:00
Rafael Kitover 95c3fd8cdf expand github issue template
Ask for more information like the affected games and drivers being used.
2017-02-28 14:18:27 -08:00
Zach Bacon f145d6ab0e Still working on libretro stuff, working on cheatsenabled compile issue now. 2017-02-25 00:55:29 -05:00
Zach Bacon a8a48919db Fixes build on the libretro side by wrapping an ifndef statement around rederedframes 2017-02-25 00:38:06 -05:00
Rafael Kitover 4d12fcda10 fix Mac linker script for @rpath libs (like SFML)
Homebrew SFML links itself with @rpath/ instead of the dylib path,
update the mac linking and bundling script to handle that case, also
move it from src/wx/tools/osx to tools/osx now that wx is the primary
port.

This fix is temporary and I will write a better one that takes
DYLD_LIBRARY_PATH and such into account, but will suffice for linking
Homebrew libs for now. The script needs more work in general.
2017-02-24 12:24:20 -08:00
Rafael Kitover cf5f425b3a default to -DENABLE_FFMPEG=ON on Mac again
No particular reason to exclude ffmpeg support in Mac builds.
2017-02-24 06:44:26 -08:00
n-a-c-h 931fda459a Fix case where buffer is filled to capacity and becoming empty. There always needs to be an extra entry as a separator between the write and the read. 2017-02-22 03:39:57 +02:00
Rafael Kitover 095b48aabf minor fix for Ubuntu 14 (cmake)
Check that the CMAKE_VERSION is 3.0 or greater when setting the CMP0043
policy to NEW. The Ubuntu 14 cmake which is 2.8.12 throws an unknown
policy error otherwise.
2017-02-21 16:47:31 -08:00
n-a-c-h 3e0f5d89ba Rewrite of ringbuffer, and updated copyright file for Debian. 2017-02-22 02:03:21 +02:00
n-a-c-h e923015d45 Remove copyright header from ZSNES since it annoys some people. The original version in ZSNES including the entire 1.4x version was GPL2+. The changes since then are mine, and I licensed it as GPL2 only for ZSNES 1.5x. I have no issue with VBA-M distributing this as GPL2+. 2017-02-22 01:05:35 +02:00
Rafael Kitover ea4056e025 remove intermediate dependencies jpeg and tiff
jpeg and tiff are not direct dependencies and should be pulled in by
direct dependencies such as wx, remove them from README.md and
./installdeps.
2017-02-20 13:43:39 -08:00
Rafael Kitover 6a7d49419c initial Wayland support #72 #76
Disable OpenGL support under Wayland because wxGLCanvas segfaults, and
fix an issue with drawn frames not appearing.

If the user has opengl as the render method in their config, it will not
be changed, but at runtime will be set to simple under Wayland.

To fix the issue with frames not being drawn, Call Refresh() to queue a
PaintEv from DrawArea(data) instead of calling DrawArea(device_context)
directly.

Also remove the DrawOSD() call from PaintEv, this was causing the OSD to
sometimes show up twice in one frame, because DrawArea(data) draws the
OSD directly on the frame data.

Add new files wayland.cpp and wayland.h with a bool IsItWayland() global
function. This uses a GDK (part of GTK) call to detect Wayland.  This
unfortunately requires linking GTK libs separately.

Add cmake code to detect the version of GTK used by the wx being linked
and link it as well. Add gtk2 and gtk3 dev packages to the code for the
supported linux dists in ./installdeps.
2017-02-20 13:20:09 -08:00
Rafael Kitover 13f5afa9c5 don't pause on menu open when link active #83
In the MenuPopped method (which received MENU_OPEN, MENU_CLOSE and
MENU_HIGHLIGHT) check that gba_joybus_active is not true before pausing
the emulator, so that if Link mode is on it will not pause.
2017-02-19 10:39:46 -08:00
Rafael Kitover b0b0ad08ca add --exclude='glibc32*' for Fedora ./installdeps
This should fix possible problems with the glibc32 package being
sometimes erroneously pulled in in rawhide when installing 32 bit devel
libs.
2017-02-16 05:21:40 -08:00
Rafael Kitover 92e3a826a4 update ./installdeps for Fedora rawhide
Try to install both pkgconfig.i686 and pkgconfig.x86_64 silently because
fc26+ does not have a separate 32 bit package.

If installing 32 bit packages fails on amd64, fall back to installing 64
bit packages only.
2017-02-16 03:39:51 -08:00
Rafael Kitover 99c6c4f938 Merge pull request #74 from Mystro256/gccwarnings
- fix C++ only flags being used for C

- check if cheats/patches files load correctly
2017-02-13 01:26:22 -08:00
Mystro256 611bbd6707 Re-add missing installed icons (for linux) 2017-02-12 06:50:54 -08:00
Rafael Kitover 27d4f09fb4 add Mystro256 to developer list in About box 2017-02-12 04:49:06 -08:00
Rafael Kitover 289abcd7a2 use -fpermissive and -fexceptions with C++ only
Add -fpermissive and -fexceptions to CMAKE_CXX_COMPILE_OBJECT so that
they only affect C++. -std=gnu++11 was already there from b4ba9d9d, but
this is a cleaner method (which is also used for NASM) where we use
STRING(REGEX REPLACE ...) to append options after the <FLAGS>
placeholder in CMAKE_CXX_COMPILE_OBJECT.
2017-02-12 04:41:57 -08:00
Mystro256 28624ac01b fpermissive is only a C++ flag 2017-02-12 04:26:21 -08:00
Mystro256 e9e2100f6d Error case in gbCheatReadGSCodeFile
Silence GCC warning
2017-02-12 04:26:21 -08:00
Mystro256 b38cb9b522 Error case if game num can't be read in cheatsImportGSACodeFile
Silence GCC warning
2017-02-12 04:26:21 -08:00
Mystro256 7e8efe963f Incorrect return value in cheatsImportGSACodeFile 2017-02-12 04:26:21 -08:00
Mystro256 cc2fabbf0a Use fread return values for apply patch error checking
Silences gcc warnings
2017-02-12 04:26:21 -08:00
Rafael Kitover a493e0f85a remove updater code #71
Remove the "check for updates" and "Update ROM database" menu entries,
as well as the automatic update checking and all supporting code.

This fixes the issue with the emulator hanging without access to the
internet.

Updating code will be reimplemented in the future using something like
Sparkle. wxHTTP does not support redirects or https so is pretty much
useless now.

Also update the About box to bump copyright year to 2017 and change my
name to "rkitover", which is what I use on github, and mention other
contributors.
2017-02-12 03:47:29 -08:00
Rafael Kitover 65dae0d0a1 support Ninja cmake generator on msys2
Add a hack to the root CMakeLists.txt to SET(MSYS ON) for the Ninja
generator when running under msys2, otherwise it cannot find libs.

The quoting fixes from #70 allow all of this to work.
2017-02-11 14:18:38 -08:00
Rafael Kitover 98718f2094 Merge pull request #70 from edorax/master
Some fixes for MSVC.
2017-02-11 08:02:02 -08:00