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

@ -72,7 +72,7 @@ void cleanup(void)
}
/* 256KB */
static long main_stack[1024 * 1024 / 4];
static long main_stack[1024 * 1024 / 2];
int (*main_fn)(int argc, char *argv[]);
int prog_idx;
static void main_thread(void)
@ -176,7 +176,7 @@ enum plugin_status plugin_start(const void *param)
#if defined(CPU_ARM) && !defined(SIMULATOR)
/* (don't) set alignment trap. Will generate a data abort
* exception on ARM. */
//set_cr(get_cr() | CR_A);
set_cr(get_cr() | CR_A);
#endif
#if 0
@ -222,8 +222,11 @@ enum plugin_status plugin_start(const void *param)
#undef rb_atexit
rb_atexit(cleanup);
/* make a new thread to use a bigger stack than otherwise accessible */
sdl_thread_id = rb->create_thread(main_thread, main_stack, sizeof(main_stack), 0, "sdl_main" IF_PRIO(, PRIORITY_USER_INTERFACE) IF_COP(, CPU));
/* make a new thread to use a bigger stack and higher priority than otherwise accessible */
sdl_thread_id = rb->create_thread(main_thread, main_stack,
sizeof(main_stack), 0, "sdl_main"
IF_PRIO(, PRIORITY_USER_INTERFACE) // we need other threads still
IF_COP(, CPU));
rb->thread_wait(sdl_thread_id);
rb->sleep(HZ); /* wait a second in case there's an error message on screen */