Commit Graph

1975 Commits

Author SHA1 Message Date
Rafael Kitover 498019a39b support older 32 bit macs running 10.7, fix build
Make mac builder use -m32 in CFLAGS etc. to produce a 32 bit binary
targetting 10.7 (Lion.) This provides the greatest backward
compatibility for older macs, and also allows for asm filters.

Fix an issue with m4 on 10.13 using a patch from macports.

Support `-pX` patch level args in DIST_PATCHES in builder.

Fix an issue with bison on 10.13 by bumping the version to 3.0.5.

Build libxslt `--without-crypto` so that it doesn't try to link the brew
libgcrypt.

Invoke cmake for dists with -DCMAKE_C_COMPILER_LAUNCHER=ccache and
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache to use ccache, and set
CMAKE_C_COMPILER and CMAKE_CXX_COMPILER to the actual compilers not
prefixed by ccache.

When checking for ccache in vbam cmake code, check that
CMAKE_CXX_COMPILER_LAUNCHER and CMAKE_C_COMPILER_LAUNCHER were not
already defined (generally on the command line.)

Remove align attributes from sections in 2xSaImmx.asm, macho format on
mac does not support this and the filter works fine without them.

In the Quartz2D renderer, pass the NSRect view.bounds through
NSRectToCGRect when calling CGContextDrawImage(), this is necessary for
the 32 bit API.

Bump openssl to 1.0.2o.

Bump libxml2 to 2.9.8.

Update URL for urw fonts, and improve the dist downloading/unpacking
code to handle URLs that do not contain the filename (for .tar.gz and
.zip as identified by `file`.)

Change post-build for harfbuzz from `rebuild_dist freetype;` to
`rebuild_dist freetype --with-harfbuzz=yes;` as it was supposed to have
been.

Build cmake itself with --parallel and --enable-ccache.

Silence errors from killed jobs due to tmp directory being gone.

Write a couple of string functions, rtrim() and gsub().

Make path_exists() handle globs with spaces in them, by escaping the
space.

Use --host and --build args to autoconf configure to "cross-compile" for
32 bits, this is necessary for some dists, and does not work for others,
remove it for dists where it does not work.

Add COMMAND_MODE=unix2003 to the build environment, this is necessary to
fix some build errors, why I have no clue, found it on stackoverflow.

Pass -Wl,-no_compact_unwind in LDFLAGS to openssl, this is necessary for
32 bits.

Force sfml to compile as 32 bit, it normally does not allow this.

Remove shared-mime-info from this build, it's not necessary for anything
and there are issues XML::Parser linked to our expat and brew perl that
need to be resolved.
2018-06-30 03:40:47 -07:00
Rafael Kitover 6b4862581e fix some ELF parsing vulnerabilities #255
Implement the recommendations described in issue #255 by @zzazzdzz:

- Check bounds when reading ELF program header sections.

- Skip reading ELF section headers if the string table pointer is NULL.

- Increase the buffer size for dissassembled instructions in the
  dissassembly view and pass the buffer size to the disArm() and
  disThumb() functions so that rudimentary bounds checking can be done.

Also add the constants WORK_RAM_SIZE and ROM_SIZE to reduce incidence of
magic numbers and make the code a bit cleaner.
2018-06-29 08:17:13 -07:00
Rafael Kitover c63d364058 travis: add job for libretro module
Add a job to test compiling the libretro module to the matrix.
2018-06-28 20:51:13 -07:00
retro-wertz ef8c89fce0 Libretro: Do not compile arm disassembly module
fix compile issue in windows
2018-06-28 15:15:18 -07:00
Rafael Kitover 63431916a7 fix 2 broken URLs in builder script
The libxslt and urw URLs were broken, replace them with working ones.
2018-06-27 14:36:34 -07:00
Rafael Kitover 48af3829aa travis: move cache key for ccache into jobs
Move the `cache: directories: "$HOME/.ccache"` key from the top of the
file into each specific job, otherwise it does not seem to have an
effect as a global option.
2018-06-27 14:13:23 -07:00
ZachBacon 21b718b837 Add Coverity Badge 2018-06-26 22:26:50 -04:00
Rafael Kitover 8778837c83 add Travis CI support
Use a matrix of 4 jobs, linux (ubuntu trusty), mingw i686, mingw x86-64
and mac.

Automatically detect ccache in the cmake config and cache the
`~/.ccache` directory for faster rebuilds.

Instructions for ccache in cmake are here:
https://stackoverflow.com/a/24305849

Change build status badge in README.md to Travis.
2018-06-26 19:15:22 -07:00
Rafael Kitover fde9d731a8 installdeps: add ccache to list of deps
Add ccache to list of deps for all platforms.
2018-06-27 02:06:28 +00:00
Rafael Kitover 77a3673d04 installdeps: install wx-common for mxe for wxrc
When cross building for win32, native wxrc is needed to generate xrc
files, add wx-common to mxe dependencies which provides it.
2018-06-27 01:58:33 +00:00
Rafael Kitover 90188e8875 installdeps: fix build instructions for mxe
Change cmake executable prefix from `x86-64` to the correct `x86_64` for
the 64 bit architecture.
2018-06-27 01:49:26 +00:00
Rafael Kitover 816aab9939 fix installdeps for ubuntu:trusty
Add some dependencies for the linux build that apt errors out on,
hopefully this won't affect newer ubuntu or debian.

Do an apt-get update before trying to install mxe dependencies for win32
cross builds, or the packages cannot be found.
2018-06-27 01:38:43 +00:00
Rafael Kitover e4923e7267 fix save dialogs on Mac #268
In MainFrame::ShowModal, which is used as a wrapper for
wxDialog::ShowModal to also pause emulation, add the current window
style flags to the additional CAPTION and RESIZE_BORDER flags being set
with SetWindowStyle(), otherwise the other style flags of the window are
reset causing erroneous behavior such as save dialogs appearing as open
dialogs on Mac.
2018-06-26 04:38:38 -07:00
Rafael Kitover 66a50e35da note how to reset config in windows in README.md
Add a note at the top of README.md for windows users on how to find the
config directory and delete it.
2018-06-23 13:45:35 -07:00
Rafael Kitover ed00dc77a9 use GetWindow()->Refresh() on non-GTK too #260
Default to GetWindow()->Refresh() to draw the game area on non-GTK
platforms as well, and only use the DrawArea(dc) method in GTK2 and
lower.
2018-06-18 10:20:29 -07:00
Rafael Kitover 89228b0697 fix high CPU usage under wxgtk2 #260
When using GTK2, call DrawArea(dc) instead of GetWindow()->Refresh(),
this prevents glib from using huge amounts of CPU (as discovered by
@retro-wertz .)

Switching video drivers sometimes crashes the app, the DrawArea() call
is as safe as possible, the problem is elsewhere.
2018-06-18 10:11:14 -07:00
Rafael Kitover d160321811 fix $ENV{WX_CONFIG} check yet again
The expansion must be quoted as "$ENV{WX_CONFIG}" when passed as a
parameter e.g. to if() otherwise it expands to no parameter when empty.
2018-06-18 08:29:14 -07:00
Rafael Kitover 0489756d4c fix $ENV{WX_CONFIG} check in 46f52941
Apparently in cmake empty env vars do not evaluate to false, use
explicit STREQUAL "".
2018-06-18 04:11:35 -07:00
Rafael Kitover 46f5294129 do not prefer wxgtk3 if $ENV{WX_CONFIG} is set
Skip the check for wx-config-gtk3 if the WX_CONFIG environment variable
is set, indicating that the user wants to override the version of wx to
build against.
2018-06-18 04:04:47 -07:00
Rafael Kitover 437b366e39 clean up wxgtk3 finding cmake code
Use a loop to check for wx-config-gtk4 then wx-config-gtk3 and unset the
config executable variable otherwise.

Also remove gl from the initial wx libraries list.
2018-06-18 03:46:30 -07:00
Rafael Kitover 2efcb620bd support and default to wxgtk3 not gtk2 on arch
Change installdeps to install wxgtk3 on arch instead of the wxgtk
package which uses gtk2.

Update the cmake code to check for the renamed wx-config executable
wx-config-gtk3 on arch, first checking for wx-config-gtk4 for the
future.
2018-06-18 02:44:19 -07:00
Rafael Kitover 430b5d638d fix Mac OS 10.13 build issues
Compile out the min/max functions in GBALink.cpp when compiling with
clang, clang does not like them because of some sort of changes in the
preprocessor.

Run the mac builder script with homebrew bash, system bash does not work
and dash no longer works.

TODO: fix dash compat
2018-06-17 16:01:40 -07:00
Zach Bacon 9222894cc4
Merge pull request #263 from retro-wertz/patch-2
Add couple of file ext on .gitignore
2018-06-16 10:25:05 -04:00
retro-wertz 02e1f49a7c
Add couple of file ext on .gitignore 2018-06-16 21:46:01 +08:00
Zach Bacon fad1dd15cd
Merge pull request #262 from retro-wertz/libretro
Libretro
2018-06-16 07:43:29 -04:00
retro-wertz 9c85991773 Opps 2018-06-16 16:47:44 +08:00
retro-wertz 009c09ef4a GBA: Show log when rom uses SRAM of FLASH save types
Log should only show once during the first write to SRAM or FLASH address using flashSaveDecide()
2018-06-16 15:59:53 +08:00
retro-wertz 90bc79f299 Libretro: implement vbam logging using libretro logging api 2018-06-16 15:55:26 +08:00
retro-wertz f4b88ba63a Libretro: Remove GBA LCD filter
Libretro use shaders for filters etc.
2018-06-16 15:53:20 +08:00
retro-wertz 76389d8e94 RTC: Change this #ifdef to GBA_LOGGING 2018-06-16 15:17:12 +08:00
retro-wertz 710d2f3ebf UtilRetro: Remove LCD filter 2018-06-16 15:08:04 +08:00
retro-wertz e0fe836516 Makefile: Add option for sanitizer, add -DNO_DEBUGGER 2018-06-16 15:02:27 +08:00
retro-wertz 94d076760d Makefile: Remove sources we dont need 2018-06-16 15:00:47 +08:00
retro-wertz 50e91f7973 Remove unrelated function during rom load 2018-06-15 13:07:22 -04:00
retro-wertz 3c0e88bcdf Remove wrong #ifdef decleration
#ifdef __libretro__ is incorrect and function has worked fine without it.
2018-06-15 13:07:22 -04:00
retro-wertz 3791b0a07f Libretro: Fix samplerate not passed correctly to gba core 2018-06-14 12:16:37 -04:00
retro-wertz 3385be2578 Silence some warnings 2018-06-14 11:48:35 -04:00
retro-wertz 4d4819f055 Libretro: Add core options for Sound Interpolation and Filtering 2018-06-14 11:48:35 -04:00
retro-wertz 94f1102395 Libretro: Add core option to mute sound channels 2018-06-14 11:48:35 -04:00
Zach Bacon 5a4c788dad
Merge pull request #256 from retro-wertz/patch-1
Set mirroringEnable to false
2018-06-14 08:28:27 -04:00
retro-wertz bdb164bd1c
Set mirroringEnable to false
Set mirroring to false when rom loaded is not found in database. Making this true all the time causes some issue, for one with soft-patching some games.

Fix this https://github.com/visualboyadvance-m/visualboyadvance-m/issues/182
2018-06-14 20:04:20 +08:00
Zach Bacon 0047fa1a69
Merge pull request #253 from retro-wertz/libretro
Libretro Updates
2018-06-14 06:08:12 -04:00
retro-wertz 17b681b864 ereader.cpp: Silence warning 2018-06-13 22:54:07 +08:00
retro-wertz 27fa30b43c Libretro: Disable cheats by default, update to bios loading
Minor rework on how bios is loaded when CPUInit is called, removes a few conditions.

Disable cheats by default. This is automatically re-enabled when enabling and applying cheats. Should save a few cycles during runtime if cheats are not needed.
2018-06-13 22:49:26 +08:00
retro-wertz 01c5f465fe Libretro: Cleanup controller layout binds 2018-06-13 22:39:25 +08:00
retro-wertz 319a4869c7 Libretro: Do not allow opposing directions 2018-06-13 21:19:59 +08:00
U-DESKTOP-UVBJEGH\Cloud 2c46522e59 Libretro: Add Solar Sensor 2018-06-11 16:46:17 +08:00
ZachBacon 037e3771b1
let's place these in the correct spot shall we? 2018-06-10 12:37:28 -04:00
ZachBacon 90d2f5c808 Added retro-wertz for his contributions in bringing in libretro back to speed and other things
Signed-off-by: ZachBacon <zachbacon@budgiemedia.rocks>
2018-06-09 12:04:42 -04:00
Zach Bacon 03bc7c247e
Merge pull request #249 from retro-wertz/updates
GB: Fix sound options not working
2018-06-09 10:08:14 -04:00