Skip to main content

Module headless

Module headless 

Source
Expand description

Headless mode execution for the NES emulator CLI.

This module handles all headless execution logic, including:

  • ROM information display
  • Memory initialization
  • Video export (streaming and buffered modes)
  • Screenshot capture
  • Memory dump output

Constants§

NES_HEIGHT
NES output height in pixels (240). Re-exported from core as u32 for image library APIs which require u32 dimensions rather than usize.
NES_WIDTH
NES output width in pixels (256). Re-exported from core as u32 for image library APIs which require u32 dimensions rather than usize.

Functions§

apply_memory_initialization
Apply memory initialization based on CLI args
create_renderer_from_args
Create a screen renderer based on CLI arguments.
list_renderers
List all available renderers and print them to stdout.
output_results
Output results based on CLI args using the output module abstraction.
print_rom_info
Print ROM information to stdout.
run_headless
Run the emulator in headless mode.
save_screenshot
Save screenshot to file from buffered frames
save_video
Save recorded frames to video file