Commit Graph

194 Commits

Author SHA1 Message Date
Flyinghead 39d68ec7fa sdl: don't reset haptic gain to 0 on exit
Issue #1963
2025-06-01 10:52:29 +02:00
James 2631706fe2
Enable physical VMU memory access (#1881) 2025-03-22 15:59:42 +01:00
Mike Kosek 9cdd0aab9f
Rename DreamPort to DreamPicoPort (#1850)
* Renamed DreamPort to DreamPicoPort
* Removed fallback to deprecated config keys
2025-02-22 08:11:05 +01:00
James 4e74619d9e
Harden serial comm interface (#1847)
* Harden serial interface
* Fixed build errors
* Minor tweaks
* Automatically attached A->A, B->B, etc
* Interfaces go in decending order
* Do a modulo in case I decide to move interface numbers
* Do specifically mod 4
* Call SDL_JoystickGetDeviceInstanceID which seems to help with a Windows bug
* Made MapleDevices smart pointers so they can freely be swapped out without leaking
* Fixed issues some issues reported by kosekmi
* Added missing bracket
* Fixed another compile issue
* Fixed a missing else
* If device had no serial number, fall down to checking name
* Use new DreamPort firmware dynamics
* Added missing parens
* Fixed screen blanking issue
* Added const
* Reset VMU Screen on game/emulator exit
* Added gameTermination() hook to hardware gamepad
* Send SW port on game termination
* Added checks so port is only sent if data is valid
* Fixed bug: wait for write to complete in sendCmd
* Fixed bug leading to multiple pointers to VMU and Rumble pack
---------

Co-authored-by: Mike Kosek <mike@kosek.de>
2025-02-16 17:36:57 +01:00
James 77ed9c20de
Connect to DreamConn only once registered (#1828) 2025-02-03 18:19:22 +01:00
James a35e8214df
Serial comm update (#1820)
* Broke apart DreamConn and DreamcastControllerUsb implementations; added serial timeouts; process serial in thread; removed crc from DreamcastControllerUsb sdl definition

* Added missing include statements

* Changed INFO_LOG to NOTICE_LOG on a couple of lines

* Clear the read queue once string is pulled off of it
2025-01-28 17:27:26 +01:00
Mike Kosek 34104724a6 Added config file override for DreamcastControllerUsb Serial Device 2025-01-27 17:30:46 +01:00
Mike Kosek 26d386f833 Fixed handling of asio::io_context 2025-01-25 17:02:18 +01:00
Mike Kosek ce0060126e Now adding mappings for Dreamcast Controller USB during input_sdl_init() 2025-01-25 17:02:18 +01:00
Mike Kosek 4389a3ffa6 Reverted Dreamcast Controller USB mapping workaround 2025-01-25 17:02:18 +01:00
Flyinghead b3fa453d75 dreamconn: asio::serial_port isn't defined on all platforms 2025-01-25 17:02:18 +01:00
Mike Kosek 32c274f407 Updated serial device search on Windows to select only matching VID/PID 2025-01-25 17:02:18 +01:00
Mike Kosek cb2d3e3776 Maple Message to Dreamcast Controller USB now prefixed for compatibility with newest version 2025-01-25 17:02:18 +01:00
Mike Kosek 28f5dd983e Now properly setting and checking left/right Trigger 2025-01-25 17:02:18 +01:00
Mike Kosek 160828a4c7 Overrode default mapping for DreamcastControllerUsb on MacOS/Windows 2025-01-25 17:02:18 +01:00
Mike Kosek aee932808e Removed unused function getDreamcastControllerType() 2025-01-25 17:02:18 +01:00
Mike Kosek 77636391fc Enabled the usage of VMUs and Rumble Packs with Original DC Controllers 2025-01-25 17:02:18 +01:00
Flyinghead a3902fc278 sdl: disable rumble when rumble power is set to 0
Issue #1766
Issue #1783
2025-01-05 22:06:37 +01:00
Flyinghead ee1a7167f6 dreamconn: open pause menu when LT+RT+Start is pressed
Issue #1305
2024-12-28 15:39:11 +01:00
Flyinghead 10aaec1619 dreamconn: send data with socket to avoid fragmentation. Build fix
Issue #1305
2024-12-28 12:21:26 +01:00
Flyinghead 553f77c675 dreamconn: send buzzer messages. Rename controller. Use asio iostream
Issue #1305
2024-12-27 18:47:12 +01:00
Flyinghead b9fdd5070b dreamconn: detect dreamconn+ with VID/PID. Send maple data as text.
Create DreamConn gamepad when detected.
Send/receive maple data in ascii dump form.
Simplify maple device creation.

Issue #1305
2024-12-20 20:02:58 +01:00
Flyinghead 6c3d77b012 more windows build fix 2024-12-16 18:14:21 +01:00
Flyinghead dfd4dbebc4 fix windows build 2024-12-16 17:34:38 +01:00
Flyinghead 34a5e7f47d input: dreamconn+ support prototype
Issue #1305
2024-12-16 17:17:45 +01:00
Flyinghead a99aa5217b sdl: don't run null haptic effects. Stop effects instead
Tentative fix for Issue #1766
2024-12-07 18:57:40 +01:00
Flyinghead 2b83df86cd boxart: don't save database when pausing (android, uwp)
Avoids ANR on android. Unnecessary since database is now saved
regularly.
2024-07-20 10:07:18 +02:00
Flyinghead 719fd70860 sdl: always open haptic interface. use default rumble except for wheels
Always open joysticks haptic interface if available and create FFB
effects if supported.
Use default joystick rumble except for racing wheels (sine effect)
Revert 4e3d1caf3f
2024-06-23 16:06:50 +02:00
Flyinghead 4e3d1caf3f input: temporary logging for failed haptic effects 2024-06-04 13:27:26 +02:00
Flyinghead adeba60ba9 input: ffb support for arcade games. rumble support (f355, 18wheeler)
SDL force feedback for racing wheels.
Support for jvs ffb (f355, 18wheeler), atomiswave (maxspeed, ftspeed)
and midi ffb (initd, clubk, kingrt66, sgdrvsim).
Simple haptic rumble for f355 and 18wheeler.
2024-06-01 11:03:14 +02:00
Flyinghead 336706e728 move most os_* funcs to oslib
add os_DestroyWindow and os_UpdateInputState
2024-04-12 17:37:45 +02:00
Flyinghead 06a6e26588 get rid of os_GetSeconds()
replace it with std::chrono-based getTimeMs()
2024-04-11 15:25:25 +02:00
Flyinghead 9e916ca1c9 minor input and lua fixes
Make macOS keyboard class with haptic code
Call SDL_JoystickSetPlayerIndex using maple port
Add Network event for LUA
Set proper controller unique id on iOS
rumblePower wasn't copied over new mappings.
2024-04-10 17:24:47 +02:00
Flyinghead 588035d9eb set currently played game name in the window title
Issue #28
2024-03-01 12:00:24 +01:00
Flyinghead 713739bbc7 sdl: support multiple mice when allowed by the platform 2024-02-24 21:33:40 +01:00
Flyinghead 90b13a40ab gladLoader: check return code and log. cheats: light refactoring 2024-02-10 12:06:48 +01:00
Flyinghead 1153238e2c sdl: (linux) fix window position at startup/recreation
Window decorations dimensions aren't taken into account on linux when
creating a window. So reposition it after it's shown.
2024-01-29 17:08:10 +01:00
Flyinghead 471e0a7786 sdl: add timeout for barcode scanner to recover from incomplete reads
Reset barcode buffer after 0.5 s. Allows to recover from a failed read
or the user pressing '*'.
2024-01-29 11:25:55 +01:00
Flyinghead b2d96d77d7 naomi: support hid barcode scanner. sdl: detect keyboard layout
sdl: Support for HID barcode scanners such as unitech MS146.
Automatically detect keyboard layout at start up.
2024-01-27 16:01:57 +01:00
Flyinghead 19bb4a6e5d switch: implement rumble with native API 2024-01-20 19:23:09 +01:00
Flyinghead cfb7ff3054 switch: use latest devkitpro. touchscreen support. cleaner abort
Use latest devkitpro image.
Call diagAbortWithResult on fatal errors instead of freezing/infinite
loop.
Add Exit button on main content screen.
Touchscreen support.
2024-01-16 11:21:32 +01:00
scribam e057370e97 core: add missing pragma once to header files 2023-12-17 11:12:20 +01:00
scribam 105ab95efa deps: update imgui and implot 2023-11-25 17:08:01 +01:00
vkedwardli b92277ac58
macOS: Register file extensions for `openFile` (Drag ROM to App Icon), update `setupWorkingDirectory`, rename `SDLMain` to `SDLApplicationDelegate` to avoid confusion with the function `SDL_main()` (#1287)
Register file extensions for openFile, and supports the following actions
    Drag ROM to Application icon to launch the app
    Drag ROM to the running app's dock icon
    Drag ROM to the running app's window (applicable to all SDL platform by SDL_DROPFILE)
Update setupWorkingDirectory
    macOS default cwd is a nonsense "/" for non-terminal application
Rename SDLMain to SDLApplicationDelegate to avoid confusion with the function SDL_main()
some code cleanup
2023-11-07 16:29:08 +01:00
Bowen Cui c0de126b2b Add option to set deadzone for analog sticks 2023-10-30 05:21:36 -04:00
Flyinghead a915f185f8 Merge remote-tracking branch 'origin/master' into dev 2023-09-25 22:17:29 +02:00
vkedwardli f75a16f40c
Ignore Mouse Capture when Left Ctrl or Left ALT is mapped to a Dreamcast Key (#1203) 2023-09-24 16:02:18 +02:00
vkedwardli b564b0bf91
Increase L2+ / R2+ trigger sensitivity for digital buttons (#1190) 2023-09-14 09:08:58 +02:00
Flyinghead c637ae8281 Merge remote-tracking branch 'origin/master' into dev 2023-07-30 18:05:38 +02:00
Lucas Azevedo 9c61006941 Fix GUI SDL mouse buttons
Clicks were swapped in GUI as SDL uses 2 for middle and 3 for right and
the GUI expects the opposite (minus 1).
2023-07-18 11:00:58 +02:00