{"id":19340328,"url":"https://github.com/ls9512/unes","last_synced_at":"2025-07-08T07:11:20.241Z","repository":{"id":119306344,"uuid":"352586789","full_name":"ls9512/UNES","owner":"ls9512","description":"🎮 Nintendo Entertainment System emulator written in C# and run in Unity","archived":false,"fork":false,"pushed_at":"2022-03-23T17:53:35.000Z","size":194,"stargazers_count":71,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T06:51:14.019Z","etag":null,"topics":["emulator","fc","game","nes","nintendo","renderer","simulator","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ls9512.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-29T09:28:39.000Z","updated_at":"2025-03-31T14:01:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"3861f364-b4c8-43bf-84d3-2c32e079d72d","html_url":"https://github.com/ls9512/UNES","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ls9512%2FUNES","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ls9512%2FUNES/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ls9512%2FUNES/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ls9512%2FUNES/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ls9512","download_url":"https://codeload.github.com/ls9512/UNES/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250357622,"owners_count":21417315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emulator","fc","game","nes","nintendo","renderer","simulator","unity","unity3d"],"created_at":"2024-11-10T03:26:04.901Z","updated_at":"2025-04-23T02:31:21.623Z","avatar_url":"https://github.com/ls9512.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# UNES\n\n\u003cdiv align=\"center\"\u003e    \n\u003cimg src=\"images/UNES_Preview.png\"/\u003e\n\u003c/div\u003e\n\n\n`UNES` is an emulator plug-in that runs `Nintendo Entertainment System` Nintendo FC Game `*.nes` files in the `Unity` environment. The project is based on [Emulator.NES](https://github.com/Xyene/Emulator.NES) to achieve cross-platform through `Unity`.\n\n\n![license](https://img.shields.io/github/license/ls9512/UNES)\n[![Release Version](https://img.shields.io/badge/release-1.0.0-red.svg)](https://github.com/ls9512/UNES/releases)\n![topLanguage](https://img.shields.io/github/languages/top/ls9512/UNES)\n![size](https://img.shields.io/github/languages/code-size/ls9512/UNES)\n![last](https://img.shields.io/github/last-commit/ls9512/UNES)\n[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)\n\n[[中文文档]](README_CN.md)\n\n\u003c!-- vscode-markdown-toc --\u003e\n* 1. [Start](#Start)\n* 2. [Load](#Load)\n\t* 2.1. [Resources loading](#Resourcesloading)\n\t* 2.2. [FileStream loading](#FileStreamloading)\n* 3. [Configuration](#Configuration)\n\t* 3.1. [Filter Mode](#FilterMode)\n\t* 3.2. [Logic Thread](#LogicThread)\n\t* 3.3. [Input Config](#InputConfig)\n* 4. [input](#input)\n* 5. [API](#API)\n\t* 5.1. [Boot](#Boot)\n\t* 5.2. [Save](#Save)\n\t* 5.3. [Load](#Load-1)\n* 6. [Mapper](#Mapper)\n* 7. [ Problem](#Problem)\n\n\u003c!-- vscode-markdown-toc-config\n\tnumbering=true\n\tautoSave=true\n\t/vscode-markdown-toc-config --\u003e\n\u003c!-- /vscode-markdown-toc --\u003e\n\n##  1. \u003ca name='Start'\u003e\u003c/a\u003eStart\n* 1. Create a new or select a `GameObject` in the scene and add the `UNESBehaviour` component.\n* 2. Create a new `RenderTexture` to render the game screen.\n* 3. Use any way you want to display the `RenderTexture` file in the game.\n* 4. Use the default input method or realize custom input on demand.\n* 5. Implement the loading of `*.nes` files on demand to obtain `byte[]` format data.\n* 6. Call the `UNESBehaviour.Boot(byte[] romData)` interface to start the game.\n\n##  2. \u003ca name='Load'\u003e\u003c/a\u003eLoad\n###  2.1. \u003ca name='Resourcesloading'\u003e\u003c/a\u003eResources loading\nIf you need to use the `Resources.Load()` interface to load the ROM file, you need to pay attention to changing the `.nes` extension to `.bytes`, and then use the following method to load:\n``` csharp\nvar bytes = Resources.Load\u003cTextAsset\u003e(romPath).bytes;\nUNES.BootRom(bytes);\n```\n###  2.2. \u003ca name='FileStreamloading'\u003e\u003c/a\u003eFileStream loading\nIf you use the method of loading the original file byte stream, you can directly call the `UNESBehaviour.Boot(byte[] romData)` interface.\n\n##  3. \u003ca name='Configuration'\u003e\u003c/a\u003eConfiguration\n###  3.1. \u003ca name='FilterMode'\u003e\u003c/a\u003eFilter Mode\nFilter mode of game screen rendering:\n|Mode|Description|\n|-|-|\n|Point|Texture pixels become blocky at close range. |\n|Bilinear|Bilinear bilinear filtering-averages the texture samples. |\n|Trilinear|Trilinear Trilinear filtering-averages texture samples and blends between mipmap levels. |\n\nFor detailed explanation, please refer to [FilterMode](https://docs.unity3d.com/ScriptReference/FilterMode.html)\n\n###  3.2. \u003ca name='LogicThread'\u003e\u003c/a\u003eLogic Thread\nIf the `Logic Thread` option is turned on, the simulation calculations of the `CPU` and `PPU` parts will be executed by other thread, and the Unity main thread is only responsible for reading the status data to refresh the game screen, which can significantly increase the number of frames.\n\n###  3.3. \u003ca name='InputConfig'\u003e\u003c/a\u003eInput Config\nCustomize the physical keyboard keys corresponding to the native keys.\n\n##  4. \u003ca name='input'\u003e\u003c/a\u003einput\nDefault configuration control method:\n|Native buttons|Operation buttons|\n|-|-|\n|Start|Num1|\n|Select|Num2|\n|Up|Up Arrow|\n|Down|Down Arrow|\n|Left|Left Arrow|\n|Right|Right Arrow|\n|A|A|\n|B|S|\n\n##  5. \u003ca name='API'\u003e\u003c/a\u003eAPI\n###  5.1. \u003ca name='Boot'\u003e\u003c/a\u003eBoot\nObtain the byte array format of the original ROM file in any way for the emulator to start:\n``` csharp\npublic void Boot(byte[] romData);\n```\n\n###  5.2. \u003ca name='Save'\u003e\u003c/a\u003eSave\nThe simulator itself only provides the data of the current running state, and does not provide the persistence implementation of the data file. Need to realize the preservation of archived data by oneself.\n``` csharp\npublic byte[] GetSaveData();\n```\n\n###  5.3. \u003ca name='Load-1'\u003e\u003c/a\u003eLoad\nObtain archive file data in any way for the emulator to restore game progress:\n``` csharp\npublic void LoadSaveData(byte[] saveData);\n```\n\n##  6. \u003ca name='Mapper'\u003e\u003c/a\u003eMapper\nThere are many Mapper extension formats in NES, and the implemented part of the project implementation can theoretically support most common games.\n|||\n|-|-|\n|0|[NROM](http://bootgod.dyndns.org:7777/search.php?ines=0)|\n|1|[MMC1](http://bootgod.dyndns.org:7777/search.php?ines=1)|\n|2|[UxROM](http://bootgod.dyndns.org:7777/search.php?ines=2)\n|3|[CNROM](http://bootgod.dyndns.org:7777/search.php?ines=3)|\n|4|[MMC3](http://bootgod.dyndns.org:7777/search.php?ines=4)|\n|7| [AxROM](http://bootgod.dyndns.org:7777/search.php?ines=7)|\n|9|[MMC2](http://bootgod.dyndns.org:7777/search.php?ines=9) (*Mike Tyson's Punch-Out!!*)|\n|10|[MMC4](http://bootgod.dyndns.org:7777/search.php?ines=10)|\n|11|[Color Dreams](http://bootgod.dyndns.org:7777/search.php?ines=11)|\n|66|[GxROM](http://bootgod.dyndns.org:7777/search.php?ines=66)|\n|71|[Camerica](http://bootgod.dyndns.org:7777/search.php?ines=71)|\n|79|[NINA-003-006](http://bootgod.dyndns.org:7777/search.php?ines=79)|\n|94|[*Senjou no Ookami*](http://bootgod.dyndns.org:7777/search.php?ines=94)|\n|140|[Jaleco](http://bootgod.dyndns.org:7777/search.php?ines=140)|\n|155|[MMC1A](http://bootgod.dyndns.org:7777/search.php?ines=155)|\n|180|[*Crazy Climber*](http://bootgod.dyndns.org:7777/search.php?ines=180)|\n|206|[DxROM](http://bootgod.dyndns.org:7777/search.php?ines=206)|\n\n##  7. \u003ca name='Problem'\u003e\u003c/a\u003e Problem\n* Audio `APU` simulation is not implemented.\n* Only realize Unity basic input system and pure keyboard operation mode.\n* Not all Mappers are implemented.\n* The performance of the PPU simulation part is low, and the frame number is unstable on the low-end mobile devices.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fls9512%2Funes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fls9512%2Funes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fls9512%2Funes/lists"}