Commit Graph

1111 Commits

Author SHA1 Message Date
Flyinghead 0fd51fb52a android: ignore audio latency. skip less frames in synchronous mode
android: use minimum size for audio buffer
alsa: use period size of 1024 instead of 512
hide audio latency option for android, win32 and mac
relax frame skipping formula
2020-06-05 21:16:48 +02:00
Flyinghead 002a05f866 dsp: proper MIXS input shift 2020-05-30 19:57:58 +02:00
Flyinghead 1301103245 maple: fix vmu reset in BIOS. naomi: support P2 buttons mapped to P1 2020-05-29 14:45:12 +02:00
Flyinghead 34575d577c fix sdl+egl build. get rid of USES_HOMEDIR. thread deadlock at exit
fix odroid xu3 build
sdl: use left or right alt+enter to maximize window
deadlock at exit if dc_exit called from emu thread
2020-05-08 18:41:36 +02:00
Flyinghead 8a6dbef775 naomi: don't die if eeprom cannot be updated (network), log instead 2020-05-02 18:24:13 +02:00
scribam 6ee4b6de85 Replace OS_DARWIN by __APPLE__ 2020-04-26 14:19:21 +02:00
Flyinghead aac8b30bce naomi: fake wrungp drive board. marine fishing inputs
set jvs board for dog walking and touch de uno
force region to japan for the same
2020-04-26 11:32:15 +02:00
Flyinghead 2c54dfd132 arm64: check CpuRunning at end of each timeslice. clean up
fixes hang when exiting service menu in kofnw
2020-04-24 19:56:38 +02:00
Flyinghead 482b7427f0 ui: get rid of 100% notif message. avoid logging garbage when canceled 2020-04-24 19:46:23 +02:00
scribam 0b1d739673 MSVC Cleanup 2020-04-23 14:10:49 +02:00
Flyinghead adfe30cf4c osx: allow exit with button. clean exit
terminate network in dc_term to avoid static init order issues
osx: call dc_term before exit
osx: exit app when exit button is pressed (dc_exit)
osx: ignore -NSDoc... app args
2020-04-23 11:46:34 +02:00
Flyinghead bec7a9f452 network: start network before starting game to configure eeprom/flash
do second net sync when comm board is reset
close menu/cancel loading when pressing menu button
2020-04-22 19:11:49 +02:00
scribam 58abddfd27 Compilation fixes for MSVC 2020-04-20 22:17:32 +02:00
Flyinghead 64249eb68e gdrom: shrink gdrom buffer to decent size 2020-04-20 18:53:08 +02:00
Flyinghead 17a2c3644f ui: add loading screen with cancel button. don't freeze ui on load 2020-04-20 18:52:02 +02:00
Flyinghead 06313dd540 naomi: auto configure eeprom and bbsram for network 2020-04-19 21:45:15 +02:00
Flyinghead 98b2a32eae naomi: auto-rotate screen, no widescreen when rot, lightgun as analog
rotate screen for naomi games that need it
disable widescreen when rotating screen
detect lightgun games and enable proper settings
disable model 3 comm board for atomiswave
2020-04-17 22:11:11 +02:00
Flyinghead 3660cf49f4 naomi net: don't xmit the packet number 2020-04-17 18:09:56 +02:00
Flyinghead 7058ffeb61 dsp: fix output shift
fix wrungp ear rape
2020-04-17 18:04:58 +02:00
scribam 62afe5714a Rework cThread to use std::thread 2020-04-15 20:20:30 +02:00
Flyinghead be1f2138e7 naomi: add inputs for wrungp. network error handling/reporting 2020-04-15 19:07:04 +02:00
flyinghead 3495a0b53e
Merge pull request #72 from inada-s/garkun/skip-recvfrom-with-invalid-sock
[MODEM] avoid WSAEINVAL error
2020-04-15 10:43:23 +02:00
Shingo INADA 645c771af2 [MODEM] mark as invalid-socket if failed to bind udp sockets to avoid WSAEINVAL error 2020-04-15 11:44:01 +09:00
Shingo INADA 2d67334cb4 [MODEM] recv tune. set small callback_cycles to recv fllowing data quickly. 2020-04-15 11:27:59 +09:00
Flyinghead a41a81f5dd naomi: network code for model 3 comm board 2020-04-14 17:43:11 +02:00
Flyinghead 6215623640 naomi: add tokyo bus guide 2020-04-13 18:32:58 +02:00
Flyinghead d001b40430 modem: fix isp settings in flash. dc_flash.bin no longer used
fix crash in World Series Baseball when connecting
fix Jet Grind Radio web site access
2020-04-05 19:58:50 +02:00
scribam 1ce40ff0ec Compilation fix for MSVC 2020-04-03 18:55:10 +02:00
Flyinghead d1b29a59d2 vulkan: re-enable vulkan 1.1 on Android. Fix TEST_AUTOMATION
disable vmem32 for Heroes of Might and Magic III
support no vmem in _vmem.cpp
2020-04-03 16:32:53 +02:00
Flyinghead 3f29bac591 pvr: textured background plane
fix for Who Wants to Be a Millionaire
2020-04-03 16:26:00 +02:00
scribam 769770ab81 Replace cMutex by std::mutex 2020-03-30 23:00:43 +02:00
scribam a155282fd0 Cleanup compiler warnings (mostly sign-compare) 2020-03-30 23:00:43 +02:00
scribam e99aac3575 Remove "using namespace std;" 2020-03-30 23:00:43 +02:00
scribam c1b37b56bc Remove "sh4_if.h" and "stdclass.h" from "types.h" 2020-03-30 23:00:43 +02:00
scribam 9a420b0093 Remove macros EMUERROR 2020-03-30 22:18:44 +02:00
scribam 4bf6802855 Cleanup include headers 2020-03-29 14:26:21 +02:00
scribam 427b428718 deps: Update xxHash to version 0.7.3 2020-03-29 13:47:20 +02:00
scribam fef96c125a deps: Update xbyak to version 5.891 2020-03-29 13:47:20 +02:00
Flyinghead f8ca801877 holly: don't die if read/write-only reg is written/read. log instead 2020-03-29 12:55:16 +02:00
scribam 0035871422 Replace RELEASE by NDEBUG 2020-03-29 10:12:32 +02:00
Flyinghead c5a42a57bc limit maple schedule time, allow vram 8-bit reads, minor changes 2020-03-28 12:19:36 +01:00
Flyinghead 96c8353364 pvr: don't discard RTT frames 2020-03-28 12:19:36 +01:00
Flyinghead 8ada1d5320 pvr: defer index building and strip merging, filter out infinite verts
don't reset tileclip_val on each frame (Irides - master of blocks)
spg clean up
2020-03-27 13:03:49 +01:00
tokuio 7e4a31c786 Add game description to roms in file list 2020-03-25 12:49:58 +00:00
Flyinghead c098790f3b naomi: connect C1 VMU fvor P2 2020-03-24 23:22:57 +01:00
Flyinghead 09c439bbe8 naom: VMU support (vonot, sf3zu). Fix otrigger inputs. 2020-03-23 17:48:43 +01:00
Flyinghead 39d81923c9 keyboard support for totd and luptype 2020-03-23 14:09:50 +01:00
Flyinghead f99d7fa262 naomi: add default eeproms 2020-03-22 16:46:16 +01:00
Flyinghead 0c2e95185c support for right analog stick. Fix gunsur2 inputs 2020-03-20 16:57:50 +01:00
Flyinghead 6b2e815b49 naomi: fix monkey ball inputs 2020-03-19 23:38:01 +01:00
Flyinghead e44ed4a8e8 gdrom: don't resume cdda if not playing. stop if cur > end 2020-03-19 17:04:47 +01:00
scribam 6dd35cc811 Add NOMINMAX for MSVC and use <algorithm> 2020-03-16 23:44:06 +01:00
Flyinghead ad3dce1102 fix alignment issues reported by ubsan on x64
Fix chd lzma and zlib buffers alignment
Fix ChannelEx struct alignment
2020-03-14 22:23:13 +01:00
Flyinghead 4e73af0f94 Mem leaks in input mapping/jvs/x11. Fix crash when latin-1 char is input
Fix warnings
2020-03-12 16:09:05 +01:00
Flyinghead aff2b9e1af fix simple texture bleeding case when upscaling. Clean up 2020-03-11 17:55:13 +01:00
Flyinghead 0b6b6339ed nvmem: generate console ID at startup. rec-x64: Call stack alignment
Generate console ID in dc_nvmem.bin if blank. Used by chuchu rocket
login.
Align stack to 16-byte
2020-03-10 14:47:45 +01:00
Flyinghead 015dcf117d naomi: enable lightgun if one is connected 2020-03-09 21:03:54 +01:00
Flyinghead 797dabe11f Add more buttons for arcade games. Show arcade mapping in UI.
Issue #40
2020-03-09 19:44:16 +01:00
scribam 53bde38035 Replace DECL_ALIGN macros by alignas 2020-02-27 22:17:33 +01:00
Flyinghead 21f1517a5f dsp x64: use returned code buffer ptr on windows cuz it's reallocated
fixes dsp crash on windows
2020-02-27 11:52:00 +01:00
Flyinghead 99f04ec753 nuke softrend 2020-02-26 23:41:05 +01:00
Flyinghead f7e811e463 x64 dsp: OSX fix 2020-02-26 19:46:46 +01:00
Flyinghead 091c14c78a X64 dsp jit compiler
fix clamping in arm64 dsp
2020-02-26 18:38:05 +01:00
Flyinghead 6bfde76514 vk: avoid calling List::head() in loops 2020-02-25 16:34:49 +01:00
Flyinghead 0ef54aa16b vram32 small optim 2020-02-25 12:55:26 +01:00
Flyinghead 8a9400ca29 GD: Implement ATA_IDENTIFY as per qemu 2020-02-11 21:25:01 +01:00
Flyinghead 9826afa063 upload all texture mipmap levels to gpu
implemented for gl/gl4/vulkan/oit
don't auto-generate mipmaps in vulkan
simpler/smaller detwiddle table
use std::lock_guard with cMutex
2020-02-07 16:55:32 +01:00
Flyinghead 333b21fac4 Fix .elf support. Init aica irq mask/level during HLE boot
BSC PCTRA is 32-bit wide
2020-02-05 18:02:44 +01:00
Flyinghead dcf5444acc stop cdda when reading sector 2020-02-02 21:15:53 +01:00
Flyinghead b79c074444 axe wchar 2020-01-31 23:51:12 +01:00
Flyinghead aaaf093af7 Allow ejecting and changing the disk while in-game 2020-01-30 19:01:47 +01:00
scribam 4161ca9b07 msvc build fixes 2020-01-28 19:08:22 +01:00
Flyinghead aac665e617 better joystick handling for wldkicks. fix blockpong controls
limit magnitude of joystick for wldkicks
fix blockpong controls (reverse x axis)
2020-01-27 22:08:39 +01:00
Flyinghead 76d7e8b653 naomi: wldkicks inputs 2020-01-26 23:23:59 +01:00
Flyinghead 0d9214df40 replace Array with std::array 2020-01-25 11:00:34 +01:00
Flyinghead 81c9312fb4 naomi: use crc to find roms 2020-01-24 23:55:54 +01:00
Flyinghead 7d33816d25 naomi: fix reboot. clean up
fix reboot (and exiting service menu) by disabling legacy dimm board
emulation
clean up. typo in var name
2020-01-24 23:30:16 +01:00
Flyinghead 48efdac9b4 naomi: open by crc for zip and 7z. add mvsc2u crc rom info 2020-01-24 21:55:12 +01:00
Flyinghead 573a298bba naomi: emulate mazan inputs 2020-01-24 15:43:19 +01:00
Flyinghead 31651c2ac6 more build fixes 2020-01-20 13:49:29 +01:00
Flyinghead 3e6bef3cc0 option to pipe the dc serial port to a pty on linux
allow the use of dcload-serial
2020-01-20 13:22:36 +01:00
Flyinghead 2b389a2142 no div matching for Aqua GT. Set correct input board for mazan
non functional changes
2020-01-15 22:50:07 +01:00
Flyinghead 1b49bdd31e reduce save states size by ~20mb 2020-01-07 20:13:33 +01:00
Flyinghead 73d34a9ab5 aica: generate samples when arm is disabled (dynarec)
Restores sound in Twinkle Star Sprites when dsp is enabled
Fix armwrestler MOV and LDR dynarec errors
Better cycle counting
2020-01-06 20:53:49 +01:00
Flyinghead 13de6b9a1e pvr: avoid TA data buffer overflow and raise Object List overflow int
fixes Ooga Booga crash/hang in offline and online multiplayer
2019-12-23 12:25:45 +01:00
Flyinghead a5a71bec0b Arm7: Fix reads from PC
When using dynamic shift, PC is offset by 4 due to pipeline effects
merge from upstream
2019-12-18 19:22:42 +01:00
Flyinghead 3294b36961 limit dc analog axes magnitude 2019-12-17 23:41:32 +01:00
Flyinghead 12b9b7254a reduce precision of FIPR and FTRV sh4 ops on x86 platforms 2019-12-17 20:23:58 +01:00
Flyinghead 7ab275d4b5 naomi: faster gdrom loading 2019-12-15 21:22:51 +01:00
Flyinghead 553343e698 suport latest lr core savestate format 2019-12-13 12:59:35 +01:00
Flyinghead 530cdaa23f use doubles to emulate FIPR on x86. avoid crash with per-game config
Don't store the renderer type in per-game config as this crashes.
Fixes Sonic Adventure falling off track
Other non-functional changes
2019-12-13 12:27:43 +01:00
Flyinghead 6439e01087 pvr: force background plane not textured 2019-12-08 22:31:08 +01:00
Flyinghead 09f5d25133 vulkan: automation screenshot. less code duplication
fix assert on exit due to not released vmem
fix crash when resizing window
2019-11-13 20:08:14 +01:00
Flyinghead 7b8840a330 Merge remote-tracking branch 'origin/master' into fh/vulkan 2019-11-10 21:01:29 +01:00
Flyinghead 56dfeb6722 mmu: missing template instances in the slow mmu 2019-11-03 21:27:06 +01:00
Flyinghead f0538eac20 flash: don't abort on invalid access size 2019-11-03 21:25:18 +01:00
Flyinghead 84bdcd9a10 G2: Add Dev Device DMA
backport from upstream
2019-11-03 21:24:28 +01:00
Flyinghead 0e12da4395 DMAC: Add LMMODE1 for ch2-dma, add basic DMAC based dma support
backport from upstream
clean up
2019-11-03 21:22:46 +01:00
Flyinghead 27fd0d4262 aica: LFORE is not cleared automatically 2019-11-03 18:23:25 +01:00
Flyinghead a7926a2357 serial: backport from upstream. Clean-up 2019-11-03 18:12:16 +01:00
Flyinghead b7dd8f16d4 vmu: avoid flashram buffer overflow 2019-11-03 17:08:34 +01:00
Flyinghead 07958f08ae refactor xform matrix out of gles. use xform matrix in vulkan 2019-10-23 18:13:28 +02:00
Flyinghead 2f363a7355 Merge remote-tracking branch 'origin/fh/gl-scale-mat' into fh/vulkan
# Conflicts:
#	core/rend/TexCache.h
#	core/rend/gl4/gles.cpp
#	core/rend/gles/gles.cpp
#	core/rend/gles/gles.h
#	shell/apple/emulator-osx/reicast-osx.xcodeproj/project.pbxproj
2019-10-21 19:49:53 +02:00
Flyinghead 0dc4b07538 pvr: use a switch instead of 100 ifs 2019-10-21 19:13:29 +02:00
Flyinghead d27142f565 maple: don't write past the vmu capacity 2019-10-21 19:09:01 +02:00
Flyinghead 86818389ac move texture cache to a template class. vulkan: OSD on android
store texture in the cache map instead of the heap
make related functions member of the class (CollectCleanup, killtex ->
Clear)
refactor common OSD stuff into rend/osd
vulkan support for OSD
2019-10-21 16:39:16 +02:00
Flyinghead 2a89874812 decouple imgui from gles renderer 2019-10-19 18:34:24 +02:00
Flyinghead 6611e9bf5e gl: refactor wsi into their own class.Allow dynamic vk<->gl switch 2019-10-18 21:57:08 +02:00
Flyinghead 06e1456d4f vulkan: memory allocator 2019-10-12 13:48:41 +02:00
Flyinghead 6304b1e9c1 Fix verify() and die() macros 2019-10-12 13:48:41 +02:00
Flyinghead 2bac2afe98 gles: fix depth issue when drawing quads on gles2
Fix Gunlord black screen on GLES 2
2019-10-12 13:48:41 +02:00
Flyinghead b1defae3f7 vulkan renderer - WIP 2019-10-05 11:50:14 +02:00
Flyinghead 8202ac420b pvr,rend: more refactoring out of gles. Change texture id to 64b 2019-10-04 13:33:08 +02:00
Flyinghead 8eac844825 OSX build fix 2019-09-30 20:14:46 +03:00
Flyinghead bad10bae20 dyna: only protect ram when needed. Use const ref to avoid copies
avoid extra op in x64 rec
2019-09-30 15:47:05 +02:00
Flyinghead 87023c722d Hide unsafe optimizations on all but arm32 platform
Non-functional changes
2019-09-30 15:36:39 +02:00
Flyinghead 0595bae85b dyna: use xxhash instead of sha1 to hash code blocks 2019-09-29 23:14:38 +02:00
Flyinghead 9d3ee3b57f dyna: get rid of SmcCheckLevel options. Fix rec-cpp
Block check is now full or off depending on block protection
rec-cpp: Add missing opcode call classes and allow for immediate args
2019-09-29 18:18:46 +02:00
Flyinghead 84e0f9f118 aica: get rid of old sync dma timing 2019-09-28 22:34:36 +02:00
Flyinghead f0dfc61975 naomi: gd cart memory leak 2019-09-28 18:56:58 +02:00
Flyinghead 106dfc3f71 Add Discord link. non-functional changes 2019-09-27 22:00:52 +02:00
Flyinghead 88a5acd9e6 aica arm: mask pc using max aica ram, not actual, in entry points
Fix crash in Sturmwind, Volgarr and Gunloard
2019-09-27 15:57:39 +02:00
Flyinghead ae4f378747 Add fast-forward mode
Fix buttons.png not being created if not first run
2019-09-27 14:15:29 +02:00
Flyinghead 219a001631 pvr: eliminate empty polygons and render passes
initialize sprite face base & offset colors to white
never join TR poly strips
re-enable depth after mod vols
2019-09-25 23:28:53 +02:00
Flyinghead bb89cb5c22 pvr: calculate emu speed over the last 2 frames in sync render
Games that do multiple renders per frame may hit a condition where one
of the renders is systematically dropped in synchronous render mode.
2019-09-25 21:08:39 +02:00
Flyinghead 9b063644c4 Per-game widescreen cheats
New option to make games render in 16/9 anamorphic format and stretch
screen to correct aspect ration.
2019-09-24 23:59:36 +02:00
Flyinghead f599891e08 pvr: face color and offset color should not be reset if not set
it's expected that polygons can reuse previous values for these colors
even for not immediately following polygons.
2019-09-22 20:00:09 +02:00
Flyinghead 55880b0dd4 537c2a4 broke rtt rendering 2019-09-22 18:20:43 +02:00
Flyinghead e85b724085 vmem: mprotect P2 vram space
Used by NHL 2K2 yuv textures
Fixes FMV not being updated
2019-09-22 10:29:53 +02:00
Flyinghead 537c2a4ed6 pvr: reset face and offset colors when not set in poly param
Fixes black ice in NHL 2K2 and black players in NHL 2K
Clean up
Don't build soft renderer
2019-09-21 22:53:09 +02:00
Flyinghead c408867ead pvr: reset tileclip value when resetting TA parser
fixes black players in NHL 2K with hle bios
2019-09-20 15:36:49 +02:00
Flyinghead b693d1c054 aw: set rom key in game list (mameset 0.213)
backport lr changes
2019-09-19 16:15:18 +02:00
Flyinghead e7a33e6de1 reios: allow hle savestates to be loaded in non-hle mode
Always initialize reios hooks during startup so hle savestates always work.
Fix bios loading logic for naomi/aw
2019-09-19 11:49:19 +02:00
scribam 4dd6ccea8d msvc/sh4: Compilation fix for cvt_f2i_t 2019-09-15 13:37:11 +02:00
Flyinghead 8194254fa1 pvr: restore TA ctx after rendering framebuffer
fixes Sakura Taisen 4 hang when starting game
2019-09-13 12:31:10 +02:00
Flyinghead 2bcc3c574b pvr: ignore data sent to TA if no prior list init
fixes Vigilante 8 freeze during FMV sequence
2019-09-12 15:07:57 +02:00
Flyinghead 1174bce64a dynarec: set correct sign on result if float conv returns indefinite
canonical implementation, x86/x64 only
2019-09-12 15:06:21 +02:00
Flyinghead 25a2c52960 pvr: crash when CurrentPP is null 2019-09-11 23:21:14 +02:00
Flyinghead 8b949e1dca Get rid of time_sync timer. Clean-up 2019-09-11 15:09:23 +02:00
Flyinghead a19c73de7b Fix some sh4 regs hard reset 2019-09-11 15:00:08 +02:00
Flyinghead b2ee35f82e aica: initialize regs with half-words 2019-09-11 14:54:24 +02:00
Flyinghead e1368f9713 reios: First polygon wasn't displayed in some cases 2019-09-11 14:08:54 +02:00
Flyinghead 08d7cc68fd aica: use log scale for attack phase
Change AEG starting envelope value from 3ff to 280
Use log scale instead of linear during attack phase
2019-09-10 16:21:51 +02:00
Flyinghead 0bd95cbba8 Delay Frame Swapping option to enable FB_R_SOF == FB_W_SOF detection 2019-09-09 14:58:53 +02:00
Flyinghead fbdbd2491d aica: implement pitch LFO and LPF envelope
simplify channel serialization
optimize aica channel reg write callbacks
2019-09-09 11:32:03 +02:00
scribam 49b7e0682b Cleanup 2019-09-07 20:36:13 +02:00
scribam e0fb50488d deps: Update xxhash integration 2019-09-06 21:05:19 +02:00
Flyinghead d1c3d31259 aica: save quantization and last sample when entering loop for normal adpcm 2019-09-06 13:53:01 +02:00
Flyinghead 7287b3816b aica: don't reset the adpcm decoder when looping
also don't decode past LEA, use LSA instead
2019-09-05 18:17:53 +02:00
Flyinghead a50ed2cc7d dsp: fix SHIFTER and ACC shift values. Simplify 2019-09-05 15:45:14 +02:00
Flyinghead 713705a6fe dsp: fix errors in PACK and UNPACK functions 2019-09-05 15:45:14 +02:00
scribam bdf2029e99 Simplify libpng/zlib integration 2019-09-04 19:59:51 +02:00
Flyinghead 5b9892425f naomi: game detection fails on windows when mixing / and \ 2019-09-03 19:18:11 +02:00
Flyinghead b4d33a6c70 Merge remote-tracking branch 'origin/master' into fh/hle-bios 2019-09-03 19:14:39 +02:00
Flyinghead ee1ee56824 proper hard reset of sh4 mm registers
more clean up
2019-09-01 23:10:04 +02:00
Flyinghead aadc9c3bfc Detect game region/vga support and set options accordingly
Better IP.BIN parsing (wince, vga)
Use wince flag and boot filename for wince detection
Switch to TV composite if vga unsupported
Switch to supported BIOS region if current is unsupported or default
2019-09-01 16:35:12 +02:00
Flyinghead 61f4cd4ecd Merge remote-tracking branch 'origin/master' into fh/hle-bios 2019-08-31 22:10:09 +02:00
Flyinghead 5ca6cacf25 reios: fix wince exception due to unaligned pio xfer 2019-08-31 20:53:42 +02:00
Flyinghead 936cd6781b clean up 2019-08-31 17:36:34 +02:00
scribam d826d8123a msvc: Fix DYNACALL/__fastcall usage 2019-08-31 14:46:30 +02:00
Flyinghead e07879e43c maple: std controller input mask was applied to all gamepad devices 2019-08-30 23:37:43 +02:00
Flyinghead 2015d9a696 rename and clean up 2019-08-30 23:35:10 +02:00
Flyinghead 79231d8961 missing change 2019-08-30 14:39:33 +02:00
Flyinghead bae43c236e dynarec: use paddr to check for bios blocks + more 2019-08-30 14:11:15 +02:00
Flyinghead cc6190f261 flash: use rewritten blocks when allocating a new one 2019-08-30 13:59:15 +02:00
Flyinghead e173b83574 New option to force WinCE mode 2019-08-28 20:47:47 +02:00
scribam 269297be18 Use _WIN32 to handle Windows specific code 2019-08-28 20:37:53 +02:00
scribam 1b002ae0da Use __GNUC__ to handle GCC specific code 2019-08-28 20:37:53 +02:00
scribam 51d181a46c Use _MSC_VER to handle specific Visual Studio code 2019-08-28 20:37:53 +02:00
scribam 61382316c9 Use __ANDROID__ to handle specific Android code 2019-08-28 20:37:53 +02:00
flyinghead 02b450ff19 Fix vram and code block protection in 32-bit mode 2019-08-28 14:08:13 +02:00
scribam 148033625c wince: Add missing preprocessor TRACE_WINCE_SYSCALLS
unresolved_ascii_string and unresolved_unicode_string only exist if
TRACE_WINCE_SYSCALLS is defined
2019-08-22 20:22:56 +02:00
Flyinghead cc8bab249f reios: serialize hle bios state. Fix save state compat with upstream and libretro 2019-08-19 18:19:27 +03:00
Flyinghead 7c8ce6267a use lroundf(x) instead of x + 0.5f 2019-08-17 18:19:33 +03:00
Flyinghead aaf950d470 Add default ISP information to flashrom 2019-08-14 20:05:42 +02:00
Flyinghead e34df4fed1 Support for Internet Game Pack game 2019-08-14 09:17:07 +02:00
Flyinghead 3e1956b949 reios: hle bios option now forces hle use
fallback to hle bios happens if no bios file found regardless of option
2019-08-13 17:12:29 +02:00
Flyinghead 93e009bf1a gl: use matrices for ndc and viewport calculations
Support VO_STARTX and VO_STARTY for shifting displayed frame
Add glm to deps
Calculate NDC, scissoring and viewport matrices once
Reduce code duplication
2019-08-12 19:56:44 +02:00
Flyinghead 7ff225bfa0 PVR: detect direct FB writes in non-interlace. Fix packed 888 FB format 2019-08-09 12:03:09 +02:00
Flyinghead 8bd2450608 comments/logs clean up 2019-08-08 08:20:15 +02:00
Flyinghead e162f3ac83 reios: cdda support 2019-07-31 22:08:56 +02:00
Flyinghead 55f76d02c0 reios: fix flashrom write
Fixed language selection that was being ignored (also w/ bios)
2019-07-31 17:59:53 +02:00
Flyinghead 6059831ec7 reios fixes 2019-07-30 19:04:51 +02:00
Flyinghead 1fffbad9fc Fix build warnings. config.h for flac 2019-07-28 18:49:59 +02:00
Flyinghead 9791ebebce wince: fix wince page lookup 2019-07-28 18:28:22 +02:00
Flyinghead 1333d6f776 Remove TARGET_BOUNDED_EXECUTION. Build warnings and clean up 2019-07-28 17:37:04 +02:00
Flyinghead a9dbbccf93 Unprotect VRAM before switching system. Fix texture cache clean 2019-07-28 17:06:12 +02:00
Flyinghead 591ebf0ba6 Merge branch 'fh/wince-dynarec' of https://github.com/flyinghead/flycast into fh/wince-dynarec 2019-07-28 13:04:05 +02:00
Flyinghead d27ab0361c arm build fix 2019-07-25 21:51:48 +02:00
Flyinghead 4dfa83079a aica and arm7 clean up 2019-07-25 21:34:43 +02:00
Flyinghead 2529b5048e get rid of useless macro 2019-07-24 19:09:54 +02:00
Flyinghead 32055c3bf9 Better error messages when BIOS files missing 2019-07-24 18:53:09 +02:00
Flyinghead 9932d9bf43 OSX: fix bios files path (now in /data/) 2019-07-24 18:24:58 +02:00
Flyinghead 1375536534 fix android intent-filter. fix spurious maple warning 2019-07-13 15:30:10 +02:00
Flyinghead 326bc580ec Merge branch 'fh/unified' into fh/wince-dynarec 2019-07-13 12:50:19 +02:00
Flyinghead bbc11a30aa Naomi rename vars and clean up. Logging changes. 2019-07-13 12:44:10 +02:00
Flyinghead e63d7d717e Fix Restart crash. Clear texture cache during reset 2019-07-13 10:59:20 +02:00
Flyinghead 68acf48d64 Support for Twin Stick and Ascii FT Stick 2019-07-12 19:18:39 +02:00
Flyinghead 14ddd01e39 compilation warnings 2019-07-12 17:53:17 +02:00
Flyinghead 4f8e18215b Fixed savestates: restore compatibility with lr and master
Add new maple devices from lr
Clean up shil.cpp
2019-07-12 17:20:43 +02:00
Flyinghead eb38564922 use exceptions for startup errors 2019-07-11 19:23:21 +02:00
Flyinghead 5285911133 Mirror writable aica ram to 8mb in 512mb vmem mode
Fixes switching from dc to naomi on windows
Should help games reading past end of aica ram (HeadHunter and others)
2019-07-10 20:17:59 +02:00
Flyinghead ad98e583c8 win32: fix vmem reset 2019-07-10 18:58:55 +02:00
Flyinghead 58cb50f587 fix reset hang on naomi 2019-07-10 17:25:11 +02:00
Flyinghead 449d150eba android: build fix
clean up files comitted by mistake
2019-07-10 09:57:08 +02:00
Flyinghead f3a91de1af Unify dreamcast, naomi and atomiswave builds WIP 2019-07-09 23:52:19 +02:00
Flyinghead d5e24d8aed Cleaner init. Get rid of LastImage 2019-07-08 18:10:43 +02:00
Flyinghead 10e6b296c5 fix cue issue. better logging 2019-07-08 00:03:44 +02:00
Flyinghead c3a42b0b22 wince: online support
Use default asyncmap for LCP control packets
Delay reading from picotcp ppp stream when connecting
Accept [PSH,SYN] as valid tcp connect packet

Add PBA Tour Bowling 2001 as wince game
Disable vmem32 for StarLancer and Maximum Pool (req'd for online support)
2019-07-07 20:31:36 +02:00
Flyinghead 18bcb81682 naomi: minimal emulation of 840-0001E comm board
makes gunsur2 and gunsur2j boot
various minor naomi changes
2019-07-04 17:33:26 +02:00
flyinghead b540b437ee win32: unprotect ram regions individually in blockmanager
fixes abort when starting game in windows
2019-07-04 09:36:22 +02:00
Flyinghead ad4218d617 audio: use new logging
other logging changes
2019-07-01 17:17:08 +02:00
Flyinghead b388fa4377 imgread: use new logging 2019-07-01 16:10:28 +02:00
Flyinghead 35cd1fcf14 sh4: use new logging 2019-07-01 15:22:04 +02:00
Flyinghead feb1b79353 sh4/dyna: use new logging 2019-07-01 12:17:51 +02:00
Flyinghead cd0849a8f5 pvr: use new logging 2019-07-01 11:42:00 +02:00
Flyinghead 74186d2518 naomi: use new logging 2019-07-01 11:14:18 +02:00
Flyinghead c60e2d29e8 modem: add termination function to stop pico thread
use new logging
log: set max verbosity to warning for release builds
2019-07-01 10:28:31 +02:00
Flyinghead a31f573c69 maple: use new logging 2019-06-30 23:38:58 +02:00
Flyinghead fcc6fd784c holly: use new logging 2019-06-30 23:02:26 +02:00
Flyinghead 58e1c68eb8 flashrom, gdrom: use new logging 2019-06-30 22:41:55 +02:00
Flyinghead cf6887a5d0 aica: use new logging 2019-06-30 22:09:32 +02:00
Flyinghead 8404c6322c New logging framework stolen from dolphin 2019-06-30 21:06:46 +02:00
Flyinghead 0a95a60ac6 less verbose logs. unbuffered stdout when test automation 2019-06-28 11:42:35 +02:00
Flyinghead e6b8c46557 atomiswave: fix coin error 2019-06-27 09:03:49 +02:00
Flyinghead 871260cfcf naomi: better error handling when loading a gdrom
x64 and arm64 dynarecs: Support 64-bit immediate readm (ninjaslt)
2019-06-26 19:06:30 +02:00
Flyinghead 927298f353 naomi: fix coin chute (compiler bug?). Disable verify in TA parsing
Fix F1 World Grand Prix for Dreamcast
2019-06-25 19:10:20 +02:00
Flyinghead 7dab84fd80 vmem handlers: last block wasn't mapped 2019-06-24 22:56:07 +02:00
Flyinghead c27975fb37 ssa: don't propagate const over interpreter fallback, sync_sr and sync_fpscr
rec-x64: support immediate args for xtract
Set write rtt to vram for Super Speed Racing (a.k.a Flag to Flag)
2019-06-24 18:56:09 +02:00
Flyinghead f862903a74 Don't unprotect vram when a texture is updated
Adjacent textures in other pages still need vram protection
Fixes texture corruption in many games since ad5ab6240b
2019-06-23 21:30:46 +02:00
Flyinghead 112e272075 renderer: support non-integer v-scaling factor
Fixes missing half-screen in Wacky Races (PAL), Buzz Lightyear of Star Command (PAL),
Tom Clancy's Rainbow Six - Rogue Spear + Mission Pack - Urban Operations (PAL), Sega Worldwide Soccer 2000 (PAL)

Input record and replay support for test automation
2019-06-23 12:17:24 +02:00
Flyinghead 49b49c5207 don't write-protect BIOS and IP.BIN blocks
Fixes Grandia II crash at start on arm.
Fix bug in bm_GetBlock()
2019-06-21 16:18:34 +02:00
Flyinghead b226544d03 Merge remote-tracking branch 'origin/master' into fh/wince-dynarec 2019-06-21 14:37:32 +02:00
Flyinghead d1550357ce fix verify failed when switching to overview (app list) on android 2019-06-21 14:10:04 +02:00
Flyinghead 3e8cdc76f3 wince: fix load state hanging 2019-06-21 13:17:34 +02:00
Flyinghead 70ea7c4d76 ssa: use canonical implementations to compute const ops 2019-06-20 19:27:21 +02:00
Flyinghead 6ed098a929 wince: enable code block protection 2019-06-19 22:55:47 +02:00
Flyinghead becb0a5efe renderer: when a RTT frame is rendered, swap any pending frame first
Fixes Tony Hawks 1 & 2 black screen issue
2019-06-19 15:10:28 +02:00
Flyinghead ad5ab6240b refactor vram lock/unlock code into new vmem.cpp functions 2019-06-19 14:49:14 +02:00
Flyinghead 318852e261 dynarec: use mprotect to protect code areas
All ram pages containing code are write protected. In that case, no need
for block checks. Memory reads in the same block(s) can also be executed
at compile time and the results propagated as constants.
When a write is detected in a protected area, the corresponding blocks
are discarded and recompiled using traditional (slow) block checks.

Backported the blkmap code finding change from upstream.
Use smart pointers for block management to avoid reference issues.
Added WriteAfterWrite ssa pass
Fixed crash in ssa ConstProp pass when op list is modified
2019-06-19 11:01:33 +02:00
Flyinghead 8d8e694e23 swap setpeq args in ssa if first is imm 2019-06-18 13:25:43 +02:00
Flyinghead 8506355447 wrap aica ram to 8MB instead of only 2MB (dc)
fix crash with GuruGuru Onsen 2 and HeadHunter
2019-06-13 21:58:09 +02:00
Flyinghead 7120512205 wince: use exceptions in dyna/decoder.cpp and catch them in driver.cpp 2019-06-13 18:36:08 +02:00
Flyinghead e0949fb9aa Fix div matching: support 64-bit div and correct handling of negative
Some games do 64-bit / 32-bit division (Pro Pinball Trilogy)
DIV0s/1 use and output 1's complement numbers
The final reminder fixup wasn't correct for negative dividend
2019-06-13 18:27:21 +02:00
Flyinghead c49694599c rec-arm: use ssa regalloc
add `subc a,a` expression to simplify
2019-06-12 17:31:37 +02:00
Flyinghead e537d92bcc ssa: don't simplify FPU ops because of Inf of NaN 2019-06-12 08:52:42 +02:00
Flyinghead ff745ee4fe fix xtrct canonical implementation 2019-06-10 19:17:24 +02:00
Flyinghead a4453c0a81 Fix vmem in 512MB mode 2019-06-10 19:01:56 +02:00
Flyinghead 3dd16e80d2 arm64 and x64 recs use ssa regalloc 2019-06-10 13:57:10 +02:00
Flyinghead 623d70d710 ssa register allocator and more ssa stuff 2019-06-09 19:41:42 +02:00
Flyinghead bd30752b86 Use auto& to avoid copy when iterating. Inline mmu_Read/WriteMemNoEx 2019-06-08 13:04:35 +02:00
Flyinghead 0890150dda dynarec: ssa missing changes 2019-06-04 21:27:45 +02:00
Flyinghead 692556ca5d dynarec: ssa initial commit 2019-06-04 21:20:34 +02:00
Flyinghead 4540acc22e mmu: optimize mmu_full_SQ() 2019-05-28 19:41:21 +02:00
Flyinghead 8cb86de026 Make SMCCheck=Fast work on arm64
The issue is that flushing the dynarec cache makes rewriting fail for
the currently executing block. So this avoids flushing the cache too
often but the problem remains.
2019-05-28 19:40:30 +02:00
Flyinghead 51cf6cf271 regalloc: handle mem ops differently in wince mode
Flush all current writeback spans before the op
Flush instead of killing spans in case the mem access throws an
exception
Some optimizations
2019-05-28 19:37:24 +02:00
Flyinghead c6e92028f2 regalloc: cleanup. no functional change 2019-05-27 22:44:51 +02:00
Flyinghead 5b2cef3fdd dynarec: add negc and xtrct op codes
native implementation of negc and xtrct for x64 and arm64
rec-arm64: pass exception pc in w27 instead of sh4 context
inline mmu_intruction_translation() and clean up
2019-05-26 13:30:05 +02:00
Flyinghead 506756ea37 android: use common rend_thread() instead of a specific one
fixes the swap pending issue (double swap) on android
2019-05-25 18:48:00 +02:00
Flyinghead 2c91ca96fc rec-arm64: fix transitions to/from mmu
exit mainloop() before regenerating it
make sure dynarec cache is cleared between runs
when deserializing, clear dynarec cache after setting mmu state
2019-05-25 18:03:18 +02:00
Flyinghead e7e387b443 wince: enable/disable vmem32 based on mmu state 2019-05-24 18:19:33 +02:00
Flyinghead e3d95f2258 wince: unify _vmem and vmem32. Use 4GB virtual space on 64-bit arch
On 64-bit architectures, _vmem first tries to allocate 4GB then falls
back to 512 MB.
The same virtual space is now used by _vmem and vmem32 (mmu)
2019-05-23 11:40:33 +02:00
Flyinghead 5b7d07315b wince: clean up unused stuff 2019-05-22 15:15:53 +02:00
Flyinghead c2c0215e1b Merge remote-tracking branch 'origin/master' into fh/wince-dynarec 2019-05-22 14:13:00 +02:00
Flyinghead fb76efb08d Standard functions for virtual mem alloc/protect/map/... 2019-05-22 11:41:12 +02:00
Flyinghead 2e5eaa6e2b Log error when writing to flash ram 2019-05-21 18:27:43 +02:00
Flyinghead 37f379fe6b Better HBlank implementation 2019-05-21 18:27:15 +02:00
Flyinghead a17b8355e5 gdrom: use memset to reset read_buff 2019-05-21 11:34:51 +02:00
Flyinghead 74e7a95484 simplify test 2019-05-21 11:34:15 +02:00
Flyinghead 121e6b200b Reset gdrom params when changing disk 2019-05-21 11:29:44 +02:00
Flyinghead a5ae8eeef0 Reset flashrom on reset 2019-05-21 11:29:25 +02:00
Flyinghead 25a7fede2e save states: don't serialize gamepad state 2019-05-21 11:29:10 +02:00
Flyinghead 05f461c3c5 Use FB_R_SOF2 only to detect direct FB writes
Fixes flashing video in Virtua Fighter 3tb
2019-05-21 11:26:48 +02:00
Flyinghead 433590b610 rend: Add per-strip TR sort option 2019-05-21 11:24:03 +02:00
Flyinghead ac43a8c54e don't swap gl buffer until FB_R_SOF is set to the rendered framebuffer
Fixes flashing screens in South Park: Chef's Luv Shack, NFL Quarterback
Club 2000
Glitchy videos: The Next Tetris, Nightmare Creatures II, Rune Jade
Flashing rear-view mirror in Metropolis Street Racer
2019-05-17 17:13:48 +02:00
flyinghead 66cbc0acf6 wince: dynarec boost 1.2 -> 1.5 2019-05-15 15:26:08 +02:00
Flyinghead f0ebd2b818 wince: force aica.NoBatch 2019-05-15 14:00:36 +02:00
Flyinghead 2434d0183e wince: better sh4 instr cycle counting. Don't hash blocks if mmu on
Use actual instr latency cycles, including fp instr
Decrease the WinCE boost ratio to 1.2
Don't hash blocks when mmu on
2019-05-14 12:38:56 +02:00
David Guillen Fandos 65e2218792 Fix ARM64 rewrites with NO_RWX_PAGES
Tested on nvidia jetson and Android, so far works great.
2019-05-13 00:23:18 +02:00
David Guillen Fandos aa4fc8dd60 Move cache invalidation to vmem_platform and implement NO_RWX on arm64
Still not functional yet, this commit breaks arm64 on android for instance.
Rewrites are not yet figured out, will push them in the next commit.
2019-05-12 23:25:43 +02:00
David Guillen Fandos 3b760f9869 Add FEAT_NO_RWX_PAGES and implement it for x64 CPU (Win and Linux)
Tested: Both with and without the feature, works only for x64 CPUs for
now, but supported in both windows and linux (see vmem implementation
for it, using mem-mapped files).
2019-05-12 22:02:57 +02:00
David Guillen Fandos 1a2b1c8672 Remove traces of memory manager from Jit driver.
Still stuff to be removed in the Naomi file handler and the ARM
AREC, which need to get ported to the new vmem interface.
2019-05-12 19:47:11 +02:00
David Guillen Fandos 55e7c17030 Fix minor build issue with madvise flags. 2019-05-12 13:40:18 +02:00
David Guillen Fandos 555b39b7e5 Merge remote-tracking branch 'origin/master' into vmemstuff2 2019-05-11 22:11:24 +02:00
David Guillen Fandos b74db6ef53 Moving vmem to separate files with a proper interface.
Works so far for Linux and Android, need to do some testing on Windows.
2019-05-11 22:09:52 +02:00
David Guillen Fandos be1ecbaa8b Fix TARGET_NO_NVMEM and deprecate TARGET_NO_EXCEPTIONS
Linked them both toghether since you can't really define one and
not the other (plus Linux honors one windows the other in some
cases).
More refactoring on this area to follow.
2019-05-10 18:57:28 +02:00
Flyinghead c5a74ccfb7 Fix Sort-DMA 2019-05-10 16:10:07 +02:00
Flyinghead eb725f9e66 x11: fix fallback to gl 3.0. fix crash when switching renderer.
Fallback to GL 3.1 when GL 4.3 isn't available was broken.
Fallback to GL 3.0 instead of 3.1.
Fix crash when switching renderer (per-pixel, per-triangle)
2019-05-10 11:15:44 +02:00
David G. F afcd7a08a3
Merge pull request #1571 from davidgfnet/modemfix
Add ENABLE_MODEM and rework makefiles to support it.
2019-05-10 01:09:35 +02:00
Flyinghead 05577b64f7 wince: return actual vmu system area in GetMediaInfo
revert previous default vmu change
2019-05-09 11:25:17 +02:00
Flyinghead dc7f608461 wince: fix vmu issues 2019-05-08 22:31:59 +02:00
David Quintana ac9e6d147d Change speed-dependant limiting to rely on time dilation instead of frame rate. 2019-05-02 03:21:22 +02:00
flyinghead 0d19da2b4b wince: disable vmem32 on windows 2019-04-30 17:43:21 +02:00
Flyinghead 920a93b19c more win32 fix 2019-04-29 18:38:28 +02:00
Flyinghead 4f4d99872b win32 build fix 2019-04-29 18:33:14 +02:00
Flyinghead 810b8a59da wince: 32-bit virtual mem space
use fast mem read/write for x64 and arm64 dynarecs
2019-04-29 18:23:00 +02:00
Flyinghead 693a6c97f3 vmem: revert aica ram mapping change. Fix ptr diff overflow in 64-bit
Aica ram mapping conflicts with P4 store queues in arm dynarecs
2019-04-28 20:46:18 +02:00
Flyinghead 6b78e1f879 fix dynarec regression 2019-04-28 20:41:39 +02:00
David Guillen Fandos 3692ea7ae6 Improve stdclass.h/cpp support for non-Linux non-Windows platforms
Simplifies having implementation on platform separated files, which is a
pain for platforms which are not Windows but not Linux either (and yet
support pthreads).
Some minor cleanup here and there while we are at it.
2019-04-27 14:34:10 +02:00
David Guillen Fandos 7b50d5df8c Add ENABLE_MODEM and rework makefiles to support it. 2019-04-27 12:05:13 +02:00