rockbox/apps/plugins/sdl/progs/quake
William Wilgus cb94b3ae2e keyboard add ability to specify temporary custom layouts
rb core allows you to load custom keyboard layouts

this patch adds the ability to load a keyboard layout in a buffer
the custom layout is temporary and does not overwrite the current layout

use like so:

    unsigned short kbd[64];
    unsigned short *kbd_p = kbd;
    if (!kbd_create_layout("ABCD1234\n", kbd, sizeof(kbd)))
        kbd_p = NULL;

    rb->kbd_input(buf,sizeof(buf), kbd_p);

Change-Id: I7be2bd4a1b4797a147fa70228a9749dc56ac052a
2020-07-22 06:48:28 -04:00
..
adivtab.h
anorm_dots.h
anorms.h
asm_draw.h
asm_i386.h
block8.h
block16.h
bspfile.h quake: pack structs which could potentially be unaligned 2019-07-21 15:13:35 -04:00
cd_linux.c
cd_null.c
cd_sdl.c
cdaudio.h
chase.c
cl_demo.c
cl_input.c SDL: Silence a large number of compile warnings (WIP) 2020-04-11 19:29:47 +02:00
cl_main.c
cl_parse.c sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
cl_tent.c
clean.bat
client.h
cmd.c
cmd.h
common.c quake: fix race condition 2019-07-30 03:44:09 +02:00
common.h quake: fix errorneous endian-correcting reads 2019-07-24 21:02:11 -04:00
conproc.h
console.c
console.h
crc.c
crc.h
cvar.c
cvar.h
d_copy.S
d_edge.c
d_fill.c
d_iface.h SDL: Silence a large number of compile warnings (WIP) 2020-04-11 19:29:47 +02:00
d_ifacea.h
d_init.c
d_local.h quake: enable PQ_OPT5 (a fixed-point DrawSpans8) 2019-08-09 21:27:55 -04:00
d_modech.c
d_part.c
d_polyse.c quake: merge some fixed-point optimizations from PocketQuake 2019-08-09 21:27:42 -04:00
d_scan.c quake: further optimize D_DrawSpans8 2019-08-09 23:05:46 -04:00
d_sky.c
d_sprite.c
d_surf.c
d_vars.c quake: enable PQ_OPT5 (a fixed-point DrawSpans8) 2019-08-09 21:27:55 -04:00
d_zpoint.c
dosasm.S
dosisms.h
draw.c
draw.h
FixedPointMath.h quake: merge some fixed-point optimizations from PocketQuake 2019-08-09 21:27:42 -04:00
gl_vidlinux.c
gl_vidlinuxglx.c
host.c sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
host_cmd.c
in_null.c
input.h
keys.c keyboard add ability to specify temporary custom layouts 2020-07-22 06:48:28 -04:00
keys.h
Makefile.linuxi386
mathlib.c sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
mathlib.h SDL: Silence a large number of compile warnings (WIP) 2020-04-11 19:29:47 +02:00
menu.c sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
menu.h
model.c quake: merge the remaining Pocket Quake PQ_OPT changes 2019-08-09 21:27:55 -04:00
model.h quake: merge some fixed-point optimizations from PocketQuake 2019-08-09 21:27:42 -04:00
modelgen.h
mpdosock.h
net.h SDL: Silence a large number of compile warnings (WIP) 2020-04-11 19:29:47 +02:00
net_bsd.c
net_bw.h
net_dgrm.c sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
net_dgrm.h
net_loop.c
net_loop.h
net_main.c
net_none.c
net_udp.c
net_udp.h
net_vcr.c
net_vcr.h
net_wso.c
nonintel.c
pr_cmds.c
pr_comp.h
pr_edict.c
pr_exec.c
progdefs.h
progdefs.q1
progdefs.q2
progs.h
protocol.h
quakeasm.h sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
quakedef.h quake: enable PQ_OPT5 (a fixed-point DrawSpans8) 2019-08-09 21:27:55 -04:00
quakesound.h
r_aclip.c
r_alias.c
r_bsp.c quake: merge some fixed-point optimizations from PocketQuake 2019-08-09 21:27:42 -04:00
r_draw.c quake: merge the remaining Pocket Quake PQ_OPT changes 2019-08-09 21:27:55 -04:00
r_edge.c quake: add notification upon strange error 2019-07-30 03:44:25 +02:00
r_efrag.c
r_light.c
r_local.h quake: merge the remaining Pocket Quake PQ_OPT changes 2019-08-09 21:27:55 -04:00
r_main.c quake: merge the remaining Pocket Quake PQ_OPT changes 2019-08-09 21:27:55 -04:00
r_misc.c quake: merge the remaining Pocket Quake PQ_OPT changes 2019-08-09 21:27:55 -04:00
r_part.c
r_shared.h
r_sky.c
r_sprite.c
r_surf.c
r_vars.c
r_varsa.S
README.rockbox quake: update readme 2019-08-03 12:30:40 -04:00
render.h quake: merge some fixed-point optimizations from PocketQuake 2019-08-09 21:27:42 -04:00
resource.h
sbar.c
sbar.h
screen.c
screen.h
server.h SDL: Silence a large number of compile warnings (WIP) 2020-04-11 19:29:47 +02:00
snd_dma.c sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
snd_linux.c
snd_mem.c quake: synchronize Mod_LoadModel and S_LoadSound 2019-08-03 05:05:05 +02:00
snd_mix.c
snd_mix_arm.S quake: clean up asm mixer 2019-10-07 14:52:30 -04:00
snd_mix_generic.c
snd_mix_generic_annotated.s
snd_null.c
snd_sdl.c
spritegn.h
sv_main.c
sv_move.c
sv_phys.c
sv_user.c
sys.h
sys_linux.c
sys_null.c
sys_sdl.c quake: fix file loading errors 2019-07-30 03:44:43 +02:00
vgamodes.h
vid.h sdl: Remove platform-specific code 2019-07-29 01:59:40 +03:00
vid_null.c
vid_sdl.c
vid_svgalib.c
vid_vga.c
view.c
view.h
wad.c
wad.h
world.c
world.h
zone.c quake: properly synchronize zone.c 2019-07-30 03:42:36 +02:00
zone.h

Introduction
============

These are my port notes for Quake. This runs, of course, on our SDL
port. See <https://www.rockbox.org/wiki/SdlPluginPort> for more.

Port Lineage
============

This port stems from SDLQuake
(https://www.libsdl.org/projects/quake/), which was built on top of id
Software's source release.

How is <X> done?
================

Custom settings: This is implemented through a modification to
Cmd_Exec_f and Key_Bind_f, in cmd.c and keys.c.

Sound mixing: There is a handwritten assembly sound mixing routine in
snd_mix_arm.S, using the ARMv5 DSP extensions for saturating
addition. Disable that if you run into sound issues.

File caching: There is an automatic caching layer in sys_sdl.c which
loads files over 1 MB into memory. Quake only uses about 8 MB of heap
when running, so there's plenty of space for this on some targets
(e.g. ipods).

Known bugs
==========

SOLVED: Setting the sample rate to 44.1 KHz leads to all sorts of
weird crashes, which stem (probably) from the same underlying memory
corruption issue. Only thing is, it seems to occur only on hardware so
it's a huge pain to debug.

This issue turned out to be a synchronization issue when loading files
from multiple threads. Fixed with some mutex locks. - 8/2/19

There is a weird crash that occurs on simulator only when playing the
first demo. I've inserted a splash statement so we can watch for it on
target.

Optimization targets
====================

D_DrawZSpans, D_DrawSpans8, and Turbulent8 (in d_scan.c) should be
fairly straightforward to write in assembly and are big time
hogs. Make them fast!