rockbox/apps/plugins/sdl/progs/quake
Solomon Peachy 9f91f02159 sdl: Fix up build failures with -fno-common
Big pile of duplicate variable definitions in quake and duke3d

Change-Id: If5ef873c1dc1d7b3104536f657258e0a06574d53
2025-08-04 22:40:00 -04:00
..
adivtab.h
anorm_dots.h
anorms.h
asm_draw.h
asm_i386.h
block8.h
block16.h
bspfile.h
cd_linux.c
cd_null.c
cd_rockbox.c
cd_sdl.c
cdaudio.h
chase.c
cl_demo.c
cl_input.c
cl_main.c
cl_parse.c
cl_tent.c
clean.bat
client.h
cmd.c
cmd.h
common.c
common.h
conproc.h
console.c
console.h
crc.c
crc.h
cvar.c
cvar.h
d_copy.S
d_edge.c sdl: Fix up build failures with -fno-common 2025-08-04 22:40:00 -04:00
d_fill.c
d_iface.h
d_ifacea.h
d_init.c
d_local.h sdl: Fix up build failures with -fno-common 2025-08-04 22:40:00 -04:00
d_modech.c
d_part.c
d_polyse.c
d_scan.c
d_sky.c
d_sprite.c
d_surf.c
d_vars.c sdl: Fix up build failures with -fno-common 2025-08-04 22:40:00 -04:00
d_zpoint.c
dosasm.S
dosisms.h
draw.c
draw.h
FixedPointMath.h
gl_vidlinux.c
gl_vidlinuxglx.c
host.c
host_cmd.c
in_null.c
input.h
keys.c
keys.h
Makefile.linuxi386
mathlib.c
mathlib.h
menu.c sdl: Fix up build failures with -fno-common 2025-08-04 22:40:00 -04:00
menu.h
model.c
model.h
modelgen.h
mpdosock.h
net.h
net_bsd.c
net_bw.h
net_dgrm.c
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
quakedef.h
quakesound.h
r_aclip.c
r_alias.c
r_bsp.c
r_draw.c
r_edge.c
r_efrag.c
r_light.c
r_local.h
r_main.c
r_misc.c
r_part.c
r_shared.h
r_sky.c
r_sprite.c
r_surf.c
r_vars.c
r_varsa.S
README.rockbox
render.h
resource.h
sbar.c
sbar.h
screen.c sdl: Fix up build failures with -fno-common 2025-08-04 22:40:00 -04:00
screen.h
server.h
snd_dma.c
snd_linux.c
snd_mem.c
snd_mix.c
snd_mix_arm.S
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
vgamodes.h
vid.h
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
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!