Difference between revisions of "Project Nested"

From Emulation General Wiki
Jump to navigation Jump to search
(Tags: Mobile edit, Mobile web edit)
(Information from a Sharopolis video about the emulator, featuring an interview with the developer, has been added, and the information is presented more professionally.)
Line 2: Line 2:
 
|logo =  
 
|logo =  
 
|logowidth =  
 
|logowidth =  
|version = v1.2 (emulator)<br>v1.2 (converter)
+
|version = v1.3
 
|active = Yes
 
|active = Yes
 
|platform = [[Super Nintendo emulators|Super Famicom (SNES)]]
 
|platform = [[Super Nintendo emulators|Super Famicom (SNES)]]
 
|target = [[Nintendo Entertainment System emulators|NES]]
 
|target = [[Nintendo Entertainment System emulators|NES]]
|developer = Myself086
+
|developer = Myself086 (Lorraine Corville)
|prog-lang = C#
+
|prog-lang = 65C816 assembly, C#
 
|website = [https://github.com/Myself086/Project-Nested GitHub page]
 
|website = [https://github.com/Myself086/Project-Nested GitHub page]
 
|license = MIT License
 
|license = MIT License
 
|source = [https://github.com/Myself086/Project-Nested Git]
 
|source = [https://github.com/Myself086/Project-Nested Git]
 
}}
 
}}
'''Project Nested''' is an open-source [[Nintendo Entertainment System emulators|Famicom (NES)]] emulator for the [[Super Nintendo emulators|Super Famicom (SNES)]] written in C#.
+
'''Project Nested''' is an open-source [[Nintendo Entertainment System emulators|Famicom (NES)]] emulator for the [[Super Nintendo emulators|Super Famicom (SNES)]] written in 65C816 assembly and C#.
  
 
==Download==
 
==Download==
Line 20: Line 20:
 
|'''[https://github.com/Myself086/Project-Nested/releases Official releases]'''<br/><small>GitHub releases</small>
 
|'''[https://github.com/Myself086/Project-Nested/releases Official releases]'''<br/><small>GitHub releases</small>
 
|}
 
|}
 +
 +
==History==
 +
The project began in 2015 as a NES emulator on PC. The emulator was running at full speed, and development was going "pretty well", but was not considered challenging, so it was decided to move it to the SNES. After three years of casual development and thinking about how to achieve 100% performance (otherwise it would have been considered pointless) until summer 2018, the emulator began official development.
 +
 +
The current model has been improved since, but not by much. The speed was calculated by multiplying the average amount of times each instruction executed each frame and the overhead. However, the maths were 5 percent off on first implementation. Most implementations were made after approximately one month.
  
 
==Overview==
 
==Overview==
Nested was inspired by the SNES originally being designed to be backwards-compatible with the NES and Myself086 wanting to code a JIT (Just-In-Time) compiler. Work on the emulator began in 2015, when math would be done on its potential performance for three years until one day in 2018, when the design could theoretically run games at full speed. Development started in 2018.
+
The emulator was inspired by the SNES originally being designed to be backwards-compatible with the NES and Myself086 wanting to code a JIT (Just-In-Time) compiler.
  
A JIT (Just-In-Time) and AOT (Ahead-of-Time) compiler (available for Windows) is used to convert NES ROMs into SNES ROMs. This is used to allow software titles for the NES to run on SNES hardware.
+
Emulation works by converting NES ROMs into SNES ROMs using a JIT (Just-In-Time) and AOT (Ahead-of-Time) compiler (with various options) for Windows, allowing them to run on SNES hardware.
  
The emulator does not use any enhancement chips, but requires the following to run on a flash cartridge or a reproduction cartridge:
+
Save files are created after the software title runs for a while. These can then be added to the ROM, often improving performance, vastly with some titles, and not much with others.
* Up to 8MB of fast HiROM (additional support for slow HiROM planned)
+
 
* 16KB of SRAM (additional support for anywhere else from 0KB to 256KB of SRAM, depending on the software title and settings, planned)
+
The following are required:
* A battery if the software title requires it
+
* Up to 8MB of fast HiROM (slow HiROM support planned)
 +
* 16KB of SRAM (support for anywhere up to 256KB of SRAM, depending on the software title and settings, planned)
 +
* A battery if required by the software title
  
 
===Compatibility===
 
===Compatibility===
The emulator can emulate the NES at a full 60FPS (frames per second), with support for audio. Software titles that use mappers 0-2 and 4 are playable (however, mappers 1 and 4 have minor glitches, which may reduce compatibility levels with titles that use them), with mappers 3, 5-8, 11, 12, 16, 18, 21-26, 32-34, 36-38, 40, 42 and 66 having unplayable support, and mappers 9 and 10 being unlikely to be supported due to it being declared impossible to accurately emulate CHR bank switching, which both mappers perform. Additionally, there is no support for iNES 2.0.
+
Emulation occurs at up to 60FPS (frames per second) with audio support, but occasional minor slowdown may occur. Software titles that use mappers 0-2 and 4 are playable, with mappers 1 and 4 having minor glitches, which may reduce compatibility levels with titles that use them, mappers 3, 5-8, 11, 12, 16, 18, 21-26, 32-34, 36-38, 40, 42 and 66 unplayable and mappers 9 and 10 unlikely to be supported due to it being declared impossible to accurately emulate CHR bank switching, performed by both mappers. Additionally, iNES 2.0 is not supported.
 +
 
 +
Out of the 456 tested titles, 31 (6.80%) are fully playable, 93 (20.39%) are playable but need a full playthrough to test, 29 (8.73%) are mostly playable, 157 (34.43%) crash in the intro or early in-game, 128 (28.07%) are unplayable and 1 (0.22%) is unlikely to be supported. For example:
 +
* Punch-Out!!! is unlikely to be supported due to using mapper 9/MMC2, as it hard to emulate because memory banks can be changed mid-scanline when it draws characters FE or FD, or sprites, the hardest to implement. This is not as problematic with the background, as the window can be used to draw and switch the characters.
 +
* One fully playable title, Battle City, was mostly playable from v1.1 until v1.3, when it hung after the game over screen with visual glitches.
 +
 
 +
Others run with minor glitches or require certain options, such as NMI at vblank or stack native return, to be disabled. Overall, at least 50% of games are expected to run in the future. The official compatibility list is available [https://docs.google.com/spreadsheets/d/1xKZIyNz1DSI3ZBdMfaTEaa_9b6IEABx-ZPwOb6XqcLQ/edit#gid=253005073 here].
  
Out of the 332 tested titles, 11 (3.31%) are fully playable, 37 (11.14%) are playable but need a full playthrough to test, 29 (8.73%) are mostly playable, 95 (28.61%) crash in the intro or early in-game, and 160 (48.19%) are unplayable. The fully playable titles are Crystalis, Donkey Kong, Donkey Kong Jr., Donkey Kong 3, Mario Bros., Millipede, Popeye no Eigo Asobi, Super Mario Bros., Tennis, The Legend of Zelda and Volleyball (and formerly (as of v1.0.2) Battle City, which is now only mostly playable due to hanging after the game over screen with visual glitches), some of which run with minor glitches or require NMI mode "At vblank" to be turned off. The official compatibility list is available [https://docs.google.com/spreadsheets/d/1xKZIyNz1DSI3ZBdMfaTEaa_9b6IEABx-ZPwOb6XqcLQ/edit#gid=253005073 here].
+
=== Future ===
 +
The following support is being worked on:
 +
* The graphics in Super Mario Bros. 2 display incorrectly and the American version resets after hitting a Shy Guy. The latter issue has been reverse engineered and figured out. Fixing this would also fix many other games that mistakenly reset.
 +
* Elite is being used as a model to "aggressively" optimize the EXE, specifically in AOT compilation, to make emulation run at the same speed, or faster if possible.
  
 
==See also==
 
==See also==

Revision as of 10:27, 11 July 2021

Project Nested
Developer(s) Myself086 (Lorraine Corville)
Latest version v1.3
Active Yes
Platform(s) Super Famicom (SNES)
Emulates NES
Website GitHub page
Programmed in 65C816 assembly, C#
License MIT License
Source code Git

Project Nested is an open-source Famicom (NES) emulator for the Super Famicom (SNES) written in 65C816 assembly and C#.

Download

Super Nintendo Official releases
GitHub releases

History

The project began in 2015 as a NES emulator on PC. The emulator was running at full speed, and development was going "pretty well", but was not considered challenging, so it was decided to move it to the SNES. After three years of casual development and thinking about how to achieve 100% performance (otherwise it would have been considered pointless) until summer 2018, the emulator began official development.

The current model has been improved since, but not by much. The speed was calculated by multiplying the average amount of times each instruction executed each frame and the overhead. However, the maths were 5 percent off on first implementation. Most implementations were made after approximately one month.

Overview

The emulator was inspired by the SNES originally being designed to be backwards-compatible with the NES and Myself086 wanting to code a JIT (Just-In-Time) compiler.

Emulation works by converting NES ROMs into SNES ROMs using a JIT (Just-In-Time) and AOT (Ahead-of-Time) compiler (with various options) for Windows, allowing them to run on SNES hardware.

Save files are created after the software title runs for a while. These can then be added to the ROM, often improving performance, vastly with some titles, and not much with others.

The following are required:

  • Up to 8MB of fast HiROM (slow HiROM support planned)
  • 16KB of SRAM (support for anywhere up to 256KB of SRAM, depending on the software title and settings, planned)
  • A battery if required by the software title

Compatibility

Emulation occurs at up to 60FPS (frames per second) with audio support, but occasional minor slowdown may occur. Software titles that use mappers 0-2 and 4 are playable, with mappers 1 and 4 having minor glitches, which may reduce compatibility levels with titles that use them, mappers 3, 5-8, 11, 12, 16, 18, 21-26, 32-34, 36-38, 40, 42 and 66 unplayable and mappers 9 and 10 unlikely to be supported due to it being declared impossible to accurately emulate CHR bank switching, performed by both mappers. Additionally, iNES 2.0 is not supported.

Out of the 456 tested titles, 31 (6.80%) are fully playable, 93 (20.39%) are playable but need a full playthrough to test, 29 (8.73%) are mostly playable, 157 (34.43%) crash in the intro or early in-game, 128 (28.07%) are unplayable and 1 (0.22%) is unlikely to be supported. For example:

  • Punch-Out!!! is unlikely to be supported due to using mapper 9/MMC2, as it hard to emulate because memory banks can be changed mid-scanline when it draws characters FE or FD, or sprites, the hardest to implement. This is not as problematic with the background, as the window can be used to draw and switch the characters.
  • One fully playable title, Battle City, was mostly playable from v1.1 until v1.3, when it hung after the game over screen with visual glitches.

Others run with minor glitches or require certain options, such as NMI at vblank or stack native return, to be disabled. Overall, at least 50% of games are expected to run in the future. The official compatibility list is available here.

Future

The following support is being worked on:

  • The graphics in Super Mario Bros. 2 display incorrectly and the American version resets after hitting a Shy Guy. The latter issue has been reverse engineered and figured out. Fixing this would also fix many other games that mistakenly reset.
  • Elite is being used as a model to "aggressively" optimize the EXE, specifically in AOT compilation, to make emulation run at the same speed, or faster if possible.

See also