Commit Graph

2023 Commits

Author SHA1 Message Date
Rafael Kitover 6e76fcefef
cmake: fix finding 32 bit wxWidgets on gentoo
Generalize regex and glob against `wx/config` scripts in
`Toolchain-cross-m32.cmake` to work on gentoo, which can append the
`-gtk3` suffix.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-22 08:50:04 -08:00
Rafael Kitover 0674b41b6c cmake: remove <INCLUDES> from nasm definition
For some reason on Ubuntu 14 (trusty) cmake translates `<INCLUDES>` in
`CMAKE_ASM_NASM_COMPILE_OBJECT` as a literal `INCLUDES` which produces
an error, remove it because we are not using it anyway.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-22 15:11:01 +00:00
Rafael Kitover 7dda58097a cmake: do not use -fPIC on 32 bit x86, breaks asm
Do not add the -fPIC (position independent code) compiler flag on 32 bit
x86 architectures because that breaks inline assembly, and some included
libraries like fex require inline assembly to work.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-22 14:53:51 +00:00
Rafael Kitover 3c28a18976 installdeps: support -m32 builds on opensuse
Also allow specifying target as "-m32" instead of "m32".

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-21 22:33:14 +00:00
Rafael Kitover d7cf15e076
implement factory reset option #368
Add a "Factory Reset" item to the Options menu, which calls
`DeleteAll()` on the config object, which actually deletes the config
file. After this the application is relaunched asynchronously without
parameters and the current instance is closed.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-20 19:44:42 -08:00
Rafael Kitover 12fa61af82
cmake: refactor FindSSP.cmake
Use a function to not pollute variable scope.

Use modern style.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-16 13:04:43 -08:00
Rafael Kitover 5a77d8f4ba
cmake: don't use ccache on msys2+ninja
When using msys ccache with a mingw ninja, the compiler fails to
execute.

Don't try to detect ccache when using the Ninja generator on msys2, it
can still be specified through cmake variables.

Do not check for the mingw ccache because it is broken and I will assume
not being used.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-14 14:58:13 -08:00
Zach Bacon ed29b9c497
Merge pull request #364 from laqieer/master
bugfix: crash when loading elf
2019-02-05 08:11:25 -05:00
laqieer 7b350c09b9 bugfix: crash when loading elf 2019-02-05 20:44:17 +08:00
Rafael Kitover eb6dfb4bfa
fix libretro build broken in 16dd5d40 #339
Conditionally compile out the code for the feature implemented in
16dd5d40 (which is the throttle and frame skip configuration for the
speedup button) for libretro, and use the old behavior of skipping 9
frames.

Affects GBA.cpp and GB.cpp .

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-03 15:28:26 -08:00
Rafael Kitover 16dd5d4068
make speedup/turbo configurable + misc #339
Add Speedup / Turbo configuration panel which allows setting the
throttle or number of frames to skip for when the speed key is pressed
or turbo is enabled (which just presses the speed key.)

Throttle and frame-skip are mutually exclusive, throttle must be 0 (no
throttle) when number of frames to skip is non-zero. The dialog controls
handle this.

This is implemented in the core in GBA.cpp, GB.cpp and ConfigManager.

Two new options are added both in ConfigManager and in the wx options,
speedup_throttle and speedup_frame_skip, the defaults are:

```
speedup_throttle   = 0 (no throttle)
speedup_frame_skip = 9
```

this was the original behavior.

Add support for unsigned ints to wx/opts.cpp for these and for throttle,
this requires a new validator wxUIntValidator to use them in spin
controls.

Clean up appearance of the throttle spin control in the General dialog.

Maximum throttle and speedup_throttle is 600, values much over 500 will
not behave differently from 0 on modern hardware.

Maximum frame skip is 30 at the moment.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-02-02 18:43:55 -08:00
ZachBacon 5379708fcc I guess I'll try the gtk2 build of wxwidgets instead 2019-02-02 18:32:38 -05:00
ZachBacon d70dd37326 Let's use the proper wxwidgets package 2019-02-02 18:29:19 -05:00
ZachBacon ede6b371a4 Fix snap deps 2019-02-02 18:23:24 -05:00
ZachBacon 44208c82d7 Add basic snapcraft yaml for building a snap 2019-02-02 18:01:59 -05:00
retro-wertz ba678f4f2e GB: Make gbTimerOn an INT type instead of BOOL 2019-01-31 16:35:36 -08:00
retro-wertz 43647d3234 GB: Prevent gbSpritesTicks from going out-of-bounds 2019-01-31 16:35:36 -08:00
Rafael Kitover f8c6953151 fix drawing panel alignment in frame #325
Add wxEXPAND spacers to frame wxBoxSizer on the top and bottom around
the drawing panel so that panel is correctly centered if maximum zoom is
set.

Set proportion to 1 on the spacers and 0 on the panel so that both
centering with maximum zoom and full expansion work correctly.

Refactor frame OnSize event: pass a dummy userdata pointer to
distinguish resizing the frame from resizing the panel, and call
Layout() when the frame is resized.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-01-31 14:59:41 -08:00
Rafael Kitover c6fa7246de cmake: use color gcc/clang output when possible
Test for the -fdiagnostics-color=auto compiler option supported by gcc
and probably clang, and turn it on if it's available.

This option colorizes compiler warnings/errors/etc. when output to a
terminal.

Also fix a typo above when adding the -fopenmp flag.
2019-01-30 14:29:06 -08:00
retro-wertz e912c359f6 GBA: Remove some magic numbers for main pointers and save types size 2019-01-30 04:10:35 -08:00
retro-wertz 0697922179 Update libretro.cpp 2019-01-29 08:28:17 -08:00
retro-wertz 4700a2c1bf libretro: Enable mirroring for classic/famicom games for GBA and update 2019-01-29 08:28:17 -08:00
retro-wertz f2b3496298 GB: Add missing battery save for MMM01 cart 2019-01-29 08:28:17 -08:00
retro-wertz a0cec107a2 Update GBA save type detection and cleanup...
1. EEPROM: move eepromInUse and eepromSize from EepromReset() to eepromInit()
to avoid re-initializing during a reset (makes item below redundant)
2. Remove gbaSaveType variable - this is now redundant due to change above
which probably was added for this reason since games using eeprom fails with
gamepak error after a reset.
3. Add labels to identify cpuSaveTypes
4. libretro: remove workaround for eeprom reset issue (#1), do not apply
custom gbPalettes if not running in GB, change vram size to 0x18000 in
memory map
2019-01-29 08:28:17 -08:00
retro-wertz 2a796d48a0 libretro: Add GB color palettes 2019-01-26 06:45:35 -08:00
Rafael Kitover 4f9003112d persist chosen audio device in config file #353
Write `gopts.audio_dev` to the option `Sound/AudioDevice`.

Clear `gopts.audio_dev` when resetting the driver, because we cannot
assume anything about device enumeration order across sound drivers.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2019-01-24 03:14:23 -08:00
Rafael Kitover d94d6d5363 osx builder: add -stdlib=libc++ to CFLAGS/LDFLAGS
Although this is a C++ option, some dists like ninja use CFLAGS instead
of CXXFLAGS for C++ code, and this becomes even more problematic with
XCode 10 which removes libstdc++ entirely.
2019-01-22 18:50:33 -08:00
ZachBacon 3eb591cac5 Update wxwidgets to 3.1.2 2019-01-21 15:27:03 -05:00
retro-wertz 3b87576e41 GB: Fix rumble support (MBC5)
- Fix missing call to rumble function on MBC5
- fix rumble flag gets disabled causing rumble not to work at all.
2019-01-21 05:28:27 -08:00
retro-wertz 089d7a40e5 libretro: Add support for tilt, gyro sensors and rumble pak (WIP)
- Uses analog stick to simulate tilt and gyro hw. By default, tilt uses
the right analog stick while gyro uses the left. The analog stick can be
swapped using a core option provided and with separate sensitivity level
for both sensors. WIP and will be fine tuned later (Kirby was fun to
play at least)
- Minor retro_run() cleanup and some minor stuff i forgot.
2019-01-21 05:28:27 -08:00
Zach Bacon 6330555c3b
Merge pull request #350 from retro-wertz/libretro
libretro: Update input descriptors for 4-player SGB and cleanup...
2019-01-18 19:52:38 -05:00
retro-wertz a2b3dd76a1 libretro: Update input descriptors for 4-player SGB and cleanup...
- Updates descriptors for 4-player SGB
- Remove alternate gamepad layouts for GBA
- Prevent crash when SGB border option executes at startup when GB is not
initialized yet
- Update input turbo function for 4-player support
- Minor cleanups (texts, style nits, etc)...
2019-01-19 00:11:16 +08:00
Rafael Kitover 9d058abb41 libretro: don't include getopt.h in configmanager
Check for __LIBRETRO__ before including getopt.h in ConfigManager.h,
because windows does not come with this header or function, and libretro
does not need it.
2019-01-17 10:36:18 -08:00
retro-wertz d5642fa333
libretro: Android buildfix (#348) 2019-01-17 23:56:12 +08:00
retro-wertz 093818a1d7 GBA: Resolve shifting negative value issue in some thumb/arm opcodes 2019-01-17 05:54:31 -08:00
retro-wertz 59f76d05b8 libretro: Use gbWram[] for $C000 in CGB mode
This uses full size of gbWram[] so we have a continouos memory block
for RAM addresses $C000 and $D000 in CGB mode. This helps with
retroachievements.
2019-01-14 09:42:53 -08:00
retro-wertz f9efb79a7d libretro: Fix GB games that uses serial (WIP)
Allow serial emulation without having the need to run link-related
communication stuff (NO_LINK define). Some games need this e.g. RC Pro-AM
racing. Dummy funcs/vars are added as placeholders.

Currently work-in-progress and might need to disable some more NO_LINK
sections.
2019-01-14 08:20:18 -08:00
retro-wertz af3fe01822 libretro: Update GB's memory map, expose all usuable ram 2019-01-14 08:20:18 -08:00
retro-wertz 470d86f5c8 libretro: Cleanup 2019-01-13 04:29:02 -08:00
retro-wertz ad432a6f70 libretro: Silence warning 2019-01-13 04:29:02 -08:00
retro-wertz bff08eafb7 libretro: Update Makefile, fix ASAN 2019-01-13 04:29:02 -08:00
ZachBacon 8628db1359 Revert faudio inclusion, causing builder to fail because I didn't properly hook up the build instructions, will try and fix later 2019-01-10 16:34:58 -05:00
retro-wertz c2b31635dd GBA: Only use eepromReset/flashReset during reset event (CPUReset) 2019-01-10 19:29:48 +00:00
retro-wertz 0d73da01a1 GBA: Get rid of blip_time() 2019-01-10 19:29:48 +00:00
Rafael Kitover 83b3ebd7f0 fix audio api radio buttons
Only the first wxRadioButton in a group is supposed to have the wxRB_GROUP
style, I broke this in 964f086b.
2019-01-09 08:32:03 -08:00
Rafael Kitover 327611b7dd installdeps: add gcc-libgfortran to msys2 deps
Add gcc-libgfortran to list of deps, without it gcc-libs may fail to
update.
2019-01-05 13:04:12 -08:00
Rafael Kitover f6ad9a8ca7 remove bad hardcoded keybinds #298 #334
Remove esc to quit key bind #298.

Remove ctrl+x (cmd+x on mac) to quit key bind #334.

Remove FilterEvent app method, it is no longer being used anyway as key binds
work correctly.
2019-01-05 12:32:10 -08:00
Rafael Kitover 6462ce59b5 pull transifex updates 2019-01-02 17:25:10 -08:00
Rafael Kitover ab3d9236ee add vim undo files to .gitignore 2019-01-02 17:00:02 -08:00
ZachBacon a7773bc96f Bump FAudio to 19.01 2019-01-02 18:00:51 -05:00