Commit Graph

83 Commits

Author SHA1 Message Date
Flyinghead 98531e07ea hle bios: fix SF rush, jeremy mc grath and the grinch
protection checksum and game bugs
2023-02-06 15:15:44 +01:00
Flyinghead 6e940e4d08 ggpo: move endOfFrame() call back to start render
Naomi2 TA context geometry for the current frame is lost when
rollbacking during vblank in because it hasn't been queued for render
yet.
Fixes black screen after GGPO rollback for Naomi 2 games
2023-02-03 11:34:58 +01:00
Flyinghead 6b2063b06f GGPO fixes
Memwatchers weren't properly reset after a ggpo session.

Race condition when stopping if GGPO restarts the cpu for a new frame.

The emu thread might still run some rollback frames before stopping, so
the emu state must be updated only after ggpo is stopped.
Fixes MINIDUMP-6P

Don't autosavestate when GGPO is on

Really disable renderer during GGPO advance frame

Don't stop the sh4 after render (single threaded) when GGPO is on

android: Don't restart when unpaused if online
2023-02-01 18:04:26 +01:00
Flyinghead 5875eda4d0 game id of console games wasn't trimmed
regression introduced by ee84567c17
2023-01-31 12:58:43 +01:00
Flyinghead 0305904873 force NTSC for some games 2023-01-30 13:40:35 +01:00
Flyinghead ee84567c17 naomi: use gameId instead of naomi_game_id to get current game name
naomi_game_id isn't reset if a console game is loaded.
settings.content.gameId should be used instead.

Issue #901
Fixes MINIDUMP-6G
2023-01-30 13:34:06 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead db9fbbaebf custom texture loader must be stopped before the tex cache is cleared
Fix for MINIDUMP-53
2023-01-22 17:22:04 +01:00
Flyinghead aea228c3df force real BIOS for Fushigi no Dungeon 2023-01-22 17:07:16 +01:00
Flyinghead 9d3125c546 fix tony hawk's 1 & 2 PAL disk ids 2023-01-17 11:41:50 +01:00
Flyinghead 13428ba696 allow screen stretching to be overridden when using widescreen cheat
Issue #870
2023-01-15 11:14:21 +01:00
Flyinghead 659d21680b android: race condition on Emulator::threadResult
The emu thread can be stopped/started by the app main java thread while
the render thread is running. This can lead to a race condition on the
threadResult future between checkStatus() and start(). So protect
relevant sections with a mutex.

Fix for MINIDUMP-1G, MINIDUMP-1H, MINIDUMP-2G and MINIDUMP-33
2023-01-14 10:52:27 +01:00
Flyinghead 66eb08f2d1 sh4: check that dma-ch2 source address is in ram
Force real BIOS for Force Five dc conversion
Fix for MINIDUMP-2W
2023-01-13 09:28:45 +01:00
Flyinghead d0bb0aea97 android: defer stopping audio until after current frame is rendered
In android, stop requests are not run in the UI thread so in
single-threaded mode, they must be deferred until after the current
frame is rendered to avoid deadlocking on audio.
2023-01-07 11:51:32 +01:00
Flyinghead 53ed006a54 naomi: 18wheeler, soulsurfer and wldrider input improvements
18wheeler: limit wheel range. Issue #693
18wheeler: Implement gear tristate lever with 2 buttons. Fake motor drive board to avoid error messages in deluxe version.
soulsurfer: floormat button/contact is always on
wldriders: unmap rear brake so it doesn't have to be released
2022-12-24 10:48:17 +01:00
Matt Phillips 6d913f42c8
Host-side profiler - initial commit (#834)
* Host-side (Flycast) profiler - initial commit

* Profiler - configurable frame warning time

* Compile fix for !DC_PROFILER
2022-12-21 11:24:11 +01:00
Matt Phillips 13f3c8281f Fixed single stepping, added support for vCont packets and ranged stepping (faster), initial work to support other breakpoint types 2022-12-18 16:27:38 +01:00
Flyinghead 51758b965e ggpo: disable full framebuffer emulation. memwatch perf fix
Disable full framebuffer emulation with ggpo if threaded rendering is
enabled. Would require thread synchronization on VRAM page map.
memwatch: do single lookup on page map in hit()
2022-12-17 10:54:01 +01:00
Matt Phillips b0a520fe18
Various GDB fixes and improvements (#832)
* Enabled GDB server, compile fix for MSVC, added GDB option to config

* GDB - 'vMustReplyEmpty' should not be explicitly handled, it is a test for how the target responds to unknown vpackets (which was incorrect)

* GDB wait for debugger option to allow debugging from bootstrap, and Event::Resume moved after renderer init so agent.interrupt() can pause the renderer

* Draw "Waiting for debugger", and fixed UI not rendering last frame before a state change

* Fixed GDB regs/mem endianness
2022-12-16 20:34:30 +01:00
Flyinghead cdca559d99 ggpo: optimize memwatch, save/load state. endOfFrame on vblank in
ggpo: Optimize memwatch and load/save state. Unprotect memory before restoring a state. Smaller timesync wait. Missing error handling.
pvr: call ggpo::endOfFrame() on vblank in only
ssa: fix warning
2022-12-10 17:19:34 +01:00
Flyinghead 32e3e7d9c5 vmem: no more 4GB vmem mode. only map elan RAM in naomi2 mode
Do not attempt to reserve 4GM of virtual space on 64-bit hosts. Use
512MB everywhere.
Don't map elan RAM if not needed and dont protect/unprotect it in
memwatch.
2022-12-09 17:37:49 +01:00
Flyinghead d417237e64 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/emulator.cpp
2022-12-06 21:47:50 +01:00
Flyinghead 446619ce85 atomiswave only has 2 MB of aica ram
new savestate version
build.h clean up
2022-12-06 20:51:45 +01:00
Flyinghead e48b72a859 race condition causing emu thread exceptions to be ignored
in multithreaded mode, checkStatus() *must* be called to report
exceptions thrown by the emu thread
2022-12-05 21:24:27 +01:00
Flyinghead 59ff44132b aica: get rid of audio samples batching
Some audio issues are reported because of this option and the now
correctly clocked aica cpu.
2022-12-05 18:34:52 +01:00
Flyinghead a40210c55c no aica batching for Tony Hawk's 1 & 2 2022-11-29 17:27:31 +01:00
Flyinghead 76cf989455 disable free play for radirgy noa
Issue #527
2022-11-14 16:00:11 +01:00
Flyinghead 94f3d80a75 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	CMakeLists.txt
#	core/hw/pvr/Renderer_if.cpp
#	core/oslib/audiobackend_alsa.cpp
#	core/rend/vulkan/desc_set.h
#	core/rend/vulkan/oit/oit_drawer.cpp
2022-11-02 20:12:34 +01:00
Flyinghead c15f446ffc hle bios: fix pal detection for some pal wince games
Caesar's Palace 2K, The Next Tetris, KISS
2022-10-31 11:31:21 +01:00
Flyinghead 40dbf53792 pvr: use render pass # to read the right tile when marking blocks
Fixes Unreal Tournament flashing/black screen.
gl: mark vram area in rtt to avoid overwriting data (Worms World Party)
Force Worms World Party to use CopyToVRam (regression due to
6a5db32d5d)
Don't calculate precise aspect ratio and use 4/3 instead (or more if
widescreen or stretch).
Fix clipping issue when using SCALER_CTL.vscalefactor. Avoir crash when
clip values are >= width or height.
vulkan: RenderFramebuffer wasn't working at all if !EmulateFramebuffer
2022-10-30 12:10:24 +01:00
Flyinghead 5722dc90f0 Full framebuffer emulation. Renderer interface changes
Helps for:
Densha de Go! 2, Issue #171
Vigilante 8, Issue #275
Xtreme Sports
Sonic Shuffle
The Ring of the Nibelungen
2022-10-23 16:32:42 +02:00
Flyinghead 1fd95c2886 Roadsters (US) doesn't support RGB cable
Issue #791
Compile warnings
2022-10-21 10:54:26 +02:00
Flyinghead 20f9450218 ignore start() if emulator already started
can happen on android
2022-10-19 10:06:53 +02:00
Edward Li 6add19fb04 unprotect elan memory during `dc_reset` hard 2022-10-15 21:32:49 +02:00
Flyinghead 02d4b821d7 naomi: allow eeprom-based settings to be overridden (rotate, region) 2022-10-12 22:59:46 +02:00
Flyinghead f88abf9987 extra depth scaling for south park rally
fixes car depth on character selection screen
2022-09-14 17:52:35 +02:00
Flyinghead e0d87eb093 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/rend/gui.cpp
2022-08-22 13:09:56 +02:00
bslenul 75ff5409f4 Switch broadcast region for San Francisco Rush 2049 and Sega Smash Pack - Volume 1 2022-07-25 11:26:12 +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
Enrique Santos c0e52b9a1a load game: destroy old maple devices before create call 2022-07-08 20:38:16 +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 907131b7f5 allow ForceWindowsCE option to be used in per-game config
Issue #252
2022-06-24 13:27:21 +02:00
Flyinghead 5eb302898f box art fetch and display
Issue #22
2022-06-15 21:22:12 +02:00
Flyinghead 77a2bbbb8d reios: cancel gd dma int in g1_end_dma. drv_stat returns busy when busy
Cancel G1 DMA interrupt in G1_DMA_END (fixes MSR, Psychic Force, Pro
Pinball, Sega Swirl)
GET_DRV_STAT must return busy when drive is busy (fixes Hell Gate, Zero
Gunner)
Better named constants
2022-04-29 15:18:41 +02:00
Flyinghead f2f4010203 clean up types.h, refactoring 2022-04-14 11:34:45 +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 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 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 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