Replace naomi:WCCFSlave by naomi:WCCFNode to set node number for
projectors and satellites.
Handle socket to port 59200 locally to allow connecting from the same IP
and bypass wccfd completely.
The context negotiation interface passes the device extensions the
frontend needs, but they were never enabled. Frontends such as RetroArch
pass the extensions an OpenXR runtime needs to share the device, and
without them SteamVR crashes in xrCreateSession.
The timer heap is capped at MAX_BLOCK_COUNT blocks of 1600 bytes, about
1,050 timers. Each TCP socket keeps several (keepalive, stats,
retransmission, linger) and closed sockets linger for 30 seconds, so a few
dozen connections a second fill it. When pico_timer_add() fails,
socket_del() frees the socket at once instead of deferring it, while
pico_tcp_input() is still using it: AddressSanitizer reports a
heap-use-after-free in pico_tcp_input(), and release builds crash.
Raise the cap to 1024 blocks (~67,000 timers). There is a single heap, and
blocks are only allocated as it grows, so this costs 8 KB of pointers.
[ci skip]
pico_socket_connect() ignored the result of pico_socket_alter_state(),
which fails when a socket with the same local/remote address and port is
already in the socket tree. The new socket then carried on untracked, and
deleting it later found and unlinked the other socket instead, which was
then freed while still in use: a double free or heap corruption.
picoppp hits this when it forwards an inbound connection whose client
reused a source port while picotcp still holds the previous connection
(Linux reuses loopback source ports at once). Fail the connect with
EADDRINUSE, and have picoppp retry with a port picotcp picks.
Found by forwarding a few hundred connections a second to the Broadband
Adapter; the crash went away with this.
[ci skip]
TcpSocket called the throwing overloads of asio's socket.shutdown() and
socket.close() when the guest closed its side of a connection. If the
host peer had already disconnected (or reset the connection),
shutdown() throws std::system_error ("Transport endpoint is not
connected"), nothing catches it, and Flycast terminates.
Use the error_code overloads: a peer that is already gone just means the
socket is already closed.
Found forwarding a few hundred connections a second to a KallistiOS
program, where clients and guest close connections in either order:
Flycast terminated within about a thousand connections.
[ci skip]
Since c52e6cc, the emulation thread calls pico_stack_recv() directly,
which enqueues on the device's protected q_in while the pico thread
dequeues it. pico_enqueue() unlocked the queue and then read q->size for
its return value. If the pico thread dequeued and processed the frame in
between, the size could read 0, and pico_stack_recv() took that as a
failed enqueue and freed a frame the pico thread had already freed.
AddressSanitizer: attempting double-free in pico_stack_recv(), called
from qemu_send_packet() on the emulation thread; freed by
pico_ethernet_receive() on the pico thread. It took a few dozen
forwarded TCP connections to crash a release build.
Read the size under the lock. Also create the queue mutex in
pico_queue_protect(): creating it lazily on first lock can give the two
threads different mutexes.
[ci skip]
WritableChip::Save() wrote the image in place. A crash or a kill while
it is being written leaves a truncated file: the Dreamcast then boots
into the date and time setup with its settings gone, and an arcade
board loses its nvmem (service settings, high scores, unlocked content).
Write to a temp file next to the real one, flush it, then rename it
over the real path, so the file on disk is always either the previous
image or the complete new one. On Windows, rename() refuses to replace
an existing file, so flycast::rename() (which had no callers) now uses
MoveFileEx with MOVEFILE_REPLACE_EXISTING, matching POSIX.
Testing: compiles on macOS arm64; the Windows path is not built here.
Co-authored-by: Claude Fable 5.1 <[email protected]>
[ci skip]
0888 KRGB and 8888 ARGB, still went through the scalar per-pixel writer.
One packed pixel is exactly one VRAM word, so they fit the same 8-word
interleaved store as the 16-bit path, 8 pixels per iteration. The store
is factored out of storeFramebuffer16Pixels() so both use it.
888 (24-bit packed) stays scalar: its pixels straddle VRAM words, so the
store pattern only repeats every 4 pixels / 3 words.
The address walk is the same as writeFramebufferLW(), so the output is
identical to the scalar path, including when the padding isn't a
multiple of 4. A harness writing 7,056 frames through both paths (both
channel orders, modes 4 to 6, 6 frame sizes, 7 destination addresses
including bank and VRAM edges, 7 line strides, 4 clip windows) gives
byte-identical VRAM. The same algorithm measured about 2x faster on a
640x480 8888 frame (0.213 ms to 0.105 ms) on Apple Silicon.
tests/src/rend/FramebufferWriteTest.cpp checks both 32-bit modes against
an independent reference (one pvr_write32p per pixel, the scalar walk)
over 3,600 cases: widths around the 8-pixel vector width, padding
including values that aren't a multiple of 4, destinations at the 32-bit
bank boundary and the end of VRAM, and clip windows, for both channel
orders. All of VRAM is compared, so a store past the frame fails too. On
arm64 it exercises the NEON path; elsewhere the scalar one. It fails when
the padding computation is deliberately broken.
Other architectures are unchanged.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
ENABLE_CTEST=ON never produced a test runner on macOS. The app's main()
(shell/apple/emulator-osx/SDLApplicationDelegate.mm) was still compiled
in, so the binary launched the emulator UI instead of gtest_main, and the
link needed libcurl, which HttpTest uses directly while the core only
links curl where it is the HTTP client (not on Apple).
- Leave SDLApplicationDelegate.mm, osx-main.mm and the Syphon video
routing out of the target when BUILD_TESTING is set, like linux-dist
main.cpp and winmain.cpp already are.
- Stub the os_* / darw_printf / hostfs / i18n glue those files provided,
in tests/src/test_stubs.cpp, for macOS.
- Link CURL::libcurl into the test target on Apple.
With this the suite builds with both the Xcode and the Ninja generators
and runs on Apple Silicon: 144 tests, 141 pass. The three that fail there
(AicaArmTest.LogicOpsTest, SDLControllerMappingTest.split_axis and
.reverse_axis) and an abort in ~maple_sega_vmu at process exit are
pre-existing and are not changed here. The CI workflow still runs the
tests only on Linux.
Co-authored-by: Claude Fable 5.1 <[email protected]>
[ci skip]
SDL_GameControllerButtonBind2 is a struct over a union whose first member
is `int button`. `bind{}` zero-initializes that member only, so
value.axis.direction holds whatever was on the stack. getBindForAxis()
assigns it only when the mapping has a '+' or '-' prefix or a '~'
suffix; for a plain "lefttrigger:a4" it is returned as read, and the
full-axis branch at the end tests it too. At -O2 on macOS/arm64 a
lefttrigger lookup came back with direction 1 instead of 0 and
"-lefty:-a1" with 1 instead of -1; SDLControllerMappingTest.split_axis
and .reverse_axis fail there. The value just happened to be 0 on Linux.
Set axis and direction to 0 before parsing the axis.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
MapleDevices[][] in maple_if.cpp holds shared_ptr<maple_device>s with
static storage, so the VMUs are destroyed when the process exits.
~maple_sega_vmu() clears the LCD on any attached maple link, which goes
through MapleLink::GetMapleLink() and locks MapleLink::Mutex, another
object with static storage, in another translation unit, that may
already be gone. With libc++ locking a destroyed mutex throws
("mutex lock failed: Invalid argument") and the process aborts; the
unit test binary exits with SIGABRT on macOS after every test passed.
On glibc the same lock happens to succeed, which is why Linux never
showed it. The Links table is read in the same state.
Give both to function-local statics that are allocated once and never
destroyed, so they outlive everything that can still reach them.
Co-authored-by: Claude Fable 5.1 <[email protected]>
[ci skip]
On ARMv7, AND, EOR, ORR, BIC, MOV, MVN, TST and TEQ with the S bit set
leave V unchanged. The AArch64 instructions the recompiler uses for them
(ANDS, BICS, TST) clear V, and storeFlags() wrote the host NZCV back as
is, so every flag-setting logical op cleared the guest's V. A signed
conditional branch (BVS, BGE, BLT, BGT, BLE) after such an op then went
the wrong way. The x64 recompiler already preserves V for these ops
(saveFlags(save_v_flag)); the interpreter does too.
[ci skip]
TST and TEQ had a save/restore under STRICT_MODE with a note that nobody
probably relies on it. That path was never built, and it did not cover
ANDS, EORS, ORRS, BICS, MOVS or MVNS.
Restore V after the op from the PSR that loadFlags() loaded before it,
in the same place the shifter carry is merged, for every logical op that
sets flags. Three instructions, only on those ops.
AicaArmTest.LogicOpsTest asserted exactly this (teq with C,V set must
keep V) and failed on arm64; it passes now, with the rest of the suite.
Co-authored-by: Claude Fable 5.1 <[email protected]>
readConst, writeConst, readt and writet shift the 32-bit guest address by
the whole tagged memInfo_ptr value (pointer | shift). Shifting a u32 by 32
or more is undefined, and GCC 16 targeting 32-bit ARM uses that: once the
pointer is known to be non-null (iirf > 31) it drops the offset, so
read32/write16 compile to a plain load/store at the region base. Every
memory access then hits offset 0, the BIOS trampoline copied to 8C0000E0
is lost and the console never boots (black screen, no sound).
Mask the shift with HANDLER_MAX, which is what x86 does in hardware and
what the code intends. No change in behaviour where the old code worked.
Co-authored-by: hitenmandalia <[email protected]>
[ci skip]
Received frames were passed to the RTL8139 from the network thread,
raising the ASIC interrupt there and racing SIIDRebuild() on the SH-4
thread. Queue them and deliver them from an SH-4 scheduler callback.
Sent frames were pushed into picoTCP from the SH-4 thread, but picoTCP
is built without PICO_SUPPORT_MUTEX so its device queue is unlocked.
Queue them and feed them to picoTCP from the pico thread before each
stack tick.
[ci skip]
Vulkan without VK_EXT_provoking_vertex, DX9 and DX11 take flat-shaded
colors from the first vertex, while on Dreamcast it's the last. For the
depth-sorted triangle list, setFirstProvokingVertex() copied each
triangle's last vertex colors onto its first vertex. But sortTriangles()
builds these triangles from strips, so neighbors share vertices:
tri0=(P0,P1,P2), tri1=(P2,P1,P3). P2 is tri0's source and tri1's
destination, and the list is processed in depth order, so one
triangle's flat color can overwrite another's before it's read. In
strips of three or more triangles, consecutive triangles even share
their first vertex. Flat-shaded translucent polygons then pick up a
neighbor's color, e.g. the player shadow decals in Tony Hawk's Pro
Skater 2 and Mat Hoffman's Pro BMX turn uniformly dark.
Each sorted triangle has its own three slots in idx, so rotate them
(a,b,c) -> (c,a,b) instead. The winding is unchanged and the provoking
vertex comes first, without touching shared vertices. Strips keep the
color copy, which is safe there.
Adds SorterTest, which fails on the old code and passes with this change.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
When nvmem is disabled, termMappings() frees main RAM, VRAM, ARAM and
the Elan RAM but leaves memInfo_ptr unchanged. Each entry still holds
the old host base, so any guest access before the next remap returns a
pointer into freed memory.
Zero the table, as init() does. A null entry routes to handler 0,
readMemNotMapped/writeMemNotMapped, which only log.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
- Bump action versions
- Improve ccache support
- Reformat files
- Replace chkfung/android-version-actions and mathieu-bour/setup-sentry-cli from android workflow
- Update MoltenVK to use the latest official tag
- Update BSD operating systems
Export only retro_* from the core, as the osx build does with
libretro.osx.def. Symbols the core exports bind to same-named ones
the frontend already loaded: RetroArch builds with their builtin
glslang made the Vulkan renderer crash in GlslangToSpv on its first
shader compile, and with a system glslang loaded (ffmpeg ->
libplacebo -> shaderc) 33 glslang entry points, zstd, zlib and
stb_image still went to those copies.
A frontend may size its savestate buffer once, as libretro.h allows,
but a state grows and shrinks with the devices plugged in and the
frames being drawn, and states then outgrow the buffer. Report the
system's memory regions plus the allowance GGPO makes for everything
else, which is constant for a game.
System SP gets NAOMI's allowance, plus the game's media if it has one:
the media is loaded into memory-backed RAM, so a state holds all of it.
[ci skip]
xbrz::scale() only implements factors 2 to 6. Any other value hits an
assert that's compiled out in release builds, and scale() returns
without writing the destination buffer. The texture is then uploaded
from uninitialized memory at the requested size.
rend.TextureUpscale2 can be set to 8 or 16 through emu.cfg or Lua.
Clamp the factor once and use it for the buffer size, the scale call
and the upscaled dimensions so they always agree.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
temp_value was a file-scope global shared by every CDI parse. The boxart
scraper opens discs on its own thread, so it can parse a CDI while a
game is loading and corrupt the other parse's reads.
Use a local in each function. It's a uint32_t initialized to 0 because
every read into it is 4 bytes; a local unsigned long would leave the top
half uninitialized on LP64.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
dc_deserialize() read the broadcast, cable and region settings straight
into the config and checked them with verify(), so a corrupt or
incompatible state killed the process, after already writing the bad
values into the settings.
Read them into locals and throw Deserializer::Exception when one is out
of range. dc_loadstate() and the libretro core already catch it and
report the state as unusable. Valid states load exactly as before.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
The in-RAM save hotkey called gui_saveState(false, true), which runs
dc_serialize() without stopping the emulator. With threaded rendering
on (the default), the SH4 and AICA keep running on the emulator thread
while the input thread serializes, so the state can be torn: memory and
registers from different moments.
Stop and restart around the save like the disk save hotkey and the
in-RAM load hotkey already do.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
The callback was only ever taken once. A frontend that loads a fresh
instance of itself for the next game, as Kodi does, keeps the core
loaded, so the next GD-ROM light change called into the unloaded one.
[ci skip]
Add the missing dump_unique_textures core-option definition beside the
existing texture-dump options. This prevents findDefinition() from
returning null when the frontend supplies a value for this option.
Default to disabled to match the implicit false config default, and use
the existing setting description for skipping video and animated textures.
findNaomiBios checked for the BIOS archive with access(), so a frontend
watching its VFS never saw it being looked for, unlike findFlash, which
already uses path_is_valid. Kodi uses that to name the file a core is
missing.
[ci skip]
RAM base and Sh4Cntx address might change on libretro without Init being
called. So set the correct Sh4Cntx address on Reset and propagate to
dynarec, cycle counter and caches.
[ci skip]
GGPO parses the peer address with inet_pton() only, so a host name in
the Peer field silently becomes 0.0.0.0 and the session never syncs,
without any error. Resolve non-numeric addresses with getaddrinfo()
before handing them to GGPO, and fail with a clear message when the
name cannot be resolved.
Co-authored-by: unjordi <[email protected]>
[ci skip]
Since the switch to hostfs::File (#2299), MD5Sum::add(hostfs::File *)
resolved to the generic add(const T&) template, which hashes the pointer
value. The resulting digests depend on the heap address, so they differ
between peers and between runs. This breaks GGPO peer verification when
a .state.net savestate is used (stateMD5), and with CDI, GDI and CUE
images (gameMD5).
Add an MD5Sum::add(hostfs::File *) overload that hashes the whole file
content, like the std::FILE overload, and reject pointer types in the
template with a static_assert so this cannot happen again silently.
Co-authored-by: unjordi <[email protected]>
[ci skip]
An overflow was setting the short battle code to 7fffffff on win32 in
50% of cases.
Fix spawn and hmgeo end of match freeze by returning 0 if the connection
is closed.
net service throw when connection is closed. Modem catches it and hang
up.
netservice: call custom service start() and stop() like others.
ice: init http client before using it
capcom: send stop message when one end is closed. detect hanged resync
and retry them.
capcom: support sf3 M.F 2000 v1 and v2
On the SH4 every FPU instruction clears the FPSCR cause field before it
executes, and sets a cause bit only if it raises an FPU exception.
Flycast doesn't update the cause field in FPU instructions, so a cause
bit that the guest writes back with lds/lds.l stays set forever.
Kita He. White Illumination (T14301M) resets to the BIOS when a karaoke
song starts (issue #1058). TRFDRAW.DLL inverts a 4x4 matrix with an LU
decomposition whose pivot comparison helper saves FPSCR, runs fcmp/gt and
reads FPSCR back: a set cause.V means an unordered (NaN) comparison. With
a stale cause.V every comparison looks unordered, no pivot row is chosen,
and the uninitialized pivot index makes the routine read a wild pointer.
The access violation is caught by the game's __except handler, which
calls ResetToFirmware().
Clearing the cause field whenever FPSCR is written matches what the
hardware shows to code that reads FPSCR after an FPU instruction.
Co-authored-by: Claude Opus 5.5 <[email protected]>
[ci skip]
Game ids can have spaces, like "INITIAL D Ver.2". The parser removed all
spaces in the section name so it became "INITIALDVer.2". Now only the
spaces before and after the name are removed.
Co-authored-by: nixxou <[email protected]>
[ci skip]
Use per-request URL buffers for GET and POST to prevent concurrent requests from overwriting each other's host and path.
Return the actual HTTP status for GET requests, retaining an error status when sending the request or querying its status fails
[ci skip]
modem: implement V42 answerer mode
modem: add callbacks for dial out, answer mode, start handshake, etc.
network: detect capcom direct games and simulate the peer-to-peer connection
The OIT color and depth/stencil attachments, a-buffers and pixel counter
are shared by consecutive render passes and by all frames in flight, but
the render pass had no external dependency covering them, and the pixel
counter reset wasn't synchronized with the fragment shaders using it.
With MoltenVK using Metal 3 argument buffers and residency sets (macOS 15+),
Metal no longer tracks hazards on resources accessed through argument
buffers, so input attachment reads and storage buffer accesses of a frame
may race with the attachment clears/loads and a-buffer writes of the next
one. This results in sporadic one-frame glitches with per-pixel alpha
sorting.
Issue #2495
Calling sh4_sched_request before will not use the correct current time.
Fixes barcode reader malfunctioning after loading a state (mushiking,
dinoking, etc.)
Issue #2501
sdl2-compat (what Homebrew installs as sdl2) doesn't convert the file
name of an SDL_DROPFILE event pushed by the application, then crashes
in strdup(NULL) when converting the event back during window creation.
Carry the path in a registered user event instead.
On arm64 Android, apps targeting API 30 or later get tagged heap pointers:
malloc returns addresses with a tag in the top byte, while the fault address
a signal handler receives has that byte cleared. Without nvmem, RAM, VRAM,
AICA RAM and Elan RAM are malloc'd, so the range checks in bm_getRamOffset(),
getVramOffset() and the memwatch watchers never matched a fault on a
protected page, and the first write to a page holding compiled code killed
the core as an unhandled SIGSEGV.
Compare untagged addresses instead. The vmem branches are unchanged: that
memory is mmap'd and carries no tag.
The libandroid link from 8933f9fe0 is still wanted, since it is what lets
ASharedMemory_create resolve and nvmem work, but its subject blamed the
dynarec; this was the crash.
flycast's libretro build has never run on Android 11 or later. It loads,
reaches frame one, and then takes a SIGSEGV its own handler cannot place:
[VMEM] Virtual memory file allocation failed: errno 13
[VMEM] Warning! nvmem is DISABLED
[COMMON] SIGSEGV @ 0x71d0c87618 invalid access to 0x71ce6cba00
errno 13 is EACCES. posix_vmem.cpp asks ASharedMemory_create first and
falls back to opening /dev/ashmem when the symbol is null -- and Android
11 took that device away from apps. So the fallback is refused, nvmem is
disabled, and the dynarec's fastmem accesses have no mapping behind
them. rewrite() cannot place the fault, and the handler falls through to
die("segfault").
The good path was there all along and was dead code, because the symbol
is declared weak:
extern "C" int __attribute__((weak)) ASharedMemory_create(const char*, size_t);
and nothing in the LIBRETRO branch links libandroid, so it resolved to
null every time. readelf on the built core shows only libm, libdl and
libc in NEEDED, and nm shows ASharedMemory_create as an undefined weak.
The app build links `android log` in its own ANDROID block further down;
the libretro build never did.
Don't switch to swap interval 2 if actual interval is 3 or more. Fixes
ECCO switching to swap 2 during loading.
Switch to interval 1 when slightly above 30 FPS for too long. Helps
variable refresh rate games (Unreal) and those rendering close to 30 FPS
(ECCO, Armada).
Issue #2467
[ci skip]
The path of http requests was limited to 256 chars on Windows, which
isn't enough for some TGDB gets.
Issue #2455
Issue #2470
Only save the database when needed. Better handling of TGDB allowance
limit. Pause if no progress.
When reaching LSA, the last sample and Q values should be stored, even
with ADPCM long stream (which doesn't use them). NBA 2K switches a
looping sound from ADPCM long stream to ADPCM and relies on the loop
start values to be restored.
Issue #2469
CHDs converted from Redump MIL-CD dumps were rejected with "Unsupported
subtype or pre/postgap": the audio tracks of the first session carry their
pregap inside their own .bin file, which chdman records as PREGAP:n
PGTYPE:V<type> in the CDROM_TRACK_METADATA2 entry.
Handle these tracks the way MAME does:
- when PGTYPE is prefixed with 'V', the pregap sectors are part of the track
data and counted in FRAMES, so INDEX 01 sits `pregap` frames after the
previous track and the track data starts `pregap` frames into the CHD
- otherwise the pregap only takes up space on the disc
- subcode data doesn't change the sector layout, and postgap sectors are
never stored: warn about both instead of bailing out
Also:
- audio tracks of CD-ROM CHDs are stored big-endian, just like the ones of
GD-ROM CHDs using the CHGD metadata tag. Not byte-swapping them was the
cause of the audio distortion reported with CHD MIL-CDs
- the 11400 frame session gap includes the pregap of the second session's
first track. Don't count those sectors twice when they're in the image
- only treat a multi-track disc as a MIL-CD when its last track is a data
track. A mixed mode CD is a single session disc and its data track is the
first one
- report the lead-out as the first FAD after the last sector, like the CUE
and GDI loaders do, instead of one frame earlier
Tested on a dozen homebrew MIL-CDs, from 2 to 17 tracks: the CUE and CHD
loaders now return the same tracks, sessions and sector data for each of
them, and they all boot.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfFd8rJc9aTQB7au8yLrqG
* cue: don't count the session pregap twice in MIL-CDs
The 11400 frame gap added at REM SESSION 02 is the lead-out of the first
session (01:30:00), the lead-in of the second one (01:00:00) and the pregap
of its first track (00:02:00). When that track has an INDEX 00 of its own,
its pregap sectors are stored in the image and were counted a second time,
placing the data track 150 frames after the session start reported in the
TOC, i.e. after the FAD the boot file is looked up at.
Redump lays MIL-CDs out with no INDEX 00 on the second session's track, so
none of the images I have hits this. It only shows up with images written by
other tools, and is included here because the CHD loader needs the same
adjustment to agree with this one.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01NfFd8rJc9aTQB7au8yLrqG
Since #2477 put zstd in the combined archive, the libnx job fails at the
final link with `undefined reference to XXH32` - the symbol went missing
from an archive that extracts xxHash first.
ar names a member after the basename of its object, and zstd builds its
own vendored copy of xxhash.c, namespaced to ZSTD_. Both archives
therefore carry a member called xxhash.c.o, and extracting them into one
directory leaves only the second: zstd's, which defines ZSTD_XXH32 and
nothing the core calls.
Extracting each archive into a directory of its own keeps every object,
whatever it is called. Reproduced and checked with a CMake project of the
same shape, two static libraries whose members collide:
flat, as now: core_main, ZSTD_XXH32
a directory each: core_main, ZSTD_XXH32, XXH32
Not run on the buildbot - the Switch toolchain is not something I have
here.
Handle the case where MVO list are shared between OP and TR but the TR
list is the one to use. Fixes Xtreme Sports shadows. Issue #2479
Reset PCW::Texture to 0 if texture is invalid (hence null) so renderers
don't have to worry about it.
Secondary accumulator fixes BANG! Gunship Elite, Evil Dead, Space
Channel 5 part 2 and WCCF in non-OIT mode.
Bind dummy imageView/buffer if a descriptor set doesn't use a slot. This
avoids referencing old resources and fixes validation errors when those
resources are deleted.
oit: lighter headers. Also bind dummy imageView/buffer where needed.
Add NEON framebuffer conversion and VRAM write paths, and validate the physical VRAM footprint before vector loads so both 8 MB and 16 MB configurations remain in bounds.
[ci skip]
The libnx template builds --target ${CORENAME}_libretro, and on Switch that
target is flycast's own objects and nothing else - 251 members. The
dependencies (xxhash, chdr, zip, elf, the resources) are folded in by the
"combined" target that CMakeLists.txt defines for exactly this case, and
that is the archive RetroArch has to link: 409 members.
[ci skip]
ImGui_ImplOpenGL3_SetupRenderState generated the VAO into its
`vertex_array_object` parameter, which is passed by value, so the name never
reached ImGui_ImplOpenGL3_RenderDrawData. There the local was still 0, the
`if (vertex_array_object != 0)` guard was false, and glDeleteVertexArrays never
ran — a VAO was leaked every frame. The OSD is drawn every frame, so on Mesa
(radeonsi) host memory grows unbounded until OOM; Vulkan is unaffected.
Move the glGenVertexArrays back into RenderDrawData and pass the handle to
SetupRenderState for binding only, so the existing glDeleteVertexArrays runs
and the VAO is recreated each frame (staying valid across GL context changes),
matching the upstream ImGui backend.
The libretro Switch core on the buildbot still comes from the old
libretro/flycast tree, because the job here was written against the
Makefile-based libnx-static template and this tree has no Makefile. There
is a CMake version of that template, and the CMakeLists already knows how
to build for Switch (NINTENDO_SWITCH + LIBRETRO produces
flycast_libretro_libnx), so point the job at that instead.
[ci skip]
Add windowsCE flag to gate windows CE-specific hacks: system calls
interceptions, page fault handler, memory slot #0 flush.
Detect mmu usage when loading a state and add UTLB entries to cache.
Fixes mario 64 savestates.
Turning the USE_DREAMLINK_DEVICES variable into a build option (enabled
by default) provides a convenient way to exclude building the
DreamPicoPort-Api dependency, which could use newer libusb APIs than are
available on platforms which provide their own libusb implementation,
i.e. mostly the BSDs.
For example, the newest DreamPicoPort-Api uses libusb_wrap_sys_device,
which isn't available on FreeBSD < 15. Building flycast with an updated
DreamPicoPort-Api on the still supported legacy FreeBSD 14 would need to
disable this option.
The build option needs to be forced off when targeting Android, iOS,
Switch or LibRetro, to keep the same build behavior from before this
change.
This also allows to unnest the configuration block to the top-level.
Fixes Sega Rally (JP) network menus.
Fixes Ikaruga and Armada loading screens. Issue #1189.
Fixes VF3tb history mode videos in NTSC and VGA mode.
Don't check for framebuffer writes when writing the framebuffer to vram
(Full FBE)
[ci skip]
Catch/rethrow xbyak exceptions in arm7 and sh4 dynarecs. Fixes
MINIDUMP-8P9
naomi: code to generate random main board serial id (not used yet)
Don't log warning for sh4 trapa op.
texcache: get rid of unused FBLineWriter argument.
Act as left projector and start right instance when MultiboardSlaves=2
netdimm: fix vf4/vf4efo regression. Get rid of final tuned sync socket
hack not needed anymore. Ignore netdimm server reboot.
Set node number in eeprom for left and right projectors.
ccd cam: don't crash if http server can't start
[ci skip]
Emulate 2 cards in reader.
Save and update card write counter.
Detect expired card and insert a blank card with it to allow data
transfer. Replace existing card with new one when saving.
Request and propagate explicit OpenGL ES 3.1 contexts in libretro. Add the image-atomic and shader-storage support needed by OIT, validate per-pixel resource limits, and improve A-buffer synchronization and framebuffer buffer reuse.
Moving a card now registers as a selection in communication menu.
Changed pitch coordinates to match real hw.
Support 2k1, 2k2 (eu) and 2k4 (eu) for player names and pictures.
[ci skip]
CUE and GDI descriptor parsing continued appending after a quoted
filename reached end of input. A malformed descriptor could consume
CPU and memory until Flycast stopped responding.
Treat failed character extraction as an invalid descriptor while
skipping whitespace and while scanning quoted filenames.
- Bump action versions
- Improve ccache support
- Reformat files
- Replace chkfung/android-version-actions and mathieu-bour/setup-sentry-cli from android workflow
- Update MoltenVK to use the latest official tag
- Update BSD operating systems
Secondary accumulator was only supported by OIT renderers in autosort
mode. This adds support for missing renderers (dx9, dx11 and gles) and
modes (dx11 OIT and gl4 OIT in !autosort mode).
Vulkan support will come in a later commit.
Fixes WCCF black pitch issue. Evil Dead and BANG! Gunship Elite now
playable in non-OIT mode.
[ci skip]
Club card format changed. Cmd 24 and 25 are single block read and write.
Card dispenser correctly reports that the player card has been dispensed
and picked up.
Added option naomi:WCCFServer to specify the server IP address (or
domain name). Replace wccf harcoded server IP address with the
configured one at runtime.
When Stop() is requested, also clear the SH4 cycle counter so the current
timeslice ends as soon as possible.
This prevents execution from continuing past a requested stop point.
Use games-frame-pacing library (aka Swappy) for OpenGL and Vulkan.
Implements proper frame pacing for 30 FPS games and/or 120+ Hz displays.
Don't duplicate Vulkan frames.
Support for satellite nodes (vonot, club kart)
Start network game when known max of nodes is reached.
Add Start Now button to network sync wait window.
Ignore MultiboardSlaves option if not active when loading eeprom. Rely
on game id instead.
Save multiboard eeprom under a different name, same as nvmem
derbyoc2 uses the same card reader as WE
Disable M3Comm on slaves
Use non-free play default eeproms with proper DOC coin settings
Slave's eeprom was configured as satellite in some cases
Since Vulkan loader 1.3.216 the loader no longer enumerates portability ICDs unless the application
sets VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR and enables the
VK_KHR_portability_enumeration instance extension. Without this,
vkCreateInstance returns VK_ERROR_INCOMPATIBLE_DRIVER on macOS / iOS
where MoltenVK is the only available ICD, and Flycast fails to start
the Vulkan renderer entirely.
Made-with: Cursor
[ci skip]
vulkan-hpp lists eSuboptimalKHR as a success code for presentKHR, so
the call returns the value rather than throwing. The existing code
ignores it via (void)res and the surface stays stuck in a sub-optimal
configuration until something else triggers a resize.
In practice this shows up across DPI / window-resize / display-mode
changes and on MoltenVK, where the driver more aggressively reports
the swapchain as suboptimal but still presents. Set resized so the
swapchain is rebuilt on the next frame, matching the existing
out-of-date handling that already comes through vk::SystemError.
Made-with: Cursor
[ci skip]
WIP support for derby owners club (except derbyoc2)
Slaves now send keyboard events to master, which handles them and sets
input focus to its own window, and attempts to raise it.
Half the sync interval for F355 to fix sync regression.
When Stop() is requested, also clear the SH4 cycle counter so the current
timeslice ends as soon as possible.
This prevents execution from continuing past a requested stop point.
Use games-frame-pacing library (aka Swappy) for OpenGL and Vulkan.
Implements proper frame pacing for 30 FPS games and/or 120+ Hz displays.
Don't duplicate Vulkan frames.
Since targeting android 16 (6a071668be)
the Back key isn't handled by Flycast anymore on android 16, due to
breaking changes by Google. Install an OnBackInvokedCallback to ignore
default handling of the key and get back to normal.
Tentative fix for
Issue #2369
Support for satellite nodes (vonot, club kart)
Start network game when known max of nodes is reached.
Add Start Now button to network sync wait window.
Ignore MultiboardSlaves option if not active when loading eeprom. Rely
on game id instead.
Aligns the reported core framerate with the typical 60 Hz host display
refresh, eliminating the periodic frame-pacing skip that drift between
59.94 fps content and a 60 Hz monitor produces under strict V-Sync or
Black Frame Insertion (the skip happens roughly every 17 seconds).
PAL (50.0 Hz) is unchanged. The 240p VGA rate is also moved to 60.0
so it benefits from the same alignment. Audio sample rate stays at
44100 Hz; the per-run sample count `sample_rate / fps` adjusts
automatically.
Co-authored-by: jf624708-blip <[email protected]>
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
[ci skip]
Save multiboard eeprom under a different name, same as nvmem
derbyoc2 uses the same card reader as WE
Disable M3Comm on slaves
Use non-free play default eeproms with proper DOC coin settings
Slave's eeprom was configured as satellite in some cases
Since Vulkan loader 1.3.216 the loader no longer enumerates portability ICDs unless the application
sets VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR and enables the
VK_KHR_portability_enumeration instance extension. Without this,
vkCreateInstance returns VK_ERROR_INCOMPATIBLE_DRIVER on macOS / iOS
where MoltenVK is the only available ICD, and Flycast fails to start
the Vulkan renderer entirely.
Made-with: Cursor
[ci skip]
vulkan-hpp lists eSuboptimalKHR as a success code for presentKHR, so
the call returns the value rather than throwing. The existing code
ignores it via (void)res and the surface stays stuck in a sub-optimal
configuration until something else triggers a resize.
In practice this shows up across DPI / window-resize / display-mode
changes and on MoltenVK, where the driver more aggressively reports
the swapchain as suboptimal but still presents. Set resized so the
swapchain is rebuilt on the next frame, matching the existing
out-of-date handling that already comes through vk::SystemError.
Made-with: Cursor
[ci skip]
WIP support for derby owners club (except derbyoc2)
Slaves now send keyboard events to master, which handles them and sets
input focus to its own window, and attempts to raise it.
Half the sync interval for F355 to fix sync regression.
Fix regression with split-screen multi render in Quake 3. Caused by
aef3d2d337.
Move duplicated code into transform_matrix. Handle framebuffer
dimensions/clipping scaling depending on render mode (Full FB emu, copy
RTT to vram).
Handle RTT and screen render similarly when possible.
[ci skip]
ui: add option to discard video and animated textures during dump
Implement a filter to prevent flooding the texture dump directory with
thousands of redundant frames from FMVs or procedural effects.
- Add a single 'Discard Video and Animated Textures' option (enabled by default).
- Filter logic: skip dumping if the texture was already updated (Updates > 1)
or if it uses the YUV format (video).
- Update UI in Advanced settings, French translations, and i18n template.
Fix framebuffer clipping when scale>1 (Stretched PAL). Issue #728
Get rid of ScissorMatrix.
Don't scale framebuffer clipping rect in full FB emu.
Refactor rend_context. Use Rect and ivec2.
In single-threaded mode, direct framebuffer writes are handled in
vblank, but the Emulator then assumes a timeout has occurred, and the
frame is rendered but not presented.
Ignore this invalid timeout and present the frame is all cases. The
context won't do anything if no frame has been rendered.
Issue #2302
Reset framebufferRendered after PresentFrame() in the Vulkan
framebuffer presentation path.
This fixes a standalone Vulkan freeze on AMD GPUs in non-threaded
mode, where the emulator could hang after the Sega logo until an
alt-tab.
[ci skip]
Don't call i18n::T in static init to avoid potential static init order
issue. Tentative fix for Issue #2285
Call i18n::init() in i18n::reloadLanguage()
Set source files to utf-8 for MSVC
Add http::get function with request and response header params.
Set a 30 s connection timeout for all http requests (except on macOS).
Linux tests with postb.in
When enabled, all .cfg and all files in data except savestates are
backed up. Only the direct children of data are considered so boxart,
wwwcache, texdump, etc. are excluded.
DX9 windowed mode only supports a swap interval of one (and immediate).
Windows reports a refresh rate of 59.94 Hz or 119.98 Hz, which is
rounded down by SDL. This causes the calculated swap interval for 30 FPS
to be less than 2 (for 60 Hz).
Issue #520
VC 2K sport games sometimes miss the end of the sound if the last
reported CA is >= LEA-2. This result in a "stuck" audio channel and
leads to a game freeze after a while (NFL) or when exiting the game
(NBA).
Issue #1481
Issue #2226
The YUV converter is reset on STARTRENDER on real hardware.
TA_YUV_TEX_CNT is reset when more YUV data is sent, not when block count
is reached.
Fixes skipping image in pl_mpeg
Use cycle_counter to increase the precision of timers.
Use 64-bit where needed to handle underflows. Avoid double operations on
32-bit and 64-bit data.
Add timer test.
Fixes lack of randmness in Soul Calibur. Issue #2093
Power Smash needs a symmetric speed to avoid lag. Handle network issues
server-side and get rid of game patches.
Same for Pro Yakyuu Team de Asobou Net
[ci skip]
If a MapleLink device is disconnected during a maple dma call, the
corresponding MapleLinkVmu will be deleted. Keep it alive until the end
of the RawDma() call.
Fixes MINIDUMP-8C4
maple: ignore the outgoing message header if the device doesn't have expansion ports. Use port and len from the DMA header.
maplelink: add virtual event handlers for game start and term. Use in DreamLink and DreamPicoPort.
pvr: reset the TA context and let the emu thread continue in case of renderer exception.
vulkan: reset rendering state when recreating swap chain
ui: only pause the game on renderer exception to allow the user to save a state. Disable scrolling buttons on Settings tab bar.
i18n: update source pot
Only reconnect maple devices that have changed instead of all of them.
Check DreamPotato socket state every second.
Disconnect linked maple device when disconnected from remote device.
dreampicoport: send port when changing bus
Disable load/save state if at least one MapleLink with storage enabled.
Change UsePhysicalMemory default to false.
Change Per Game VMU A1 default to true.
Fix DreamLink infinite loop on exit.
dreampotato, dreamconn: don't use stringstream for output
dreampotato: libretro support (no VMU storage yet)
Currently the install-target of the DreamPicoPort-API dependency is
executed when installing flycast. This results in the include file
DreamPicoPortApi.hpp and the static library libdream_pico_port_api.a to
be installed alongside flycast.
Add EXCLUDE_FROM_ALL to add_subdirectory to prevent this.
* Do not create a shared_ptr from destructor
* Fall back when MDC_DeviceRequest message does not have an expected response
* Assume the device type for physical DreamConn controllers
* DreamConn controllers do not support physical VMU memory
* Do not maple_ReconnectDevices for DreamConn controller
Use modem sync mode when ASYN is reset.
Implement V14 sync-async mode for V42 detection. Also used by Power
Smash and Pro Yakyu Team de Asobou Net!
Switch to V42 protocol for most games.
Set correct modem speed and timing as set by the game.
Get rid of modem speed/automode cheats.
[ci skip]
Fail if eglGetDisplay() is null.
Throw exception on initRenderApi/switchRenderApi failure.
Catch in SDL and Android and show error message.
Localize Android java code.
Fixes MINIDUMP-7SD MINIDUMP-2XH MINIDUMP-5KM MINIDUMP-2FF MINIDUMP-4ZP
MINIDUMP-6T1 MINIDUMP-5D3 MINIDUMP-7ME
[ci skip]
Due to d0ec876936 the mmu enabled path may
be taken when the emu is pausing, so make sure block linking uses the
same number of ops in both branches.
Fixes MINIDUMP-82C MINIDUMP-7T2 MINIDUMP-7W0
IniFile: use locale-independant float conversions functions
Use std::ostringstream and std::istringstream as appropriate.
Use C locale for GDI and CUE parsing.
* New translations flycast.pot (French)
New translations for {languageName} [ci skip]
* New translations flycast.pot (Swedish)
New translations for {languageName} [ci skip]
* New translations flycast.pot (French)
New translations for {languageName} [ci skip]
* New translations flycast.pot (Swedish)
New translations for {languageName} [ci skip]
* New translations flycast.pot (English, United Kingdom)
New translations for {languageName} [ci skip]
Support for localized dates, collation and messages.
Rewrite ini file reader/writer and command line parser.
Standardize all config stuff in the config namespace.
* Use DreamPicoPort-API 1.0.2 which automatically clears USB stalls
* Getting condition in order to detect controller seems to be problematic
* Use the libusb implementation of DreamPicoPort-API on Windows because WinRT is buggy
Detect UWP on-screen keyboard hiding and validate imgui text edit (code
by @danprice142).
Don't use list boxes for paths in Settings > General since child windows
cause issues with DPad/cursor keys navigation and thumbstick scrolling.
The touchpad also reports motion events on the same axis numbers, but
the range source is different so ignore them.
Override known axes in mapping when the gamepad is connected.
Issue #2109
* Add user-configurable paths for boxart, mappings, and cheats
Introduces new configuration options for Boxart path, Mappings path, and Cheat path, allowing users to specify custom folders for box art, controller mappings, and cheat files.
Normalize analog axis values using InputDevice.MotionRange.min and
InputDevice.MotionRange.range.
Specify Event.actionIndex when getting axis values like SDL does.
Issue #2109
King of route 66 uses a maple microphone for the CB-MIC feature.
Also define the mic switch button binding (button 6).
Don't add VMUs to naomi2 games since no game uses them afaik
Use the INDEX 01 mm:ss:ff tag to determine the pregap size and add it to
the track start FAD.
Remove previous +02:00 hack for audio tracks.
Fixes Sonic Team jingle cut off in ChuChu Rocket redump cue.
Issue #2103
Only one palette is supported in the shader, so convert area 1 palette
textures (2-volume mode) on the cpu and handle them normally in the
shader.
Issue #1528
* Add configurable paths for BIOS, VMU, saves, textures & dumps
Introduces new options for user-defined folders for BIOS, VMU, savestates, game saves, texture packs, and texture dumps. Updates path resolution logic in oslib.cpp to prioritize user-specified paths before falling back to defaults.
* Add UWP support for directory and file access
Introduces UWP-specific implementations for directory handling and file access in core/oslib, including custom opendir, readdir, and closedir functions, this is so we can see subfolders properly on UWP
* Custom Paths section hidden on Android and iOS
Adds UWP protocol activation support for ROM loading from UWP Frontends/Browsers, allows launching ROMs via SDL's `SDL_WinRTGetProtocolActivationURI()` and redirection using the 'launchOnExit' URI parameter from protocol activation in SDL_WinRTApp, Closing a Rom/Game from the quick menu or closing the app will make use of `launchOnExit` and redirect to the specified app
Implements launching a URI via Windows.System.Launcher after the game is stopped from the Exit button in the quick menu, enabling return to sender/redirection on UWP
Update SDL submodule to include SDL_WinRTGetProtocolActivationURI()
EG rate formula specified in the doc is correct but FRS+OCT is ignored
if negative.
If LSA > LEA, playback continues after LEA until reaching LSA. Then CA
is reset and playback stops (including looping sounds). Get rid of
Legacy of Kain hack.
With block linking, CpuRunning isn't tested immediately so add a special
case in DynaRBI::Relink()
Issue #893
Fixes MINIDUMP-56 MINIDUMP-6V MINIDUMP-6X MINIDUMP-CA
Fixes MINIDUMP-H8 MINIDUMP-K6 MINIDUMP-QN MINIDUMP-YZ
Fixes MINIDUMP-YM MINIDUMP-148
Work around race condition when stepping (CpuRunning still true in
Sh4Executor::Step() on emu thread since Step() hasn't be called yet in
main thread).
Don't advertise vCont commands that aren't supported.
Range stepping end is exclusive.
Drop support for Android 4.* (kitkat, jelly bean)
Minimum SDK 21 (Android 5.0, lollipop)
Target SDK 35 (Android 15)
Build with NDK 29 for 16KB-page by default. Issue #1864
Range for all axes, including triggers, is now [-32768,32767]
Detect trigger direction when mapping and store in mapping file.
sdl: parse controller bindings string to correctly map axes.
Issue #2014
Add image barrier in VulkanContext::PresentFrame() for nvidia gpus.
Tentative fix for square glitches on nvidia 30xx series.
Issue #1631
oit: Add dependency from external to subpass 2 since vulkan's implicit
one is too relaxed.
Use actual Panther DC identifier for full controller. Fixes KISS: Psycho
Circus.
Issue #2026
Show current state of mapped gamepad buttons and axes in controller
mapping.
Assume that full axes are roughly centered at start up and determine
which axis are half ones, and the axis direction.
Fixes driving wheel pedals range to the expected [0, 32767].
Issue #2014
Add sine effect to haptic api and stop using maple rumble for naomi FFB.
Emulate spring in midi FFB. Thanks to njz3 for his help on decoding the
protocol.
Don't use exponential scale for rumble when using haptic sine effect.
serialize Sh4OCache::writeBack/ThroughBufferCycles
Emulator keyboard bindings no longer working when UI is open (Exit).
All-ports mapping not being loaded correctly.
All-ports mapping not working on ports B,C and D.
Restore automatic binding of opposite key/axis.
caused by 64b9e51af0
Add button combination mappping support
- Implement tracking of pressed buttons in GamepadDevice
- Add ability to detect button combinations- Fix mapping system to preserve individual button mappings
- Ensure buttons can work both individually and as part of combinations
- Ensured trigger buttons can be the first button in a combination
- Maintained detection state when binding multiple buttons
- Added special handling to recognize both original and normalized trigger codes
---------
Co-authored-by: James Smith <[email protected]>
Use the actual PVR2 dithering kernel (standard 4x4 Bayer matrix) used on
real hardware.
Fixes the screen melt effect of Doom64 (per-pixel only).
Issue #1939
Add rightx and righty for DreamPicoPort (for maraca support)
Add secondary d-pad to dreampicoport mapping
Allow DreamLink device to dictate button/axis name; set custom button names in DreamPicoPort to known codes
Add bba config information to flash if missing. Fixes outtrigger.
cheat: Enable automode in modem connection string for Bomberman Online
and Outtrigger (US)
cheat: disable dricas auth for outtrigger (JP)
Using src=OTHER_COLOR with destination secondary accumulator should use
the secondary accumulator color, not the final one.
Fixes dark gun in Doom 64 with Ultra graphics (bump mapping).
Issue #1771
Add subpass dependency from the last subpass to external/top of pipe.
Fix glitches in upper left corner when using OIT on Mali GPUs.
Issue #1014
Issue #1234
Issue #1356
Issue #1497
Issue #1852
Using src=OTHER_COLOR with destination secondary accumulator should use
the secondary accumulator color, not the final one.
Fixes dark gun in Doom 64 with Ultra graphics (bump mapping).
Issue #1771
Add subpass dependency from the last subpass to external/top of pipe.
Fix glitches in upper left corner when using OIT on Mali GPUs.
Issue #1014
Issue #1234
Issue #1356
Issue #1497
Issue #1852
Stop the emu in retro_serialize_size and don't restart it until after
the state is saved in retro_serialize. This avoids issues when the
actual state size is greater than what retro_serialize_size returned.
Issue #1885
* added getFunctionDefinitions
* Set DreamPort device default deadzone to 0% while preserving user customization
* Fixed default dead zone 0% for DreamPicoPort; set UsePhysicalVmuMemory default to true
* Use DisabledScope for UsePhysicalVmuMemory; moved DreamLinkGamepad::getDefaultMapping() to protected scope to match parent
* Set unique ID for DreamPicoPort devices so they enumerate the same way by flycast on every load
* Implement DreamLinkGamepad::resetMappingToDefault() and set C, D, and Z buttons for DreamPicoPort
---------
Co-authored-by: Nexus382 <[email protected]>
Use send_to instead of async_send_to for UDP sockets. Set socket to
non-blocking and discard data if socket full. Tentative fix for
corrupted Speed Devils Online UDP packets.
Fix uncaught exception if dns server name can't be resolved.
Use lambda instead of std::bind.
* Harden serial interface
* Fixed build errors
* Minor tweaks
* Automatically attached A->A, B->B, etc
* Interfaces go in decending order
* Do a modulo in case I decide to move interface numbers
* Do specifically mod 4
* Call SDL_JoystickGetDeviceInstanceID which seems to help with a Windows bug
* Made MapleDevices smart pointers so they can freely be swapped out without leaking
* Fixed issues some issues reported by kosekmi
* Added missing bracket
* Fixed another compile issue
* Fixed a missing else
* If device had no serial number, fall down to checking name
* Use new DreamPort firmware dynamics
* Added missing parens
* Fixed screen blanking issue
* Added const
* Reset VMU Screen on game/emulator exit
* Added gameTermination() hook to hardware gamepad
* Send SW port on game termination
* Added checks so port is only sent if data is valid
* Fixed bug: wait for write to complete in sendCmd
* Fixed bug leading to multiple pointers to VMU and Rumble pack
---------
Co-authored-by: Mike Kosek <[email protected]>
Use io_context::post() instead of a timer to read from modem.
Notify user if connection to DCNet fails.
Fix race condition/crash with BBA.
Use lambdas instead of std::bind.
Stop network service when bba is reset. Start it on first frame out.
dcnet: close connection on dhcp release
picoppp: close all sockets and acceptors when stopping.
* Broke apart DreamConn and DreamcastControllerUsb implementations; added serial timeouts; process serial in thread; removed crc from DreamcastControllerUsb sdl definition
* Added missing include statements
* Changed INFO_LOG to NOTICE_LOG on a couple of lines
* Clear the read queue once string is pulled off of it
Use 2 Mb/s for console and 740 Kb/s for devices.
Fixes Silent Scope vmu load issue at boot. Issue #1796
D+Vine has issues detecting A and B presses with one controller
connected but it does work eventually. No issue with more than 1
controller. Issue #1279
Power Drift only boots with one controller connected. Crashes with 2 or
more.
Use double for canonical FIPR and FTRV on all platforms.
Fix interpreter implementation of FTRC.
Fix canonical implementation of cvt_f2i (FTRC).
arm32: use Vfma instead of Vmla for FMAC. Vfma does not a fused
muliply-add, Vmla doesn't.
arm32: Use canonical implementations of FIPR and FTRV.
arm32,arm64: Correct implemetation of cvt_f2i (FTRC)
Fixes desync with NBA 2k1/2k2 online games.
Use a series of stable-partitions to sort the list of available formats
to find the best candidate surface-format/color-space that is a non-sRGB
format being presented in an sRGB color-space. Vulkan mandates that all
surface formats that have SRGB forms must also support a UNORM form.
This is basically just RGBA8/BGRA8 on all platforms still, but in a way
that is still capable of falling back to secondary formats in a stable
way in the case that the primary choice is not available. Mobile
devices especially have a LOT of secondary HDR surface formats and other
weird formats that can be used to present such as RGBA16 or RGBA565.
With stable partitions, if we can't get our best option then there is
always a "next best thing" to fall back on rather than relying on the
driver-order.
Some textures are frequently updated because of their location in vram,
close to a hotspot. This causes the custom texture to never be loaded.
This change will skip the unneeded texture update, allowing the custom
tex to replace it when available.
Issue #1812
uwp: Fix crash in x64 dynarec when rewriting due to wrong unprotect
range.
uwp: load MapViewOfFileEx dynamically to map regions at a given address.
dll load and function lookup utility.
Socket callback is called with PICO_SOCK_EV_DEL just before the socket
is deleted. After returning from the callback, the socket pointer is no
longer valid.
Use unique touch mouse class for iOS and Android.
Enable touch mouse for arcade lightgun games or when maple device A is a
lg. Disable it otherwise.
android: only display controllers that actually send events, including
system mouse and keyboard. Use separate Touch Mouse and System Mouse.
iOS: fix missing button input for touch mouse. Don't bubble up touch
events that hit vgampad buttons or controls.
Eliminate audio clicks when loading a state or starting the next game.
Fix overflow in null audio driver on windows. Detect fast forward and
reset time counter.
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.
Refactor common virtual gamepad code.
Distinct layouts for console and arcade.
Add arcade buttons 5 and 6, insert card button, service mode toggle.
System SP support
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
Ask Windows to create the Screenshots folder if it doesn't exist.
Fall back to Pictures folder if the Screenshots folder can't be
determined.
Issue #1761
User can choose a custom vgamepad image or reset to default.
Unused controls are disabled and hidden based on the game (arcade) or
maple device (console).
Use same display code as android.
Support custom buttons.png.
Allow layout customization as in android.
Save layout in emu.cfg.
Allow transparency setting.
Issue #990
Audio and record initializations are unified by providing helper functions for
opening the audio device and for setting the device parameters. The ioctl calls
are properly checked for errors and log an appropriate error message. The init
fails if the requested parameters are not supported by the device, i.e. 44.1kHz
16bit stereo for playback. This provides consistent behavior with all the other
audio backends.
The added build option USE_LUA (enabled by default) allows to enable/disable Lua
support in the build. This provides more control over the used dependencies, and
is important especially for OpenBSD and FreeBSD i386 builds, where the build
fails with enabled Lua support, see also [1].
[1] https://github.com/vinniefalco/LuaBridge/issues/302
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
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
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.
The added build options USE_ALSA, USE_LIBAO, USE_OSS and USE_PULSEAUDIO allow to
enable/disable specific audio backends in the build. This provides more control
over the used dependencies.
The OSS backend wasn't enabled in the previous build configuration, consequently
the build option USE_OSS is set to OFF by default.
* Do not build breakpad in Xcode project, fix `PhaseScriptExecution failed` error and fix Flycast cannot be launched from debugger
* NSLog prettyprint for Xcode 16
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).
Make sure to end the current render pass with the previous setting.
Fix initial layout of color attachments in OIT.
Fix missing initial transition after Term/Init in !OIT.
Issue #1734
AppleClang doesn't mask the operand in the callee. This must be done in
the dynarec.
See 6115a918b2
Tentative fix for barcode reader not working on macOS/arm
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
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
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
Race condition when pausing/resuming is done from a separate thread (android): the renderer gets a result ready status for the previous emu thread, but waits on the newly created one forever.
The data passed to event handlers (achievements in particular) must be
copied if used by an async task. It might be deleted before the async
task runs.
Fixes MINIDUMP-3ZR MINIDUMP-4XJ MINIDUMP-4TB MINIDUMP-4CA MINIDUMP-38H
Avoid crashing in release mode if a merged font is invalid or FontNo
can't be found. The font is simply ignored and the glyph range isn't
loaded.
Fixes MINIDUMP-4TD
Disable import/export home folder buttons when not using SAF file
picker.
Get rid of unused home migration feature when onboarding.
Android TV screenshots and banner.
Android 9 and earlier can use the legacy file browser. This fixes issues
with broken SAF file picker on Android TV 9.
Catch exception when no file picker is installed on the device (Android
TV 12) and instruct the user to install one.
Issue #1657
Pressing dpad up or down moves the selection 2 lines up or down resp.
Regression due to ca613db70d.
Happens on 1920x1080 screen with 213 dpi.
Relax vertically touching items test.
Disables the naomi2 vertex input attribute when emitting non-naomi2 pipelines.
This addresses some validation messages involving unused vertex inputs and optimizes the bandwidth of the input assembler a little bit for non-naomi2 games.
Rather than using `VK_FORMAT_R8G8B8A8_UINT` for these vertex attributes and then dividing by `255.0` in each of the shaders, the `VK_FORMAT_R8G8B8A8_UNORM` format will automatically remap byte components into the `0.0-1.0` range and removes the need to do the extra divisions or castings within the shader.
The full push-constant region is 24 bytes(6 floats), but some of these push-constant writes only wrote 20 bytes of data(5 floats).
Causing 4 bytes at the end to be left undefined.
Resolved by pushing an extra zero.
The sh4 cpu is stopped/restarted during a soft reset, and dynarec code
reset (arm64, arm, x86). If the emulator is stopped concurrently, the
call may hang. Use a mutex-protected method to restart the cpu only if
the emu is still running.
* vk: Add `VK_EXT_provoking_vertex` optimization
The dreamcast uses the last vertex as the provoking vertex, while vulkan uses the first vertex.
This requires an additional call to `setFirstProvokingVertex` to reorder the vertices for all incoming geometry.
With `VK_EXT_provoking_vertex`, the pipeline can designate that the provoking vertex is to be the last vertex, which removes the need to re-order incoming geometry on the CPU.
* vk: Propagate physical device API version to VMA
Allows VMA to make assumptions such as using the `*KHR` or non-`KHR` versions of certain function names.
* vk: Refactor libretro device initialization for `VK_EXT_provoking_vertex`
* vk: Top out at vulkan API version to VMA to 1.1
Despite the physical device possibly being 1.2 or 1.3, we only want up to 1.1. Otherwise we will be responsible for other API functions being resolved and loaded when passing to VMA.
* vk: Enable `VK_EXT_provoking_vertex` usage for ModVol and Final(OIT) pipeline
* vk: Enable `VK_EXT_provoking_vertex` for ModVol(OIT) pipeline
Pretty much anything handling dreamcast-geometry should use this extension when available
* vk: Additional `VK_EXT_provoking_vertex` pipeline fixes
This addresses the `BestPractices-Arm-vkCreateSampler-lod-clamping` message from ARM:
https://github.com/KhronosGroup/Vulkan-ValidationLayers/blob/65b79bac615ec1c47ab61a02d55a3bba871b56b9/layers/best_practices/bp_descriptor.cpp#L103-L110
Rather than clamping the LOD in the samplers, instead rely on the Image-View's `vk::ImageSubresourceRange` to limit the number of sampled LODs.
Currently, only game-textures actually have MipMaps, so this does not introduce any additional mip-map sampling or filtering anywhere. If any code want's to actually limit the number of LODs sampled, then they would allocate an additional ImageView for the range of MipMaps to be sampled.
Co-authored-by: flyinghead <[email protected]>
* Uses a utility-lambda for repeated extension-adding logic
* Uses an `std::set` for the list of available extensions for quick queries
* `VK_EXT_DEBUG_REPORT` and `VK_EXT_DEBUG_UTILS` aren't device extensions and don't need to be here. They are instance extensions
* Each extension that is tested to be added has a corresponding log message for if it was enabled or if it was unavailable
```
00:00:162 rend\vulkan\vulkan_context.cpp:427 N[RENDERER]: Device extension enabled: VK_KHR_swapchain
00:00:162 rend\vulkan\vulkan_context.cpp:427 N[RENDERER]: Device extension enabled: VK_KHR_get_memory_requirements2
00:00:162 rend\vulkan\vulkan_context.cpp:427 N[RENDERER]: Device extension enabled: VK_KHR_dedicated_allocation
00:00:162 rend\vulkan\vulkan_context.cpp:430 N[RENDERER]: Device extension unavailable: VK_KHR_portability_subset
00:00:162 rend\vulkan\vulkan_context.cpp:430 N[RENDERER]: Device extension unavailable: VK_EXT_debug_marker
```
Rather than electing the first physical device it finds, and falling back on the first-listed GPU: a series of stable-partitions are done so that the "least compromising" GPU is selected based on a series of criteria.
It will now maximally try to find a GPU that(in order of priority):
* Is a discrete GPU
* Supports `fragmentStoresAndAtomics`
* Supports `R5G5B5`/`R5G6B5A1`/`R4G4B4A4`
In the case that a system has two dGPUs and one of them supports optimal-formats, the optimal-format one is selected
In the case that a system has an iGPU and the dGPU and they both support optimal formats, the dGPU is selected.
In the case that a system has an iGPU and the dGPU and the dGPU doesn't support optimal formats, the dGPU is still selected.
When entering an error or contentpath warning popup, there are two `ImguiStyleVar` on the stack.
Within the pop-up frame, an additional `ImguiStyleVar` is added.
When the popup ends, there is technically one more ImguiStyleVar on the internal stack than when we entered the popup, causing an assert to hit:
```
Program: G:\flycast\out\build\x64-Debug\flycast.exe
File: G:\flycast\core\deps\imgui\imgui.cpp
Line: 10104
Expression: SizeOfStyleVarStack >= g.StyleVarStack.Size && "PushStyleVar/PopStyleVar Mismatch!"
```
These nested imgui RAII objects need to be scoped such that the stack is preserved both upon entry and exit of these popups to avoid these asserts.
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
`sh4_core.h` has defines for symbols like `r` and `pr` which conflict with the variable names in `arm64_unwind.h` and cause even deeper errors over in `wingdi.h(4954)` and `wincrypt.h(4741)`.
Swapping the include order avoids this collision.
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.
Don't clip modifier volumes but tesselate triangles intersecting the
near plane. Then project clipped vertices onto it in the vertex shader.
Issue #1651
If a render to texture happens before presenting the current frame,
another texture will be bound to shader slot #0 and will be returned to
the libretro frontend.
Issue #1616 and #1619
Framebuffer swap should only be called when a new frame has been
rendered.
ANR when stopping the emulator in single-threaded mode: race condition
causes stopRequested to not be handled, and Pause event is never sent.
App may be run in restricted mode, where the Application object is a
generic android.app.Application. Disallow backup to avoid this. If
Application object isn't of the expected type, restart the app.
Race condition when starting then stopping the render thread:
mainui_enabled isn't set until after the thread has started. If stopped
during that time, it will hang.
Auto save state in a background thread to avoid ANR.
android: Fix AndroidStorage.getFileInfo for document uri (cheat file)
cheats: limit cheat file size to 1MB to avoid parsing garbage forever. Save file path only if valid.
Fog clamping values may change so the shader shouldn't depend on the
current value when compiling.
Fixes Red Dog Superior Firepower glitch.
Issue #1642
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)
Use correct temp attachment depending on pass count. Keep attachment
index to bind the correct one before final subpass.
Use correct initial layout for OP+PT attachment 1 (was eUndefined) when
creating the RTT render pass.
Fixes Alone in the Dark cutscenes.
Issue #1609
Recreate RTT attachments if switching CopyToVRAM on/off.
Samsung phones/tablets can scale down the emulator view to improve
performance. In this case, getPointerCoords() returns screen, not view
coordinates. Use MotionEvent.getX/Y() instead.
Tentative fix for deadlock when main thread is calling
JNIdc.rendinitNative(null), and render thread is blocked on a lock
trying to hide on-screen keyboard.
Haptic effects for the virtual gamepad must be done on a background
thread. Not sure about gamepad rumble but it shouldn't hurt.
Reuse haptic duration for haptic power (0-100).
Fix crash when power is zero (createOneShot needs power >= 1)
If checkStatus(wait = true) is called, any other thread will be blocked
even when calling with wait = false since the mutex is locked. This
happens on Android when JNIdc.rendinitNative(null) is called by the app
main thread.
Use a shared_future instead and unlock the mutex before waiting.
* Set min macos deployment version to 10.13. This is the lowest version supported by Xcode 14.3.1 and 15+
* Prefer target_compile_options to add compilation flags
* Simplify macos custom commands with TARGET_FILE and TARGET_FILE_DIR
* Do not install discord-rpc and libzip files
onInputDeviceAdded may be called with an invalid device id. Avoid NPE
onGenericMotionEvent: event may have a null device. Avoid NPE
getExternalFilesDir may return null if no external storage available.
Use getFilesDir in this case.
Catch exceptions in HomeMover and continue.
addStorage: catch SecurityException and alert user. Graceful failure.
Always open joysticks haptic interface if available and create FFB
effects if supported.
Use default joystick rumble except for racing wheels (sine effect)
Revert 4e3d1caf3f
Use "folder" instead of "directory" in UI.
When game list is empty, show button to easily add a new content path.
Improve folder paths display in settings with middle ellipsis.
android: import/export home folder content
Use single thread to handle rumble for virtual and physical gamepads.
Use heavy click effect for vgamepad buttons when available (android 10)
Handle rumble inclination param.
storage: add file update date to FileInfo.
Savestates and custom textures can be loaded from content path / ASS.
Cache last savestate update date to improve perf on android.
android: Don't use scoped storage for android < 5. Optimize listContent.
Fix getSubPath
android: instrumented storage test
Migrate home folder to externalFilesDir
(/sdcard/Android/data/com.flycast.emulator/files) if running on android
10+.
Use externalFilesDir for home by default. No more onboarding on first
install.
Use content uri instead of hacking out real path since the latter won't
work on higher target sdk.
Cache last readable savestate path in hostfs::getSavestatePath(). All
content folders are scanned when not found, which is very slow with ASS
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
Force palette update when changing directx color order.
Add 10k extra depth scale to Capcom vs SNK 2000 Pro and cvs.zip to fix
winner character portraits not appearing during ending.
Issue #1546
Revert (again) forcing native depth interp for AMD gpus
Disable native depth interpolation for Mortal Kombat
Issue #1145
Force Japanese bios for vonot
Issue #1542
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.
Race condition when promise is deleted before the future is created
(login)
Require username and password before login.
Disallow pause in hardcore mode when needed.
imgui: fix some failing assertions
Issue #761
Fixes MINIDUMP-35Y, MINIDUMP-34A, MINIDUMP-35K, MINIDUMP-34Y
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
Fix boxart list navigation with DPad (regression).
Get rid of several bogus PopStyleVar/PopID.
Better navigation of pause menu buttons.
imgui: tweak NavScoreItem to help pause menu nav.
Allow achievement list navigation with DPad.
Open cheats window fullscreen. Open Add Cheat window as a modal popup.
Add game_scanner.cpp
Fix threading issue when hashing disk for RA. Protect cacheMap with
mutex.
Achievement current challenges displayed as small icons.
Embed FontAwesome symbols.
New pause menu.
Issue #761
Limit Filter fields width to what's available. Issue #1488
Avoid bouncing loop when scrollbar appearance and responsive boxart size
work against each other. Issue #1489
Make macOS keyboard class with haptic code
Call SDL_JoystickSetPlayerIndex using maple port
Add Network event for LUA
Set proper controller unique id on iOS
rumblePower wasn't copied over new mappings.
Some AMD GPUs have issues with this option enabled so let the user
decide.
partial revert of 9f9b29b833 and
cab19ad54b.
Issue #1445
Add BSD CI badge to README
Append device id to friendly name to distinguish between generic
HID-compliant devices.
Issue #664
Issue #835
Better UI for device tables using new imgui table API.
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.
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)
Use end FAD +1 of track 2 as start of lead-out for single density area.
gdi: set track end FAD based on track size, not start of next track
chd: ignore pad frames when calculating end FAD
cdi: end FAD was one off
Issue #1386
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.
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)
Use end FAD +1 of track 2 as start of lead-out for single density area.
gdi: set track end FAD based on track size, not start of next track
chd: ignore pad frames when calculating end FAD
cdi: end FAD was one off
Issue #1386
using strtol here instead of strtoul when cheat code values are expected to be unsigned and are above 7fffffff breaks on platforms like Windows where long is 32-bit even on 64-bit platforms, capping out at 2147483647 and causing some cheat codes to break.
Fix create bitmap DC2 sequence: 4 bytes then data.
Record msb mode at time of image definition as it might change before
the image is printed.
ntvmys uses 64-pixel wide custom characters.
Custom chars must use current bitmap msb setting.
Implement rule line dot fill and pattern fill.
Fixes most ntvmys print out issues.
Issue #1378
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
GET_DRV_STAT returns BUSY when disk is being recognized.
GETSCD returns asc and ascq in result 1 on error, does not return unit
attention if drive is busy.
Fixes disk swapping for Shenmue II, Dancing Blade II and Kaen Seibo.
Fixes wrong drive visual in Golf Shiyouyo Course Data Syuu
Issue #1046
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
Status is Busy when disk swapping is in progress so libGDR_GetDiscType
always returns NoDisk/Open. Rely on the scheduler instead so that the
correct type is returned when disk swapping is finished.
Issue #1046
Issue #189
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.
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.
Use flattened nav on file select, add cheat and controller mapping
windows and list boxes.
Don't show the SDL on-screen keyboard twice.
Use ImGuiChildFlags_Border instead of the legacy border parameter
(BeginChild)
Use latest devkitpro image.
Call diagAbortWithResult on fatal errors instead of freezing/infinite
loop.
Add Exit button on main content screen.
Touchscreen support.
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
dx11: terminate video routing in DX11Renderer::Term. Don't use
DX11Context.
dx11: avoid using local static vars
gl: don't send rendered frame when full FB is on
gl: send rendered framebuffer
gl: terminate video routing in termGLCommon. Don't use GLGraphicsContext
gl: avoid crash on quick exit during test automation
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
* 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
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.
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
Saturation reduces or increases the range of analog axes.
Issue #675
Axes values are re-scaled with dead zone to allow small values.
New Gamepad Settings dialog box to set up dead zone, saturation and
rumble/haptic power.
Use raii-like mechanism to delete resources when not in use.
Fix several issues reported by validation layers (vtennis rtt, main
buffer size resizing, ...)
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
The dx9 half-pixel translation fix must use the rtt texture pixel size.
Issue #1299
ImGui enables separate alpha and color blending funcs so it needs to be
disabled in the renderer.
Issue #1301
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
The calculated size for vq textures was half the correct value, which
affects the texture hash. Calculate the old hash and use it as fallback
for backward-compatibility.
Issue #1291
Make the texture data start address really point to max mipmap data, no
more codebook skipping.
Register file extensions for openFile, and supports the following actions
Drag ROM to Application icon to launch the app
Drag ROM to the running app's dock icon
Drag ROM to the running app's window (applicable to all SDL platform by SDL_DROPFILE)
Update setupWorkingDirectory
macOS default cwd is a nonsense "/" for non-terminal application
Rename SDLMain to SDLApplicationDelegate to avoid confusion with the function SDL_main()
some code cleanup
UI: dead zone changes from 0 to 100%. Add % for Rumble too.
Support Android and iOS gamepads.
Assume legacy gamepads have an analog stick (evdev, xinput)
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
Disable blending when rendering a-buffers. Fixes ECW Anarchy Rulz black
title screen and Demolition Racer glitchy end of race screen.
Use palette in the depth pass for punch-through polygons using palette
texture. Fixes shadow issue in Alone in the Dark.
Copy ouput fbo to geom_fbo before drawing. Fixes missing transparent
polygons in subsequent partial renders. Fixes Test Drive Le Mans missing
labels in loading screen.
Issue #1262
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
dx9: resize depth surface to max width and height when RTT
dx11 oit: resize all depth and temp render targets when RTT but keep
current framebuffer.
Fixes Flag to Flag not updating the screen when RTT'ing rear view
mirrors.
Issue #1257
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
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
Interpolating between LoDs produces unexpected alpha values.
dx,vk: add negative LoD bias
Fixes "Press Start" text in Trizeal title screen
dx11: get rid of bogus nearest wrap hack
Can't reproduce original issue with daytona
Fixes Virtua Tennis title screen
Issue #1230
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
Fixes crash with doa2a and doa2m and some atomiswave conversions.
Regression due to b47f4f56ef
Fixes MINIDUMP-1TY, MINIDUMP-1TD, MINIDUMP-16Q, MINIDUMP-1AC
For some reason the directx compiler doesn't convert float literal in a
deterministic way (!). A difference of one ulp can be seen between
different compilation of the same code.
This causes an issue with the rounding of the alpha value for PT polys.
Issue #1207
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
Fix issues when games access texture data directly in vram.
Jet Set Radio custom graffiti copy to vmu. Issue #232
Cardcaptor Sakura best shots. Issue #1089
Grandia II battle start effect.
Force Copy to VRAM for Cardcaptor Sakura, Grandia II, Canvas, Sakura
Taisen 3 and more
dx11: black screen when full framebuffer emulation is enabled if scaling
is on (480 -> 240p)
Fixes Mr.Driller. Issue #1067
dx9: wrong stretching when rendering the dc framebuffer if aspect ratio
different from 4:3
Alpha test for PT polys is done after mixing texture and vertex colors
and clamping. Revert db0534d5dd. See
86235bb4a3.
Fixes visible triangle arrows after selecting a character in Langrisser
Millenium.
Issue #1201
vk oit: OP polygons don't support blending
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.
x64 vfmadd is a better implementation of the sh4 FMAC op, so use it if
available. Fall back to mul+add if GGPO is enabled to avoid desyncs
between different cpu models.
Issue #1201
The alpha channel needs to be extended for PT polygons to work. Fixes
Langrisser Millenium black title screen and missing textures on
character selection screen.
Issue #1201
Fix background poly vertices coordinates to form a valid triangle strip
Fixes lovebery bogus background poly on character selection screen.
Issue #1200
gl, vk, dx11, dx9: implement ordered dithering in GLSL/HLSL
refactor framebuffer and texture writes to vram
don't expand color data when reading planar textures
When resuming a game, keyboard is ignored until the next frame is
rendered. This is due to ImGUI not updating its WantCaptureKeyboard flag
until the next frame, which is an issue if the game isn't actively
rendering frames (Zombie Revenge pause screen, Giant Killers)
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
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
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.
When frame dupe is enabled and switching to fast forward, the current
semaphore index might end up pointing past the end of the semaphore
array, causing a crash.
Issue #1138
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)
Added support for new controllers in the Libretro interface:
- Maracas (RETRO_DEVICE_MARACAS)
- Fishing Controller (RETRO_DEVICE_FISHING)
- Pop'n Music (RETRO_DEVICE_POPNMUSIC)
- Race Controller (RETRO_DEVICE_RACING)
- Densha de Go! (RETRO_DEVICE_DENSHA)
Also did a bit of refactoring, mostly for readability, but also moving repeated code into functions.
The Toy Racer server ignores the source udp port so it must match the
dreamcast one. Will not work if the port is in use or well-known, or if
NAT gets in the way.
Issue #1112
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
Racing controller, fishing controller and Densha de Go controller
Co-authored-by: Ricardo <[email protected]>
Co-authored-by: Flyinghead <[email protected]>
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, ...)
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
On Mac when running a debug build of flycast and retroarch in the
debugger, it gets confused about which glsl to pick. The easiest way
to fix this is to build the flycast core in a way where it's only
exporting symbols that are going to be called by retroarch directly.
Handle case where mov64 must swap its operands depending on register
allocation.
Fix canonical call for FSCA when return operands are register-allocated.
Issue #1020
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).
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.
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
Missing call to KeepAliveID was preventing drag scrolling in empty
areas. Also check for HoveredIdDisabled to allow scrolling by dragging
disabled items and enable HoveredIdAllowOverlap.
imgui gl renderer: use ImDrawCmd::IdxOffset instead of counting
manually. Use correct alpha blending function.
Use imgui events for all input. Simplify keyboard input by getting rid
of modifiers.
Enable flat navigation in content window.
Add format string to OptionSlider.
Shift the framebuffer according to VO_STARTX and VO_STARTY.
Issue #594
GlVertexArray class to handle vertex arrays (or lack thereof)
lr: Fix PowerVR2 filter including in full fb emu mode. Use quad to draw
vmus and lightgun xhairs.
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.
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
When using the secondary accumulator as source or destination, pixel
must not be discarded even if blending results in a nop. Doing so
cancels the transfer to/from the accumulator.
Issue #979
dx11 oit: use FAILED to detect pixel shader creation error. Log error
codes when Buffers::init fails.
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.
Texture weren't updated after loading a state. Regression introduced by
942224c685.
Change Windows CE depth scale from 0.1 to 0.01 to fix black screen FMV
on AMD and Intel GPUs. Issue #973
New pico_stack_deinit() function to fully deinit picotcp. Need to call
pico_stack_init when restarting.
Get rid of dns client
Tentative fix for MINIDUMP-G6, MINIDUMP-J0, MINIDUMP-HY, MINIDUMP-G5,
MINIDUMP-J0, MINIDUMP-HY, MINIDUMP-FP, MINIDUMP-F7, MINIDUMP-9H,
MINIDUMP-CB, MINIDUMP-CE; MINIDUMP-B3, MINIDUMP-1Y, MINIDUMP-A7,
MINIDUMP-9M
Ignore StrideSel if 0 during texture update and use width instead.
Return false from BaseTextureCacheData::Update() if texture is invalid.
Make sure valid textures have non-null height and size.
gl,vk,dx9,dx11: ignore invalid textures
Fixes MINIDUMP-GP
naomi network: Initialize socket to -1. Only close if valid.
Multiboard or sgdrvsim slaves don't broadcast digital outputs
Don't save slave windows position
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.
arm, arm64, x86: only account for current block cycles if block is
executed. Test cycle_counter before updating it.
arm, arm64: use function for mmu block check (vaddr and FPU ops) to
reduce host code size per block.
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.
on other platforms, render() won't be called => audio not terminated,
rom files not saved, pause event missed
unprotect memory and reset memwatch before loading a state
* vendor newest libelf
source:
https://github.com/seL4/util_libs/tree/2d5b59c99a93507266c10efe50760f25b7d73728/libelf
* use exec_elf.h from openbsd to define structs
* libelf: build fixes
- do not link against muslc.
- windows and apple use bundled exec_elf.h.
- casts added like the old elf32.h, elf64.h and elf.c so pointer
arithmetic works. otherwise some compilers complain about void*.
- remove unused bits of exec_elf.h and added typedefs.
* adapt CMakeLists.txt to use libelf's CMakeLists.txt
* adapt reios_loadElf() to new libelf API
* OpenBSD: BSS is immutable so mark it as mutable so that mprotect RWX works
see: mimmutable(1)
https://github.com/google/syzkaller/commit/bc009f82ea71c399f19eef28f115ff5cda7be4ba
* 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:
https://github.com/RPCS3/rpcs3/commit/1a13d3ae4e28fc46baef52086c64189f84cf2b9f
* 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
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
* 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
The naomi2 vertex shader doesn't set 2-volume attributes (vtx_base1,
vtx_offs1 and vtx_uv1) if they aren't used. But the pixel shader always
references them even though they aren't actually used. This breaks some
gl drivers: "The shader uses varying vtx_uv1, but previous shader does
not write to it."
Fixes MINIDUMP-93
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
Allow non per-game options to be overridden with command line args.
Fixes MINIDUMP-7G
Save state slot, box art settings, UploadCrashLogs, UseRawInput and lua
filename shouldn't be settable per-game.
Current framebuffer must be saved in gl.ofbo.origFbo when entering
RenderLastFrame and restored on exit.
Tentative fix for MINIDUMP-74
glIsProgram(OSD_SHADER) is strangely failing on Adreno 308 so let's get
rid of it (and pray).
Fix for MINIDUMP-7D, MINIDUMP-7C, MINIDUMP-7B, MINIDUMP-79, MINIDUMP-6J
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
wayland doesn't return the current surface dimensions in
getSurfaceCapabilities so we defaulted to 640x480. Instead use the
current display dimension as set by SDL.
Issue #648
Issue #898 (partial fix)
Vulkan validation errors when doing direct framebuffer rendering if fb
slots are skipped, since the corresponding fence isn't waited on.
Instead use an independent index to use them in sequential order.
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
pvr: Heap use after free due to PolyParam vector reallocation
vk: fix wrong buffer size calculation
Renderer::Process now returns void since it can't fail anymore
naomi2: light model at index 0 is "no light"
dx9, gles: throw if naomi 2 not supported
Change UI to disable BBA toggle when game is started.
Refactor UI to use DisabledScope helper.
Make sure the network stack deletes the same device it initialized.
Tentative fix for MINIDUMP-4N
NDK 23 switched to clang's unwinder instead of gcc so __register_frame()
takes a single FDE as argument (as in macOS).
Fix for MINIDUMP-3M and MINIDUMP-3N
sample_count wasn't reset to 0 on init, so it could point past the end
of the audio buffer if buffer size is decreased, leading to a crash.
Fix for MINIDUMP-29
Deadlock if audio buffer size is too small (< 1024 samples)
Config can change after the TA context has been queued (upscaling, full
framebuffer emu, etc.) which can make the calculated framebuffer size
wrong during render, leading to crashes in renderers.
Fix for MINIDUMP-35
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
Device is lost for a long time when the screen is locked. Need to
continue calling present() to recover.
Reset render state cache on in RenderFramebuffer and RenderLastFrame
entry points.
More logging in renderer resizing.
If the android activity is destroyed and the game unloaded, the gui's
game state wasn't updated, leading to a crash if resuming. Same for the
android game state if pausing, destroying then resuming.
tentative fix for MINIDUMP-27, MINIDUMP-25, MINIDUMP-23
Wait until emu is stopped in single-threaded.
Stop vibrator thread when view is detached
Allow the screen saver when a game isn't running.
vkEnumerateInstanceVersion is only available in vk 1.1 so it might be
null after dynamic loading of entry points.
tentative fix for MINIDUMP-1Z, MINIDUMP-20 and MINIDUMP-21
Handle case where device reset fails and continue attempting a reset.
tentative fix for MINIDUMP-12 and MINIDUMP-1Q
RenderFramebuffer wasn't working when first render after init
Check supported texture formats including mipmap and mipmap autogen.
Fall back to 8888 format.
tentative fix for MINIDUMP-17, MINIDUMP-1R and MINIDUMP-1M
RenderFramebuffer wasn't working if first render after init.
VSTR and VLDR require a 32-bit alignment in armv7. SH4 alignment
requirement is identical but ignored (no SH4 address error is raised).
So instead of crashing, just align the memory address.
Fix for MINIDUMP-1J
Gamepad events aren't delivered to the UI thread in Android. This can
lead to race conditions between the UI thread (calling gui_display_ui())
and the event thread (calling gui_open_settings()).
Issue #852
Fix for MINIDUMP-1D, MINIDUMP-1E, MINIDUMP-1K
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.
JIT detection and enabling taken from ppsspp
Re-check JIT and restart AltServer discovery every 10 secs until JIT is
enabled.
Attempt to enable JIT by forking a process to debug the parent process.
(jailbroken devices)
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
Option to reg alloc 64-bit regs in two host regs. Used when FPSCR.SZ ==
1 (64-bit reg and memory transfers.) Enabled for arm, arm64 and x64
(windows only) dynarecs.
Don't fallback to interpreter when FPSCR.PR==1 (double precision) for
FMOV, FLDS and FLTS.
tentative fix for the broken pipe error when uploading to sentry on
android.
init log and sleep for 5 secs before upload
log git version, gpu name and version, renderer type and game id
add dynarec implementations for missing ldc and stc ops with sr and
fpscr
add dynarec implementation for tas.b
canonical implementation for div1
delete unused reg_old_sr_status and reg_sr
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()
* 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
* Open external console for serial output on Windows
(cherry picked from commit e41a1410b9)
* Compile fix for _UNICODE
(cherry picked from commit 4e6927bd27)
Sort triangles during ta_parse. Use the same index as other polys. Store
results in rend_context.
Use primitive restart if available to avoid too many degenerate
triangles.
Update renderers.
Widescreen cheats for initd, initdv2, gunsur2, spawn, cspike, jambo,
soulsurf.
Courtesy of Goddamn Superhero
Disable ws chear for House of the Dead 2 (wrong gun coordinates)
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
Part of PalSelect was used as cache key for palette textures
PrintTexture fix
egl,wgl,xgl: No need for depth/stencil surface
gl: non-functional refactoring
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.
Take jitter into account when calculating current scanline
Scheduler would miss the next int if it's on the next scanline
Support for Hblank interrupt mode 2 (every scanline)
Merging polygons in per-triangle can produces a large number of
degenerate triangles (up to x3), which must then be sorted, resulting in
a performance hit. This is useless since the sorted triangles are merged
after being sorted. (Regression introduced by
20d25059bf)
Issue #818
In per-strip mode, polygons are now sorted before creating the index and
merging. So it doesn't have to be done in the renderer anymore.
Maple bus max xfer rate is 2 Mbps but actual speed is 1 Mbps.
Fixes Slave Zero (PAL) freeze with HLE.
Some improvements on payload size calc. Clean up.
EoR interrupt delay now depends on the TA context size.
Issue #634
Fixes issues with FMV in some WinCE games (Resident Evil 2, Next Tetris,
Nightmare Creatures 2)
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
copy TA_GLOB_TILE_CLIP and SCALER_CTL to rend context when starting
render. Use rend context copy to calculate framebuffer size.
Fixes framebuffer size glitches in vf4 water stages.
lr: pass aspect ratio when resizing.
dx11: Wrong sizing of rotated games.
gl: test automation fixes.
Region tile object list pointers can be identical for op and tr modvols,
in which case tr modvols should be drawn using op modvols geometry.
Used by crazy taxi 1/2, alien front online, daytona usa and probably
many others.
Issue #717
When a per-game setting is the same as the standard one, it is ignored
and not saved to emu.cfg. However the previously saved per-game setting
wasn't deleted, making it impossible to revert.
Issue #653
Use FB_R_CTRL.vclk_div to detect progressive mode.
transform_matrix: Support non-4:3 aspect ratio such as 640x240. Don't
expect 480 height. Issue #690
Add black bars at top and bottom if screen aspect ratio is too low.
Issue #584.
Framebuffer size doesn't depend on screen stretching. Stretching is done
when blitting to screen.
lr: correct subsequent stretching when drawing vmus and xhair
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)
* Breakpad.framework and dump_syms
* Use ExceptionHandler manually instead of using public methods from the framework
* Change macOS buildType to RelWithDebInfo and enable building Breakpad framework
* Enable symbol upload on GitHub runner
* Compile Breakpad directly instead of embedding the Breakpad.framework
* Print minidump location also
* Ignore `EXC_MASK_BAD_ACCESS` again
Fixes error at install: The package requires OS version 10.0.22621.0 or
higher on the Windows.Universal device family. The device is currently
running OS version 10.0.22000.4970.
Correct handling of non square images
Improve search for arcade game names
Retrieve other images if no boxart (titlescreen, screenshot)
Changed some arcade rom names to more friendly ones
Store FT_W_SOF1 and FT_W_CTRL in render context since they can be
modified before render end. New tentative fix for vf4 water reflection
flashing black during netplay.
Refactor texture cache to use constructors. RTT code moved from
renderers.
Partial revert of ddcd3861d3
Fixes the SH4 exception seen with the previous cheat on some platforms.
Don't write memory if value is unchanged to avoid unnecessary protection
faults.
Render to temporary render target at end of pass and swap with regular
RT.
Fixes Tony Hawk 2 missing transparent geometry and character shadow.
Issue #618
Use 17 bits for vertex id but substract first vtx index
Use 13 bits for poly number instead of 12
Panzer Front uses more than 4095 tr polys.
Issue #616
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
vk: Use same descriptor set pool sizes for standalone and core
lr: bind "Insert Card" to L button (Naomi button 6)
lr: reset input descriptors when loading a new game
lr: don't reset maple devices in arcade mode: reloading eeprom cancels game settings
ImGui is now initialized once at startup and shutdown before
terminating. graphics initialization is independent.
Move more imgui stuff into imgui drivers.
switch: set scaling on external screen to 1.4, same as xbox
UI scaling refactoring.
shared libraries containing gnuc unique symbols are never unloaded on
linux, and possibly other platforms. So don't terminate the emulator on
deinit and init it only once.
Issue #566
gl4: buffer not released on term() was causing crashes or black screen when restarted.
actual aica arm clock seems to be 22.5792 MHz, which means 512 cycles
per sample at 44.1 KHz (from 256)
fixes vf4 audio hiccup in character selection screen
The new texture filter option can be set to:
- Default (keeps the game's intended filter mode).
- Force Nearest-Neighbor (crisper appearance).
- Force Linear (smoother appearance).
Additionally, mipmapping can now be enabled on nearest neighbor-filtered
textures (which is used if nearest-neighbor filtering is enabled, including
with anisotropic filtering).
Anisotropic filtering was already implemented in both OpenGL and Vulkan,
but it was not exposed in the GUI.
This can be used to get a smoother image (supersampling) on
1440p and 4K displays. The 9× setting is also suited for native
resolution rendering on 8K displays.
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
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.
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
polys with different palette index shouldn't be merged.
If a pass isn't using any opaque, it can't be found. Fall back to using
the transparent or punch-through list in this case.
dx11: naomi2 support
n2: ambient color was swapping red and blue
gl, dx11: don't write depth in per-strip to avoid missing geometry,
prefer wrong depth order/blending for now
optimize naomi2 per-triangle sorting
elan: Get rid of geometry shader and do geometry clipping manually.
pvr: Aggressively merge transparent polys in per-triangl and OIT mode, duplicating the last vertex to merge opposite cull mode strips.
gl4: reset OIT pointers in final shader. No need for clear pass.
gl4: alternate between 2 buffers for verts.index/tr poly params.
gl4: use gl_VertexID + poly number for poly index.
gl: new GlBuffer class.
emulate elan v10 (fixes modvol in vf4, initd, beachspiker, wldrider)
wrong color order for model and vtx color
model param override xor support
improved light direction precision. Angle attenuation algo change
get rid of alpha light and modifier volume hacks
texture dma xfer from main and elan ram
gl4: use geometry only vtx and geom shaders for depth pass
2-volume support
n2: do not process elan commands during ggpo rollbacks.
n2: Cache model colors to avoid unpacking for each vtx
pvr: merge equivalent polys with different culling by duping a vtx
pvr: fix crash during direct FB render
pvr: use correct color ordering for naomi2. Use identify matrix for null matrix pointers
ggpo: do not signal end of frame on a render to texture
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
Writes current TA_OL_BASE to all tiles OPB block. Read from region array
at render time to identify context.
Fixes vf4 water reflections RTT
get rid of dump_frame/read_frame
Some systems provide the GLES3 implementation in the same GLESv2 library file, most notably Mesa.
Added the alternative library name when GLES3 is requested.
This makes the build work on the Pi4 - I've only tested it with the libretro core and the GLES 3.1 context is succesfully used.
Raspberry Pi 3 can use the legacy Broadcom GLES2 libraries from /opt/vc/lib.
They are the default GLESv2 libraries on Raspberry PI OS 10 (Buster) and older.
dx11: shadow scale factor inverted in per-pixel
vulkan: clear deleted overlay images when terminating
Use color struct for FOG_COL_VERT, FOG_COL_RAM, FOG_CLAMP_MIN,
FOG_CLAMP_MAX and VO_BORDER_COL. Avoid code duplication in renderers.
oit: skip to new frame even if previous frame was never presented
libretro: quad pipeline used for overlay must use subpass 2 in per-pixel
overlay: delay destruction of VMUs images
libretro: WaitIdle on queue instead of wait_sync_index
libretro: Null first frame erroneously set as valid causing a crash with dx11 (single-threaded rendering)
libretro: pass dx11 compiler pointer to shaders
dx11: use feature level to check if per-pixel is supported
dx11: use 32-bit float depth texture to avoid loss of precision (SA2 into logo)
dx11: cache shader blobs to disk if not provided by OS
dx11: swap interval depends on screen refresh rate (1 for 60 Hz, 2 for 120 Hz, ...)
dx9: use clipping planes to avoid interpolation errors in rasterizer (daytona, mermaid lake)
directsound: use comptr
gui: fix navigation issue with OptionArrowButtons due to missing id
dx11: use faster clipping algorithm for modifier volumes
dx11: modifier volumes need cull mode. Fixes Daytona shadows.
win: the fault handler was treating some software exceptions as fatal (msvc)
uwp: remove async hacks and disable MS task wait exception. Fixes error reporting when loading a game.
- Changes the main category sublabels to match RetroArch's style.
- Adds a missing period, as reported in Crowdin.
- Adds an extra minor description to the Language setting.
dx11: clip modvol triangles before sending them to the gpu
dx9,11: wrong source pointer for rtt to vram
dx11: handle source RowPitch when copy rtt to vram
dx11: crash at reinit
dx11: wrong scissor with direct fb rendering
dx11: blend ops are different for the alpha channel
Fix mingw CI build
dx11: Set clip planes at X -1/1 and Y -1/1 to avoid rasterizer errors.
Fixes Daytona Mermaid lake depth issues
dx11: fix texture wrap around at UV 1 with nearest filtering
dx9: inside clipping
all renderers: force full palette update at init
Use UWP version of FindFirstFileEx
Implement basic access() and stat()
Add home dir to list of drives
Allow external storage folders to be added and scanned for games
dx11: support for vmu and lightgun crosshair overlays
dx11: implement inside clipping (fixes 18 wheeler rear view mirror)
dx11: tentative 4K support on xbox
iOS,uwp: save log file in home (iOS)/data(uwp) directory
uwp: don't sign app on pull requests
dx11: Back face stencil ops need to be set
dx11: Rotate CCW instead of CW
dx11: Present with NO_WAIT when fast forwarding
sdl: support for on-screen keyboard. Delay keys up by one frame to allow quick key presses.
ui: better fix to wait for future on UWP
New serialize framework. Refactor serialization into modules.
Maple dma xfer must not be executed immediately. Delay until interrupt
is raised.
Fixes Geist Force freeze at start.
When rendering happens after the render timeout (initial sega copyright
screen and more), the frame is never swapped and never displayed. Causes
a crash in vk since the acquired swapchain image is never
presented/released.
Refactor imgui backend code into imgui drivers for gl, vk, dx9
Generic GraphicsContext interface for gl/vk/dx9 contexts
Simplify graphics api switching code
dx9, gl(sdl): set swap interval based on monitor refresh rate.
Use w=1 to avoid multiply/divide of xy as in dx9
Disable rendering when video output disabled
Use original w value in pixel struct to avoid precision loss (samsptk)
vk oit: missing memory barrier was producing Tr modvol glitches (JSR)
gl oit: Tr modvol needs full vertex shader
ggpo: support for arcade games using keyboard (totd, luptype) and
mouse/rotary encoders (waiwai drive)
Chat and UI now usable when the keyboard is not set to a maple port.
Verify md5 of flash, eeprom, vmus if no savestate used
Use chd header SHA1 as digest
Load .state.net state file at start
Force real BIOS for some games
Fix crash at startup due to race condition with game scanner
Don't allow selection of non-writable folder during onboarding
Add private internal and external Files folders to list of storage
locations to choose from
Assign first external android gamepad to port A instead of B
ui: Fix layout of controller mapping dialog when port=All
scheduler reset and unregister
schedule requests during reset(), not init()
preserve cntx.sh4_sched_next on sh4 reset
Use cntx.cycle_counter in dynarecs and interpreter
Fixes Confidential Mission hang at boot with HLE
Pass LoadProgress object to report load progress and cancel
Better UI
Cancel with exception
Fix issues when stopping/exiting in !threaded
dx9: call gui_term on shutdown
single-threaded mode similar to libretro core
stateful Emulator object
disable memory watcher when !gppo
ggpo: poll input as late as possible in !threaded
Use same layout as gamepad arcade for on-screen gamepads (ABXYRL)
map RT and LT to buttons 5 and 6 in arcade
android: Fix non-working fast-forward button
Use maple port in lastAxisValue state
naomi: use default alienfnt buttons: 1-4
Default mappings for arcade and console
Default mappings for arcade stick/hitbox
Proper handling of inverted axes
ggpo: automatic analog setting for arcade games
ggpo: always save delta ram on save_game_state as frames may be rerun
and resaved
Global network online status (ggpo, naomi, modem, bba)
Disable fast forward, cheats and savestates when online.
Handle mutually exclusive buttons (U/D, L/R) in each controller.
Track digital X/Y axes state to allow for proper handling of U+D and
L+R. Issue #334
SDL: Ignore key repeat events
Block net rollbacks until the current frame has been processed to avoid
glitched textures.
Call WSAStartup at init on windows
Display net stats when in game
Switch build fix
Checkout submodules non-recursively
Add ccache to speed up compilation
Use ninja and specify target to build only dump_syms
Use official aws-actions/configure-aws-credentials action and awscli to upload artifacts to s3 bucket
Retain currently inserted disk during soft reset
Correct DriveSelect value. Ignore slave drive commands and return 0
status.
Properly handle unknown ATA commands.
Fixes DreamShell boot and CDI boot from BIOS
Get rid of swipe gesture (fixes touch not being delivered)
Use UP+DOWN or LEFT+RIGHT to open menu.
Arcade shortcuts (RT + A/B/X)
Disable system gestures
Monitor network and restart AltKit as needed.
Close naomi/aw cart on reset. Reset input mapping/button names
Get rid of ngen_GetFeatures()
throw exception instead of failing verify if not internal error
catch sh4 exceptions in dynarecs and throw fatal error
delegate to previous signal handler, proper abort for win32
arm32: use builtin gcc __clear_cache
dyna/driver.cpp: no need for a code buffer in win32, cleanup
Use RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO or
RETRO_ENVIRONMENT_SET_GEOMETRY to report resolution/aspect ratio
changes.
Handle rotation without restarting.
Fix Content Reset crash
Render resolution not set at startup with vulkan !threaded
vk: Crosshair always displayed (white) even when off
Better handling of multiple render (rend_single_frame returns false)
# Unlink and re-link to prevent errors when github mac runner images install python outside of brew. See https://github.com/actions/setup-python/issues/577
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
**Flycast** is a multi-platform Sega Dreamcast, Naomi and Atomiswave emulator derived from [**reicast**](https://reicast.com/).
**Flycast** is a multi-platform Sega Dreamcast, Naomi, Naomi 2, and Atomiswave emulator derived from [**reicast**](https://github.com/skmp/reicast-emulator).
Information about configuration and supported features can be found on [**TheArcadeStriker's flycast wiki**](https://github.com/TheArcadeStriker/flycast-wiki/wiki).
Join us on our [**Discord server**](https://discord.gg/X8YWP8w) for a chat.
Join us on our [**Discord server**](https://discord.gg/X8YWP8w) for a chat.
Get builds for your system from the [**builds page**](https://flyinghead.github.io/flycast-builds/) or [**GitHub Releases**](https://github.com/flyinghead/flycast/releases).
- **Latest master builds:** regular builds from the `master` branch with recent fixes and updates.
- **Nightly dev builds:** experimental builds with the latest features and changes.
- **Stable tagged releases:** versioned release builds published on GitHub Releases.
Automated test results are available from the builds page as well.
1. [Set up Homebrew](https://brew.sh) or run `brew update` if already installed.
All code contributed to this fork is *not* bound by the Individual Contributor License Agreement of the upstream repository (https://github.com/reicast/reicast-emulator) and shall *not* be considered as a contribution to the upstream repository.
| Nightly dev | `brew install --cask flyinghead/flycast/flycast@dev` |
3. Run Flycast from your Application folder
 See the <a href="https://github.com/flyinghead/homebrew-flycast#readme">Flycast tap</a> for updating, uninstalling, and switching channels.
### iOS
 Due to persistent harassment from an iOS user, support for this platform has been dropped.
### Xbox One/Series 
 Grab the latest build from [**the builds page**](https://flyinghead.github.io/flycast-builds/), or the [**GitHub Actions**](https://github.com/flyinghead/flycast/actions/workflows/uwp.yml). Then install it using the **Xbox Device Portal**.
## Build from source
### macOS
 Right-click the bootstrap script and choose **Open**:
Log("udpproto%d | Haven't exchanged packets in a while (last received:%d last sent:%d). Resending.",_queue,_last_received_input.frame,_last_sent_input.frame);
Loaded 100 of 5098 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.