Commit Graph

1040 Commits

Author SHA1 Message Date
flyinghead 4c14a96888 vk, gl4: out of bound array index when sorting pixels 2021-12-12 18:42:50 +01:00
flyinghead 0478ec9696 dx11: per-pixel renderer 2021-12-11 18:53:35 +01:00
flyinghead 46044c068b cheats: don't rely on cheat count on load. Fix compile warnings 2021-12-11 18:33:28 +01:00
flyinghead b79c049bd4 dx11: wrong shader hash calculation 2021-12-09 09:26:36 +01:00
flyinghead 27041cbf59 dx11: better clipping algo. modvol cull mode. win: exception code
dx11: use faster clipping algorithm for modifier volumes
dx11: modifier volumes need cull mode. Fixes Daytona shadows.
win: the fault handler was treating some software exceptions as fatal (msvc)
uwp: remove async hacks and disable MS task wait exception. Fixes error reporting when loading a game.
2021-12-06 17:43:22 +01:00
flyinghead 7820c9bc44 dx9/11: fix rtt2vram crash. dx11: modvol fix and more
dx11: clip modvol triangles before sending them to the gpu
dx9,11: wrong source pointer for rtt to vram
dx11: handle source RowPitch when copy rtt to vram
dx11: crash at reinit
dx11: wrong scissor with direct fb rendering
dx11: blend ops are different for the alpha channel

Fix mingw CI build
2021-12-04 19:16:11 +01:00
flyinghead 191f1c38df dx11: scissoring fix. 4K UI scaling
Clearing of side columns in 4:3 uses the quad drawer so it needs to be
called early. Border color was wrong. Fixes GTA2.
Scale UI x2 in 4K mode.
2021-12-03 15:48:42 +01:00
flyinghead 99195c3f4c dx11: set clip planes on X and Y. rend: Force palette update at init
dx11: Set clip planes at X -1/1 and Y -1/1 to avoid rasterizer errors.
Fixes Daytona Mermaid lake depth issues
dx11: fix texture wrap around at UV 1 with nearest filtering
dx9: inside clipping
all renderers: force full palette update at init
2021-12-01 14:54:03 +01:00
flyinghead 280c159078 uwp: fix dirent. Implement access() and stat()
Use UWP version of FindFirstFileEx
Implement basic access() and stat()
Add home dir to list of drives
Allow external storage folders to be added and scanned for games
2021-12-01 14:40:17 +01:00
flyinghead 6a8f1b941e dx11: overlay support. inside clipping. 4K support on xbox. log fix
dx11: support for vmu and lightgun crosshair overlays
dx11: implement inside clipping (fixes 18 wheeler rear view mirror)
dx11: tentative 4K support on xbox
iOS,uwp: save log file in home (iOS)/data(uwp) directory
uwp: don't sign app on pull requests
2021-11-29 18:22:25 +01:00
flyinghead d071adea9a dx11: fix modifier volumes, rotation. sdl: on-screen keyboard support
dx11: Back face stencil ops need to be set
dx11: Rotate CCW instead of CW
dx11: Present with NO_WAIT when fast forwarding
sdl: support for on-screen keyboard. Delay keys up by one frame to allow quick key presses.
ui: better fix to wait for future on UWP
2021-11-28 16:19:03 +01:00
flyinghead 4ab3f01867 uwp: external storage support. enable picotcp 2021-11-27 14:30:36 +01:00
flyinghead f91847dad0 DX11 renderer WIP 2021-11-26 18:08:41 +01:00
BornPosthumous 417ffc09f8
Allows override of flycast.lua file (#411) 2021-11-21 15:16:11 +01:00
flyinghead 5b933cde61 uwp: use ccache for CI. gui_util.h typo 2021-11-20 18:24:21 +01:00
flyinghead bc34024e32 uwp: fix crash when opening menu/canceling load. CI job 2021-11-20 16:18:27 +01:00
flyinghead 8262c9ece7 UWP support - WIP 2021-11-19 23:18:45 +01:00
Flyinghead e56ecfec40 vk,dx9: black screen/crash in single-threaded on direct fb access
When rendering happens after the render timeout (initial sega copyright
screen and more), the frame is never swapped and never displayed. Causes
a crash in vk since the acquired swapchain image is never
presented/released.
2021-11-11 11:17:39 +01:00
Flyinghead 7583db3bef vk: option to duplicate frames to simulate swap interval > 1
Issue #293
2021-11-10 20:55:22 +01:00
Flyinghead ac5abd96bb ui: imgui driver, GraphicsContext interface, dx9 swap interval
Refactor imgui backend code into imgui drivers for gl, vk, dx9
Generic GraphicsContext interface for gl/vk/dx9 contexts
Simplify graphics api switching code
dx9, gl(sdl): set swap interval based on monitor refresh rate.
2021-11-10 20:35:30 +01:00
Flyinghead aa944ac5e8 vk: fix vmu transparency in lr core 2021-11-10 18:42:11 +01:00
Flyinghead a04fd06e38 gl: iOS doesn't like smooth. More precision needed for vertex colors 2021-11-09 10:38:41 +01:00
Flyinghead 99ee526ac5 gles3 doesn't support noperspective. vk needs higher prec for color/uv/z
noperspective not supported in gles 3. Use smooth instead
Vulkan now needs higher precision for colors, UV and z (adreno 630)
2021-11-08 16:53:47 +01:00
Flyinghead 06ef0e5fdc vk,gl: use w=1 in shaders. Fix translucent modvols
Use w=1 to avoid multiply/divide of xy as in dx9
Disable rendering when video output disabled
Use original w value in pixel struct to avoid precision loss (samsptk)
vk oit: missing memory barrier was producing Tr modvol glitches (JSR)
gl oit: Tr modvol needs full vertex shader
2021-11-07 18:21:44 +01:00
Flyinghead 7c53413bc5 vk oit: fix depth-only Tr pass
Cosmic smash
2021-11-05 18:36:09 +01:00
Flyinghead 986baccf83 lr build fix 2021-11-04 13:11:18 +01:00
Flyinghead 32d31e7644 vk: implement TranslucentPolygonDepthMask
Fixes Cosmic Smash
vma: instance is needed at init
Partial vk support for iOS
2021-11-04 09:13:47 +01:00
Flyinghead 17bbb7f145 vk: disable small tex optimization on macOS. Fix libMoltenVK embedding
small textures linear optimization leads to texture corruption with
moltenvk.
Copy libMoltenVk to correct runtime output dir.
2021-11-02 09:44:24 +01:00
Flyinghead da3ed74c4e vulkan: moltenvk support on macOS - WIP
sdl: save/restore window position in config
2021-11-01 13:05:22 +01:00
Flyinghead 46ae8f92cc input: per game input mapping 2021-11-01 12:39:50 +01:00
Flyinghead ab45b5ec8a ggpo: keyboard/mouse games support. Fix chat when keyboard disabled
ggpo: support for arcade games using keyboard (totd, luptype) and
mouse/rotary encoders (waiwai drive)
Chat and UI now usable when the keyboard is not set to a maple port.
2021-10-19 16:56:46 +02:00
Flyinghead db93a4c4a7 ggpo: in-game chat
use menu key to open/close chat window
disable keyboard/mouse controllers when using chat
disabled controllers can now use emu keys (menu, escape, ff)
2021-10-18 16:40:17 +02:00
Flyinghead cf653640b3 ggpo: verify md5 of bios, game and savestate
Verify md5 of flash, eeprom, vmus if no savestate used
Use chd header SHA1 as digest
Load .state.net state file at start

Force real BIOS for some games
2021-10-16 17:56:21 +02:00
Flyinghead 1c6e722961 android: add app external & internal files dir. Race condition at start
Fix crash at startup due to race condition with game scanner
Don't allow selection of non-writable folder during onboarding
Add private internal and external Files folders to list of storage
locations to choose from
Assign first external android gamepad to port A instead of B

ui: Fix layout of controller mapping dialog when port=All
2021-10-14 11:39:27 +02:00
Flyinghead f9d5b8eb74 ui: limit max scaling on small low-res screens (<= 640x480) 2021-10-12 17:34:42 +02:00
Flyinghead bcc3337c58 cheats: support for bit-level RA codes
log start of address space, RAM, VRAM, audio RAM at boot
fix add cheat dialog layout
don't crash on wrong gdrom unlock code
2021-10-12 17:28:01 +02:00
Flyinghead 163888f329 GameShark cheat codes support 2021-10-10 17:24:17 +02:00
Flyinghead 19bd6d0bca test automation clean up
less #ifdef
force mute audio
don't force vsync
2021-10-10 16:26:36 +02:00
Flyinghead 1072235b1a lua: ui bindings 2021-10-04 19:42:45 +02:00
flyinghead 82bec1e324 lua: build fix for linux and win. dx9: crash on exit 2021-10-03 20:22:52 +02:00
Flyinghead 5bcfa35737 Better background game loader
Pass LoadProgress object to report load progress and cancel
Better UI
Cancel with exception
Fix issues when stopping/exiting in !threaded
dx9: call gui_term on shutdown
2021-10-02 11:30:40 +02:00
Flyinghead c1bcf91dd6 pvr: render timeout when using ggpo or !threaded
will cause ggpo desyncs with previous versions
2021-10-01 16:48:01 +02:00
Flyinghead a6248905a0 ggpo: report UDP bind error. Better error reporting for net init
fix ggpo lib warnings
2021-09-30 17:24:51 +02:00
Flyinghead 699dcdaf5b Merge remote-tracking branch 'origin/master' into net-rollback
# Conflicts:
#	core/hw/maple/maple_if.cpp
#	core/rend/mainui.cpp
#	shell/libretro/libretro.cpp
2021-09-30 15:03:29 +02:00
Flyinghead 2803ee8274 imgread.ImagePath clean up. ggpo: poll input late if !thread 2021-09-30 14:24:17 +02:00
Flyinghead 0d2e6f5e98 remove safe mode/div matching option
mismatched delete/free() in TexCache.cpp
2021-09-29 11:57:51 +02:00
Flyinghead 99bf7f77c4 single-threaded mode. refactoring.
single-threaded mode similar to libretro core
stateful Emulator object
disable memory watcher when !gppo
ggpo: poll input as late as possible in !threaded
2021-09-29 10:22:58 +02:00
Flyinghead 7fe2ab720f refactor screen_width/height 2021-09-27 20:29:23 +02:00
Flyinghead 18cecc8d38 gl,vk: use VO_BORDER_COL for clear color 2021-09-27 13:39:08 +02:00
Flyinghead 1dc01314a1 input: don't poll input on emu thread
fixes device reset errors with dx9 on Alt+Enter and other renderer
crashes
2021-09-27 11:51:39 +02:00
Flyinghead fb40bb22df vk: CommandPool size must be 2. Fix lightgun xhair validation error 2021-09-27 11:19:50 +02:00
Flyinghead 41ac140076 ggpo: lightgun support for arcade games
ui: display button names in arcade mode only
2021-09-26 21:28:31 +02:00
Flyinghead 1725dbfa98 input: fix arcade mode for on-screen gamepads.
Use same layout as gamepad arcade for on-screen gamepads (ABXYRL)
map RT and LT to buttons 5 and 6 in arcade
android: Fix non-working fast-forward button
Use maple port in lastAxisValue state
naomi: use default alienfnt buttons: 1-4
2021-09-21 15:56:01 +02:00
Flyinghead 65956dbc8d input: merge buttons and axes
Default mappings for arcade and console
Default mappings for arcade stick/hitbox
Proper handling of inverted axes
ggpo: automatic analog setting for arcade games
2021-09-19 18:27:21 +02:00
Flyinghead d75072362a vk oit: work around adreno 600 driver regression
Android 11 adreno 600 driver v502: PixelBuffer.pixels.length() is
returning 0 in some cases.

Issue #361
2021-09-18 18:08:52 +02:00
Flyinghead 7fd954e10d rend: apply vscalefactor to scissor in 240p/480p
fixes SF3 3rd strike half-screen in 240p mode
2021-09-16 19:27:59 +02:00
Flyinghead 05d495b282 dx9: Fix RenderLastFrame
Fixes black blackground when opening the menu during a game
2021-09-15 17:24:55 +02:00
Cameron Bates 501c6f260a Remove mouse invert option and invert gcmouse by default 2021-09-14 23:43:16 +02:00
Cameron Bates e1fa2b9831 [iOS] GCMouse support (#353) 2021-09-14 11:51:44 +02:00
Flyinghead 480e85f615 ggpo: UI for analog axes settings. Display stats option 2021-09-12 17:42:58 +02:00
Flyinghead e8b73e22b7 Merge remote-tracking branch 'origin/libretro' into net-rollback 2021-09-11 18:11:36 +02:00
Flyinghead ad2e142b01 ui: Show mouse cursor when emu throws an exception. lr: fix vulkan init 2021-09-10 15:32:13 +02:00
Flyinghead 88fa5d5c41 arm64 dsp: don't JitWriteProtect twice. ios: Hide VSync. pvr: fix mutex 2021-09-10 15:26:18 +02:00
Flyinghead e45ec4324f Merge remote-tracking branch 'origin/master' into libretro 2021-09-10 12:19:29 +02:00
Flyinghead 3ced57a263 network: use interface for startup. avoid deadlock on exit
Use common interface for naomi and ggpo
Simpler ggpo interface
Fix deadlocks on exit with ggpo
2021-09-09 18:17:05 +02:00
Flyinghead 458868a634 ggpo: always save delta ram. Disable ff,cheats,savestates when online
ggpo: always save delta ram on save_game_state as frames may be rerun
and resaved
Global network online status (ggpo, naomi, modem, bba)
Disable fast forward, cheats and savestates when online.
2021-09-08 17:18:01 +02:00
Flyinghead 8594d11693 maple: refactor usage of rt/lt. zero out joystick values if ggpo active
Fix mouse cursor being invisible when emu throws an exception
2021-09-07 16:30:56 +02:00
Flyinghead a4c14ebef7 Merge remote-tracking branch 'origin/libretro' into net-rollback 2021-09-07 15:02:39 +02:00
Flyinghead 599874c9c1 dx9: VSync option support 2021-09-07 14:16:05 +02:00
Flyinghead a3d50fc197 Merge remote-tracking branch 'origin/libretro' into net-rollback 2021-09-05 20:07:37 +02:00
Flyinghead 35e77976a6 ui: use input from all keyboards
Issue #339
2021-09-05 10:29:12 +02:00
Enrique Santos e3aca85efd
ggpo: add frame delay to settings (#343) 2021-09-04 18:47:21 +02:00
Flyinghead e02ccbf32a gl: update fog and texture palette in Process() 2021-09-03 11:12:47 +02:00
Flyinghead b362a55c04 ggpo: rollback glitches. win32 init. switch build. stats
Block net rollbacks until the current frame has been processed to avoid
glitched textures.
Call WSAStartup at init on windows
Display net stats when in game
Switch build fix
2021-09-03 11:11:46 +02:00
Flyinghead 69d0801121 net rollback with ggpo 2021-09-02 17:51:23 +02:00
vkedwardli a51f310e96
Add volume slider in audio settings (#329)
Use logarithmic volume scale
2021-08-26 13:30:23 +02:00
Flyinghead 2a849ccba5 ui: hide dirs on iOS. Fix home on android. force even width rendering
Hide content and home dirs on iOS
Show home dir and allow change on android
Force even width for rendering resolution
2021-08-26 10:08:50 +02:00
vkedwardli 7a33ae35e0
[macOS] Fix DelayFrameSwapping and optimise Vsync logic (#307)
* Support macOS 10.15 and 11
* Enable VSync option on macOS. Use "swapOnVSync" logic from other wsi
* Limit `mainui_rend_frame()` to 5 iterations max: 4 renders and the final swap
2021-08-24 11:43:19 +02:00
Flyinghead 2f03922b43 build fix 2021-08-23 14:25:27 +02:00
Flyinghead 5db2856270 missing changes from previous commit 2021-08-23 14:16:52 +02:00
Flyinghead e3e3229612 iOS: multiple controller/rumble support. GL: fix black screen after RTT
iOS:
* multiple controllers support. Rumble support.
* fix audio recording
* declare CHD/GDI/CUE/CDI content types
* start game when opening file URL
* Use safe area for UI and virtual gamepad
* Better icons
2021-08-23 14:02:12 +02:00
Flyinghead 1bea7853ef iOS: CI job, JIT status, touch fixes 2021-08-10 17:04:36 +02:00
Flyinghead 12f302d356 iOS: uv need high precision in fragment shader. cmake build. virtual joystick. AltKit integration 2021-08-10 11:32:22 +02:00
Flyinghead 77e7c25e9c iOS support. Work in progress 2021-08-06 10:30:30 +02:00
Flyinghead 37eace9db4 osx: lockup when emulator aborts. Race condition when starting emu 2021-08-05 17:43:26 +02:00
Flyinghead 951e70328f Use exception when load content fails. ui: graceful stop on fatal error
libretro: catch/detect fatal errors and shutdown
2021-08-03 10:05:09 +02:00
Flyinghead 2dd7717128 glGetString(GL_EXTENSIONS) may return null in core contexts
xcode project missing update
2021-08-03 09:49:20 +02:00
Flyinghead 7561ce753a unwind info for arm64. use static c++ lib for android
include oboe static libs
get rid of old regalloc
2021-07-29 17:46:46 +02:00
Flyinghead de060d66ab don't save flash if no game started. libretro: fix notifications
compilation warnings, non-functional changes
2021-07-20 19:21:11 +02:00
Flyinghead 4a77f847b4 libretro: fix arcade flash files path. ui: stop spamming dc_stop 2021-07-20 10:06:44 +02:00
Flyinghead 117f47e3a2 rend: shader builder utility 2021-07-19 12:49:47 +02:00
Flyinghead af76a09e03 gl: repeat % operator for printf. remove Switch special case 2021-07-18 18:15:35 +02:00
Flyinghead 9e5769912b gl: workaround nouveau bug (oit). Use float palette coords for switch
Don't switch render type before terminating current one.
2021-07-17 15:53:47 +02:00
Flyinghead e112f2d8af gl: GLES2 build compatibility 2021-07-15 19:24:56 +02:00
Flyinghead ed0caa119a Merge remote-tracking branch 'origin/master' into libretro
# Conflicts:
#	CMakeLists.txt
2021-07-15 18:43:29 +02:00
Flyinghead f768146d8e switch: unneeded init functions. needed exit one 2021-07-15 16:50:54 +02:00
Flyinghead 412083d9ea libretro: blank vmus at unload/reset 2021-07-15 15:43:10 +02:00
Flyinghead 07cdb42ff7 switch: set UI scaling factor depending on docking mode 2021-07-15 14:44:39 +02:00
Flyinghead 0d7a2128b6 libretro: fix 32-bit arm build. delete useless #def in pvr2 filter 2021-07-15 12:06:04 +02:00
Flyinghead 8e6dc54b16 switch: add .. entry to folder chooser. start at / 2021-07-14 20:55:22 +02:00
Flyinghead a2efde1103 libretro: more switch fixes
combine all static libraries into one
save/restore gl state in !threaded mode
patch libchdr
build fixes
2021-07-13 18:51:40 +02:00
Flyinghead 63a3f02368 libretro: better switch support 2021-07-12 20:14:21 +02:00
Flyinghead 994e6826b4 libretro: option changes (resolution, widescreen, rotation)
Use RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO or
RETRO_ENVIRONMENT_SET_GEOMETRY to report resolution/aspect ratio
changes.
Handle rotation without restarting.
2021-07-12 09:57:58 +02:00
Flyinghead 97991fd8fc gl: delete libretro vmu and crosshair textures when terminating 2021-07-11 20:43:04 +02:00
Flyinghead 345dab9633 libretro: fix nvidia palette issue. request 3.2 to get a core gl ctx 2021-07-09 13:10:30 +02:00
Flyinghead 5c952021b7 libretro: vmu and crosshair display. lightgun fixes 2021-07-08 20:09:09 +02:00
Flyinghead b66e6560ca libretro: vulkan support 2021-07-08 12:47:00 +02:00
Flyinghead 042f2e0224 custom textures: saturate colors when dumping RGBA4444 and RGBA5551 2021-07-07 17:19:13 +02:00
Flyinghead 205f2690d6 gl4: delete fog & palette textures when terminating
fixes fullscreen toggle screen corruption
2021-07-07 10:54:10 +02:00
scribam aeea301ee3 Minor include header changes 2021-07-07 10:37:11 +02:00
flyinghead ef506d49aa libretro: pvr2 postprocessing filter 2021-07-06 21:37:47 +02:00
flyinghead c205a888a9 options: anisotropic filtering, oit pixel buffer size, fast gdrom load 2021-07-06 16:19:12 +02:00
flyinghead a3b66aec1f libretro: win32 support. build fix. 2021-07-06 13:22:54 +02:00
Flyinghead 7dbd79750c WIP libretro core update 2021-07-05 19:44:08 +02:00
flyinghead c5ce475359 Merge remote-tracking branch 'origin/master' into fh/directx
# Conflicts:
#	core/input/gamepad_device.cpp
2021-07-04 17:53:49 +02:00
Enrique Santos 46e3258629
Controller Mapping: System Profiles & Unmap Button (#269)
* add unmap button
* separate controller profiles for dc & arcade games
* loads current system mapping on menu exit
* simplify, use default filename for dc controls
* create blank mapping file for sdl controllers if not found
2021-06-27 12:49:47 +02:00
Flyinghead b3ad0a62c1 gl: fix multiple rendering with GLES 2
fixes split-screen multiplayer for SW1 Racer, Q3, Re-volt
2021-06-19 10:48:32 +02:00
Flyinghead 7f49accc22 Merge remote-tracking branch 'origin/master' into fh/directx 2021-06-07 20:53:31 +02:00
Flyinghead b8c2a695b8 ui: allow drag scrolling anywhere. change some ui elements
allow scrolling by dragging (almost) anywhere
move physical devices before dreamcast ones
hide insets when displaying full screen window
reduce scroll bar size on android
fix controller mapping column sizes
2021-06-07 12:18:05 +02:00
scribam d6545b253b Misc cleanup 2021-06-06 11:15:06 +02:00
Flyinghead 293761bdf5 gui: separate auto-load and auto-save options. Fix tool tips on android 2021-06-04 11:11:23 +02:00
Flyinghead 58974c9305 savestate slots 2021-06-03 13:50:40 +02:00
keita yoshimoto cddb6609f1
Multiple save states (#248) 2021-06-03 13:22:40 +02:00
Flyinghead c3bc5cfc3b vk oit: use a 2nd depth attachment for subpass 1
subpass 1 needs writable depth buffer (see
9f60c5e854)
2021-05-30 18:20:04 +02:00
scribam 57ae9022dd Update Windows resource and version.h.in files 2021-05-28 14:56:04 +02:00
flyinghead 7ed68952ba Merge remote-tracking branch 'origin/master' into fh/directx
# Conflicts:
#	core/deps/patches/SDL.patch
#	core/hw/maple/maple_devs.cpp
#	core/rend/gl4/gles.cpp
#	core/rend/gles/gles.cpp
#	core/rend/gui.cpp
#	core/rend/gui.h
#	shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj
2021-05-26 22:38:48 +02:00
flyinghead 4696733eb4 dx9: linear filtering for fog texture. swap only when frame rendered 2021-05-26 21:40:43 +02:00
Flyinghead 86d014c3e4 gl: crash when rtt copy to vram due to wrong pbo size
fixes Baldr Force crash
2021-05-26 09:53:29 +02:00
Flyinghead 9f60c5e854 rend: PT alpha must be set before shading
Fixes Langrisser Millennium intro fmv and title/main screen. Issue #249
vk oit: use depth buffer like gl oit
2021-05-25 14:15:37 +02:00
vkedwardli 2b62f8c607
Fix macOS cmake & Xcode project (#255)
* Update zlib reference for Xcode project

* Add CoreHaptics.framework for Xcode project

* Capitalize app bundle

* Use local FindSDL2.cmake script for macOS

* Use `macOS` instead of the old `OSX`
2021-05-25 10:11:58 +02:00
Flyinghead 4cced8ffa0 android: add content path ui too wide when inset present 2021-05-20 10:45:12 +02:00
Flyinghead 373dffc65a wince: ditch vmem32. use address LUT in dynarec. finer grained flush 2021-05-17 11:59:34 +02:00
Flyinghead 5769d7e64f vk: typo in previous commit height -> width 2021-05-11 16:47:54 +02:00
Flyinghead 408c65fcbf gl4: pack/unpack pixel colors. pack poly params. share GLSL with vk 2021-05-11 10:38:17 +02:00
Flyinghead fb38b224f4 rend: get rid of RenderToTextureUpscale option. Use RenderResolution 2021-05-10 20:07:23 +02:00
Flyinghead a4019dd205 new VSync option 2021-05-10 18:02:06 +02:00
Flyinghead affc9f262c gl: update palette on context [re]init
backport from fh/directx
fixes black textures in SoulCalibur when switching back to app (android)
2021-05-03 09:57:45 +02:00
Flyinghead d20fc971c9 android: display cutouts support. render last frame when editing vjoy
render in display cutouts
gl/vk: render last frame when editing virtual gamepad
gl: Fix background handling
gui: reset vmus when stopping game
2021-05-02 11:31:44 +02:00
Flyinghead 5dd15e2942 android: oboe driver error handling. Set buffer size to burst size
oboe: handle lost of audio and recording streams and attempt reopen.
When using aaudio, set the oboe buffer size to the burst size.
gui: really ignore AutomaticLatency for oboe driver

Issue #182
2021-05-01 12:19:04 +02:00
Flyinghead 6dfa9f7786 android: oboe audio driver. get rid of build variants
Issue #182
2021-04-30 19:57:11 +02:00
Flyinghead acd8620139 android: add zh_HK locale 2021-04-30 18:26:35 +02:00
Flyinghead 150cfa29e7 Merge remote-tracking branch 'origin/master' into fh/directx 2021-04-29 19:06:38 +02:00
flyinghead b90cdf9588 RawInput driver. Multiple keyboards support
Merge Keyboard and KbGamepad
Always use system mouse for UI
Issue #138

Fix DX9 when not using SDL
2021-04-29 18:58:04 +02:00
flyinghead 6316479930 get rid of unneeded pixel unpacker and use better name 2021-04-29 18:38:58 +02:00
Flyinghead 92ccd6eb26 android: load Asian glyphs depending on locale
Issue #225
2021-04-22 11:12:51 +02:00
Flyinghead 805dac3039 Resize renderer after [re]init
Fixes crash on Android when app is brought back to the foreground
Issue #228
2021-04-22 10:59:40 +02:00
Edward Li 2bd77ba9c4 missing a space 2021-04-22 02:21:04 +08:00
Edward Li ba955f6659 Re-enable the content path warning dialog 2021-04-22 02:17:18 +08:00
Edward Li 01898d5f41 Fix scanner cannot be stopped 2021-04-22 02:16:18 +08:00
Flyinghead 3dd3595a79 disable emulator Exit on android
Issue #222
2021-04-20 16:32:49 +02:00
Flyinghead c0b5721920 Super widescreen option
Issue #209
2021-04-20 16:06:03 +02:00
Flyinghead 44fd67ffd2 In command line mode, exit the emulator when pressing Exit
Issue #222
2021-04-20 15:57:30 +02:00
Flyinghead 3474901e58 wsi: swap immediately when fast forwarding 2021-04-20 10:56:49 +02:00
Flyinghead d55a26c242 flatpak: better screenshots. Indicate where to put BIOS files. 2021-04-19 19:12:00 +02:00
flyinghead 8909368033 dsound: dedicated audio thread. configurable latency
Use dedicated thread to fill the audio buffer, fill with silence when
underrun, wait for notification events instead of busy loop.
Configurable ring buffer size / latency.
2021-04-19 11:13:27 +02:00
flyinghead f9603dc11a vk: use texture pointers instead of u64 2021-04-17 19:04:00 +02:00
flyinghead 5359e9a09d allow gpu-handled palette textures to be replaced by custom version
Issue #219
Fix incorrect texture size calculation for VQ textures.
Reorder BaseTextureCacheData fields to have hottest on top
2021-04-17 18:40:58 +02:00
flyinghead 28d2c6db73 dx9: rotate 90deg 2021-04-16 21:58:37 +02:00
flyinghead abc8b18b78 dx9: mipmaps. load/dump textures. vmu/crosshair display.
upload all texture mipmaps to gpu
dump textures. load custom textures
vmu and lightgun xhair display
fix dx9 half-pixel offset
fix 565_32 unpacker bug
2021-04-16 18:30:47 +02:00
flyinghead c889bfa6d4 dx9: copy to vram. clipping. fix depth/stencil size. better reset
Coordinate device reset with dxcontext. Keep compiled shaders.
Don't use automatic depth/stencil on backbuffer. Manually handle it.
Implement scissoring/clipping
multipass translucent depth
Render-to-texture copy to vram
2021-04-15 15:17:32 +02:00
flyinghead b549c56b23 build fix. default Delay Frame Swapping to true 2021-04-13 11:20:11 +02:00
flyinghead f107d380b9 WIP directx9 renderer 2021-04-12 22:49:04 +02:00
Flyinghead 4a8ce39bfd vk: use a single command buffer for all texture updates 2021-04-08 10:38:26 +02:00
Flyinghead 24d172bd51 gl: use async PBO to copy texture back to vram 2021-04-08 10:33:14 +02:00
Flyinghead 72968290bf cheats: support for .CHT cheat files
Issue #167
gui: no need to save background in opengl, use RenderLastFrame instead
disable cheats when online
2021-04-06 11:41:41 +02:00
Flyinghead 904bed862e arm32: store queue dynarec optim. ditch Unstable Optimizations
shrink Sh4Context.pad size except on arm32
reset sh4 before mem to unlock ram
2021-03-29 14:26:55 +02:00
Flyinghead 9e9aa5b4d9 gl: proper vao use. define palette uniforms only when needed 2021-03-28 20:08:02 +02:00
Flyinghead dc0c5baece move vram to pvr 2021-03-28 20:08:02 +02:00
Flyinghead 569c23ca95 pvr: use pvr_read32p/pvr_write32p to access 32b vram 2021-03-28 20:08:02 +02:00
scribam 767a1b6a8d gui: fix wrong index CrosshairColor 2021-03-28 11:38:43 +02:00
scribam d0c2c269b0 glcache: call glDeleteTextures if texture cache size > 0 during reset 2021-03-27 19:56:11 +01:00
Flyinghead 1e6874c5eb SDL2/SDL.h -> SDL.h 2021-03-21 20:07:53 +01:00
Flyinghead d8a25e73f2 cmake fixes. makefile clean up. load gles3 driver with sdl
add FindSDL2.cmake and don't provide wrong hint
cmake: option to disable vulkan
don't use/link with egl if using sdl
remove ARM_HARDFP and use standard __ARM_PCS_VFP #def
hide texture upscaling options if no openmp
2021-03-21 18:03:22 +01:00
Flyinghead 06be0d927b screen stretching always in final horiz direction. lightgun coords fix
gl: strech direct fb texture based on stretching and rotation
Fix lighgun coords when stretching and/or rotating
Dimension render size based on stretching and rotation
vk: lightgun crosshair disappears near 0-edge -> scissoring x and y must
be >= 0
always stretch horizontally even when rotating
2021-03-21 18:03:22 +01:00
Flyinghead 685dcd1c8a Variable length arrays not supported by msvc. Fix MacOS project 2021-03-21 18:03:22 +01:00
Flyinghead 1abfa19636 set rendering resolution in discrete steps instead of scaling 2021-03-21 18:03:22 +01:00
Flyinghead 58c936fa6c android: expose sound latency setting. default to auto
Issue #182
remove video Clipping option
remove audio LimitFPS option
2021-03-16 10:15:23 +01:00
scribam 8542675488 clang-tidy: run bugprone-incorrect-roundings 2021-03-15 19:52:54 +01:00
scribam 092ee6d8a5 clang-tidy: run readability-container-size-empty 2021-03-15 19:52:54 +01:00
scribam 913fbef952 clang-tidy: run readability-inconsistent-declaration-parameter-name and improve parameter names 2021-03-15 19:52:54 +01:00
scribam 26ebcdf9f5 clang-tidy: run modernize-use-equals-default 2021-03-14 21:52:42 +01:00
scribam fe17d79e8d clang-tidy: run performance-unnecessary-value-param 2021-03-13 17:28:33 +01:00
scribam af0c267d96 clang-tidy: run modernize-use-emplace 2021-03-13 17:28:32 +01:00
scribam d1239dea89 clang-tidy: run modernize-redundant-void-arg 2021-03-13 17:28:32 +01:00
scribam 28d7227ba5 clang-tidy: run modernize-use-bool-literals 2021-03-13 17:28:32 +01:00
scribam d715836c40 clang-tidy: run modernize-use-override 2021-03-13 17:28:32 +01:00
scribam 1cc3490f51 Remove HOST_OS references 2021-03-13 11:38:34 +01:00
flyinghead 99e37500e9 vk: renderer wasn't always resized when window is
Issue #199
2021-03-08 21:04:51 +01:00
flyinghead 0e20d5976b vram texture locks race condition 2021-03-05 18:22:42 +01:00
flyinghead ee9e64a253 gui: prevent crash when starting a game while game scanner is running 2021-03-05 18:20:55 +01:00
Flyinghead ca107953fe Vulkan renderer setting was reset to off when starting a game 2021-03-03 09:40:52 +01:00
flyinghead 8259b8ba02 x86 msvc build fix. Build 32bit SDL. Force renderer type at startup 2021-03-01 12:49:41 +01:00
flyinghead 72a61786f4 win32: crash when opening texture pack
Issue #187
2021-03-01 12:44:38 +01:00
Flyinghead c3a95594f9 New option system
Fix per-game settings (Issue #115)
Automatic load/save state (Issue #173)
Reload Naomi/AW BIOS after per-game settings are loaded to allow
per-game BIOS region. (Issue #96)
Restrict Soul Reaver widescreen cheat to the EU version (Issue #188)
Disable UI elements for overridden settings
Clean up/simplify legacy Naomi ROM loading
2021-03-01 10:13:40 +01:00
Flyinghead 859a8dc8fb vulkan: wrong viewport with widescreen and SSAA x2
Issue #172
2021-02-21 08:33:31 +01:00
Edward Li 25e66d6972 Keeping the original scaling calculation for other OSes 2021-02-18 07:24:05 +08:00
Edward Li 50ece2a831 Handling scaling properly on macOS 2021-02-18 06:03:14 +08:00
Edward Li 78aaf39792 Edit comment 2021-02-01 22:56:12 +08:00
Edward Li 4bbf4e3b65 Precompose characters for game scanner also 2021-02-01 20:01:56 +08:00
Edward Li eda6603808 Use `preferredLanguages` to detect system language 2021-02-01 19:57:28 +08:00
Edward Li 94caf86d4d Precompose unicode characters before displaying since HFS+ and APFS is using decomposed form 2021-02-01 19:42:18 +08:00
Edward Li 98c4343410 Font loading for macOS 2021-02-01 19:40:12 +08:00
Edward Li 7d73920ac2 Using the official common character list from the governments 2021-02-01 19:38:29 +08:00
Flyinghead 1a8b25cc34 vk: bump sampler pool size. use swap chain size 3. no mailbox on AMD
Increase descriptor set pool size for combined image sampler to
accomodate for games using a stupidly large number of textures.
Don't use mailbox mode on AMD as it needs 5(!) swap chain images on
linux.
Return to a swap chain size of 3 since it's the min for AMD.
2021-02-01 12:04:55 +01:00
Flyinghead a71c897d56 vk oit: crash when rendering to texture 2021-01-31 17:30:34 +01:00
flyinghead 6105365065 win32: load Asian glyphs from system fonts based on current code page 2021-01-31 16:08:10 +01:00
flyinghead 0fe0c6c653 gl: crosshair not displaying without fps cpunter or vmu 2021-01-28 18:57:04 +01:00
flyinghead 562660134e vulkan: fix resize crash with overlay 2021-01-26 18:12:37 +01:00
flyinghead 7697d37ec6 lightgun crosshair support 2021-01-23 15:59:57 +01:00
flyinghead d217f5232a win32 and macOS fixes 2021-01-21 22:44:51 +01:00
flyinghead ed7bd06f96 win32: multiple mice support. Patch and build SDL 2021-01-21 21:00:46 +01:00
flyinghead 119948cfdb more event use cases 2021-01-19 23:52:28 +01:00
flyinghead 87e9fdd0ac allow subfolders in custom texture folders
make file iterator to be used by custom tex and game scanner
added some missing nowide::getenv
2021-01-19 16:58:26 +01:00
flyinghead 16dec49e08 windows: use utf8 internally. Support latin2, cyrillic, etc. pathnames
upgrade libzip to 1.7
imgui: use all glyphs from font including latin2, cyrillic, greek, etc.
2021-01-19 11:11:01 +01:00
flyinghead 417b470cbb sdl: fall back to open gl if vulkan init fails 2021-01-16 19:09:22 +01:00
flyinghead 49627eaf53 vk: first framebuffer wasn't cleared 2021-01-16 18:50:54 +01:00
flyinghead f3b86f6c14 gl: TextureCache -> GlTextureCache 2021-01-15 10:14:24 +01:00
Flyinghead 1727413247 vulkan: fix crash on minimize and resize. clear framebuffer on resize
many vulkan fixes related to init/term/reset
2021-01-09 18:16:39 +01:00
Flyinghead 4a103a1de3 process input when no frame is rendered 2021-01-08 21:47:33 +01:00
Flyinghead ac7bd2a6a0 free()/delete[] mismatch 2021-01-04 21:21:35 +01:00
Flyinghead 2c8b5aa7f8 vs2019 build tentative fix 2021-01-04 18:56:15 +01:00
Flyinghead 0fd9912f02 gui: get rid of content winodw border 2021-01-03 21:26:56 +01:00
Flyinghead 889fc8256d broadband adapter support 2021-01-02 21:19:50 +01:00
Flyinghead a859effa04 build fix 2020-12-27 09:10:19 +01:00
Flyinghead a0b099df7c gl: when loading custom textures, don't delete regular textures until after the current frame
regular textures might be referenced by the current frame and deleting them cause gl errors
Issue #144
2020-12-27 08:58:48 +01:00
Flyinghead 7a889803fd renderer: mipmapped textures render as black when dumping textures
Issue #144
2020-12-26 22:59:20 +01:00
Flyinghead a00aad5fa7 pvr: auto frame skip to replace current and previous synchronous rendering
Restore previous synchronous rendering behaviour (normal auto frame skip)
No frame skipping when disabled
better cpu speed measure over 4 vblanks
2020-12-25 12:08:44 +01:00
Flyinghead ee157db078 macos: microphone support. Audio latency setting 2020-12-24 08:58:46 +01:00
Flyinghead 1a59f8bade vk: reset lastFrameView to nil when switching renderer
fix crash when switching per-tri/per-pix
2020-12-21 20:09:23 +01:00
Flyinghead 632731bede vmem: map area 4 access to vram
pass DDT0101 diag test
fix vmem handler bug with >= 8 handlers
ch2-DMA: use SB_LMMODE1 for upper mirror
dmac: update SAR and DAR according to CHCR.SM and CHCR.DM
use function templates for vram 32b handlers
clean up
2020-12-20 17:25:28 +01:00
Flyinghead a7a70f9900 gl: don't present a frame if no previous render 2020-12-16 17:25:33 +01:00
Flyinghead 3f1326a3ac rend: read framebuffer as non-interlaced when possible 2020-12-16 14:40:11 +01:00
Flyinghead 190ab6690a vk: create staging buffer for texture if null
Fixes SF3 double impact crash
better texture cache cleanup
2020-12-16 14:37:28 +01:00
Flyinghead bb5b5d4512 only switch vulkan/opengl when needed 2020-12-15 20:16:35 +01:00
Flyinghead 04cd7db2cd pvr: serialize TA render passes
use enum for renderer type
2020-12-15 16:27:34 +01:00
Flyinghead c03cf8eb45 rend: multi-render, delay swap, refactor main ui loop
move ui loop out of hw/pvr
vk: implement multi-rendering, delay swap. Load fb before render pass
fps counter now counts frames, not renders
vk: force ignoreTexAlpha for 565 texture in case the supporting texture
has an alpha channel (RTT). Fixes Alone in the Dark cinematic scenes.
pvr: better detection of frame swapping (FB_R_SOF/FB_W_SOF)
pvr: synchronous rendering now always waits for render in progress
(speed measurement not reliable, render skipped when multi-rendering)
vk: limit swap chain size to 2
2020-12-15 15:09:42 +01:00
Flyinghead d960f8e9f5 lightgun: handle screen stretching, rotation and tall aspect ratio
Issue #139

move jvs stuff into maple_jvs.cpp
2020-12-09 13:48:58 +01:00
Flyinghead fd244eb8b9 android: create data directory if needed at startup and onboarding 2020-12-08 17:15:51 +01:00
Flyinghead b147f71ffa fix crash with vulkan an android
compiler bug?
2020-12-08 15:45:39 +01:00
Flyinghead adeacd89f4 input: implement reload. remap some naomi games input
implement lightgun reload (dc, naomi)
kcode[] set to 32 bits
revamped mapping for naomi keys
remapped btns for some naomi games
display game button/axes names in UI
2020-12-02 14:40:50 +01:00
Flyinghead 8905410aa4 clean up 2020-11-30 21:59:13 +01:00
Flyinghead 8f77a5482a config/data folders improvements
linux: look for legacy ~/.reicast and ~/.reicast/data
else look for ~/.config/flycast and ~/.local/share/flycast
and ~/.config/reicast and ~/.local/share/reicast
(defaults to flycast)

look for bios files in home folder and data folders (android, windows
,macos), then in game folder.
on linux, search in /usr/share/flycast and /usr/local/share/flycast and
legacy locations
2020-11-26 16:45:57 +01:00
Flyinghead 93dc87f17f rend: fix race condition when clearing texture cache 2020-11-25 23:22:45 +01:00
Flyinghead fad94ca759 upgrade imgui to 1.8. Allow scrolling settings by dragging empty space 2020-11-25 13:54:27 +01:00
Flyinghead 289ff59008 gui: fix content path incorrect popup. fix potential race condition 2020-11-25 10:20:03 +01:00
Flyinghead 7744e1a262 vk: use-after-free if inFlight texture is deleted or cache cleared 2020-11-24 18:01:09 +01:00
Flyinghead 4cb361bf9f input: allow binding controller buttons/axes to more than 1 player
Issue #68
2020-11-21 17:57:23 +01:00
Flyinghead 3e3fa08430 input: use btn/axes names in ui. fix mouse btn mapping
Use button and axis names in mapping UI
Mouse button remapping was impossible
x11: use same config names for window size as sdl/win
2020-11-20 22:10:14 +01:00
Flyinghead ee66afb7f6 vk: recreate swap chain if presentation failed. retry creation if fails 2020-11-20 21:13:18 +01:00
Flyinghead 47f262a2c6 vk: use normal pipeline for raw fb display
raw fb also needs to be rotated/scaled
oit: draw opaque polys on first frame
2020-11-19 22:29:06 +01:00