Commit graph

209 commits

Author SHA1 Message Date
Ryan C. Gordon 28ea51d4ab
dirksimple_platform.h: Removed an obsolete FIXME. 2024-04-05 10:34:23 -04:00
Ryan C. Gordon 9c370ef73d
actions: setup-sdl has a v1 tag now. 2023-07-31 23:36:06 -04:00
Ryan C. Gordon ba8fc79f5b
ci: no longer need github-token, see if we can do without discriminator. 2023-06-30 23:51:41 -04:00
Ryan C. Gordon d56dd718c9
ci: Don't need libsdl-org/setup-sdl action to be verbose anymore, I think. 2023-06-30 21:25:21 -04:00
Ryan C. Gordon 4c697e45cb
ci: The variable is github-token, with a dash, not underscore. 2023-06-30 21:20:16 -04:00
Ryan C. Gordon cb18380f9e
sdl: Fixes to the Windows file enum code. 2023-06-30 21:19:17 -04:00
Ryan C. Gordon a4c7247326
sdl: Fix _another_ bogus return value. 2023-06-30 21:15:47 -04:00
Ryan C. Gordon d6a61942c0
cmake: Add more MSVC warning suppressions. 2023-06-30 21:15:03 -04:00
Ryan C. Gordon e0534ee8b4
cmake: The cmake_policy isn't necessary with a higher required version. 2023-06-30 21:14:32 -04:00
Ryan C. Gordon 5950597589
ci: Latest libsdl-org/setup-sdl has a full github-token argument. 2023-06-30 21:13:56 -04:00
Ryan C. Gordon e7cdc7c821
ci: Seeing if we need CMP0074, since cmake_minimum_required is set higher. 2023-06-30 21:07:18 -04:00
Ryan C. Gordon 0ce250c728
libretro: Fixed another bogus return value. 2023-06-30 19:01:09 -04:00
Ryan C. Gordon 84967c11fb
cmake: Turn off more Visual Studio compiler warning spam.
Normally I would keep these on, but Ogg, Vorbis, and Theora are rotten
with them. I should probably just turn these on for those libraries...
2023-06-30 18:57:29 -04:00
Ryan C. Gordon f0f6d98c75
cmake: Turn off some overwhelming MSVC warnings. 2023-06-30 18:53:48 -04:00
Ryan C. Gordon a6b4dc36df
dirksimple: Fixed bogus return value. 2023-06-30 18:47:35 -04:00
Ryan C. Gordon f53b280f72
sdl: Attempt to compile on Windows. 2023-06-30 18:39:37 -04:00
Ryan C. Gordon c43c37572d
sdl: Attempt to make this work on Windows. 2023-06-30 18:21:03 -04:00
Ryan C. Gordon 50df3d2e01
ci: Make sure CMake sees the output of libsdl-org/setup-sdl 2023-06-30 17:50:09 -04:00
Ryan C. Gordon 08651f838e
ci: Still working on this. :) 2023-06-30 17:42:56 -04:00
Ryan C. Gordon 5bf0eb985e
ci: Ninja isn't install on Linux by default, don't bother using it. 2023-06-30 17:33:16 -04:00
Ryan C. Gordon 387ef41a89
ci: Still making mistakes. :) 2023-06-30 17:29:11 -04:00
Ryan C. Gordon e30ce26df0
ci: Add GH_TOKEN environment variable to workflow. 2023-06-30 17:25:36 -04:00
Ryan C. Gordon 7042ff2495
ci: Another attempt at libsdl-org/setup-sdl 2023-06-30 17:19:29 -04:00
Ryan C. Gordon 76ce2f3256
ci: Attempt to build with the new libsdl-org/setup-sdl GitHub Action. 2023-06-30 17:07:39 -04:00
Ryan C. Gordon aee535bac5
lair: Don't crash the game if you die in the actual dragon's lair.
Fixes #25.
Fixes #19.
2023-04-21 23:52:09 -04:00
Ryan C. Gordon 9d17b0b9fe libtheora: NEON version of YUV->RGB conversion.
This is about 25-30% faster than the current scalar version, both on an
M1 Mac Mini and a Raspberry Pi 4 on a 32-bit Raspberry Pi OS install.

Since this needs tons of NEON registers, it might run better on a Pi4 in
64-bit mode, if the compiler understands it can have 32 SIMD registers
instead of 16, and never shuffle things between registers and RAM.

Reference Issue #23.
2023-04-14 14:05:20 -04:00
Ryan C. Gordon 1675afce91
libtheora: Make sure all arrays of YUV data are aligned for SIMD access.
This doesn't have any SIMD code at the moment, but just in case.

Reference Issue #23.
2023-04-10 21:48:11 -04:00
Ryan C. Gordon ed6705db21
theoraplay: Calculate two rows per iteration in yuv->rgb conversion.
Since we use the same Cr and Cb values for each of these rows, this
lets us calculate them once and reuse them with both rows' Y values.

The test case went from 2.0 seconds to 1.9.

Reference Issue #23.
2023-04-10 20:10:57 -04:00
Ryan C. Gordon 6116eb368d
theoraplay: Further yuv->rgb optimization.
Turns out dramatically reducing register pressure by precalculating a
bunch of stuff and shoving them into `#define`s makes both of these
approaches just about similar in performance, but the `#else` block is
_still_ slightly faster, but it's a statistical rounding error now, and
maybe just imaginary.

Reference Issue #23.
2023-04-10 20:10:56 -04:00
Ryan C. Gordon 2d35c9b1b4
theoraplay: Just noting an optimization attempt that _didn't_ work.
It's not clear to me why the `#if 0` block would be slower...maybe we ran
out of CPU registers and it ended up shuffling stuff back and forth
from the stack?

Just adding this to revision control so I have a note that I tried this,
later.

Reference Issue #23.
2023-04-10 18:47:13 -04:00
Ryan C. Gordon 8591805c4d
theoraplay: Removed some unnecessary variables in yuv->rgb conversion. 2023-04-10 16:28:21 -04:00
Ryan C. Gordon 5f20ea8fb4
theoraplay: Converted yuv->rgb conversion to fixed point math.
The test case dropped from 2.4 seconds to about 2.0 on this (x86-64)
laptop, and my guess is this is a much more drastic improvement on
things like a Raspberry Pi.

Reference Issue #23.
2023-04-10 16:25:19 -04:00
Ryan C. Gordon 69c9ae2f21
theoraplay: Add support for new pixel formats to test apps. 2023-04-10 15:05:59 -04:00
Ryan C. Gordon 45a5968b11
theoraplay: yuv->rgb conversion optimizations.
This precalculates most stuff, so the tight loop does a lot less math.

A test case on my laptop dropped from 3.2 seconds to around 2.4. Not bad!

Reference Issue #23.
2023-04-10 11:05:27 -04:00
Ryan C. Gordon 2ed2f1ea0a
theoraplay: Reworked mutex code.
This was passing pthread_mutex_t around by value, but this is
often a struct, so we were copying the struct by-value, where we
would lock the _copy_ that is thrown away upon return from
Mutex_Lock(), and the actual mutex will sit there untouched,
which is to say it basically disables locking. You might get
lucky and the struct has some internal pointer where you end up
with a working lock anyhow, but this is not the case on macOS
and probably other places, too.

Surprisingly, this very rarely produced a noticible race
condition, but there have been weird assertions from time to
time, and I expect this will fix those.
2023-04-09 01:49:43 -04:00
Ryan C. Gordon 6e8044c244
theoraplay: Fixed build when THEORAPLAY_NO_FOPEN_FALLBACK isn't defined. 2023-04-09 01:48:01 -04:00
Ryan C. Gordon d641dff3c7
theoraplay: Protect a shared variable behind a lock.
(ctx->videocount, in this case.)
2023-04-09 01:30:56 -04:00
Ryan C. Gordon 969c9f5653
Added a fake laserdisc seek lag.
This blacks out the screen for a bit between seeks and gameplay resuming.

Right now there isn't code to enable this, but eventually I'll hook up
cvars at the engine level and add this.
2023-04-06 22:12:32 -04:00
Ryan C. Gordon 66cc856529 lair: Fixed the endgame to match the arcade version.
(at least as far as I can tell.)
2023-04-06 18:36:54 -04:00
Ryan C. Gordon 3c62f75b96 lair: Sprinkled a few kills_player=true around.
God mode chooses the first choice that leads to a sequence that
isn't marked `kills_player=true`, but the reversed long falling
platform and the fire room both have choices that lead to a
non-interactive sequence that, on timeout, leads to a
player-killing sequence.

Mark those sequences as fatal, too, to fix god mode. In normal
play, the game doesn't look at `kills_player` unless there's no
`nextsequence` available, so it won't end the scene early to
be there.
2023-04-04 21:10:09 -04:00
Ryan C. Gordon 195a4837db cmake: Fixed standalone build on macOS. 2023-04-04 21:09:43 -04:00
Ryan C. Gordon 98cc3cd2d2
lair: Don't buzz for unaccepted input during attract mode. 2023-03-27 00:59:24 -04:00
Ryan C. Gordon b37912e3aa
lair: Hook up game sounds.
Fixes #16.
2023-03-26 00:54:38 -04:00
Ryan C. Gordon 2a9d343e7d
audio: Can now mix .wav files into the laserdisc audio stream.
Fixes #15.
2023-03-26 00:52:51 -04:00
hunterk 2b9f9fcc72 move input descriptors to retro_set_environment
so it doesn't trigger every frame
2023-03-08 09:28:12 -05:00
hunterk 4bb3296d23 add input descriptors
enables remapping in RetroArch
2023-03-08 09:28:12 -05:00
Ryan C. Gordon 42d33aa3b8
Well that was dumb. 2023-03-08 09:00:49 -05:00
Ryan C. Gordon 102edc718a
sdl: Don't fail to build on ancient SDL2 installs.
This should fix the build on GitHub Actions.
2023-03-08 08:58:44 -05:00
Ryan C. Gordon 10732fa25c
libretro: Bumped version to 0.3. 2023-03-06 16:03:16 -05:00
Ryan C. Gordon b0301108cc
Moved some files around, to declutter things. 2023-03-06 16:03:00 -05:00