Commit Graph

1643 Commits

Author SHA1 Message Date
Flyinghead 67eee05c14 lightgun: wiggle the reported lightgun position in a 2x2 square
Fixes claychal not registering shots in menus.
2024-12-11 10:41:53 +01:00
Flyinghead bb1b1059d4 sh4: SCIF DR bit can't be reset if rx fifo isn't empty
Fixes manic panic periodic touchscreen errors.
2024-12-11 10:37:48 +01:00
Flyinghead 94f35ca54f arcade: add input descriptors for most games 2024-12-09 16:09:45 +01:00
Flyinghead 1507097bcd naomi: set offscreen sensor when reloading. fix wldkicks PCB inputs
Most games using analog inputs for lightguns also have an offscreen
sensor (lupinsho, mok, hotd2, confmiss). Activate it when reloading or
shooting offscreen.
Fix World Kicks PCB inputs.
2024-12-09 16:02:30 +01:00
Flyinghead e4599e36ed Merge remote-tracking branch 'origin/master' into dev 2024-12-08 10:47:31 +01:00
Flyinghead 15617c1816 ssa: fix regression
due to fff03f64a3
Issue #1773
2024-12-08 10:40:44 +01:00
Flyinghead 354d649ebd Merge remote-tracking branch 'origin/master' into dev 2024-12-07 20:38:55 +01:00
Johan Mattsson fff03f64a3
ssa: Fix wrong opcode comparison (#1769)
* ssa: Fix wrong opcode comparison

* ssa: handle 32 bits shift case first (shld, shad)

---------

Co-authored-by: flyinghead <flyinghead@users.noreply.github.com>
2024-12-07 18:59:14 +01:00
Flyinghead de1584d97c systemsp: input remapping. Input desc for mushiking, dinoking, lovebery
Allow input remapping for SystemSP.
Add input descriptors for barcode games: mushiking, dinoking and
love&berry
2024-12-03 20:16:56 +01:00
Flyinghead a40c51e682 gdrom: fix deserialization crash
regression due to c860807fef
Issue #1755
2024-12-03 18:33:58 +01:00
Flyinghead c860807fef gdrom: reduce dma buffer size. reios: schedule dma reads by chunks
Reduce gdrom dma buffer size to 16 sectors from 32.
Limit serialization of dma and pio buffers to actual content.
reios: schedule transfer of dma data in chunks.
Fixes Soul Calibuf audio drop outs at boot with HLE BIOS (RA).
Issue #1755
2024-11-30 16:37:55 +01:00
Flyinghead 5f55a9fd3f naomi: fix issue when creating eeprom. Ignore audio disable.
Byte at offset 2 was incorrect.
Ignore disable attract mode audio in BootID.
Remove ikaruga default eeprom.

Issue #1760
2024-11-29 17:11:36 +01:00
Flyinghead b42387e929 naomi: vf4 and mazan input descriptors 2024-11-28 16:41:30 +01:00
Flyinghead b4dcc64ef6 android: draw onscreen gamepad with imgui
Get rid of Renderer::DrawOSD.
gl: make a GlQuadDrawer class.
Draw on-screen gamepad using imgui.
Clean up vgamepad interface.
2024-11-22 14:42:51 +01:00
Flyinghead 6612e3fef8 gdrom: update settings and more when swapping disks
Set forced and per game settings.
Update game id and save state file name.
Reset cheats and custom textures.
Update game title and window title.
Issue #1748

hle bios: reboot the game when "exit to bios" vector is called
2024-11-20 11:46:34 +01:00
Flyinghead fbd52a72d4 naomi: load and decrypt gd-rom on demand
Shorten load times and avoid ANR on android with libretro when loading a
GD-ROM game. Load and decrypt data by 16 KB chunk when needed.
Issue #1457
Issue #1738
2024-11-17 20:39:30 +01:00
Flyinghead d618abc320 rend: modifier volumes must be clipped
Modifier volumes should also be clipped when needed.
Implement outside clipping for non-OIT renderers.
OIT renderers are less affected since the shadowed polys themselves are
usually also clipped after shadow is applied.
Fixes overflowing shadows in baserunner cams in WSB 2K1.
2024-11-17 12:09:40 +01:00
Flyinghead bdd2d5af7f naomi: emulate dimm registers for gd cart
Emulate 1.02 dimm board without network so that the bios detects it and
shows the expected GD-ROM SYSTEM boot screen.
Fix rom board serial id issue (error 04) with ikaruga, tetkiwam,
puyofev[j] and sprtjam.
Issue #1735

Add naomigd and naomidev bios definitions (unused).
Use netdimm for mj1 and wccf* series (still not working).
2024-11-14 13:05:48 +01:00
Flyinghead 76638df001 sh4: split xffr array. Fix FPCB_PAD on windows
Split xffr[32] into xf[16] and fr[16].
Set FPCB_PAD size to 64_KB. Issue #1736
Get rid of shil_param::reg_aofs
2024-11-13 10:31:45 +01:00
Flyinghead 129673a84b dynarec: use sh4 ctx to get register pointers. prefer offset
Move restoreHostRoundingMode() into Sh4Context
2024-11-09 18:44:51 +01:00
Flyinghead 7c1c5817d3 sh4: move sqWrite func into sh4 context. Simplify usage
Allow passing sh4 context to dynarec canonical implementations
Reduce FPCB padding to PAGE_SIZE except on arm32
2024-11-09 16:54:47 +01:00
Flyinghead e394840344 sh4: pass sh4 context to dynarecs, sh4cycles and caches
Reorder RuntimeBlockInfo members to save space
2024-11-09 13:25:55 +01:00
Flyinghead 2b28e819e5 sh4: build fix. rounding mode refactoring 2024-11-08 21:34:24 +01:00
Flyinghead db846ca933 sh4: pass context to interpreter funcs. get rid of sh4 regs #define 2024-11-08 18:36:08 +01:00
Flyinghead 93ae9d0375 sh4: refactor interpreter and recompiler with Sh4Executor interface 2024-11-07 18:14:18 +01:00
Flyinghead 52df0133f0 sh4: pass sh4 context to sq write handlers 2024-11-06 23:27:20 +01:00
Flyinghead d5aeb482d9 sh4: move sq_buffer into sh4 context 2024-11-06 22:11:27 +01:00
Flyinghead 7eec648690 sh4: move Sh4RegType & GetRegPtr into sh4/dyna
rec-arm: use getRegOffset/reg_nofs instead of GetRegPtr
2024-11-06 20:46:32 +01:00
Flyinghead 897e06b887 sh4: refactor GetDR/SetDR and access to fp registers 2024-11-06 19:26:04 +01:00
Flyinghead aa38771cd0 refactor sh4_sr_GetFull/sh4_sr_SetFull 2024-11-06 18:01:01 +01:00
Flyinghead c77ddba109 get rid of settings.dynarec.disable_nvmem 2024-11-06 17:03:01 +01:00
Flyinghead cd8a88366d get rid of TARGET_NO_EXCEPTIONS 2024-11-06 16:59:16 +01:00
Flyinghead 9d4d486524 naomi: add crc32 to GDROM and AW roms 2024-11-06 16:45:42 +01:00
Flyinghead fc6142b332 maple: do a full save of the vmu after loading a state
A partial save might corrupt the vmu file system.
2024-11-04 19:19:31 +01:00
Flyinghead 5fc84acdfb maple: base vmu file name on game ID for multidisk games
Build vmu file name with game ID so that all disks of multidisk games
share the same vmu (A1 only, or all with libretro when enabled).
Rename existing vmu file to new format if none exists.
Issue #1556
2024-11-03 17:14:31 +01:00
Flyinghead 037dc3b4b9 atomiswave: set dma speed to 7 MB/s for all aw games and conversions
AW dma transfer rate seems to be lower than naomi.
Fixes Force Five freeze when starting a game.
Fixes opening sequence animation being truncated in kofxi.
Issue #1724
2024-11-03 16:55:15 +01:00
Flyinghead 96aac66133 naomi: improve performance of M1 and M4 carts dma
Limit buffer size to 1 or 2 KB instead of 32 KB.
Only decrypt right before dma transfer.
Fixes frame drops and audio underruns in vf4evoct attract mode.
Issue #1717
2024-11-02 18:46:49 +01:00
Flyinghead 4d5ced1ce6 maple: add Full Controller with 2 analog sticks and all buttons
add AllStatusReq string for purupuru device.

Issue #1171
2024-11-02 18:13:38 +01:00
Flyinghead 65aadb9dcb pvr: avoid infinite loop if tile array is invalid
Fixes 240pSuite freeze at boot with the libretro core.
2024-11-02 11:04:56 +01:00
Flyinghead 2e5309bfa3 aica: don't batch samples
Batching 32 samples and arm runs causes audio glitches with some wince
games. So run aica 44100 times/sec instead.
Issue #1240
Issue #1605
2024-11-01 14:31:59 +01:00
Flyinghead b4937ef271 f355: pass full BIOS path to slaves
if the bios file is located relative to the rom location, slaves won't
be able to find it. Pass the full bios path to avoid the issue.
2024-10-14 16:31:23 +02:00
Flyinghead b2c6159b10 Merge remote-tracking branch 'origin/dev' 2024-10-11 15:28:19 +02:00
Flyinghead 01e5cd882c pvr: fix default clipping rectangle
Set default clipping rectangle to max (1280x480).
Fixes Irides: Master of blocks bogus clipping to tile 0,0.
2024-10-09 19:37:42 +02:00
Flyinghead d7c168f406 naomi: copy cart dma data in chunks
Copy cart dma data in 1K chunks to avoid transferring all in one shot.
Fixes Soul Surfer and Beach Spiker audio glitches when playing a sample
before it's completely transferred.
Issue #1513
2024-10-08 17:03:00 +02:00
nbFlyinghead d689c50e21 naomi: increase dma xfer rate except for force five
Revert 54ac9c6361 but make an exception
for force five. Issue #141
Fixes loud music in beach spikers and soul surfers. Issue #1513
Fixes some menu textures not being loaded in F355.
2024-10-05 13:30:36 +02:00
Flyinghead efd71b3a44 Storage::getParentPath can throw 2024-10-04 16:51:08 +02:00
Flyinghead 2653c5ed73 naomi2: fix modifier volumes clipping
Don't clip modifier volumes but tesselate triangles intersecting the
near plane. Then project clipped vertices onto it in the vertex shader.
Issue #1651
2024-09-29 16:42:38 +02:00
Flyinghead 4baf529ff7 race condition when stopping emu thread right after start
In threaded rendering, CpuRunning is set after the emu thread is
started. If calling Emulator::stop() before it is set, the call will
hang.
2024-09-23 17:43:23 +02:00
Flyinghead 38de2868a0 sgdrvsim: axis 0 is master audio volume, not wheel
Use (unused) axis 4 instead. Wheel position is read with the ffb drive
board, not JVS.
Map clutch to left trigger 2.
Issue #1636
2024-09-16 18:26:13 +02:00
Flyinghead 64d7199107 Merge remote-tracking branch 'origin/master' into dev 2024-09-16 11:16:04 +02:00
Flyinghead 5393235c40 aica: skip remaining step functions when channel is disabled
CA is reset to 0 when channel is disabled due to AEG and this value must
not be changed.
Issue #472 and #1180
2024-09-07 14:55:45 +02:00
Flyinghead a81a02f14b maple: save rfid card after decrementing counter
Issue #1626
2024-09-07 14:50:29 +02:00
Flyinghead 7174ef1194 naomi: full rfid chip emulation for mushiking series
Fixes hang after playing 3 games.
Issue #1626
2024-09-04 09:48:34 +02:00
Flyinghead f039a809da naomi: limit max analog values to avoid overflow
Fixes overflow in wild riders when going full right or full accel/brake.
Follow up to Issue #1627
2024-09-02 17:04:17 +02:00
Flyinghead 1223154665 jvs: fix analog axes values encoding
The least significant byte of analog axis values seems to be handled as
signed.
Fixes crazy taxi going right when turning full left.
Issue #1627
2024-09-01 18:41:37 +02:00
Flyinghead c575eac89b naomi: add mushik4t rom 2024-08-30 17:49:07 +02:00
Flyinghead b468c9bdae aica: reset CA to 0 when disabling channel due to AEG
CA was reset to 0 for non-looping sound when ending, but not for looping
ones when they reach full attenuation. This confuses some games.
Disable the channel when it reaches full attenuation and reset CA to 0.
Revert a7702c622a
Issue #1602
Better fix for
Issues #472, #483, #1180, #1249, #1030 (partial)
2024-08-29 13:09:39 +02:00
Flyinghead a93bd9e64e Merge remote-tracking branch 'origin/playstore' into dev 2024-08-24 18:08:59 +02:00
Flyinghead 244bb724c9 naomi: add FFB support for Tokyo Bus Guide
Only rumble seems to be used.
Issue #1601

Add info about awave BIOS
2024-08-24 16:29:29 +02:00
Flyinghead b99b3450c8 sh4: compute fsrra as 1/sqrt(x) instead of sqrt(1/x)
Fixes invisible chaos emerald in Sonic Adventure cutscene after Emerald
Coast.
Partial revert of ec3ad9b.
Issue #1600
2024-08-20 21:12:05 +02:00
Flyinghead 6061d402bd build fix 2024-08-17 18:08:53 +02:00
Flyinghead af7353225b pvr: rgb888 needs to be correctly aligned when xclip.min != 0
Fixes glitchy combat opening animation in soul calibur (with full
framebuffer emulation). Use slower but correct method instead.
Issue #1591
2024-08-17 17:29:32 +02:00
Flyinghead cb0b667129 maple: don't assert dma interrupt if using hardware dma trigger
Fixes Virtua Cop 2 pause when shooting. Regression due to ecce915
Issue #474
2024-08-17 17:23:34 +02:00
Flyinghead 9fd80b952a Storage::getSubPath can throw if path doesn't exist (android) 2024-08-13 17:38:23 +02:00
Flyinghead 53d092c326 naomi: set SB_GDSTARD and SB_GDLEND when starting dma
Fixes toukon4 fmv freeze
Issue #1582
2024-07-17 10:05:58 +02:00
Flyinghead 136ce267dc aica: apply 6dB attenuation after adding channels in mono
Less saturation with sega bass fishing challenge's default audio
settings.
Issue #1564
2024-07-06 14:03:48 +02:00
Flyinghead a01edd22c7 Merge remote-tracking branch 'origin/dev' into playstore 2024-06-30 11:24:46 +02:00
Flyinghead 49ad2b6864 naomi: save printer output as a screenshot
Use hostfs::saveScreenshot()
2024-06-23 16:00:31 +02:00
Flyinghead e270621a03 f355: fix gearbox and clutch mappings 2024-06-22 21:40:07 +02:00
Flyinghead af7edadedb Merge remote-tracking branch 'origin/dev' into playstore 2024-06-21 18:20:40 +02:00
Flyinghead d92790e69f sh4: incorrect div1 implementation if Rn == Rm 2024-06-20 18:12:11 +02:00
Flyinghead 2103dd5a7a storage: add exists() method. load bios from content path. android fix
Add Storage::exists() method
Allow dc and arcade bios to be loaded from content path.
Fix android getSubPath when called on a root uri.
2024-06-14 12:39:32 +02:00
Flyinghead ec3ad9b328 sh4: use double for fipr and ftrv. divide before sqrt for fsrra. ssa fix
dynarec: use double to implement fipr and ftrv except on arm32
interpreter: always use double for fipr and ftrv
fsrra: perform division before square root
fmac: use std::fma or native fma op
get rid of unused dynarec op shop_swap
ssa: dead register pass must assume interpreter fallback modifies all
registers
ssa: replace reg+0 address by reg in constant propagation pass
decoder: replace address offset 0 by null param for indexed mem access
2024-06-12 10:54:15 +02:00
Flyinghead 9bdaa6c40b naomi: drop support for gdi. default to first bios region found
Use the first BIOS region found if the requested one can't be located.
2024-06-03 19:08:19 +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 34216f77af naomi: fix marstv freeze
Force JP BIOS version D for this game.
Issue #1508
2024-05-15 11:55:06 +02:00
Flyinghead 21c77adc4d os_notify 2024-05-14 22:43:55 +02:00
Flyinghead 35acb7e62c ui: load savestate thumbnails asynchronously. limit thumbnail size
GetLastFrame can take max width or height.
Limit width of savestate screenshot to 640.
Load savestate thumbnail in async task.
2024-05-14 14:23:40 +02:00
Flyinghead 6f0581032b save screenshot. add screenshot to savestates
Retrieve last frame rgb data (gl, vk, dx9, dx11).
Specific save screenshot code for android, iOS and UWP.
Add Save Screenshot emu key (F12 by default)
vk: defer deletion of in-flight textures when texture cache is cleared.
vk: fix issue when updating imgui textures after a render pass has begun
(achievements)
vk: palette texture not updated after a state has been loaded.
gl: Move opengl-specific stuff into opengl imgui driver.
savestate: Add non compressed header, following by screenshot png data,
before actual savestate.

Issue #842
2024-05-13 15:47:34 +02:00
Flyinghead 13302b87c8 move ui to its own folder 2024-05-07 22:23:51 +02:00
Flyinghead f76d05a3d5 achievements: leaderboard notifications. detailed toast message
Draw achievement notifications using imgui drawlist api
Fixes for insets
Issue #761
2024-05-07 17:50:36 +02:00
Flyinghead 300cf0d437 better RetroAchievements UI and threading
Pop ups for authentication, game load, game completed, achievements
unlock and progress.
Handle disk changes.
Issue #761
2024-05-01 18:32:39 +02:00
Flyinghead de6a43bd21 savestate: drop support for legacy libretro and <v16 savestates 2024-04-16 09:40:55 +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 e8340bfa5e maple: implement AllStatusReq for controller and VMU 2024-04-07 11:47:42 +02:00
Flyinghead eaa22a49d1 msvc build fix 2024-04-06 19:07:27 +02:00
Flyinghead 4f87a3556e Fix vmu beep frequency 2024-04-06 17:43:19 +02:00
Flyinghead e27b5dc1aa Merge remote-tracking branch 'origin/master' into dev 2024-03-16 19:40:48 +01:00
Flyinghead 5ce1f92e5c naomi: allow mapping of left & right trigger 2
Makes rear brake usable in wild riders
Issue #1450
2024-03-12 14:36:38 +01:00
Flyinghead 43bb7c83f7 hide P3 and P4 light gun crosshairs for arcade games 2024-03-06 16:42:43 +01:00
Flyinghead 391da7023f sh4: fix SCIF serialization
Fixes MINIDUMP-2M0
Add some diag logging to win_vmem
2024-03-04 17:02:42 +01:00
Flyinghead 62d00578af fix compile warnings 2024-03-01 12:58:53 +01:00
Flyinghead 588035d9eb set currently played game name in the window title
Issue #28
2024-03-01 12:00:24 +01:00
Flyinghead 156aafe95b sh4: fix P4 region mapping and on chip ram addressing
P4 region is normally mapped outside of the sq and system registers
areas (E4-EF, F8-FE).
Fixes NHL 2K2 missing helmet and jersey textures. Issue #1416
Fixes invalid geometry in worldkicks series (using interpreter or 4 GB
vmem space)
Fix On Chip RAM addressing: bit 13 or 25 is used to select the bank.
2024-02-27 17:39:51 +01:00
Flyinghead 6639d6b167 naomi: fix shaktam inputs
Issue #1420
2024-02-27 17:39:51 +01:00
Flyinghead 443d5a2ba6 pvr: apply a negative bias to background plane depth
Fixes skybox in Xtreme Sports. Issue #1381
Fixes background clipping in Blue Stinger (JP) intro. Issue #721
Fixes Windows CE yuv FMV black screen (4x4 EVO, Armada, Carsear's
Palace, Giant Killers, PBA bowling, Starlancer, Tomr Raider, Wild Metal,
Who wants to beat up...)

Get rid of ForceWindowsCE option
Force PAL for Super Runabout (EU)
2024-02-27 17:39:51 +01:00
Flyinghead 2dde1d5e7b sh4: fix P4 region mapping and on chip ram addressing
P4 region is normally mapped outside of the sq and system registers
areas (E4-EF, F8-FE).
Fixes NHL 2K2 missing helmet and jersey textures. Issue #1416
Fixes invalid geometry in worldkicks series (using interpreter or 4 GB
vmem space)
Fix On Chip RAM addressing: bit 13 or 25 is used to select the bank.
2024-02-25 14:37:27 +01:00
Flyinghead 4667d17d78 naomi: fix shaktam inputs
Issue #1420
2024-02-24 19:42:41 +01:00
Immersion95 67c4e62c51 Adds option to enable/disable "Fix Upscale Bleeding Edge"
Helps with texture bleeding case when upscaling. Disabling it can help if pixels are warping when upscaling in 2D games (MVC2, CVS, KOF, etc.)
2024-02-22 11:30:26 +01:00
Flyinghead 531c6f94d5 pvr: apply a negative bias to background plane depth
Fixes skybox in Xtreme Sports. Issue #1381
Fixes background clipping in Blue Stinger (JP) intro. Issue #721
Fixes Windows CE yuv FMV black screen (4x4 EVO, Armada, Carsear's
Palace, Giant Killers, PBA bowling, Starlancer, Tomr Raider, Wild Metal,
Who wants to beat up...)

Get rid of ForceWindowsCE option
Force PAL for Super Runabout (EU)
2024-02-07 16:02:55 +01:00