Commit graph

71 commits

Author SHA1 Message Date
Franklin Wei
a1353a3eff wolf3d: add missing SOURCES.wolf
I'm dumb...

Change-Id: I5e8ebcf3d7e739c1cd50509b15fe585819ba7fb9
2019-07-09 12:30:56 -04:00
Franklin Wei
3f59fc8b77 Wolfenstein 3-D!
This is a port of Wolf4SDL, which is derived from the original id
software source release. The port runs on top of the SDL plugin
runtime and is loaded as an overlay.

Licensing of the game code is not an issue, as discussed below
(essentially, the Debian project treats Wolf4SDL as GPLv2, with an
email from John Carmack backing it up):

  http://forums.rockbox.org/index.php?topic=52872

Included is a copy of MAME's Yamaha OPL sound chip emulator
(fmopl_gpl.c).  This file was not part of the original Wolf4SDL source
(which includes a non-GPL'd version), but was rather rebased from from
a later MAME source which had been relicensed to GPLv2.

Change-Id: I64c2ba035e0be7e2f49252f40640641416613439
2019-07-09 11:20:55 -04:00
Franklin Wei
c2411f785c sdl: silence audio driver debug output
Change-Id: I7aae3419f56f9cf952d9383f2a6cf9e9950e9a6d
2019-07-09 11:20:55 -04:00
Franklin Wei
71922db6cf sdl: a couple minor fixes
Prevents system SDL from interfering with thread driver selection. Also
adds test code for alignment faults.

Change-Id: I8bc181922c4a9e764429897dbbaa1ffaabd01126
2019-07-09 11:20:55 -04:00
Franklin Wei
edd93414a1 sdl: add pointer to wiki for docs
Change-Id: I6e87658351f32d3c40d9ca2b635ae2f654fdd3aa
2019-06-16 14:51:34 -04:00
Franklin Wei
b04f267ec3 sdl: prevent simulator build from using pthreads
The simulator build will pull in the host SDL headers, which we can't
filter out easily. A simple workaround is to simply remove the pthread
include from our SDL.

Change-Id: I09de0f2e85b891aa88958e21426ab450af516e76
2019-06-16 14:28:56 -04:00
Franklin Wei
6039eb05ba sdl: remove non-rockbox drivers
We never use any of these other drivers, so having them around just takes
up space.

Change-Id: Iced812162df1fef3fd55522b7e700acb6c3bcd41
2018-03-12 20:52:01 -04:00
Franklin Wei
ef373c03b9 sdl: clean up audio driver
This prevents a (highly improbable) race condition when exiting, and uses
pcm_set_frequency() instead of mixer_set_frequency(), since that seems like
the Right Thing to Do (TM).

Change-Id: Icb6a4597843215f08b3835490ac63f67c9a04736
2018-01-15 19:47:49 -05:00
Franklin Wei
beaeb28a29 duke3d: bump audio sample rate to 22.1KHz
Recent optimizations to sound mixing should allow this, up from 16KHz.

Change-Id: I0ba5742c934118a3a6505b8dc58578b0cfe8ea77
2018-01-15 19:45:57 -05:00
Franklin Wei
cf07bb328d duke3d: further optimize audio mixing
Rather than holding intermediate results as fixed-point, this converts them
directly to normal integers (in the range of the PCM sample) while mixing,
instead of waiting till the end to perform a separate shifting step. Also,
this precalculates some constants in the reverb code.

Change-Id: Ie04e444d145bc28ce67eef9ae0ead6d328acf28a
2018-01-15 19:45:28 -05:00
Franklin Wei
69ff35ac49 sdl: correct misleading comments
Change-Id: Ieb33d3fec1e0d834c5e294b79f280959497acb6a
2018-01-14 19:32:13 -05:00
Michael Sevakis
769d73d734 Use sleep(0) instead of yield() in SDL_WaitAudio
This allows CPU load to drop below 100%, which is good for anything
that scales frequency and voltage based on CPU load. Also conserves
some energy by letting the core go idle if there aren't any available
buffers.

Change-Id: I9385ac9e030f97010b12eb825875a900463ab0ac
2018-01-14 19:32:13 -05:00
Franklin Wei
ccd612345c sdl: fix freeze on startup on PP targets
Using the coprocessor was a good idea in theory, but didn't actually work.
This moves all SDL threads to the main core, which isn't ideal, but at
least works. Additionally, this also adds some good-practice stuff such as
setting the default sample rate on exit.

Change-Id: If1636b33d439000ec7c4e50f46e8d002708d3121
2018-01-11 19:45:31 -05:00
Franklin Wei
896c828152 duke3d: unregister timer on exit
This was leading to a crash upon audio playback after running the game.

Change-Id: I1e9961da443c21e3eff38bcf9877ffa75a922715
2018-01-05 18:05:10 -05:00
Franklin Wei
9f6ce046cb duke3d: rewrite sound mixing to use fixed-point
Gives significant performance improvement on ipod6g.

Change-Id: I1e8462bec197acb10e770c796240b5001df52440
2017-12-26 23:42:42 -05:00
Franklin Wei
78db1d9502 duke3d: use hardware FPU if available
Change-Id: Idd9fad7bc0604a553c282a0f8c663ad44030ecac
2017-12-26 23:40:16 -05:00
Franklin Wei
8d3e3056f7 fix red once more
Change-Id: I6290cc6cca468c197656236d3dd31c3f72c53842
2017-12-24 17:43:30 -05:00
Franklin Wei
2b49724c3a attempt to fix sysfont.h errors
Change-Id: Icc67dc777d3a2269ececbf4fbe34d78d7bd34087
2017-12-24 13:29:09 -05:00
Franklin Wei
7ea37bb806 fix red
Change-Id: Ib28cfd9037901c7b8bc9b2960ad2c1c9a1e25a69
2017-12-24 12:58:33 -05:00
Franklin Wei
6416d96fbc fix red
Change-Id: I20f1bd6f0208f6108d68fb59206b09dd9da4f1af
2017-12-23 21:28:20 -05:00
Franklin Wei
a855d62025 Port of Duke Nukem 3D
This ports Fabien Sanglard's Chocolate Duke to run on a version of SDL
for Rockbox.

Change-Id: I8f2c4c78af19de10c1633ed7bb7a997b43256dd9
2017-12-23 21:01:26 -05:00