Skip to content

Resolved segmentation fault in SDL2 audio#64

Open
J1mbo wants to merge 73 commits intodjyt:masterfrom
J1mbo:master
Open

Resolved segmentation fault in SDL2 audio#64
J1mbo wants to merge 73 commits intodjyt:masterfrom
J1mbo:master

Conversation

@J1mbo
Copy link

@J1mbo J1mbo commented Aug 19, 2020

Resolved segmentation fault in SDL2 audio due to potential pointer corruption when tick() runs concurrently with fillaudio() by adding a spinlock. There is likely a OS native threading method to doing this, however the lock in the routine works in my testing OK with game runtime of over 24 hours measured.

@djyt
Copy link
Owner

djyt commented Mar 19, 2021

If you have time, would you mind trying a straight compile of the latest code in master. And let me know if Linux still has a segmentation fault?

J1mbo and others added 22 commits December 24, 2024 08:28
Developed and compiled with Ubuntu 24.04.

Enhancements over djyt build:

1. Blargg CRT filtering, CRT overlays, colour controls
2. Colour palatte accuracy to hardware
3. Sound in separate thread and support 31,250Hz sample rate
4. Better "Joystick" support for buttons (included config.xml includes config for Thrustmaster 348 Xbox wheel)
5. Engine stops on crash
6. Hang related to timer fix on high-scores screen fixed
…hics format to 16-bit so improving frame-rate on single-core Pi boards
J1mbo and others added 30 commits October 13, 2025 07:53
… any corner. Resolves missing skid on one or other level exit corners.
…that provides consistent slip for all parts of the game. Original code is used when fix_bugs is not enabled
…Slightly faster fastmask() implementation in full shader.
…RACY compile-time choice restored and this can now be set via CMake e.g. 'cmake .. -DPIXEL_ACCURACY=0' to disable S16 glowy edges.
…2. Improved speed of overlay generation. CRT bezel effect now adjusts with warpX/warpY. Updated menu to reflect changes and less video restarts are now needed when configuring the settings.
…use jump table to speed up sprites that don't need x-clip; hwsprites now ~30% faster than MAME implementation on Pi2
x86 SSE2 fallback:
- Detection now uses __SSE4_1__ to select SSE4.1 vs SSE2 at compile time;
  no explicit -msse4.1 flag required
- INSERT_SIMD_REGISTER_VALUE_SSE2 emulates _mm_insert_epi32 via two
  _mm_insert_epi16 calls, making the filter work on any x86-64 CPU
- 32-bit x86 with SSE2 also supported; pre-SSE2 falls back to scalar

RISC-V RVV 1.0:
- WITH_RVV CMake option (OFF by default) applies -march=rv64gcv
- __riscv/__riscv_v detection includes <riscv_vector.h> and sets
  SNES_NTSC_HAVE_RVV; dispatch block maps generic aliases to _RVV variants
- Full set of RVV macros using vl=4 (LMUL=1) throughout: INSERT via
  vid+vmseq+vmerge, ROTATE via vslidedown+vslideup, clamp/convert/store
  mirroring the SSE4/NEON structure
- CHECK_ALL_EQUAL_RVV uses vmseq/vmand/vcpop for the fast-path equality check
Added RISC-V RVV 1.0 SIMD path; SSE2 fallback for x86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants