Skip to content

games/NXDoom: Add an option to disable the screen wipe. - #3870

Closed
wwlapaki310 wants to merge 1 commit into
apache:masterfrom
wwlapaki310:nxdoom-nowipe
Closed

wwlapaki310 wants to merge 1 commit into
apache:masterfrom
wwlapaki310:nxdoom-nowipe

Conversation

@wwlapaki310

@wwlapaki310 wwlapaki310 commented Oct 18, 2026 •

Copy link
Copy Markdown

Summary

Add CONFIG_GAMES_NXDOOM_NOWIPE, an option that cuts straight to the new screen instead of melting the old one away.

DOOM melts the old screen away whenever the game state changes. That takes two more 64000 byte buffers while it runs. On a board with little RAM, such as the Spresense with 1.5 MB, the allocation fails and the game stops:

z_malloc: failed on allocation of 64000 bytes

With the option on, the wipe is skipped before its buffers are allocated. The option is off by default.

This is one of three pull requests that let NXDoom run on the Spresense: the nuttx configuration and documentation (apache/nuttx#20774) and the serial terminal keys (#3869). The nuttx one shows how the three fit together, so it may help to read it first. The two nuttx-apps pull requests are independent of each other and should be merged first.

Impact

  • Users: new option, off by default. Existing configurations are not affected.
  • Build: none. The change is under #ifndef CONFIG_GAMES_NXDOOM_NOWIPE.
  • Hardware: none.
  • Documentation: in the nuttx pull request above.
  • Compatibility: none.
  • Security: none.

Testing

Result: with the option on, the game no longer stops at the screen change and runs for more than two minutes.

Host: Windows 11, build in a Docker container (Ubuntu 24.04), arm-none-eabi-gcc 13.2.1.
Board: Spresense main board with the extension board and an ILI9340 display, spresense:nxdoom from the nuttx pull request, with a one-level IWAD. To try it before that is merged, use the nxdoom-spresense branch of https://github.com/wwlapaki310/nuttx together with the two nuttx-apps pull requests.

Before, the game stopped after about a minute:

z_malloc: failed on allocation of 64000 bytes

nsh>

After, a new game was started and played, and the game ran for more than two minutes without stopping:

hu_init: Setting up heads up display.
st_init: Init status bar.

PR verification Self-Check

  • This PR introduces only one functional change.
  • I have updated all required description fields above.
  • My PR adheres to Contributing Guidelines and Documentation (git commit title and message, coding standard, etc).
  • My PR is still work in progress (not ready for review).
  • My PR is ready for review and can be safely merged into a codebase.

The melt effect that DOOM shows whenever the game state changes
allocates two more 64000 byte buffers while it runs.  On a board with
little RAM, such as the Spresense with 1.5 MB, that allocation fails
and the game stops with:

  z_malloc: failed on allocation of 64000 bytes

Add GAMES_NXDOOM_NOWIPE to cut straight to the new screen instead of
melting the old one away.

The option is disabled by default, so existing configurations are not
affected.

Tested on a Spresense: with the option the game runs past the point
where it stopped before.

Assisted-by: Claude:claude-sonnet-5-5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: satoru akita <wwlap24@gmail.com>
@wwlapaki310

Copy link
Copy Markdown
Author

Closing in favour of #3860, which adds the same CONFIG_GAMES_NXDOOM_NOWIPE option. I checked it on a Spresense and it fixes the z_malloc failure there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant