Commit Graph

1463 Commits

Author SHA1 Message Date
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 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 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 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 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
ZachBacon 429b8ceba2 I'm pretty sure some of this is very hacky and needs correcting, but it compiles at least. 2018-12-25 19:57:49 -05:00
ZachBacon 53e16e0411 Need to hook up the effects chain parameters 2018-12-25 18:48:55 -05:00
ZachBacon 8939455bb9 Next on the list is adding a few more arguments for certain functions 2018-12-25 17:47:21 -05:00
ZachBacon a8c44364e5 Next on the list is correcting the incomplete types 2018-12-25 17:31:22 -05:00
ZachBacon 4b664c69f7 Still not quite ready for d3d, but this one header mingw has anyways. 2018-12-25 16:22:13 -05:00
ZachBacon 14815135bc we need to release with the proper function in faudio 2018-12-25 16:07:12 -05:00
ZachBacon 0bfbcfa332 Needed the FAudio Processor in FAudioCreate 2018-12-25 15:40:14 -05:00
ZachBacon af98f532b1 Inbound FAudio fixes 2018-12-25 15:29:11 -05:00
Rafael Kitover 5f38c0da8a cmake: static: check for link file when editing
When trying to do the necessary edits to linklibs.rsp or link.txt for
static linking, first check if the files were created by cmake,
otherwise a fatal error is generated.
2018-12-23 19:43:32 -08:00
ZachBacon ba563c71b3 Add FAudio to the xrc 2018-12-23 12:46:01 -05:00
retro-wertz 0c579b20a1 Revert to a default audio api (SDL) when config is invalid
Prevents crash when an invalid or a non existing api is used in
vbam.conf
2018-12-23 09:29:48 +08:00
ZachBacon 4361c45b16 Fixed a few things, still have lots to fix though before it's a usable state. 2018-12-18 10:46:45 -05:00
ZachBacon 99795b270d cmake hookup is done, there are some issues that I'll be trying to fix within faudio.cpp before it's ready for mainstream 2018-12-18 10:24:39 -05:00
ZachBacon eab039cd78 This should allow faudio to be supported in vba-m, next is to further modify cmake to find faudio 2018-12-18 08:59:11 -05:00
ZachBacon e00aca18df Initial work on switching to faudio, WIP 2018-12-17 23:20:29 -05:00
retro-wertz 85891fc7fd Reduce input delay by 1 frame and audio timing fix 2018-12-10 18:47:09 +08:00
Rafael Kitover 27a874e3ba
Merge branch 'master' into tasks/add-lldb-support 2018-12-05 14:23:20 -08:00
Scott Knight a52eddb5b4 Handle debugger disconnect and reconnect properly
When connecting the debugger the debugger variable was
being set to true before setting up the dbgMain and other related
function pointers. This caused the idle loop to attempt to call dbgMain
which was still NULL. This change makes sure that debugger isn't
set to true until all function pointers are set and that when disconnecting
the remotePort variable is reset back to 0 so we can reconnect properly.
2018-12-05 14:17:52 -08:00
Scott Knight 6ba3b7791d Set correct register number in gdb stop reply
https://github.com/bminor/binutils-gdb/blob/master/gdb/features/arm/arm-core.xml

According to the current arm register definition file in gdb the cpsr register is
actually register number 25 and not 16.
2018-12-05 14:17:01 -08:00
Scott Knight f385fb2faf Update gdb remote query support
The latest version of gdb from devkitpro expects slightly
different response to some of the remote queries. For instance
when sending back the current thread id there should be no
space or dash between 'm' and the thread id. Additionally a
handful of other common remote gdb query params were
added to better support current versions of gdb
2018-12-05 14:17:01 -08:00
retro-wertz ca56ccffeb libretro: Simplify cheats, add multiline support for GB/GBC 2018-12-01 07:24:54 +08:00
retro-wertz a2d5c260ec libretro: Add turbo buttons 2018-12-01 07:13:14 +08:00
Scott Knight 3484ecc419
Add support for LLDB qHostInfo packet
https://github.com/llvm-mirror/lldb/blob/master/docs/lldb-gdb-remote.txt

The qHostInfo command is listed as a high priority to implement for gdb
stubs that lldb can connect to. Adding support for this command allows
lldb to properly connect with it's `gdb-remote 55555` command and
correctly determine the target and allow debugging.
2018-11-28 08:50:50 -05:00
Scott Knight dd2a1d9b51
Fix stack overflow in remoteMemoryRead
When doing a remote memory read the debugger can ask for any size.
The buffer being allocated however was only 1024 bytes long and the
code in remoteMemoryRead also attempts to write a zero byte at the
end of the array. This code will now take the count of bytes the debugger
is trying to read and allocates a buffer that is count * 2 + 1 large. This is large
enough to hold the $02x formatted hex byte for each byte as well as the zero
byte written at the end.
2018-11-28 08:50:49 -05:00
Scott Knight 4f28e84632
Fix stack overflow in remotePutPacket
If the packet passed into remotePutPacket was 1024 bytes or
larger then the buffer array would not be large enough to hold
the $, checksum and zero byte written. This now allocates a buffer
of size count + 5 to accommodate these extra characters.
2018-11-28 08:50:48 -05:00
Zach Bacon 5e58e4c3e6 when it comes to cross compiling, Most unices like linux are case sensitive 2018-10-23 22:06:18 -04:00
Rafael Kitover 9cb9ce86bd fix Windows XP Compatibility #315
Use the IsWindowsVistaOrGreater() function from VersionHelpers.h, which
fortunately is part of mingw, to check for the availability of the
comctl32 LoadIconWithScaleDown API, which we use to fix issues with the
app icon, like the icon being too big in the volume mixer.
2018-10-23 06:19:34 -07:00
ZachBacon 58083d9d4a Gonna use universaldxsdk for xaudio 2018-09-16 15:20:06 -04:00