1
0
Fork 0
forked from len0rd/rockbox
This ports id Software's Quake to run on the SDL plugin runtime. The
source code originated from id under the GPLv2 license. I used
https://github.com/ahefner/sdlquake as the base of my port.

Performance is, unsurprisingly, not on par with what you're probably
used to on PC. I average about 10FPS on ipod6g, but it's still
playable.

Sound works well enough, but in-game music is not supported. I've
written ARM assembly routines for the inner sound loop. Make sure you
turn the "brightness" all the way down, or colors will look funky.

To run, extract Quake's data files to /.rockbox/quake. Have fun!

Change-Id: I4285036e967d7f0722802d43cf2096c808ca5799
This commit is contained in:
Franklin Wei 2018-02-11 15:34:30 -05:00
parent b70fecf21d
commit 5d05b9d3e9
171 changed files with 64268 additions and 20 deletions

View file

@ -204,6 +204,7 @@ int SDLCALL SDL_RunAudio(void *audiop)
/* Convert the audio if necessary */
if ( audio->convert.needed ) {
LOGF("RB AUDIO: converting audio. Will be slow!");
SDL_ConvertAudio(&audio->convert);
stream = audio->GetAudioBuf(audio);
if ( stream == NULL ) {

View file

@ -225,12 +225,29 @@ static void ROCKBOXAUD_CloseAudio(_THIS)
rb->pcm_set_frequency(HW_SAMPR_DEFAULT);
}
static bool freq_ok(unsigned int freq)
{
for(int i = 0; i < SAMPR_NUM_FREQ; i++)
{
if(rb->hw_freq_sampr[i] == freq)
return true;
}
return false;
}
static int ROCKBOXAUD_OpenAudio(_THIS, SDL_AudioSpec *spec)
{
/* change to our format */
spec->format = AUDIO_S16SYS;
spec->channels = 2;
spec->freq = RB_SAMPR;
if(!freq_ok(spec->freq))
{
rb->splashf(HZ, "Warning: Unsupported audio rate. Defaulting to %d Hz", RB_SAMPR);
// switch to default
spec->freq = RB_SAMPR;
}
/* we've changed it */
SDL_CalculateAudioSpec(spec);