Playing

scarletnx-nds takes the common options that fit it: -r, --game, --data, --outdir, --output, --frames, --seconds, --shot, --script, -f, -H and -h, each value as --option VALUE or --option=VALUE.

scarletnx-nds Game.nds plays the image in a window with both screens, the upper one above the lower one, scaled to the window at the console's shape. The keyboard is the other consoles': the arrows are the D-pad, X or Space A, Z B, S X, A Y, Q L, E R, Enter Start and Backspace Select. A gamepad's buttons are where the console has them. A finger or the mouse's left button held on the lower screen is the pen, the first one until it lifts (--touch=1 the fingers alone, --touch=0 neither). The twelve keys are on the screen too (On-screen controls): shown on a touch screen while no gamepad is connected, or as --controls= says, their layout edited with F2. F11 or Alt+Return switches fullscreen, and Esc twice within 3 seconds closes the window: the runtime's keys, as a Switch game takes them.

scarletnx-nds is also a menu entry of scarletnx-gui ("Load NDS ROM"), and an image in a games folder shows in Games.

The first run of a game compiles it, which takes a few minutes on a few cores (a game of 3 MiB of code makes about 200000 blocks). Later runs load the module.

--frames N and --seconds N end the run after that much of the console's time, and -H (--headless) opens no window. --shot PATH writes the last frame, both screens, as a PPM image, and --shot-every=N one every N frames beside it. --script MS:KEYS,... presses keys unattended, each at its time in ms from the start of the run, by the console's frames: KEYS in hex are KEYINPUT's bits (1 A, 2 B, 4 Select, 8 Start, 10 Right, 20 Left, 40 Up, 80 Down, 100 R, 200 L), 400 X, 800 Y, and 1000 the pen, at the lower screen's pixel the top 16 bits give (XXYY1000: 60601000 touches x 96, y 96). --press-len=MS is how long each is held (300). --wav=PATH writes the run's sound.

--aot=0 plays without the module: every block is compiled at run time, which starts at once and is slower until the game's code has been seen. --aot-threads=N sets the compile's threads, and --aot-threads-most=N the most its 0 takes. For work on the driver, --trace prints the services' requests and what the board does not know (twice, each interrupt too), and --dump_ram=PATH writes the ITCM and main memory's range, 0x01FF8000 to 0x02FFFFFF, when the run ends. These four, and --aot=0, are settings too, the launcher's Settings > DS, which it passes to a run (--nds-trace=1, Settings): the last given counts.

The game's folder is recompiled/<name>/ of the data folder (--data, else the user's), named after the image's file, or <name>/ of --outdir, or the folder --output names. It holds the module (<name>_code.so), the blocks runs compiled at run time (<name>.hints), the save (<name>.sav), a copy of the runtime named after the game, the DLLs beside it on Windows, which the copy loads, and <name>.ini, whose source= names the image and system=nds the console. The image stays where it is and is read there. The copy plays its game alone, and scarletnx-nds --game=recompiled/<name> plays it the same way. -r compiles the module again without playing, starting from the hints. A <image>.sav beside the image, which another emulator keeps, is read once, when the folder has none.


Made from docs/platforms/nds/README.md at 69237645142c. GPL-3.0-or-later.