Commit Graph

2302 Commits

Author SHA1 Message Date
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
Rafael Kitover de0e8d6ba3 cmake: support libasan/-fsanitize
Add the ENABLE_ASAN cmake option, defaulting to `-fsanitize=address` if
ON, or the value specified for the option.
2019-01-02 08:23:26 -08:00
Rafael Kitover ff2d31bf5e faudio: minor change
This translated xaudio2 driver may not be feasible to get working, but
I'll try at some point.
2019-01-02 07:16:08 -08:00
Rafael Kitover 964f086bea fix audioapi opt enum, reorder xrc
The config option name enum needs to match the actual enum, since the
value is an integer. Unavailable APIs are not shown using #ifdefs in
guiinit.cpp.

Also reorder the radio button xrcs to be in the order of the enum.
2019-01-01 18:44:51 -08:00
Rafael Kitover 8cb3f5a78c fix sound api config on linux/mac
Missing "|" in option spec would create the "sdlopenal" option instead
of separate "sdl|openal" options.

Add missing "|" to option spec.
2018-12-31 03:49:31 -08:00
Rafael Kitover 55a60e3e73 only block key event propagation for game keys #88
One bug noted in the #88 discussion is that when a joystick button is
held down, keyboard shortcuts do not work.

Rewrite the logic for process_key_press() to only block further
wxWidgets event propagation if the actual key pressed is a game key, not
if any game keys are being held down.

This takes care of all the issues in #88.

TODO:

- investigate other joystick issues
2018-12-28 21:51:28 -08:00
Rafael Kitover f8b5627bd8 fix support for old SDL versions
Check for at least SDL 2.0.6 when using the
SDL_JoystickGetAxisInitialState() API introduced in e57beed8.
2018-12-28 05:22:17 -08:00
Rafael Kitover e57beed890 ignore depressed gamepad triggers #88
On joystick event notification, filter out axis values that are equal to
their initial state.

The reason for doing this is explained in 539027ca. Triggers on e.g. the
360 controller are an axis that are the max negative value in the
depressed state, and for some reason a constant stream of events are
generated for them, that's another issue that needs to be addressed.

For the time being, this fixes the other half of the main issue in #88:
users with an old config with the default special key bindings will now
be able to use keyboard hotkeys as these spurious joystick events will
be filtered out and will not block keyboard events.

TODO:

- stop generating events for depressed triggers in the first place

- fix joystick events completely blocking keyboard events
2018-12-28 04:36:41 -08:00
Rafael Kitover 979ef8ebbd cmake: fix building without FAudio
Only add FAudio to target_link_libraries() if it's enabld.
2018-12-26 10:56:27 -08:00
Rafael Kitover a91f066493 disable travis mingw jobs for now
The mxe package server is dead, disable mingw jobs because they fail
without it pending some workaround.
2018-12-26 10:38:12 -08:00
Rafael Kitover edf2c0c461 fix xaudio2 when openal is disabled
Move the new faudio driver constant AUD_FAUDIO to the end of the sound
driver enum, otherwise the wrong is used.

Also check for NO_OAL before instantiating an openal driver.
2018-12-26 07:35:42 -08:00
Rafael Kitover 3ed08e8d68 finish connecting new faudio driver
Add cmake code to find and link faudio if enabled.

Fix typo for get devices faudio method in wxvbam.h

Selecting the faudio driver now works, but the driver not does
unfortunately.
2018-12-26 06:53:52 -08:00
Rafael Kitover 296e8e1693 fix valid sound driver config values + faudio fix
Fix name of FAudio option XRC control: "FAudio" and not "Faudio".

Create list of valid sound driver options by using macros for the ones
that are compiled in (with windows being a special case.)
2018-12-26 06:09:29 -08:00
Rafael Kitover 1f4487b836 faudio: add gui code for selecting driver
Add code to swtich to faudio api when the option is selected in the
config dialog in guiinit.cpp.
2018-12-26 05:33:19 -08:00
Rafael Kitover 396227661e add some missing faudio initialization code
Add case for faudio in the code for getting audio devices in
guiinit.cpp.
2018-12-26 05:28:53 -08:00
Rafael Kitover 0c2906d026 fix SDL sound defaulting code
The #if logic was leftover from when OpenAL was the default.

Default to SDL sound always instead.
2018-12-26 05:24:21 -08:00
ZachBacon 580a11e39e Let's not force FAudio just yet 2018-12-26 06:37:53 -05:00
ZachBacon 969046ea83 Add faudio to the build script 2018-12-26 06:21:25 -05:00
ZachBacon d6f3fd23de Finish hooking up FAudio to the rest of the frontend 2018-12-25 20:58:31 -05:00
Rafael Kitover 539027ca16 remove problematic default joy binds #88
The default keyboard/joystick bindings for the "special" keys have
assumptions about axis numbers that do not hold with modern game pads.

For reference, the 360 controller has the following mappings:

Axis 0/1: left stick
Axis 3/4: right stick
Axis 2:   left trigger
Axis 5:   right trigger

This triggers another bug causing the depressed state of a trigger axis
to fire continuously. In this case, this is the left trigger on a 360
controller which is axis 2.

This triggers yet another bug where a stream of joystick events blocks
keyboard events from registering, resulting in hotkeys like ctrl+p to
pause not working.

Replace all joystick binds for special keys with null values.

With this change, a default installation of vbam will not trigger the
hotkeys not working bug when a joystick is plugged in.

The other bugs here mentioned also need to be fixed.
2018-12-25 17:42:46 -08:00
ZachBacon 5da48769ae fixed a typo and added faudio, but there's still persisting issues 2018-12-25 20:31:29 -05:00
Zach Bacon 514f355664
Merge pull request #337 from visualboyadvance-m/light-weight
Light weight
2018-12-25 20:00:09 -05:00