Commit Graph

1641 Commits

Author SHA1 Message Date
Flyinghead 4220c0d64f naomi: reset destination ram if dma xfer from invalid rom offset
Reset destination area to 0 if attempting a dma xfer from an invalid rom
offset. Also update SB_GDSTARD and SB_GDLEND in this case.
Fixes texture corruption in ntvmys.
Issue #1378
2024-02-01 17:51:25 +01:00
Flyinghead e286f98f72 naomi: new rom ntvmys 2024-01-31 16:52:34 +01:00
Flyinghead ecce9157bd maple: raise interrupt on vblank when maple bus is occupied
Raise a maple interrupt at the next vblank when the host occupies the
maple bus to read the lightgun position. Fixes RevolveR single shot
issue since the game is waiting for the interrupt.
Issue #1369
2024-01-28 15:21:40 +01:00
Flyinghead 4c7e57ebd6 gdrom: revert SPI_TEST_UNIT change
Fixes disk swapping for Alone in the Dark and Resident Evil: Code
Veronica (real BIOS)
Issue #1046
2024-01-26 19:49:01 +01:00
Flyinghead 10d3ffdf09 jvs: fix crackin'dj inputs. serialize coin count
crackin'dj: map vertical mouse axis to right turntable. Invert fader.
Simulate turntable motor. Embed eeproms with calibration done.
Fix coin being inserted after loading a savestate.
2024-01-24 19:39:20 +01:00
Flyinghead cbd01fba38 gdrom: fix disk swapping for some games
Add a 1 s delay when inserting a disk before the drive is ready.
Fixes disk swapping for Skies of Arcadia, Shenmue II (except HLE), Alone
in the Dark, Dancing Blade, First Kiss Story II and Kaen Seibo.
Issue #1046
Issue #189
Fixes BIOS menu disk swapping.
2024-01-24 18:35:23 +01:00
Flyinghead 88fd2641d9 pvr: allow blending for opaque polys of list continuations
Fixes Crackin'DJ invisible background animation and Monkey Ball grey map
background.
2024-01-23 19:20:40 +01:00
Flyinghead 70a69cf48d switch: fastmem/vmem implementation
Only map first writable mirror due to switch limitation.
2024-01-22 15:18:49 +01:00
Flyinghead c1b087df83 arm64: notify compiler that x10 is used in setHostRoundingMode
Fixes a crash on switch in single-threaded mode in
setDefaultRoundingMode.
2024-01-17 10:08:44 +01:00
Flyinghead 0b0904cdc5 systemsp: hopper and medal game fixes
hopper: Limit coin sensors to 100 ms to avoid coin chute jam errors.
hopper: Use periodic sensor for hopper to avoid hopper jam errors.
Issue #1365
medal: wire inputs and emulator required sensors. Embed medal games
nvmem to disable comm and all errors.
magicpop, unomedal, puyomedal, ochaken and westdmrg now playable.

kingyoch rom parent is kingyo
2024-01-13 14:52:29 +01:00
Flyinghead 2a48049216 systemsp: cart network hle. hopper emulation.
WIP emulation of cart network features.
Hopper emulation.
WIP medal emulation.
Playable games: kingyo, manpuku and shateki
2024-01-10 15:56:21 +01:00
Flyinghead c001240797 move audio drivers to their own folder 2024-01-10 11:45:54 +01:00
Flyinghead c0c6f206bf f355: fix win32 condition variable implementation
A race condition can happen on condition variables due to
unlock/wait/lock not being atomic. This results in the wrong process
being notified, causing a deadlock.
Happens more frequently in twin mode.
Issue #1361
2024-01-05 12:36:20 +01:00
scribam 6aa59c54a5
Minor misc changes (#1360)
* core: cleanup include headers
* dx11: remove unimplemented function
* core: annotate destructors with override
* aica: use range-based for loop
* bm: use const reference/structured bindings with blkmap
2024-01-02 14:38:16 +01:00
Flyinghead 9c964ac955 refactor embedded resource loading. Use for imgui font and android OSD
Generic embedded resource loading function
Zip bios and printer fonts
Add buttons.png and Roboto-Medium.ttf as embedded resources
2024-01-02 14:37:29 +01:00
Flyinghead 5734556440 naomi: crc32 for asndynmt[o]. Use vfnet.flyca.st domain for netdimm 2024-01-01 16:16:55 +01:00
Flyinghead a7702c622a aica: don't disable channel when reaching full attenuation
Some games rely on the channel still being processed and CA/LP being
updated. Courtesy of @kihato
Issues #472, #483, #1180, #1249, #1030 (partial)
2023-12-31 12:02:42 +01:00
Flyinghead c7b6f22e10 naomi: limit rom dma delay to 1 sec
Fixes crash at boot with jambo safari.
Fix for MINIDUMP-293
2023-12-25 19:07:08 +01:00
Flyinghead 54ac9c6361 naomi: lower rom dma transfer speed
Decrease from 20 to 7 MB/s. Fixes various freezes with Force Five aw
conversion.
Issue #141

Don't expose atomiswave A0_006 registers to naomi and other arcade
platforms.
2023-12-21 14:18:53 +01:00
scribam e057370e97 core: add missing pragma once to header files 2023-12-17 11:12:20 +01:00
Flyinghead 363c2c4c3f modem: register flags documentation 2023-12-17 11:07:13 +01:00
Flyinghead fe429ec01e move holly interrupts out of types.h 2023-12-16 23:04:39 +01:00
Flyinghead 192838b9c1 maple: lightgun must return 0 for trigger axes
Fixes Death Crimson 2 fast forwarding in story mode when using a
lightgun.
Issue #646
2023-12-16 16:47:48 +01:00
Flyinghead 0433fd824c naomi: fix handling of dma abort
Fixes hang in f355 twin and twin2
2023-12-08 18:30:12 +01:00
Flyinghead 7cc77b10ed naomi: schedule end of cart dma
Set to 20 MB/s to fix meltyb satsuki vs kouma hang when starting fight
Issue #1255
2023-12-07 16:14:10 +01:00
Flyinghead 07f208d2a2 elan: set dma completion delay to fixed min value
Fixes initdexp hang at race start
Issue #1337
2023-12-07 13:43:52 +01:00
Flyinghead 05cd7ee8d3 naomi2: fix initdv3j boot. avoid end of area crash with initdv2/v3jb
Abort processing and set elan error when invalid draw/dma commands are
executed.
Issue #981
Fixes MINIDUMP-K5 MINIDUMP-JS MINIDUMP-S0 MINIDUMP-98 MINIDUMP-125
MINIDUMP-12D MINIDUMP-22Q

Delay completion of elan dma transfers. Fixes initdv3j boot.
Issue #647

gdrom: some data was serialized twice
2023-12-05 18:25:40 +01:00
Flyinghead e9beea484d Merge remote-tracking branch 'origin/master' into dev 2023-12-04 11:58:12 +01:00
Flyinghead d7c28a4805 aica: recommpile dsp when loading a state
Fixes bad noise when loading a menu state on tetris from in game.
2023-12-03 20:51:09 +01:00
Flyinghead ce4a3a7147 scif: always schedule timer when updating baud rate
Old savestates don't have any callback set, and read only devices
(barcode readers) won't schedule any either
UI message when r/w card is ejected
2023-12-03 18:22:52 +01:00
scribam db7895cea5
Some ifdefs to improve builds (#1325)
* mmu: hide some jit and fast mmu functions behind ifdef
* linux: move log to the correct place
2023-12-01 15:03:59 +01:00
Flyinghead bd25c14cfd libretro: fix manic panic touchscreen buttons 2023-11-29 12:31:30 +01:00
Flyinghead d6593b9c6e maple: race controller has only 3 axes
Reporting 5 axes (with the optional pedals unit) breaks some games:
daytona usa, super speed racing, F1 world grand prix, ...
2023-11-29 12:26:04 +01:00
Flyinghead cb518b5481 serial: fix RDF and TDFE status bits
RDF and TDFE can't be reset if tx/rx fifo is below/above trigger
Remove rx overrun check
Proper reset of scif state
Fixes maxspeed, vonot and hell gate battle cable.
Tetris connects but still has input responsiveness issues.

sh4 mmr: use unnamed bitfields
2023-11-25 17:06:45 +01:00
Flyinghead a18e3701c6 Merge remote-tracking branch 'origin/master' into dev 2023-11-25 16:58:59 +01:00
Flyinghead f11a5981fe dynarec: increase code cache free space limit from 16 to 32 KB
Windows CE games have huge code blocks. (Tomb Raider - Last Revelation)
Fixes MINIDUMP-21R
2023-11-25 15:53:52 +01:00
Flyinghead 8f3124d14e gdrom: increase gdrom ticks by 10%
Fixes Sakura Taisen 3 broken music
Issue #692
2023-11-23 16:49:05 +01:00
Flyinghead 14f3507b86 naomi: initd card reader fix. card reader refactoring
cardInserted was shadowed by initd card reader
use deque and vector instead of array+indexes
2023-11-23 16:44:03 +01:00
Flyinghead 4efacd7d71 Battle cable support
work in progress
f355 and aero dancing seem to work
vonot and tetris don't
maxspeed is broken
2023-11-23 16:40:20 +01:00
Flyinghead a9d5b77053 Merge remote-tracking branch 'origin/master' into dev 2023-11-20 17:13:51 +01:00
Flyinghead bc28c7ccb3 lr: enabke Insert Card button for all card reader games
Hide naomi f355 series and sgdrvsim on non-desktop platforms
2023-11-20 17:11:27 +01:00
Flyinghead c4c4c2fde0 naomi: club kart card reader support 2023-11-18 18:20:41 +01:00
Flyinghead df83ca436c input: use 16 bits of precision for analog axes/triggers 2023-11-15 18:24:30 +01:00
Flyinghead a0014bc810 naomi: allow printing for f355/1 screen. Fix print template
f355 vanilla can print even when running with a single screen.
Fix print template by Ciopy Burns
Repeat print template vertically as needed for longer prints
No networking for f355 vanilla
2023-11-14 15:42:20 +01:00
Flyinghead 41723a831f use static init when possible. use unnamed bit-fields. refactor vmuBeep
no functional changes
2023-11-11 18:54:10 +01:00
Flyinghead e60f30b357 naomi: use background template for f355 printing
template courtesy of Ciopy Burns
2023-11-10 17:58:46 +01:00
Flyinghead 9a60cd7ded kingrt66: network config was overriding other settings
Auto accel, CB Mic and Motor Power settings share the same config byte
in eeprom, so don't change them when configuring network settings.
2023-11-09 19:25:10 +01:00
Flyinghead 926877397c Merge remote-tracking branch 'origin/master' into dev 2023-11-07 16:32:12 +01:00
Edward Li f6b3577de5 Save race result image to writable data folder 2023-11-05 18:39:37 +01:00
Edward Li a4ec706c79 Init `ThermalPrinter` only when cabinet type is Deluxe.
nvmem: Enable printer by default for `f355twin` and `f355twn2`
2023-11-05 18:39:37 +01:00
Flyinghead fd3f207e45 maple: move arcade input settings into maple init
Get rid of settings.input.JammaSetup
2023-11-02 19:00:29 +01:00
Flyinghead 594b403997 naomi: add some (mostly not working) roms
mazanj
dygolfp
shors2k2m
shors2k2s
shors2k2l
shors2k2
wccf116
wccf1dup
wccf212e
wccf234j
wccf310j
wccf331e
wccf322e
wccf331j
wccf341j
wccf400j
wccf420e
galilfac (systemsp)

Fix hotd2p, virnbap, huhimage
2023-11-02 18:44:52 +01:00
Flyinghead bafe07de85 aica: better sounding LPF
Use 4 bits of exponent instead of 5 for the cut off frequency
Force sample to 0 if cut off freq is 0
Improve BIOS menu sounds
Issue #108
2023-11-02 18:33:14 +01:00
Bobby Smith 3e047a6e03 Create expansion device for "Racing Controller" 2023-11-01 15:43:08 +01:00
Flyinghead 29c0dca0ce naomi: enable printer for all f355 editions
only usable in deluxe mode (f355twin, f355twn2)
2023-11-01 15:41:41 +01:00
Flyinghead 51089c5e0a aica: always avoid race condition when sh4 interrupt is raised
... even if an SH4 interrupt is already asserted.
Regression introduced by c7d214e55a
Fixes audio freeze in Test Drive Le Mans
Issue #1267
2023-10-30 17:47:19 +01:00
Flyinghead 93e47dd410 aica: don't change LEA for non-looping sounds
Non-looping sounds with LSA=0 and LEA=0 shouldn't be played at all.
Regression introduced by dac5b991e0.
Fixes white noise in Sonic Adventure Emerald Coast action stage.
Issue #1264
2023-10-27 14:52:07 +02:00
Flyinghead 09a1fea40f arm32: fix host rounding mode on android
It looks like setting host rounding stopped working on armv7 android a
while ago (v1.0 already has the issue). Directly setting the host FPSCR
register doesn't work so use the C99 standard functions fegetenv and
fesetenv instead.
Fixes flickering yoshimitsu legs in Soul Calibur.
Fixes rotating objects in Sword of the Berserk.
Issue #556
Issue #1259
2023-10-25 16:48:58 +02:00
Flyinghead dac5b991e0 aica: ignore LEA if <= LSA
Fixes Legacy of Kain Ash Village music
Issue #1104
2023-10-22 10:12:30 +02:00
Flyinghead b7d923e02b maple: clear mapleDmaOut on reset. Other reset issues
mapleDmaOut wasn't reset, causing crashes or freezes in subsequent runs
Issue #1253

reset YUV state, pvr tile clip, MMU sq_remap, sh4 sq_buffer and more
2023-10-20 16:15:42 +02:00
Flyinghead e94b26f1df gdrom: return blank sector if FAD miss
Fixes NBA Hoopz (US) voice samples
Issue #1247
2023-10-17 14:29:05 +02:00
Flyinghead e96b38ff5c rend: support vscalefactor > 1 for RTT
SCALER_CTL.vscalefactor also applies to RTT and values > 1 will increase
the texture height.
dx11: initialize abufferPointers to avoid issues with first frame
rendered.
Fixes pause menu/battle animation with Skies of Arcadia (PAL)
Issue #1127
2023-10-16 14:51:27 +02:00
Flyinghead e894d4df5c sh4: limit penalty cycles to first 3 mem ops
Fixes choppy video in Dynamite Cop! and Resident Evil 2 intros.
Fixes desync between character and background in UFC championship intro.
Fixes Dino Crisis (JP) desync between video and subtitles.
Fixes South Park Rally boot freeze with one controller and 2 vmus.
Add cheats for Dave Mirra BMX to fix main loop timing.
Issue #1034
2023-10-16 14:39:15 +02:00
Flyinghead 0b66409ed2 naomi: default eeprom for pokasuka ghosts
Fixes coin assignments error at boot
Issue #1237
2023-10-13 10:51:07 +02:00
Flyinghead 4419ff310a naomi: default eeprom for manic panic
Fixes coin assignments error at boot
Issue #1237
2023-10-12 09:36:09 +02:00
Flyinghead f6f6637973 naomi: mushikep compatibility 2023-10-11 14:25:11 +02:00
Flyinghead cb33387ed6 gdrom: clear DRQ on ATA_NOP
Fixes Sentimental Graffiti 2 hang when switching disk
Issue #1232
2023-10-09 22:39:54 +02:00
Flyinghead 23d1db9c75 nvmem: add email address to flash ISP config
Issue #1227
2023-10-09 20:44:15 +02:00
Flyinghead 4e079b5d0b missing override keyword 2023-10-08 19:14:33 +02:00
flyinghead 7308f9a704 sh4: dont change host rounding mode in Sh4_int_Reset()
Don't change host rounding mode in Sh4_int_Reset(), which is typically
called from the UI thread.
Set rounding mode to default before calling renderer (single-thread
mode), restore it before returning.
Fixes issues with dx11 shaders compilation: rounding mode affects
inexact literal float values.
Issue #1224
Issue #1207
2023-10-06 18:17:14 +02:00
Flyinghead 56517b027a naomi: fix gdrom searching in rom parent path
OpenDisc() now throws so exceptions must be caught
Never return null from OpenDisc
2023-10-05 11:43:22 +02:00
Flyinghead 60f3d718ac arm64 rec: fix crash with some naomi games (regression)
Fixes crash with doa2a and doa2m and some atomiswave conversions.
Regression due to b47f4f56ef
Fixes MINIDUMP-1TY, MINIDUMP-1TD, MINIDUMP-16Q, MINIDUMP-1AC
2023-10-01 19:31:18 +02:00
Flyinghead 0f6e1752e3 rend: clear framebuffer when vram address changes
Fixes top and bottom leftovers from BIOS boot in San Francisco Rush
2049.
Issue #1197
2023-09-25 18:23:26 +02:00
Flyinghead e57ccde532 systemsp: pluggable input manager. fix lr. disable isshoni P1 button 1
Delegate input management to game-specific class
Default, card reader/dispenser and isshoni input managers
isshoni: Use button 1 for touchscreen press
libretro: systemsp input mapping
2023-09-25 17:38:41 +02:00
Flyinghead 403f1f635b systemsp: load rom boot id from compact flash volume
Open and decrypt 1STREAD.BIN then the image file to extract the rom boot
id.
Fix boot id for non-encrypted roms (bingogals)
Reset naomi default eeprom when forcing different region and before
reloading the bios.
2023-09-20 17:22:28 +02:00
Flyinghead 289f264371 systemsp: set correct region for rom games
Override the region when not supported by the game. Only works for rom
games.
2023-09-19 17:59:20 +02:00
Flyinghead 869ddb643d systemsp: initialize media name and default eeprom
Fix failure to load a systemsp rom game after running a compactflash
game.
Fix error 05 if selecting the wrong region then switching to Japan.
2023-09-19 16:13:27 +02:00
Flyinghead c63f1a9997 pvr: background poly vertex order fix
Fix background poly vertices coordinates to form a valid triangle strip

Fixes lovebery bogus background poly on character selection screen.
Issue #1200
2023-09-19 16:08:22 +02:00
Flyinghead 0fc0dc5101 systemsp: rfid management chip emulation
fixes dinoking, dinokior, dinoki25, lovebery, lovebero and loveber3
2023-09-18 11:00:08 +02:00
Flyinghead c839bc89eb naomi: crash when loading a legacy .bin rom
More fix for MINIDUMP-1DA, MINIDUMP-1D8, MINIDUMP-1EM
2023-09-15 18:50:55 +02:00
Flyinghead 84f2871650 renderer: set render timeout to 20 ms to reduce input lag at 30 FPS
Fixes mouse not responding in 30 fps (Quake 3) or variable fps games
(Unreal)
Issue #949
2023-09-14 15:18:56 +02:00
Flyinghead e1b4d4d703 naomi: crash when loading a legacy .bin rom
Fixes MINIDUMP-1DA, MINIDUMP-1D8, MINIDUMP-1EM
2023-09-14 15:08:56 +02:00
Flyinghead 7e1dcf9003 maple: move test, coin and trigger buttons into the upper 16-bit range
avoid interfering with regular jvs/maple buttons
2023-09-12 19:13:40 +02:00
Flyinghead 0ac483acfc sh4 dynarec refactoring
sh4 code buffer class
dynarec interface and implementations
2023-09-12 16:52:25 +02:00
Flyinghead d29645cc49 naomi: derbyoc JP card reader support. security pic for doa, tduno
Derby owner's club (JP) uses a Sanwa CRP-1231LR card reader. World
edition uses a Sanwa CRP-1231BR.
Set x76f100 security pic content for doa2, doa2a, doa2m, tduno
2023-08-27 17:20:43 +02:00
Flyinghead 129fff1c2a naomi: x76f100 and at93cxx implementation. naomi2 elan fix
proper emulation of x76f100 security eeprom and at93cxx serial eeprom
elan: don't reset projection matrix at end of frame. Issue #1177
2023-08-25 17:01:40 +02:00
scribam 56b082def7 uwp: add support for arm 2023-08-02 09:32:55 +02:00
Flyinghead c637ae8281 Merge remote-tracking branch 'origin/master' into dev 2023-07-30 18:05:38 +02:00
scribam 40953b17c4 uwp: add support for arm64 2023-07-30 18:03:32 +02:00
Flyinghead 7061c043d9 naomi: derbyocw card support. serial pipes refactoring. systemsp fixes
common interface for most serial pipes
jvs: MIE RS422 port support
card reader: allow reading/writing of individual tracks
systemsp:  fix interrupt handling. refactor serial ports. isshoni wanwan
puppy touchscreen support
2023-07-26 21:34:03 +02:00
Flyinghead 92a19e9250 hopper fixes. fix kick4cash input
kick4cash encoders are rotated 45° and polling is done twice per frame.
add bet button to shootout pool and club kart (prize)
hopper: load/save config. fix pay out and bet values. proper defaults
based on selected currency.
2023-07-23 17:16:08 +02:00
scribam 1b565f9879 clang-tidy: run modernize-concat-nested-namespaces 2023-07-22 19:04:52 +02:00
scribam 4db26bc092 spg: fix warning 'vblk_cnt' defined but not used 2023-07-16 19:57:51 +02:00
Flyinghead 8c0f543bc8 naomi: hopper support for kick'4'cash, shootout pool and club kart prize
high level emulation of 837-14438 and naomi SWP hopper boards
2023-07-16 19:57:16 +02:00
Flyinghead 8e3a48eb6f naomi: fix shootout pool inputs
Use button 1 to switch between cue aim and cue roller rotary encoders.
Remap start/mode to start
2023-07-16 19:10:39 +02:00
Flyinghead 3c6eaa4d34 aica arm: use scratch reg for call/jump if offset if too big (armv7)
Issue #1148
2023-07-14 21:32:49 +02:00
scribam daf8230cca deps: update vixl 2023-07-03 11:37:42 +02:00
Flyinghead f02265b662 systemsp: fix sram addressing
translate dinoki4 rom name
2023-07-03 11:36:59 +02:00
Flyinghead 5eb893a995 Sega SystemSP support
add naomi roms: anpanman2, anpanman2a, drbyocwt and clubkpzbp
2023-07-01 16:24:51 +02:00
Flyinghead b47f4f56ef user-defined literals: _KB, _MB, _GB 2023-07-01 14:31:25 +02:00
Flyinghead aad4921e09 picotcp: fix kos ppp nego. modem,bba: fix kos detection
picotcp: ignore conf ack received when lcp layer is up (kos ppp)
picotcp: ignore icmp ping seq and id #
scheduler: add void * arg to callback function. Get rid of static instances when possible
bba: use scheduler to delay link changes (fixes kos bba detection)
modem: fix soft reset. don't reset TDBE during reset (fixes kos modem detection)
2023-06-23 11:40:22 +02:00
Eric Warmenhoven 74b98d85ed libretro: another apple platforms build fix 2023-06-16 17:27:14 +02:00
Eric Warmenhoven 2511a19d2d libretro: apple platforms build fix 2023-06-15 16:05:36 +02:00
Flyinghead 2644c2ef47 pvr: more std::vector::operator[] UB
Issue #1100
2023-06-05 17:13:40 +02:00
scribam f590766421 deps: update nowide 2023-06-04 12:49:55 +02:00
Flyinghead ffc0a42c18 std::vector::operator[index] with index >= size is UB 2023-06-04 12:48:50 +02:00
Flyinghead 63686eeee1 naomi: add fallback bios files. Proper region names
ui: use proper region names for arcade (export, korea)
naomi: add previous version of BIOS files and fall back if latest ver
not found
fall back to use multiregion bios hack for korea
add CRC for all bios files
2023-06-02 14:23:14 +02:00
Flyinghead 231a1b624f maple: fishing controller vibration pack, analog to dpad
refactoring to avoid duplicate code
2023-05-31 17:01:54 +02:00
Flyinghead 90c4e42c11 naomi: add mushikk, mushikc and mushik2k
cheats for mushikk and mushikc rfid check
mushik2k needs rev.H korean bios and won't boot
2023-05-31 16:53:49 +02:00
Ricardo Mendonça Ferreira 885714e883
Support for Maracas & Pop'n Music controllers, WIP for others (#1035)
Racing controller, fishing controller and Densha de Go controller

Co-authored-by: Ricardo <ric.ce.br@gmail.com>
Co-authored-by: Flyinghead <raphael.jean@gmail.com>
2023-05-29 12:45:34 +02:00
Flyinghead 4391058563 aica: dma cycles schedule tweak
Increase lower limit to schedule dma callback from 224 to 513
Fixes freeze/crash in Nomad Soul
Issue #1080
2023-05-25 13:02:14 +02:00
Flyinghead ed99c96232 mmu: slow mmu build fix 2023-05-24 10:43:20 +02:00
Flyinghead 6b9840268f vf4: fix networking on windows (vanilla, evo). Add eeprom and nvmem
connect returns EWOULDBLOCK instead of EINPROGRESS on windows
add eeproms for vf4, vf4evo and vf4tuned (2-player cabinet)
add nvmems for vf4, vf4evob and vf4tuned (network & card readers
enabled, all day card schedule, stage select, ...)
2023-05-20 11:19:26 +02:00
Flyinghead 3f456c6738 vf4: insert card now ejects the card if already inserted
support vf4 card renewal
2023-05-19 17:45:18 +02:00
Flyinghead e5344d37d0 gdrom: fix cdda restart. revert previous change. fix hle pause/release
Revert changes from Issue #690
Fixes cdda restart in Mr.Driller, Bust-a-move 4, Wetrix+ and Reel
fishing. Issue #1019
hle: returning current cdda information fixes the pause/release issue
2023-05-16 14:33:33 +02:00
Flyinghead c07f862ef2 ggpo: exchange vf4 cards when starting the session 2023-05-16 09:43:21 +02:00
Flyinghead fe9ce46ab1 pvr: don't crash when hblank int mode is invalid or unsupported
Fixes MINIDUMP-ZE
2023-05-14 16:42:14 +02:00
Flyinghead 01c5c98396 pvr: check current ta context index when deserializing
Fixes MINIDUMP-YS
2023-05-14 16:40:36 +02:00
Flyinghead d00f07acb8 naomi: check cart malloc
Fixes MINIDUMP-QW
2023-05-14 16:36:14 +02:00
Flyinghead 83bfa9158d aica: don't crash if AFSEL=1
Fixes MINIDUMP-XW
2023-05-14 16:22:10 +02:00
Flyinghead ac2637286b Merge remote-tracking branch 'origin/master' into dev 2023-05-13 15:55:47 +02:00
Flyinghead 4b0d377e66 pvr: don't clip negative depth vertices
Fixes baserunner cams depth in World Series Baseball 2K1
Issue #1027
2023-05-12 10:20:46 +02:00
Flyinghead c0f0a758df pvr: treat nan intensity as max. avoid nullptr crash in appendSpriteVtx
Fixes Gaiamaster Kessen! black texture. Issue #1021

Fix for MINIDUMP-RC
2023-05-09 21:07:40 +02:00
Flyinghead 1a5a2f64d4 naomi: insert card button compatibility with ggpo
handle insert card button like standard naomi buttons so it can be used
with ggpo
load card data when it's inserted, not before
2023-05-06 20:54:45 +02:00
scribam 4acb670b88 netbsd build fix 2023-04-29 17:51:25 +02:00
Flyinghead 79b9b49218 naomi: netdimm net client and rfid card reader emulation
high-level emulation of netdimm v3.17 net client lib
vf4/mushiking rfid card reader emulation
2023-04-29 17:50:56 +02:00
Flyinghead 92a1c1891b alienfnt: support for serial modem and worldwide ranking server
Emulate modem on sh4 serial port.
Use picotcp stack to handle ppp protocol.
Include nvmem with network settings (server at alienfront.duckdns.org,
disabled by default).
2023-04-16 15:41:54 +02:00
scribam 210100a108 naomi: netbsd/openbsd pthread fixes
These systems do not have pthread_condattr_setpshared/pthread_mutexattr_setpshared
2023-04-13 18:10:19 +02:00
Flyinghead 70d3e221a9 mushiking series support
Emulate barcode reader. UI to input card id.
scif: SCFSR2.DR should also trigger an interrupt. Fixes the partial read
issue with manic panic ghosts touchscreen.
Add default implementations in SerialPipe for read-only and write-only
devices.
Fix card jammed error in mushiking with custom input code.
Add mushi2k61 and mushi2k62 to naomi rom list.
Cheats to skip rfid check.
2023-04-12 10:09:21 +02:00
Flyinghead b556617e1d sh4: only reset serial pipe on hard reset
See d3690b12c6
2023-04-09 20:56:14 +02:00
Flyinghead e327172fd0 sh4: check access length when getting a ram pointer with GetMemPtr
Check access length and return nullptr if overflowing ram.
Fix ch2-dma code accordingly.

Fixes MINIDUMP-GX
2023-04-09 20:47:12 +02:00
Flyinghead c5f82483e6 naomi: fix multiboard windows position
Position slave windows over master.
Support any window width.
2023-04-09 20:28:10 +02:00
Flyinghead 87fdd203b5 android scoped storage (ASS) support
introduce Storage abstraction interfaces
use Storage i/f to load zip and 7z archives, cdi/cue/gdi/chd media,
cheats and to find custom textures.
Use android file picker to add storage. Request persisted access perms.
jni helper classes.

Issue #813
2023-04-08 18:37:50 +02:00
Flyinghead f94a08f12f mmu: avoid crash due to approximative fast mmu matching
Fixes MINIDUMP-EA (Sonic Shuffle)
2023-04-02 22:06:22 +02:00
Flyinghead 32e08ca165 modem: don't crash on unexpected register writes
Just log and ignore.
Fixes MINIDUMP-62
2023-03-31 20:03:16 +02:00
Flyinghead 7108358ebd Merge remote-tracking branch 'origin/master' into dev 2023-03-30 17:31:22 +02:00
Flyinghead 48acb03b81 underclock/overclock SH4 option
Increase/reduce the dynarec cycle count for each block.
Issue #210
2023-03-30 17:22:24 +02:00
Flyinghead 79be464326 aica: proper write mask on aica dma address registers
Fixes MINIDUMP-P3
2023-03-28 21:05:18 +02:00
Flyinghead f67aad0b2d pvr: don't wait if Present msg is already in the queue
Only Render* msgs are an issue when piling up on slow platforms.
Fixes frame skipping only working when delay frame swap is on
Issue #975
2023-03-28 21:01:56 +02:00
Flyinghead d76982bbeb naomi,aw: embed default flash for some games
Needed to configure network on first run.
2023-03-27 16:57:48 +02:00
Flyinghead 5e4e48fffe mmu: don't crash when table full, just ignore
Fixes MINIDUMP-NF
2023-03-25 11:45:03 +01:00
Flyinghead 068861d0cc pvr: mask low address bits according to 32-bit vram access size
Avoid crash when accessing the very last vram byte with short or int.
Correct behavior should be to raise an sh4 address exception.
Fixes MINIDUMP-N2
2023-03-24 11:53:38 +01:00
Flyinghead 2d7a1ce71a atomiswave: fix failure to identify the game
regression by 78f80eb7dc
2023-03-23 09:45:25 +01:00
Flyinghead 9512ee657a Allox f355 deluxe to run with only one screen 2023-03-22 19:01:34 +01:00
Flyinghead 78f80eb7dc naomi: printer support for f355 and tduno[2]. Fix some bios font glyphs
Thermal printer support for f355 (G2 ext bus) and tduno[2] (maple JVS)
Change game id for sgdrvsim and dragntr3 to distinguish them.
Fix cyrillic page in BIOS font.
2023-03-22 19:00:50 +01:00
Flyinghead fa525b4488 Fix hotd2p inputs
Issue #731
2023-03-22 15:36:10 +01:00
Flyinghead ee3e83e09c Fix loading of Sega Yonin Uchi Mahjong MJ (mj1)
gd cart: load first .bin if the specified one isn't found. Fix loading
of main directory for mj1. Don't update progress too often when
decrypting.
chd: allow loading of 1-track CD-ROMs
Use 2 jvs boards for mj1

Issue  #985
2023-03-22 13:00:59 +01:00
Flyinghead 5c5c872afc aica: small dma transfer must be correctly scheduled
Previously transfer taking less than 4096 cycles would be instantly
executed.
Fixes Sports Jam announcer broken audio.
Issue #980
2023-03-21 11:32:21 +01:00
Flyinghead cb83d319b9 naomi: 4-player and eeprom fixes
Add 4-player support to Dirty Pigskin Football, WFF Royal Rumble, World
kicks PCB and Beach Spikers.
Fix several bugs in initEeprom and force 4-player cab when needed.
Get rid of pstone, pstone2 and ringout default eeproms.
2023-03-20 12:35:36 +01:00
Flyinghead afc1f5f4e1 Merge remote-tracking branch 'origin/master' into dev 2023-03-15 21:09:47 +01:00
Flyinghead 4a2ad8b145 pvr: SortedTriangle has unsafe pointer to PolyParam
std::vector elements can be reallocated. Use index instead of pointer.
2023-03-15 20:58:12 +01:00
Flyinghead 4d990947de sgdrvsim: display or network broadcast speedometer and tachometer
Display speedometer value, or network broadcast speedo and tacho on port
8002 (slave 2) if option is set
2023-03-13 17:45:12 +01:00
Flyinghead ea7dd699b9 only launch sgdrvsim slaves on desktop platforms 2023-03-10 18:10:57 +01:00
Flyinghead 8a28ddbfe6 jvs: allow p2 buttons to be always on. sgdrvsim improvements
jvs: allow button mapped to jvs P2 to be always on. Don't overflow
button descriptors table
midiffb: invert axis if needed
Launch sgdrvsim network instances automatically. Remap some buttons and
make some always on.
2023-03-10 17:57:27 +01:00
Flyinghead f186046c98 partial support for sega driving simulator 2023-03-09 17:54:57 +01:00
Flyinghead 5644e834fa x86 dynarec: use UpdateSystem_INTC like other recs
get rid of unused rdv_DoInterrupts and rdv_DoInterrupts_pc
2023-03-09 09:37:48 +01:00
Flyinghead b8d47fe0a8 sh4 dmac: more accurate implementation. Fixes sh4_dmac_demo.elf 2023-03-07 18:38:41 +01:00
Flyinghead abcd9d77d4 set some global to static 2023-03-07 18:36:26 +01:00
Flyinghead 095e5ede81 sh4: more accurate cycle counting
get rid of float ops hack for dead or alive 2
get rid of idle skip option and code block hashing
count cycles for high-level wince functions and handlers (GetTickCount,
QueryPerformanceCounter and TLB_MISS handler)

Fixes Dave Mirra Freestyle BMX time counter running too fast.
More FPS for many wince games. Better wince perf on slow devices.
2023-03-07 18:35:01 +01:00
Flyinghead 67bba95dd1 dmac: set DMAOR.AE and raised interrupt if ch2 address error
Fixes crackin'dj 1 & 2 freeze at boot
Regression introduced by 66eb08f2d1
2023-03-06 10:26:52 +01:00
Flyinghead 2355bb8bb5 pvr: drop more vertices with large x and y
Fixes Manic Panic Ghosts bogus transparent rectangles in first stage
2023-03-05 15:08:17 +01:00
Flyinghead c4d24254db naomi2: FFB support for Club Kart and King of Route 66 2023-03-04 17:45:53 +01:00
Flyinghead 014da3a225 naomi: network output FFB for 18 wheeler and f355 2023-02-28 20:23:58 +01:00
Flyinghead 885a0508c0 Merge remote-tracking branch 'origin/master' into dev
# Conflicts:
#	core/hw/aica/sgc_if.cpp
#	core/hw/naomi/naomi.cpp
#	core/hw/sh4/dyna/driver.cpp
2023-02-28 20:02:23 +01:00
namtsui a1472fb190
OpenBSD 7.2 patches (#953)
* OpenBSD: BSS is immutable so mark it as mutable so that mprotect RWX works

see: mimmutable(1)
bc009f82ea

* OpenBSD does not have mcontext_t

<signal.h> provides `typedef struct sigcontext ucontext_t;'.
take register names from <machine/signal.h>, which provides struct
sigcontext.

see:
1a13d3ae4e

* OpenBSD uses major.minor for shared libs, so properly dlopen libGL.so

* OpenBSD remove redefinition of swap16

* OpenBSD: SDL2 controller detection

Use sdl_open_joystick() to open controllers on startup instead of
SDL_JOYDEVICEADDED event, which never gets detected.

* OpenBSD does not have mcontext_t but linux does
2023-02-28 18:22:45 +01:00
Flyinghead 26815d042a arcade ouput: send game name before any output
Send the game id before any output to inform clients of the current
running game.
2023-02-27 17:46:00 +01:00
Flyinghead 026f21eddf naomi: report error if rom is invalid instead of crashing
Fixes MINIDUMP-CS
2023-02-27 17:43:08 +01:00
Flyinghead 8d54382b10 aica: apply RAM mask to sample address (SA)
Fixes MINIDUMP-B9
2023-02-24 21:24:56 +01:00
Flyinghead 97dfabc416 pvr: don't reset TA parser during soft reset
Rendering might be in progress in another thread and this leads to
crashes.
Fixes MINIDUMP-AW and MINIDUMP-AY
2023-02-22 17:49:01 +01:00
Flyinghead 9b24984b07 crash when switching to full mmu
The MMU now has a state variable, which must be set before the dynarec
is reset.
Regression in afcb3b7ad8

Fixes MINIDUMP-AZ, MINIDUMP-B7, MINIDUMP-B0
2023-02-20 22:56:23 +01:00
Flyinghead 7ce08ea860 Fix Touch de Uno 1 & 2 inputs
Fix touchscreen touch detection
Default eeproms with calibrated touchscreen and disabled printer
2023-02-20 11:14:02 +01:00
Flyinghead a156edbd73 Merge remote-tracking branch 'origin/master' into dev 2023-02-19 14:10:37 +01:00
Flyinghead 9dae5827cc naomi: touchscreen emulation for manic panic ghosts and touch de zunou 2023-02-19 13:51:23 +01:00
Flyinghead bf79183bd6 mmu: max alignment requirement is 32-bit
a 64-bit access only needs to be 32-bit aligned.
use enum for mmu errors
2023-02-18 13:33:38 +01:00
Flyinghead afcb3b7ad8 mmu: get rid of FullMMU option. Detect wince with string id in ram
ForceWindowsCE now just sets ExtraDepthScale
2023-02-18 13:33:38 +01:00
Flyinghead 5bfbcb210c dynarec: refactor imm mem r/w and store queue handlers. clean up mmu
Eliminate duplicate code for immediate memory read/write in all dynarecs
Simplify PREF to use do_sqw_nommu even for simple SQ remap
Check for address errors before mmu translation
Get rid of unneeded template params in mmu translation funcs
2023-02-18 13:33:38 +01:00
scribam d8137a967c
C++17 (#926)
* cmake: use c++17

* Use std::size

* Use std::make_unique

* Use std::clamp

* Use structured binding

* Use [[fallthrough]]

* Use enable_if_t/is_enum_v/is_integral_v/is_same_v

* Use if constexpr

* Use try_emplace

* Use auto for iterators

* Use inline variables
2023-02-18 13:24:34 +01:00
Flyinghead 04df0da7cb pvr: increase index size for wild riders
Index overrun with wild riders
Fixes MINIDUMP-7A
2023-02-12 15:05:02 +01:00
Flyinghead 5eeddecb40 maple: set bus speed back to 2Mbps. Worms Pinball needs FFBE
Power Drift crashes with 1Mbps
partial revert of 2332884d8b
Force Slave Zero to use real bios (still has issues)

Worms Pinball prototype needs full framebuffer emulation
2023-02-12 15:05:02 +01:00
Flyinghead 0f90293252 dynarec: handle illegal instructions 2023-02-10 14:53:54 +01:00
Flyinghead 0d166e1403 msvc build fix 2023-02-10 14:17:45 +01:00
Flyinghead 5b169b7f9d naomi: use master pid to make unique multiboard shared mem file on unix 2023-02-10 12:54:20 +01:00
Flyinghead 099a758c94 hw: new hardware register implementation
used for sh4 mm registers and holly
ignore incorrect size reads and writes
separate data and read/write handlers
2023-02-10 12:51:36 +01:00
Flyinghead 5020a267af pvr: fix unsorted pass triangle count. tr count should accumulate
partial revert of 927db7f189
Fix missing walls in Bust a Move 4 (vs)
2023-02-06 15:09:18 +01:00
Flyinghead debe21de7b Merge remote-tracking branch 'origin/master' into dev 2023-02-05 22:20:28 +01:00
Flyinghead 37c17e4300 pvr: re-use TA contexts if not used for 60 frames 2023-02-05 18:32:35 +01:00
Flyinghead 927db7f189 pvr: sorted triangle count incorrect with multiple render passes
causes crash in setProvokingVertex

Fix for MINIDUMP-7A, MINIDUMP-7H, MINIDUMP-7J
2023-02-05 11:18:18 +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 bfdab4db20 pvr: add dummy sorted triangle to signal that per triangle is in use
Avoids crash when sorted triangle list is empty and renderer uses wrong
index values
2023-02-03 11:07:21 +01:00
Flyinghead f0e4574132 aica arm: stop the cpu if setting an illegal mode instead of crashing
Fixes MINIDUMP-70
2023-02-03 11:03:08 +01:00
Flyinghead d1e6ee9cd7 pvr: add a dummy sorted triangle if list is empty
this signals that sorted triangles are being used otherwise wrong
indexes values lead to a crash
2023-02-02 20:19:52 +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 e70a0dcf3d sh4_fpu clean up. tests 2023-02-01 13:53:32 +01:00
Flyinghead d1ab3461a6 savestates: dropping support for old formats
savestates older than 3 years aren't supported anymore
2023-01-31 17:57:54 +01:00
Flyinghead 04c418d02a serialize: move code out of serialize.cpp and into modules 2023-01-31 10:13:03 +01:00
Flyinghead 528235ce9d jvs: fix kingrt66 instant win with accelerator 2023-01-30 13:28:14 +01:00
Flyinghead 27ea6ca092 aica: rename mem and reg accessors 2023-01-30 13:21:43 +01:00
Flyinghead 53dab29ddb iOS and Switch build fixes 2023-01-30 11:10:14 +01:00
Flyinghead b1479e6e34 aica: use namespaces, simplify api, handle serialization
Rename VArray2 to RamRegion. Add alloc(), free(), setRegion() and
de/serialize()
2023-01-30 10:40:07 +01:00
Flyinghead 143073b61d rename _vmem to addrspace and move platform vmem stuff to virtmem ns
use namespaces
simplify names
no functional changes
2023-01-29 18:48:33 +01:00