8-Bit Nintendo Emulator Written in Javascript + VueJS
I don't understand the question
This codebase attempts to be CPU cycle accurate emulation of the original 8-bit Nintendo gaming console. There are independent VueJS components that emulate various aspects of the system.
All documented opcodes for the Ricoh 2A03 CPU are emulated correctly. Even attempts to emulate some of the documented glitches. there are toggles to allow step by step execution as well as logging of CPU operations. This fully passes the nestest.nes test rom.
Opcodes are grouped together and defined in their own file (such as opcodes/adc.js).
This component simulates a memory bus that provides memory addresses and maps those addresses to the memory i/o methods of connected components. For example, $0000-$07FF will connect to a memory component. This databus also provides memory mirroring through specifying connected devices memory addresses but their actual sizes. Memory mirroring happens internally.
This component also renders a memory inspector which allows you to visually see the memory addresses and their values. It also provides the ability to directly modify values in memory or fill in ranges of memory with values.
This stores values for a static size of memory. Not much really to talk about here. Generic memory i/o methods.
This component provides memory that represents CHR memory. The difference between this and the basic memory component is that it has the ability to preview the contents of this CHR memory with rendering.
Provides memory access to nametable memory but also visually provides rendering of the contents of the nametables for visual debugging purposes.
Provides a UI to load a ROM and then copy it's contents to the required mapper.
Provides Mapper 0 support (think first-gen NES games). Very basic mapper that does no memory switching.
Provides support for utilizing keyboard or gamepad input and mapping it to both inputs, supporting 2 player games. Visually renders debugging of joypad presses and releases.
The devil. Emulators the video of the NES. Utilizes an HTML5 Canvas object for rendering. Supports palette loading and scrolling. Attempts to emulate the PPU cycles accurately accordingly to https://wiki.nesdev.com/w/index.php/PPU_rendering
Work in progress. Attempts to use browser synthesizer support to simulate NES audio.
- Download/clone
- run npm install
- run npm run serve
So far, only NROMs will load into memory correctly (They're the easiest).
- Copy test ROM image to the public/roms directory
- In the ROM Cartidge loader, just type the name of the rom. You don't need to include the .nes extension.
I'm not a pirate. I use test ROMs and community ROMs to play with.
- Audio is still a major work in progress
- Slight video palette glitches on scrolling
- Major discrepency in performance between Chrome and other browsers. I can't believe this. Chrome is way slower. Firefox runs at native near 60fps.