Skip to content

{bp-19239} apps/NXDoom: Initial port of DOOM to NuttX#19286

Merged
xiaoxiang781216 merged 4 commits into
apache:releases/13.0from
jerpelea:bp-19239
Jul 3, 2026
Merged

{bp-19239} apps/NXDoom: Initial port of DOOM to NuttX#19286
xiaoxiang781216 merged 4 commits into
apache:releases/13.0from
jerpelea:bp-19239

Conversation

@jerpelea

@jerpelea jerpelea commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

his is the twin PR of the source port: apache/nuttx-apps#3573

The nuttx-apps needs to be merged first.

It includes a configuration for playing NXDoom on the NuttX simulator with X11 graphics and keyboard input, as well as documentation about the configuration and NXDoom itself.

This is part of my GSoC proposal, last milestone of making some cool user demos: #18507.

Impact

RELEASE

Testing

CI

Zepp-Hanzj and others added 4 commits July 3, 2026 09:41
The existing first-order LCG (seed = 470001 * seed % 999563) has several
quality problems:
- Output range limited to [1, 999562] (~20 bits) instead of full 32-bit
- Lower bits have very short periods (8-bit period = 1, 16-bit = 105)
- Overall period only ~1M, far too short for many applications
- Causes mbedtls_rsa_gen_key to loop forever when rand() consumption
  aligns with the cycle length (issue apache#16760)

Replace the entire order-based LCG implementation (CONFIG_LIBC_RAND_ORDER
0-3) with Marsaglia's xorshift32:
- Full 32-bit output range
- Period 2^32 - 1 (~4.29 billion)
- Fast: just three XOR/shift operations
- No floating-point math needed
- No CONFIG_LIBC_RAND_ORDER configuration required

Remove the CONFIG_LIBC_RAND_ORDER Kconfig option and clean up all
defconfig references (12 boards) and related comments.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
Includes documentation about the current state of the DOOM port, where
it came from, how to play and what the requirements are. Includes all of
the warnings about experimental/unfinished features.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Includes a defconfig to play NXDoom on the simulator. Keyboard input is
available through X11, as well as graphics rendering. The `/data` folder
is used as the default home for game files.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Include docs about new NXDoom configurations for playing NXDoom.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
@xiaoxiang781216 xiaoxiang781216 merged commit f725c19 into apache:releases/13.0 Jul 3, 2026
16 of 42 checks passed
@jerpelea jerpelea deleted the bp-19239 branch July 4, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants