# puNES

> Built from commit 3effc4a043e0 on 2026-11-24. The current build: https://abdess.github.io/retrobios/version.json

Source: https://abdess.github.io/retrobios/emulators/punes/

puNES emulates Nintendo NES and Nintendo Famicom Disk System. It reads 2 files, 1 of them required: without a required file it does not start games. A required file is needed only by the machines that use it. Each file below cites the line of source code that reads it.

The app reads its files from this folder:

**Windows:**

`%LOCALAPPDATA%/puNES/bios/`

Qt's GenericConfigLocation. --portable moves it to the application directory.

Source: [`src/gui/qt.cpp:561-568`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/qt.cpp#L561-L568)

**Linux:**

`$XDG_DATA_HOME/puNES/bios/`

~/.local/share/puNES when XDG_DATA_HOME is unset. --portable moves it to the application directory.

Source: [`src/gui/qt.cpp:561-570`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/qt.cpp#L561-L570)

**About this profile**

| Detail | Value |
|---|---|
| Type | standalone |
| Classification | Other |
| Source | [https://github.com/punesemu/puNES](https://github.com/punesemu/puNES) |
| Version | 0.112, stated in [`src/core/version.h`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/version.h) |
| Revision | [punesemu/puNES@b1758ec26a3d](https://github.com/punesemu/puNES/commit/b1758ec26a3d6da10abf50dc184fa837236c5f61) |
| Profiled | 2026-08-08 |
| Profile | [YAML](https://github.com/Abdess/retrobios/blob/main/emulators/punes.yml), [JSON](https://abdess.github.io/retrobios/api/v1/emulators/punes.json) |
| Cores | punes |
| Systems | [Nintendo NES](https://abdess.github.io/retrobios/systems/nintendo-nes/), [Nintendo Famicom Disk System](https://abdess.github.io/retrobios/systems/nintendo-famicom-disk-system/) |
| Data folder (Windows) | `%LOCALAPPDATA%/puNES/` |
| Data folder (Linux) | `$XDG_DATA_HOME/puNES/` |

**Technical notes**

Qt emulator of the NES, the Famicom and the Family Computer Disk System, also playing NSF and NSFE music files. A cartridge boots with nothing supplied: the 2A03, the PPU and every mapper are emulated in software.

Four names are fixed by the code. disksys.rom and gamegenie.rom share one four-step lookup ([`src/core/fds.c:265-309`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/fds.c#L265-L309), [`src/core/cheat.c:74-108`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/cheat.c#L74-L108)): the path recorded in the configuration, the working directory, the directory holding the loaded image, then the bios folder of the data directory. nes20db.xml and dip.cfg are read from the XDG data directories under a puNES subdirectory, then the base of the data directory, then the application directory ([`src/gui/nes20db.cpp:50-79`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/nes20db.cpp#L50-L79), [`src/gui/dipswitch.cpp:61-85`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/dipswitch.cpp#L61-L85)), and the installer writes both into the shared data directory ([`CMakeLists.txt:227-228`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/CMakeLists.txt#L227-L228)).

The data directory is the application directory under --portable, %LOCALAPPDATA%/puNES on Windows and ~/.local/share/puNES elsewhere ([`src/gui/qt.cpp:561-575`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/qt.cpp#L561-L575)), so the bios folder is ~/.local/share/puNES/bios.

No length and no hash is ever compared. fds_load_bios computes a CRC32 of the BIOS it loaded ([`src/core/fds.c:329`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/fds.c#L329)) and the only reader of that value is the log line at [`src/core/fds.c:502-503`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/fds.c#L502-L503).

The iNES 1.0 game database is compiled in as src/core/database.h and carries the Vs. System PPU type and the region, so Vs. System titles need no external file. The uPD7756 ADPCM samples of mappers 018, 086 and 072 come from the Misc ROM area of the NES 2.0 dump itself ([`src/core/mappers/mapper_018.c:51`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/mappers/mapper_018.c#L51), [`src/core/mappers/mapper_086.c:56`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/mappers/mapper_086.c#L56), [`src/core/mappers/mapper_072.c:45`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/mappers/mapper_072.c#L45)). loadWaveFiles, which would read <data>/samples/<name>/NN.wav ([`src/core/mappers/waveFile.cpp:76-84`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/mappers/waveFile.cpp#L76-L84)), is declared and defined but called from nowhere in the tree, so no wave file is ever opened.

Palettes, shaders, cheat imports and soft patches are opened from paths the user picks in a file dialog and no name is fixed by the code, so they carry no file entry here. A palette shorter than 192 bytes is refused and a built-in table is used instead ([`src/core/palette.c:39-64`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/palette.c#L39-L64), [`src/video/gfx.c:323-334`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/video/gfx.c#L323-L334)).

## Files

**2 files**: 1 required, 1 optional. 2 more files come with the app.

In this collection: 2 in repo and 0 missing.

## Required

### `disksys.rom` required for Nintendo Famicom Disk System in repo

Family Computer Disk System BIOS

- Path: `bios/disksys.rom`, in [the data folder](https://abdess.github.io/retrobios/emulators/punes/#data-folder)
- System: [Nintendo Famicom Disk System](https://abdess.github.io/retrobios/systems/nintendo-famicom-disk-system/)
- 8192 bytes are read into PRG ROM and mapped at 0xE000. When none of the four locations holds the file, fds_load_bios logs FDS;bios not found and returns EXIT_ERROR, which the caller propagates, so the disk image does not load. A short read only logs FDS;error on reading bios.

- Size: 8.0 KB
- Collection copy: [`bios/Arcade/FBNeo/fdsbios.nes`](https://abdess.github.io/retrobios/systems/arcade/#sha1-57fe1bdee955)
- Platforms: `disksys.rom`: [Batocera](https://abdess.github.io/retrobios/platforms/batocera/#nintendo-fds), [EmuDeck](https://abdess.github.io/retrobios/platforms/emudeck/#nintendo-nes), [KNULLI](https://abdess.github.io/retrobios/platforms/knulli/#nintendo-fds), [Lakka](https://abdess.github.io/retrobios/platforms/lakka/#nintendo-fds), [RetroArch](https://abdess.github.io/retrobios/platforms/retroarch/#nintendo-fds), [RetroBat](https://abdess.github.io/retrobios/platforms/retrobat/#nintendo-fds), [RetroPie](https://abdess.github.io/retrobios/platforms/retropie/#nintendo-fds). `bios/disksys.rom`: [AmberELEC](https://abdess.github.io/retrobios/platforms/amberelec/#nintendo-fds), [EmuELEC](https://abdess.github.io/retrobios/platforms/emuelec/#nintendo-fds), [RetroDECK](https://abdess.github.io/retrobios/platforms/retrodeck/#nintendo-nes). `fds/disksys.rom`: [Recalbox](https://abdess.github.io/retrobios/platforms/recalbox/#nintendo-fds), [RomM](https://abdess.github.io/retrobios/platforms/romm/#nintendo-fds). `FDS_disksys-nintendo.rom`: [BizHawk](https://abdess.github.io/retrobios/platforms/bizhawk/#nintendo-nes). `NES/boot0.rom`: [MiSTer FPGA](https://abdess.github.io/retrobios/platforms/misterfpga/#nintendo-nes)

**Source**

- Source: [`src/core/fds.c:34`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/fds.c#L34), [`src/core/fds.c:259-332`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/fds.c#L259-L332) (fds_load_bios), [`src/core/fds.c:191-193`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/fds.c#L191-L193) (caller), [`src/core/mappers/mapper_FDS.c:81`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/mappers/mapper_FDS.c#L81) (mapping)

## Optional

### `gamegenie.rom` optional in repo

Game Genie ROM, booted in place of the cartridge to reach the code entry screen

- Path: `bios/gamegenie.rom`, in [the data folder](https://abdess.github.io/retrobios/emulators/punes/#data-folder)
- System: [Nintendo NES](https://abdess.github.io/retrobios/systems/nintendo-nes/)
- Loaded only while the cheat mode is set to Game Genie. The whole file is read, its length taken from the file itself. Absent, gamegenie_load_rom returns early and the cartridge boots directly.

- Collection copy: [`bios/Other/punes/gamegenie.rom`](https://abdess.github.io/retrobios/systems/other/#sha1-aaa9833c3de2)

**Source**

- Source: [`src/core/cheat.c:30`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/cheat.c#L30), [`src/core/cheat.c:69-120`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/cheat.c#L69-L120) (gamegenie_check_rom_present), [`src/core/cheat.c:121-179`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/cheat.c#L121-L179) (gamegenie_load_rom), [`src/core/ines.c:97-99`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/ines.c#L97-L99) (caller)

## Comes with the app

### `nes20db.xml` comes with the app

NES 2.0 header database, matched by ROM hash

- System: [Nintendo NES](https://abdess.github.io/retrobios/systems/nintendo-nes/)
- Supplies mapper, submapper, mirroring, region, RAM sizes and Vs. System hardware for dumps whose own header is absent or wrong. A miss leaves info.mapper.nes20db.in_use false and the header carried by the ROM is used. Installed by [`CMakeLists.txt:227`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/CMakeLists.txt#L227) and shipped beside the executable in the Windows zip. The hash is the copy at the profiled revision.

- SHA1: 8ed9fb83d8e4

**Hashes and source**

- SHA1: `8ed9fb83d8e4d73217d347e3b7965cb640cb8395`
- Source: [`src/gui/nes20db.cpp:31`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/nes20db.cpp#L31), [`src/gui/nes20db.cpp:49-81`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/nes20db.cpp#L49-L81) (nes20db_search), [`src/core/ines.c:276-278`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/ines.c#L276-L278), [`src/core/unif.c:316`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/unif.c#L316) (callers), [`CMakeLists.txt:227`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/CMakeLists.txt#L227) (install)

### `dip.cfg` comes with the app

DIP switch database for multicart and Vs. System boards, keyed by CRC32

- System: [Nintendo NES](https://abdess.github.io/retrobios/systems/nintendo-nes/)
- Read on every mapper init. A miss leaves dipswitch.used false, which mappers 001, 043, 045, 176, 215, 412 and 447 and the selection dialog at [`src/gui/qt.cpp:754`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/qt.cpp#L754) all guard on, so the board runs on its reset value. Installed by [`CMakeLists.txt:228`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/CMakeLists.txt#L228) and shipped beside the executable in the Windows zip. The hash is the copy at the profiled revision, the 0.111 zip carries an older one.

- SHA1: 0f25848f7370

**Hashes and source**

- SHA1: `0f25848f73705328ca03b02905e95e3a5d087d8c`
- Source: [`src/gui/dipswitch.cpp:30`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/dipswitch.cpp#L30), [`src/gui/dipswitch.cpp:60-86`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/gui/dipswitch.cpp#L60-L86) (dipswitch_search), [`src/core/mappers.c:44`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/src/core/mappers.c#L44) (caller), [`CMakeLists.txt:228`](https://github.com/punesemu/puNES/blob/b1758ec26a3d6da10abf50dc184fa837236c5f61/CMakeLists.txt#L228) (install)

## Next steps

- [Get the files](https://abdess.github.io/retrobios/which-pack/), for the setup in use
- [Every system](https://abdess.github.io/retrobios/systems/), and the files each one needs
- [When a game does not start](https://abdess.github.io/retrobios/wiki/troubleshooting/)

Data as of 24 November 2026.
