Commit Graph

1248 Commits

Author SHA1 Message Date
Flyinghead 9d17fc15a3 gdrom, hle: don't restart cdda if paused or playing
Fix regression due to ab791d1b9c
(unpausing restarts the current track)
Issue #690
2022-07-14 16:49:56 +02:00
Flyinghead ab791d1b9c gdrom: ignore CD_PLAY when already playing, not when paused
Issue #690
2022-07-13 12:52:29 +02:00
Flyinghead 4f206d2773 pvr: set correct framebuffer size in 240p/pixel_double
Some games use 240p and pixel_double resulting in a 320x240 framebuffer.
Renderer should be resized accordingly.
Fixes linear filtering artifact in KoF dream match 1999 (Issue #690)
2022-07-12 15:55:49 +02:00
Flyinghead 7f9d9b81aa gdrom: don't reset current cdda sector on cd_play if already playing
Issue #690
2022-07-12 15:33:11 +02:00
Edward Li c77c3ab015 DRY 2022-07-09 11:46:27 +02:00
Flyinghead f4986008fe jvs: fix 86-request decoding
Fixes kingrt66 inputs when networked
Issue #673
2022-07-05 14:34:57 +02:00
Flyinghead 19112aecb2 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/hw/naomi/naomi_cart.cpp
2022-07-01 12:42:37 +02:00
Flyinghead 5f5a748031 boxart: batch uid searches. Bios image. More arcade rom name changes 2022-06-23 22:06:50 +02:00
Flyinghead 74852520dc maxspeed: allow use of per-game network settings
Issue #671
2022-06-20 20:56:53 +02:00
Flyinghead 7bcd8c819a arcade rom names update. non square boxart
Correct handling of non square images
Improve search for arcade game names
Retrieve other images if no boxart (titlescreen, screenshot)
Changed some arcade rom names to more friendly ones
2022-06-20 18:07:06 +02:00
Flyinghead 11ecb473b6 new option to broadcast digital outputs over the network
Similar to MAME's "-output network" option. Should be compatible with
MAME Hooker and the like.

Limit boxart images loaded per frame to 10.
2022-06-16 16:50:26 +02:00
flyinghead afd07c25ba pvr: store tex address in render context. texture cache refactoring
Store FT_W_SOF1 and FT_W_CTRL in render context since they can be
modified before render end. New tentative fix for vf4 water reflection
flashing black during netplay.
Refactor texture cache to use constructors. RTT code moved from
renderers.
Partial revert of ddcd3861d3
2022-06-11 13:24:22 +02:00
Flyinghead b5f1552ed8 elan: don't crash on invalid texture xfer size
Issue #647: fixes initdv3jb area conquered crash
2022-06-06 15:54:25 +02:00
Flyinghead 71ac212dc7 elan: disable texture for vertices without UV coordinates
Fixes initial D white transparent quad at start of race
2022-05-30 16:15:15 +02:00
Flyinghead e84cdce398 reios: flashrom read returns 0 on success. system id/timezone flash fix
flashrom read returns 0 on success, not size read.
Fixes Slave Zero (PAL) crash
2022-05-21 15:46:22 +02:00
Flyinghead af2fe242f9 flash: console id is checksummed 2022-05-18 14:58:21 +02:00
Flyinghead 58d1f7cee1 pvr: reset nextContext in Reset(). Use tactx_Alloc for direct fb render
Fix crash with multipass renders
Issue #634
2022-05-16 13:04:38 +02:00
Flyinghead 430256266f pvr: lightModels TA overrun on beach spikers
Better sizing of TA_context lists
2022-05-15 13:41:03 +02:00
Flyinghead f9e38b11d9 pvr: restore TA_context pool
fixes performance regression on android
2022-05-15 13:37:58 +02:00
Flyinghead 39bb94dd55 jvs: don't scale ninja assault lightgun coordinates
Fixes reload issues (Issue #610)
2022-04-30 11:50:56 +02:00
Flyinghead afb0a80de1 pvr: autosort needs empty passes to be accounted for
Issue #612
2022-04-29 11:37:17 +02:00
Flyinghead 49932e02a6 gdrom: generate raw subcode 2022-04-27 14:32:53 +02:00
Flyinghead fc9e1e401b naomi: emulate midi ffb drive board response
needed for driving simulator
2022-04-27 14:28:58 +02:00
Flyinghead 3b81bbcae5 naomi2: gmp diffuse/specular flags select vertex or model colors only
These flags shouldn't be used to disable diffuse/specular shading
Fixes road surface glitches in initdv3e (Usui map)
2022-04-21 13:55:09 +02:00
Flyinghead 902fc2cbe8 naomi: override Region settings if current region BIOS isn't found 2022-04-20 14:16:15 +02:00
scribam aa6c9e2106 msvc: fix linking issues in debug build 2022-04-17 13:24:37 +02:00
Flyinghead 039c666247 more types.h clean up. better aica handler templates 2022-04-15 17:03:49 +02:00
Flyinghead ed5c24c281 arm64 build fix 2022-04-15 11:17:22 +02:00
Flyinghead f2f4010203 clean up types.h, refactoring 2022-04-14 11:34:45 +02:00
Flyinghead a9e261d280 simplify TA parsing 2022-04-13 20:36:52 +02:00
Flyinghead bf61f5cfe8 Merge remote-tracking branch 'origin/master' into dev 2022-04-04 12:11:10 +02:00
Flyinghead 8dcc25e1a9 ta: default base/offset color is white, not black
fixes black players in NHL 2K
2022-04-04 11:47:11 +02:00
Flyinghead a428167dc6 naomi network: alienfnt startup crash if not connected 2022-04-04 11:43:54 +02:00
Flyinghead 48e3a3eb68 aica: double arm clock speed
actual aica arm clock seems to be 22.5792 MHz, which means 512 cycles
per sample at 44.1 KHz (from 256)
fixes vf4 audio hiccup in character selection screen
2022-04-03 20:53:44 +02:00
Flyinghead 94c20ba29f elan: reset TA parser before loading state 2022-04-02 16:43:15 +02:00
Flyinghead 8baebcfb5b maxspeed networking. Store aw force feedback value 2022-04-02 16:41:52 +02:00
Flyinghead 6c38295d62 new naomi network protocol. vblank event. initd rumble support
new vblank event, used by cheats, lua and naomi net
new udp net protocol for naomi. rx/tx on vblank on emu thread.
input: rumble power configurable (Issue #158)
ui: rumble intensity slider, enable/disable upnp
aica: hook to consume midi out
decode midi out to simulate rumble for initd
upnp can now be disabled
2022-03-27 15:23:21 +02:00
Flyinghead be270259ee crash with RTT and copy to VRAM if width > linestride
RTT texture width must not exceed FB_W_LINESTRIDE
fixes Flag to flag crash
2022-03-25 15:41:16 +01:00
Flyinghead a5bad2b9b7 more naomi widescreen cheats. Fix vathlete 4-player mode
widescreen cheats for asndynmt, doa2m, slashout, spikers battle,
18wheeler, beach spikers. Courtesy of Esppiral
vathlete needs 2 I/O boards for 4-player mode
2022-03-20 17:49:50 +01:00
Flyinghead 56768f2d3d naomi2: use TA parser. Use N2light directly with vk, dx11
Use TA parser to handle list type and clipping for Naomi 2 polys.
Pass all pass-throuch TA data to TA parser but stop on naomi2 command.
Set default projection matrix instead of identity (fixes Area conquered
screen invisible in initd).
Change N2Light and N2LightModel so they are usable in GLSL (vulkan) and
HLSL (dx11).
TA parser throws exception for unhandled param.
ta_vtx.cpp refactoring.
Support for subtractive lights (diffuse+specular). Used in some clubk
circuits.
Fix vulkan crash when direct FB render.
2022-03-16 17:28:45 +01:00
Flyinghead 5b3d36e081 naomi2: network support for clubk and initd
clubk: don't reverse handle by default
hotd2 doesn't have a proper game id or standard eeprom
2022-03-15 19:44:24 +01:00
Flyinghead 53b5588bda Merge remote-tracking branch 'origin/master' into dev 2022-03-13 11:01:27 +01:00
Flyinghead 1015a8c098 naomi2: vulkan support
oit: use #define instead of functions in GLSL
2022-03-12 17:56:46 +01:00
Flyinghead 514eedbc63 maple: do not raise maple_dma interrupt for light gun
Issue #474 (Virtua Cop 2 momentarily freezes when shot fired)
2022-03-07 19:16:49 +01:00
Flyinghead 1f61f80c92 input: fix naomi rotary encoders
Games with multiple JVS input boards poll inputs more than once,
ignoring some relative mouse movements.

Issue #557
2022-03-06 17:57:16 +01:00
Flyinghead e5863920c4 naomi2: fix beach spiker crash
VUR vertices can also have environment mapping
2022-02-22 08:48:51 +01:00
Flyinghead a5660fa2b4 missing changes from previous commit 2022-02-18 17:40:00 +01:00
Flyinghead ecc03e3ebc naomi: use boot rom id to configure eeprom
Make eeprom from scratch if it doesn't exist based on boot id info.
Override eeprom settings to make game happy
Change region to supported one
Get rid of per-rom region info in rom list
New option to configure Naomi games in free play
2022-02-18 17:35:20 +01:00
Flyinghead af4638e83f naomi2: fix another initdv2 end of race crash 2022-02-18 16:40:26 +01:00
Flyinghead cecf1a5497 naomi2: fix initdv2 end of race crash 2022-02-17 18:31:20 +01:00
Flyinghead f2374982b8 pvr: don't merge polys with != palette. 2nd pass sometimes ignored
polys with different palette index shouldn't be merged.
If a pass isn't using any opaque, it can't be found. Fall back to using
the transparent or punch-through list in this case.
2022-02-17 18:30:29 +01:00
Flyinghead d736dd027d naomi2: initd card support. lua: fix multi-threading crash
initial d card reader support. insert card button.
lua: use mutex to enforce thread-safety
2022-02-16 19:02:04 +01:00
Flyinghead e35ccbbb18 naomi2: force region for some roms. elan clean up 2022-02-15 17:15:44 +01:00
flyinghead 8d071bf4ea naomi2: dx11 support. fix ambient color. no depth write in per-strip
dx11: naomi2 support
n2: ambient color was swapping red and blue
gl, dx11: don't write depth in per-strip to avoid missing geometry,
prefer wrong depth order/blending for now
optimize naomi2 per-triangle sorting
2022-02-13 21:01:45 +01:00
Flyinghead a14086d484 naomi2: shader error in gles. Invert clubkart wheel axis 2022-02-11 19:06:58 +01:00
Flyinghead 20d25059bf naomi2: remove geom shader. Merge transparent polys. bump mapping fix.
elan: Get rid of geometry shader and do geometry clipping manually.
pvr: Aggressively merge transparent polys in per-triangl and OIT mode, duplicating the last vertex to merge opposite cull mode strips.
gl4: reset OIT pointers in final shader. No need for clear pass.
gl4: alternate between 2 buffers for verts.index/tr poly params.
gl4: use gl_VertexID + poly number for poly index.
gl: new GlBuffer class.
2022-02-11 15:54:18 +01:00
Flyinghead ccee7162bc naomi2: soulsurfer inputs, 2-volume UV, wrong TA parser selected
TAParserDX was used for pass-through TA data. Fixes health bar color in
vf4 and dust color in kingrt66.
2-volume missing u1/v1. Fixes clubk shadows.
2022-02-08 10:32:56 +01:00
Flyinghead debbae6ab1 naomi2: elan v10 emulation. texture dma xfers. 2-volume support
emulate elan v10 (fixes modvol in vf4, initd, beachspiker, wldrider)
wrong color order for model and vtx color
model param override xor support
improved light direction precision. Angle attenuation algo change
get rid of alpha light and modifier volume hacks
texture dma xfer from main and elan ram
gl4: use geometry only vtx and geom shaders for depth pass
2-volume support
2022-02-05 14:50:12 +01:00
Flyinghead 2c6f01ae38 naomi2: kingrt66 wiper button. initd gear up/down
kingrt66: map wiper button, remap shift H and R
initd: map gear up and down
wldrider: remap push and pull
2022-02-05 14:29:01 +01:00
Flyinghead 0362fd1079 naomi2: disable elan when net rollbacking, optimizations. ggpo: RTT fix
n2: do not process elan commands during ggpo rollbacks.
n2: Cache model colors to avoid unpacking for each vtx
pvr: merge equivalent polys with different culling by duping a vtx
pvr: fix crash during direct FB render
pvr: use correct color ordering for naomi2. Use identify matrix for null matrix pointers
ggpo: do not signal end of frame on a render to texture
2022-02-01 17:37:54 +01:00
Flyinghead 38765dc89a pvr: fix multipass. naomi2: constant color shading.
pvr: link multipass TA contexts. Each pass has its own.
pvr: get rid of context pool
naomi2: constant color shading. Use model diffuse and specular
selection. Don't use vtx color for offset color.
naomi2: pseudo-parallel lights fix
naomi2: pass-through TA data needs forced list type. Terminate with
end-of-list
enable RTT copy to vram for Beach Spikers
2022-01-31 20:40:09 +01:00
Flyinghead e51a291195 ggpo: wrong elan ram offset calculation 2022-01-30 12:39:00 +01:00
Flyinghead 5fb8b458bb pvr: use TA_OL_BASE instead of PARAM_BASE/TA_ISP_BASE to id TA context
Writes current TA_OL_BASE to all tiles OPB block. Read from region array
at render time to identify context.
Fixes vf4 water reflections RTT
get rid of dump_frame/read_frame
2022-01-29 18:39:38 +01:00
Flyinghead de1322b928 naomi2: Fix T&L matrix. vmem elan ram support.
Fix T&L matrix (wild riders)
Open GL support for normal/light matrix
handle elan RAM in vmem
2022-01-28 21:24:30 +01:00
Flyinghead 58f05f74cf jvs: set received jvs message trail to zero
fixes sh4 crash during naomi boot
2022-01-28 11:31:30 +01:00
Flyinghead e5d517dad2 use platform.isConsole(), platform.isNaomi(), ... 2022-01-27 17:52:19 +01:00
Flyinghead 1ffcc75031 naomi2: implement SB_ISTNRM for clxb. serialize elan state 2022-01-27 16:40:12 +01:00
Flyinghead e084cc9a3a jvs: set received jvs message trail to zero
fixes sh4 crash during naomi boot
2022-01-27 15:50:44 +01:00
Flyinghead e1038ea632 naomi2: fix regressions. 2-volume and bump mapping support WIP
optimize open gl uniforms
2022-01-26 22:15:10 +01:00
Flyinghead cb99e7d920 naomi2: do T&L on the gpu. bypass TA format. env mapping.
fix model/instance/matrix parsing
handle culling reversed model flag
geometry shader for near plane clipping
2022-01-25 15:37:04 +01:00
Flyinghead b048921c11 naomi2: fix clipping, parallel light direction, reset state on loadstate 2022-01-18 18:25:40 +01:00
Flyinghead 4335aa563f naomi2 WIP 2022-01-16 22:41:42 +01:00
Flyinghead a4788b5b24 zero-init sh4 context when no vmem is available
Issue #439
2022-01-03 18:44:47 +01:00
Flyinghead 300c74e3fc Merge remote-tracking branch 'origin/master' into net-rollback
# Conflicts:
#	CMakeLists.txt
#	shell/libretro/libretro.cpp
#	shell/libretro/libretro_core_options.h
2021-12-22 21:31:17 +01:00
Flyinghead bf87f7ba84 Compilation error on armv7 with gcc 9 2021-12-20 14:27:19 +01:00
flyinghead b1e0bc90ba uwp: remove angle, upload to S3. windows: don't build SDL 2021-12-18 11:50:03 +01:00
Flyinghead 325cd9a066 DSP crash on apple M1
Issue #415
2021-12-17 13:43:45 +01:00
Flyinghead e02afb34d1 dx11: wrong shadow scale factor. vk: object leak. Code duplication
dx11: shadow scale factor inverted in per-pixel
vulkan: clear deleted overlay images when terminating
Use color struct for FOG_COL_VERT, FOG_COL_RAM, FOG_CLAMP_MIN,
FOG_CLAMP_MAX and VO_BORDER_COL. Avoid code duplication in renderers.
2021-12-17 13:40:42 +01:00
Flyinghead dc5acd24b2 Merge remote-tracking branch 'origin/master' into net-rollback 2021-12-17 12:40:37 +01:00
Flyinghead 7555263e38 wrungpo had wrong decryption key
Issue https://github.com/libretro/flycast/issues/1108
2021-12-17 11:55:17 +01:00
Flyinghead 04be40767b android: fallback to /dev/ashmem if ASharedMemory fails. More logs
Issue #439
2021-12-15 23:09:59 +01:00
flyinghead 6a3a8d5578 libretro: dx11 support. dx11 shader cache. dx9 clipping planes
dx11: use 32-bit float depth texture to avoid loss of precision (SA2 into logo)
dx11: cache shader blobs to disk if not provided by OS
dx11: swap interval depends on screen refresh rate (1 for 60 Hz, 2 for 120 Hz, ...)
dx9: use clipping planes to avoid interpolation errors in rasterizer (daytona, mermaid lake)
directsound: use comptr
gui: fix navigation issue with OptionArrowButtons due to missing id
2021-12-13 21:02:44 +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 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 f91847dad0 DX11 renderer WIP 2021-11-26 18:08:41 +01:00
flyinghead 63598019e1 naomi: rename deathcox to deathcoxj, new deathcox parent rom
MAMESET 0.227 changes
Issue #409
2021-11-20 14:06:19 +01:00
flyinghead 8262c9ece7 UWP support - WIP 2021-11-19 23:18:45 +01:00
Flyinghead 8f80bcb159 New serialize framework. Delay maple dma xfer
New serialize framework. Refactor serialization into modules.
Maple dma xfer must not be executed immediately. Delay until interrupt
is raised.
Fixes Geist Force freeze at start.
2021-11-13 15:56:42 +01:00
Flyinghead 80cf422a5e dynarec: fix CLRS and SETS ops
Destination reg was missing
Fix crash in OpenTyrian/SDL_DREAMHAL
Issue #403
2021-11-11 10:44:22 +01:00
LaercioMBR 004250ed23
InputDescriptors for radirgyn and mamonoro 2021-10-24 14:07:40 +02:00
Flyinghead 808a161d39 ggpo: make chat thread-safe. Deadlock on early rollback
Make ggpo_send_message() thread-safe
Deadlock UI/emu threads if rollback happens before first render
Disable rollback wait in single-thread mode
2021-10-20 14:41:18 +02:00
LaercioMBR 6d8e1794a0
Fix Metal Slug 6 inputs (#393) 2021-10-20 14:36:02 +02:00
LaercioMBR 846ed76808
InputDescriptors for Dolphin Blue, Demolish Fist and ggx15 2021-10-19 17:02:01 +02: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
LaercioMBR 7fb85e5b25
Standardizing InputDescriptors names, added kov7sprt_inputs (#389) 2021-10-18 11:24:38 +02:00
Flyinghead 3eeb7e7cae build fix 2021-10-16 18:15:11 +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 85c21df5e7 Use allocAligned/freeAligned for all aligned allocs 2021-10-14 10:46:44 +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